Esempio n. 1
0
    //
    // Some compilers get confused by these functions if they're inline
    //
    bool RealTestDescription::setUp()
    {
        if ( !suite() )
            return false;

        bool ok = true;

        for ( GlobalFixture *gf = GlobalFixture::firstGlobalFixture();
	      gf != 0; gf = gf->nextGlobalFixture() )
	{
            _TS_TRY_WITH_SIGNAL_PROTECTION
            {
                _TS_TRY
                {
                  ok = gf->setUp();
                }
                _TS_LAST_CATCH( {
		    tracker().failedTest( file(), line(),
		        "Exception thrown from GlobalFixture::setUp()" );
		    ok = false;
		} );
            }
            _TS_CATCH_SIGNAL({
                tracker().failedTest( file(), line(),
		    __cxxtest_sigmsg.c_str() );
                ok = false;
            });
    bool RealTestDescription::setUp()
    {
        if ( !suite() )
            return false;

        for ( GlobalFixture *gf = GlobalFixture::firstGlobalFixture(); gf != 0; gf = gf->nextGlobalFixture() ) {
            bool ok;
            _TS_TRY { ok = gf->setUp(); }
            _TS_LAST_CATCH( { ok = false; } );

            if ( !ok ) {
                doFailTest( file(), line(), "Error in GlobalFixture::setUp()" );
                return false;
            }
        }