RE: [Cppunit-devel] CompilerOutputter Vs TextOutputter
Brought to you by:
blep
|
From: Manu A. <Ma...@ma...> - 2003-03-05 16:04:55
|
Geez
I meant at one time I comment out only one of the setOutputters,so that
the output is of that particular format.
-Manu
-----Original Message-----
From: Cremin, Patrick
To: Manu Anand
Sent: 3/5/03 9:26 PM
Subject: RE: [Cppunit-devel] CompilerOutputter Vs TextOutputter
The TextOutputter does not give XML output.
Change your code to the below and give it a shot (its untested)
int main()
{
CppUnit::TextUi::TestRunner runner;
runner.addTest( EmployeeTest::suite() );
for( int i=0; i<3; i++ )
{
switch(i)
{
case 0:
// Change the default outputter to a compiler error format outputter
// The test runner owns the new outputter.
runner.setOutputter( CppUnit::CompilerOutputter::defaultOutputter(
&runner.result(),
std::cerr ) );
case 1:
// Change the default outputter to a xml format outputter
// The test runner owns the new outputter.
CppUnit::XmlOutputter *xmlOutputter = new
CppUnit::XmlOutputter(&runner.result(),std::cerr ) ;
runner.setOutputter(xmlOutputter);
case 2:
// Change the default outputter to a xml format outputter
// The test runner owns the new outputter.
CppUnit::TextOutputter *textOutputter = new
CppUnit::TextOutputter(&runner.result(),std::cerr ) ;
runner.setOutputter(textOutputter);
}
// Run the test.
bool wasSuccessful = runner.run( "" );
std::cout<<"Test was "<<wasSuccessful<<std::endl;
}
// Return error code 1 if the one of test failed.
return wasSuccessful ? 0 : 1;
}
-----Original Message-----
From: Manu Anand [mailto:Ma...@ma...]
Sent: Wednesday, March 05, 2003 9:24 AM
To: Cremin, Patrick
Subject: RE: [Cppunit-devel] CompilerOutputter Vs TextOutputter
Hi there
XmlOutputter works fine. Here is the main
int main()
{
CppUnit::TextUi::TestRunner runner;
runner.addTest( EmployeeTest::suite() );
// Change the default outputter to a compiler error format outputter
// The test runner owns the new outputter.
/*
runner.setOutputter( CppUnit::CompilerOutputter::defaultOutputter(
&runner.result(),
std::cerr ) );
*/
// Change the default outputter to a xml format outputter
// The test runner owns the new outputter.
CppUnit::XmlOutputter *xmlOutputter = new
CppUnit::XmlOutputter(&runner.result(),std::cerr ) ;
runner.setOutputter(xmlOutputter);
/*
// Change the default outputter to a xml format outputter
// The test runner owns the new outputter.
CppUnit::TextOutputter *textOutputter = new
CppUnit::TextOutputter(&runner.result(),std::cerr ) ;
runner.setOutputter(textOutputter);
*/
// Run the test.
bool wasSuccessful = runner.run( "" );
std::cout<<"Test was "<<wasSuccessful<<std::endl;
// Return error code 1 if the one of test failed.
return wasSuccessful ? 0 : 1;
}
There are things known and things Unknown.
In between are the doors - Jim Morrison
> ----------
> From: Cremin, Patrick[SMTP:pc...@or...]
> Sent: Wednesday, March 05, 2003 8:52 PM
> To: Manu Anand; cpp...@li...
> Subject: RE: [Cppunit-devel] CompilerOutputter Vs TextOutputter
>
> Could you send your complete main(). Also, I assume the xmloutputter
> does give you XML right?
>
> Patrick
>
>
>
> -----Original Message-----
> From: Manu Anand [mailto:Ma...@ma...]
> Sent: Wednesday, March 05, 2003 9:11 AM
> To: 'cpp...@li...'
> Subject: [Cppunit-devel] CompilerOutputter Vs TextOutputter
>
> Hello again
> Sorry for bothering again but here is a dummy pgm I wrote to find diff
> b/w these 2 outputters. I don't see any.
>
> //Code
>
> // Change the default outputter to a compiler error format outputter
> // The test runner owns the new outputter.
> /*
> runner.setOutputter( CppUnit::CompilerOutputter::defaultOutputter(
>
> &runner.result(),
> std::cerr ) );
> */
>
> // Change the default outputter to a xml format outputter
> // The test runner owns the new outputter.
> CppUnit::XmlOutputter *xmlOutputter = new
> CppUnit::XmlOutputter(&runner.result(),std::cerr ) ;
> runner.setOutputter(xmlOutputter);
>
> /*
> // Change the default outputter to a xml format outputter
> // The test runner owns the new outputter.
> CppUnit::TextOutputter *textOutputter = new
> CppUnit::TextOutputter(&runner.result(),std::cerr ) ;
> runner.setOutputter(textOutputter);
> */
>
> Also I'll like to know how do I get errors in my code?
>
> Thanks
> -Manu
> There are things known and things Unknown.
> In between are the doors - Jim Morrison
>
>
> DISCLAIMER: Information contained and transmitted by this E-MAIL is
> proprietary to Mascot Systems Limited and is intended for use only by
> the
> individual or entity to which it is addressed, and may contain
> information
> that is privileged, confidential or exempt from disclosure under
> applicable
> law. If this is a forwarded message, the content of this E-MAIL may
not
> have
> been sent with the authority of the Company. If you are not the
intended
> recipient, an agent of the intended recipient or a person responsible
> for
> delivering the information to the named recipient, you are notified
that
> any
> use, distribution, transmission, printing, copying or dissemination of
> this
> information in any way or in any manner is strictly prohibited. If you
> have
> received this communication in error, please delete this mail & notify
> us
> immediately at Mai...@ma... Before opening attachments,
> please scan for viruses.
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Etnus, makers of TotalView, The
> debugger
> for complex code. Debugging C/C++ programs can leave you feeling lost
> and
> disoriented. TotalView can help you find your way. Available on major
> UNIX
> and Linux platforms. Try it free. www.etnus.com
> _______________________________________________
> Cppunit-devel mailing list
> Cpp...@li...
> https://lists.sourceforge.net/lists/listinfo/cppunit-devel
>
>
>
DISCLAIMER: Information contained and transmitted by this E-MAIL is
proprietary to Mascot Systems Limited and is intended for use only by
the
individual or entity to which it is addressed, and may contain
information
that is privileged, confidential or exempt from disclosure under
applicable
law. If this is a forwarded message, the content of this E-MAIL may not
have
been sent with the authority of the Company. If you are not the intended
recipient, an agent of the intended recipient or a person responsible
for
delivering the information to the named recipient, you are notified that
any
use, distribution, transmission, printing, copying or dissemination of
this
information in any way or in any manner is strictly prohibited. If you
have
received this communication in error, please delete this mail & notify
us
immediately at Mai...@ma... Before opening attachments,
please scan for viruses.
DISCLAIMER: Information contained and transmitted by this E-MAIL is
proprietary to Mascot Systems Limited and is intended for use only by the
individual or entity to which it is addressed, and may contain information
that is privileged, confidential or exempt from disclosure under applicable
law. If this is a forwarded message, the content of this E-MAIL may not have
been sent with the authority of the Company. If you are not the intended
recipient, an agent of the intended recipient or a person responsible for
delivering the information to the named recipient, you are notified that any
use, distribution, transmission, printing, copying or dissemination of this
information in any way or in any manner is strictly prohibited. If you have
received this communication in error, please delete this mail & notify us
immediately at Mai...@ma... Before opening attachments,
please scan for viruses.
|