I installed CPPUnit and the wizard according to README's and website docs and environment vars and etc... on and on.
The wizard creates a project for me just fine (No compiler, linker errors/warnings).
However, in the included test1() method I purposely put a "false" value in it to see the result like: CPPUNIT_ASSERT( 1 == 0 ); or CPPUNIT_ASSERT( false );
Neither of these are caught by CPP Unit. Also, The XML page it generates says that no tests were run. So somthing is wrong.
Any help is appreciated:)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The project requires that the environment variable CPPUNITDIR is defined so that
%CPPUNITDIR%\Include contains the folder CPPUNIT\Include and
%CPPUNITDIR%\LIB contains the CPPUnit LIB files e.g. cppunit.lib.
Where should I edit this? How should I run my cpp project to call this Wizard? Can you provide any screenshot to follow? You can email me to annieong81@hotmail.com
Thanks in advance.
Regards
Annie
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If no tests appear to be running (having run into this myself in the past but I'm not using VS2005) check to see if you are using 'named' suite registration. If you are, then you must include the name of the suite as a parameter when executing your tests. If this IS the problem you are seeing, then I'd recommend also registering your suite under the default ('All Tests').
The command you would use in your test class would look something like the following:
CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( MyClass_test, "MyClass" ); // named suite registration
CPPUNIT_TEST_SUITE_REGISTRATION( MyClass_test ); //default registration
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I installed CPPUnit and the wizard according to README's and website docs and environment vars and etc... on and on.
The wizard creates a project for me just fine (No compiler, linker errors/warnings).
However, in the included test1() method I purposely put a "false" value in it to see the result like: CPPUNIT_ASSERT( 1 == 0 ); or CPPUNIT_ASSERT( false );
Neither of these are caught by CPP Unit. Also, The XML page it generates says that no tests were run. So somthing is wrong.
Any help is appreciated:)
Hi starman90,
I have little doubts on how to setup the VS2005 Wizard. First of all, are downloading from CPPUnitProjectWizard.7z ?I had read the README and from http://cppunit.sourceforge.net/cppunit-wiki/CppUnitVisualStudio2005Wizard but I am confused especially :-
The project requires that the environment variable CPPUNITDIR is defined so that
%CPPUNITDIR%\Include contains the folder CPPUNIT\Include and
%CPPUNITDIR%\LIB contains the CPPUnit LIB files e.g. cppunit.lib.
Where should I edit this? How should I run my cpp project to call this Wizard? Can you provide any screenshot to follow? You can email me to annieong81@hotmail.com
Thanks in advance.
Regards
Annie
If no tests appear to be running (having run into this myself in the past but I'm not using VS2005) check to see if you are using 'named' suite registration. If you are, then you must include the name of the suite as a parameter when executing your tests. If this IS the problem you are seeing, then I'd recommend also registering your suite under the default ('All Tests').
The command you would use in your test class would look something like the following:
CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( MyClass_test, "MyClass" ); // named suite registration
CPPUNIT_TEST_SUITE_REGISTRATION( MyClass_test ); //default registration