Changeset 9f39db for src/Patterns/unittests/CloneUnitTest.cpp
- Timestamp:
- Jan 6, 2011, 11:47:13 PM (15 years ago)
- Children:
- 8dd38e
- Parents:
- 567640
- File:
-
- 1 edited
-
src/Patterns/unittests/CloneUnitTest.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Patterns/unittests/CloneUnitTest.cpp
r567640 r9f39db 72 72 void CloneTest::setUp() 73 73 { 74 IPrototype *ip1 = &p1;74 ip1 = &p1; 75 75 CPPUNIT_ASSERT( ip1 == &p1 ); 76 IPrototype *ip2 = &p2;76 ip2 = &p2; 77 77 CPPUNIT_ASSERT( ip2 == &p2 ); 78 78 … … 95 95 { 96 96 // test that new instances have been created. 97 IPrototype *ip1_1 = p1.clone();98 IPrototype *ip1_2 = p1.clone();97 ip1_1 = p1.clone(); 98 ip1_2 = p1.clone(); 99 99 CPPUNIT_ASSERT( ip1 != ip1_1 ); 100 100 CPPUNIT_ASSERT( ip1 != ip1_2 ); 101 101 102 IPrototype *ip2_1 = p2.clone();103 IPrototype *ip2_2 = p2.clone();102 ip2_1 = p2.clone(); 103 ip2_2 = p2.clone(); 104 104 CPPUNIT_ASSERT( ip2 != ip2_1 ); 105 105 CPPUNIT_ASSERT( ip2 != ip2_2 ); … … 114 114 115 115 // make refs to interface 116 IPrototype *ip1 = &p1;116 ip1 = &p1; 117 117 CPPUNIT_ASSERT( ip1 == &p1 ); 118 IPrototype *ip2 = &p2;118 ip2 = &p2; 119 119 CPPUNIT_ASSERT( ip2 == &p2 ); 120 120 121 121 // clone (i.e. counter = p?.counter ), ... 122 IPrototype *ip1_1 = p1.clone();123 IPrototype *ip1_2 = p1.clone();124 IPrototype *ip2_1 = p2.clone();125 IPrototype *ip2_2 = p2.clone();122 ip1_1 = p1.clone(); 123 ip1_2 = p1.clone(); 124 ip2_1 = p2.clone(); 125 ip2_2 = p2.clone(); 126 126 127 127 // check that each is individual
Note:
See TracChangeset
for help on using the changeset viewer.
