~blep/cppunit2/cpptl-integration

« back to all changes in this revision

Viewing changes to src/cpputtest/registrytest.cpp

  • Committer: Baptiste Lepilleur
  • Date: 2009-08-27 17:50:15 UTC
  • mfrom: (467.1.2 cpptl-integration)
  • Revision ID: blep@users.sourceforge.net-20090827175015-op04km4ev3b2x0f5
sync.

Show diffs side-by-side

added added

removed removed

Lines of Context:
65
65
static void
66
66
testRegistryRootSuiteContent()
67
67
{
68
 
   CppUT::Suite &rootSuite = CppUT::Registry::getRootSuite();
 
68
   CppUT::Suite rootSuite = CppUT::Registry::getRootSuite();
69
69
   CPPUT_ASSERT_EXPR( checkContainedNestedSuite( rootSuite, "Root1" ) );
70
70
   CPPUT_ASSERT_EXPR( checkContainedNestedSuite( rootSuite, "Root2" ) );
71
71
   CppUT::Suite root1Suite = rootSuite.nestedSuiteByName( "Root1" );
72
72
   CppUT::Suite root2Suite = rootSuite.nestedSuiteByName( "Root2" );
73
73
   CPPUT_ASSERT_EXPR( root1Suite.isValid() );
74
74
   CPPUT_ASSERT_EXPR( root2Suite.isValid() );
 
75
   CPPUT_ASSERT_EXPR( root1Suite.parent().isValid() );
 
76
   CPPUT_ASSERT_EXPR( root2Suite.parent().isValid() );
 
77
   CPPUT_ASSERT_EXPR( root1Suite.parent() == rootSuite );
 
78
   CPPUT_ASSERT_EXPR( root2Suite.parent() == rootSuite );
75
79
   CPPUT_ASSERT( checkContainedTestCase( root1Suite, "testRoot1Test1" ) );
76
80
   CPPUT_ASSERT( checkContainedTestCase( root1Suite, "testRoot1Test2" ) );
77
81
   const CppUT::TestMeta *test = root1Suite.testCaseAt( 1 );
81
85
   CPPUT_ASSERT_EQUAL( "it is test2", test->description() );
82
86
   CPPUT_ASSERT_EQUAL( 5.0, test->timeOut() );
83
87
   CPPUT_ASSERT_EQUAL( 0, test->groupCount() );
 
88
 
 
89
   // @todo effective test of strict ordering & hashing
 
90
   root1Suite < rootSuite;
 
91
   rootSuite.hash();
84
92
}
85
93
 
86
94