[Cppunit-devel] Test templates or something like this...
Brought to you by:
blep
From: Paulo J. de O. C. de M. <po...@sa...> - 2005-02-20 01:14:22
|
Hi all, I'm using cppunit for the first time for checking a program I'm currently developing. The first test I've made is for the parser which receives a filename, opens the file and check for syntactic errors returning true if everything is ok, or false if it is not. The problem is that I build during setUp() a list of all the files I can find in a benchmarks directory and then ran in a for loop like this: for (std::list<string>::const_iterator i = paths.begin();i != paths.end(); i++) { cout << endl << "Parsing " << *i; p = new Parser(*i); CPPUNIT_ASSERT(p->parseFile(foo)); } Well, paths is a list<string> with the filenames to test. The problem is that as soon as 1 file fails calling CPPUNIT_ASSERT with false, no more files are tested. How can I check all the files and only after that I get the results with the files that failed and the ones that passed through? One problem I faced is that I cannot find docs for cppunit with examples, all I found was the wiki and doxygen docs which didn't seem to help me much with these issues. Cheers, -- Paulo Jorge Matos - pocm at sat inesc-id pt Computer and Software Engineering INESC-ID - SAT Group |