#12 cppunit does not test anything!

-- deleted --
closed-fixed
nobody
5
2001-04-14
2001-04-10
Bastiaan Bakker
No

Build platform: RH Linux Intel 7.0 (g++ 2.96 20000731)

The hierarchy example does not appear to actually test
anything. The unmodified example outputs:

Running BoardGameTest<BoardGame> .
Running ChessTest<Chess> .

OK (2 tests)

Then after modifying the assertion in ChessTest.h to:
assert (m_game->numberOfPieces () == 31);

(that is, changing 32 to 31), the output becomes:

Running BoardGameTest<BoardGame> .
Running ChessTest<Chess> .

OK (2 tests)

The test does not fail!
The same happened with my own test code. It seems the
actual test methods are not called at all.

Discussion

  • Logged In: YES
    user_id=8050

    Tested RH Linux Intel 6.2 (g++ 2.91) and SPARC Solaris 2.6
    (g++ 2.95.2) as well. Same results.

     
  • Logged In: YES
    user_id=8050

    OK, I see now this already has been fixed by patch 403542.
    Thanks Tim Jansen!
    But it would be very nice if this patch would actually be
    merged into a release!

     
    • status: open --> closed-fixed