From: tho Date: Tue, 17 Aug 2010 08:16:28 +0000 (+0000) Subject: Utils: fixed singleton unit test on final build X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=1c149cd73c2b9dc5b112958e1f247097cd18db6e;p=senf.git Utils: fixed singleton unit test on final build git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1690 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/senf/Utils/singleton.test.cc b/senf/Utils/singleton.test.cc index 3d9247c..45ae34a 100644 --- a/senf/Utils/singleton.test.cc +++ b/senf/Utils/singleton.test.cc @@ -95,8 +95,12 @@ namespace { AliveTest1::~AliveTest1() { if (test2Dead) { - assert( ! AliveTest2::alive() ); - std::cerr << "singleton alive test ok\n"; + if (! AliveTest2::alive() ) + std::cerr << "singleton alive test ok\n"; + else { + std::cerr << "singleton alive test 2 NOT ok!\n"; + throw 1; + } } test1Dead = true; } @@ -109,8 +113,12 @@ namespace { AliveTest2::~AliveTest2() { if (test1Dead) { - assert( ! AliveTest1::alive() ); - std::cerr << "singleton alive test ok\n"; + if (! AliveTest1::alive() ) + std::cerr << "singleton alive test ok\n"; + else { + std::cerr << "singleton alive test 1 NOT ok!\n"; + throw 1; + } } test2Dead = true; }