Ignore:
Timestamp:
Jan 6, 2011, 11:47:13 PM (15 years ago)
Author:
Frederik Heber <heber@…>
Children:
8dd38e
Parents:
567640
Message:

FIX: some unittests declared variables anew although defined in header, NULL'd in setup, deleted in tearDown().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Patterns/unittests/CloneUnitTest.cpp

    r567640 r9f39db  
    7272void CloneTest::setUp()
    7373{
    74   IPrototype *ip1 = &p1;
     74  ip1 = &p1;
    7575  CPPUNIT_ASSERT( ip1 == &p1 );
    76   IPrototype *ip2 = &p2;
     76  ip2 = &p2;
    7777  CPPUNIT_ASSERT( ip2 == &p2 );
    7878
     
    9595{
    9696  // 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();
    9999  CPPUNIT_ASSERT( ip1 != ip1_1 );
    100100  CPPUNIT_ASSERT( ip1 != ip1_2 );
    101101
    102   IPrototype *ip2_1 = p2.clone();
    103   IPrototype *ip2_2 = p2.clone();
     102  ip2_1 = p2.clone();
     103  ip2_2 = p2.clone();
    104104  CPPUNIT_ASSERT( ip2 != ip2_1 );
    105105  CPPUNIT_ASSERT( ip2 != ip2_2 );
     
    114114
    115115  // make refs to interface
    116   IPrototype *ip1 = &p1;
     116  ip1 = &p1;
    117117  CPPUNIT_ASSERT( ip1 == &p1 );
    118   IPrototype *ip2 = &p2;
     118  ip2 = &p2;
    119119  CPPUNIT_ASSERT( ip2 == &p2 );
    120120
    121121  // 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();
    126126
    127127  // check that each is individual
Note: See TracChangeset for help on using the changeset viewer.