How effective is the CXX test framework, given that you are writing unit test cases around the code that you have written. Any bug in the code might as well get translated into a bug in the unit test code as well? Isn't it something like two negatives make a positive?
Also, the time and effort spent on CXX is at least equal to if not m...
I'm a complete newbie when it comes to XCode and I'm looking for something similar to Visual Studio integration for XCode. I'm developing on my Vista pc in VS 2008 and I want to be able to develop the same project on my macbook as well, but I don't know how to configure XCode to do the same things that VS does.
...
I have never used unit testing before, so I'm giving CxxTest a go. I wrote a test to check if a function correctly sorts a std::vector. First I made sure the test failed when the vector wasn't sorted, and then as a sanity check I tested whether std::sort worked (it did, of course). So far, so good.
Then I started writing my own sorting ...
I'm just starting to use CxxTest and would like to test whether a std::vector has been sorted correctly. Here's my test so far:
void testSort() {
std::sort(vec.begin(), vec.end()); // This could be any sorting function
for (unsigned int i = 0; i < vec.size() - 1; ++i) {
TS_ASSERT(vec[i] <= vec[i + 1]);
}
}
Obviously, CxxTes...
./cxxtest/cxxtestgen.py -o tests.cpp --error-printer DrawTestSuite.h
g++ -I./cxxtest/ -c tests.cpp
g++ -o tests tests.o Color.o
tests.o: In function `DrawTestSuite::testLinewidthOne()':
tests.cpp:(.text._ZN13DrawTestSuite16t… undefined reference to `Linewidth::Linewidth(double)'
tests.cpp:(.text._ZN13DrawTestSuite16t… undefined reference...
I have a testing script that checks what version of java the user is using and then executes some commands. But we are trying to convert all of our testing into cxxtests. I would like to know how to convert my version checking script into c++ code. I know I could just use the system() command but I would like that to be a last resort....
I would like to delete a another directory when I run make clean, but I can't figure out how to code it up in the rules.
I have tried
clean-local:
-rm -f del.dir
but that didn't work.
I also tried
CLEANFILES = del.dir
but that also didn't work.
Any suggestions would be appreciated,
Thanks for your time,
Josh
...
I wish to dynamically extend my CxxTest Suite with additional test items, but am finding that all the testing scenerios must be available (hard-coded) at compile time.
My scenario is that I've got a fairly bulky C++ class that has 20+ methods to be tested. This class needs to be tested for 40+ DIFFERENT data sets. These data sets are ...
Hi,
I work with a team that develops MPI-based C++ numerical applications. The group uses cxxtest for constructing individual unit tests or small suites, but 1) there are some complications aggregating across directories with cxxtest's usual features and 2) there are some integration tests that are simply easier to implement "from the ou...