Re: [Cppunit-devel] CppUnit 1.7.10 tar ball
Brought to you by:
blep
|
From: Baptiste L. <gai...@fr...> - 2002-04-04 15:38:34
|
----- Original Message ----- From: "Robert Wenner" <ro...@po...> To: "Baptiste Lepilleur" <gai...@fr...> Sent: Thursday, April 04, 2002 12:56 PM Subject: Re: [Cppunit-devel] CppUnit 1.7.10 tar ball > Hi! > > Sorry if you get this email more than once, it was returned yesterday > because it could not be delivered for 4 hours. There seems to be a > problem with my mail going to the list. > > --- cut here --- > > Latest version seems to be almost fine under Linux for me, too. > > During installation I get these messages: > $ autoconf > You should update your `aclocal.m4' by running aclocal. Don't know anything about that. Somebody does ? > And later: > $ make install > [...] > /usr/bin/install: cannot create regular file > `/usr/local/share/cppunit/html/html/index.html': No such file or > directory > make[2]: *** [install-htmlDATA] Error 1 > That's one "html" too much? You may not have installed doxygen (the documentation generator). It can be found at: http://www.doxygen.org/. Though, that is kind of weird since we provide the generated documentation in a separate bundle. That lead me to beleive this would be a bug in the makefile (don't know how to fix that one). > > On using the deprecated TextTestRunner.h the preprocessor could not find > the include file, I changed in include/cppunit/TextTestRunner.h this > line > #include <cppunitui/text/TestRunner.h> > to > #include <../cppunitui/text/TestRunner.h> Hum, something is wrong there. The include hierarchy is supposed to be like this: include/ cppunit/ TextTestRunner.h cppunitui/ text/ TestRunner.h Since include/ is the directory given to the compiler to search include, it should be resolved successfully (and was on VC++ before I mad the update in the examples). Could you check that include/ is the directory you give to the compiler ? An acceptable fix would be: #include "../cppunitui/text/TestRunner.h" => the include is relative to the locate of TextTestRunner.h file, while #include <...> just pick any directory given to the compiler which resolved sucessfully the specified path. Since CppUnit only require include/, the sucessful resolution can only appear with a "miraculous" other unspecified directory... Let's me know how it goes. > > Documentation is somewhat better now. :-) > > Anyway I still don't like the CppUnit::TextUi::TestRunner > implementation. I don't like the call to runner.run with its boolean > arguments for progress printing, waiting and summary printing. We do > have listeners, if I do not add a listener I obvisiously do not want > progress printing or waiting. If I do not add an outputter I > obvisiously do not want a summary. > I think the runner should never ever add a listener on its own, > especially not like in TestRunner.cpp in method runTest (Test*, bool) > around line 131. > IMHO that's a good place to do some refactoring. I'll probably fix that after 1.8.0. I think I'll introduce a CppUnit::TestRunner class which does not use any outputter, but create a default TestResult and give access to the TestResult. run() would run the specified test and that's it. > > Another place for refactoring: have the CPPUNIT_ASSERT_EQUAL_MESSAGE > macro take the message as its first argument as CPPUNIT_ASSERT_MESSAGE > macro does. (Or make the message always the last argument, but make it > always the same way.) I made the change in the current CVS version. message is now the first argument. Thanks for the feedback, Baptiste. |