User forums > Using Code::Blocks
Could I use CppUnit in code::blocks?
Mr_LJ:
Hello killerbot,
How do things look?
killerbot:
have made some progress !!! Not completely finished yet.
Mr_LJ:
Hello,
how do you get ahead with the article?
regards
LJ
oBFusCATed:
Tutorial for unittest++:
0. Read the docs first :lol: at http://unittest-cpp.sourceforge.net/UnitTest++.html
1. Create console project
2. Change the code in main.cpp to look like this:
--- Code: ---// test.cpp
#include <UnitTest++.h>
TEST(FailSpectacularly)
{
CHECK(false);
}
int main()
{
return UnitTest::RunAllTests();
}
--- End code ---
3. Add the include paths to the unittest++
4. Add linking options
5. Compile and run it...
6. If errors goto 3/4
7. Add a post build step for the test project to run the resulting executable
8. Write you tests and have fun.
If you know how to setup projects with codeblocks you won't have problems with this.
Best regards
Mr_LJ:
thanks for that instruction :D
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version