diff options
Diffstat (limited to 'test/cxxtest/sample')
-rw-r--r-- | test/cxxtest/sample/CreatedTest.h | 2 | ||||
-rw-r--r-- | test/cxxtest/sample/DeltaTest.h | 2 | ||||
-rw-r--r-- | test/cxxtest/sample/ExceptionTest.h | 2 | ||||
-rw-r--r-- | test/cxxtest/sample/FixtureTest.h | 2 | ||||
-rw-r--r-- | test/cxxtest/sample/TraitsTest.h | 6 | ||||
-rw-r--r-- | test/cxxtest/sample/mock/Dice.h | 2 | ||||
-rw-r--r-- | test/cxxtest/sample/mock/MockStdlib.h | 2 | ||||
-rw-r--r-- | test/cxxtest/sample/mock/TestDice.h | 8 | ||||
-rw-r--r-- | test/cxxtest/sample/mock/roll.cpp | 2 |
9 files changed, 14 insertions, 14 deletions
diff --git a/test/cxxtest/sample/CreatedTest.h b/test/cxxtest/sample/CreatedTest.h index 53a6821a21..fe6cce4450 100644 --- a/test/cxxtest/sample/CreatedTest.h +++ b/test/cxxtest/sample/CreatedTest.h @@ -17,7 +17,7 @@ class CreatedTest : public CxxTest::TestSuite public: CreatedTest( unsigned size ) : _buffer( new char[size] ) {} virtual ~CreatedTest() { delete[] _buffer; } - + static CreatedTest *createSuite() { return new CreatedTest( 16 ); } static void destroySuite( CreatedTest *suite ) { delete suite; } diff --git a/test/cxxtest/sample/DeltaTest.h b/test/cxxtest/sample/DeltaTest.h index 7223c3af25..5b2dd7c155 100644 --- a/test/cxxtest/sample/DeltaTest.h +++ b/test/cxxtest/sample/DeltaTest.h @@ -7,7 +7,7 @@ class DeltaTest : public CxxTest::TestSuite { double _pi, _delta; - + public: void setUp() { diff --git a/test/cxxtest/sample/ExceptionTest.h b/test/cxxtest/sample/ExceptionTest.h index 68363c8740..47375480b1 100644 --- a/test/cxxtest/sample/ExceptionTest.h +++ b/test/cxxtest/sample/ExceptionTest.h @@ -42,7 +42,7 @@ private: public: Number( int ) {} }; - + int throwThis( int i ) { throw Number( i ); diff --git a/test/cxxtest/sample/FixtureTest.h b/test/cxxtest/sample/FixtureTest.h index 33a119f2bd..272a90c2d5 100644 --- a/test/cxxtest/sample/FixtureTest.h +++ b/test/cxxtest/sample/FixtureTest.h @@ -19,7 +19,7 @@ public: { _buffer = new char[1024]; } - + void tearDown() { delete[] _buffer; diff --git a/test/cxxtest/sample/TraitsTest.h b/test/cxxtest/sample/TraitsTest.h index 14659385d0..09957e591d 100644 --- a/test/cxxtest/sample/TraitsTest.h +++ b/test/cxxtest/sample/TraitsTest.h @@ -20,7 +20,7 @@ public: Pet( const char *petName ) { strcpy( _name, petName ); } const char *name() const { return _name; } - + bool operator== ( const Pet &other ) const { return !strcmp( name(), other.name() ); @@ -32,13 +32,13 @@ public: // Note: Most compilers do not require that you define both // ValueTraits<const T> and ValueTraits<T>, but some do. // -namespace CxxTest +namespace CxxTest { CXXTEST_TEMPLATE_INSTANTIATION class ValueTraits<const Pet> { char _asString[256]; - + public: ValueTraits( const Pet &pet ) { sprintf( _asString, "Pet(\"%s\")", pet.name() ); } const char *asString() const { return _asString; } diff --git a/test/cxxtest/sample/mock/Dice.h b/test/cxxtest/sample/mock/Dice.h index 94271417e1..3a393ef262 100644 --- a/test/cxxtest/sample/mock/Dice.h +++ b/test/cxxtest/sample/mock/Dice.h @@ -5,7 +5,7 @@ class Dice { public: Dice(); - + unsigned roll(); }; diff --git a/test/cxxtest/sample/mock/MockStdlib.h b/test/cxxtest/sample/mock/MockStdlib.h index aee62bafe7..2434cb82cc 100644 --- a/test/cxxtest/sample/mock/MockStdlib.h +++ b/test/cxxtest/sample/mock/MockStdlib.h @@ -7,7 +7,7 @@ class MockStdlib : { public: unsigned lastSeed; - + void srand( unsigned seed ) { lastSeed = seed; diff --git a/test/cxxtest/sample/mock/TestDice.h b/test/cxxtest/sample/mock/TestDice.h index 35b3b7eec9..7607ccd6f8 100644 --- a/test/cxxtest/sample/mock/TestDice.h +++ b/test/cxxtest/sample/mock/TestDice.h @@ -16,14 +16,14 @@ public: { delete stdlib; } - + void test_Randomize_uses_time() { stdlib->nextTime = 12345; Dice dice; TS_ASSERT_EQUALS( stdlib->lastSeed, 12345 ); } - + void test_Roll() { Dice dice; @@ -47,7 +47,7 @@ public: stdlib->nextRand = 2; TS_ASSERT_EQUALS( dice.roll(), 3 ); - + class Five : public T::Base_rand { int rand() { return 5; } }; Five *five = new Five; @@ -55,7 +55,7 @@ public: TS_ASSERT_EQUALS( dice.roll(), 6 ); TS_ASSERT_EQUALS( dice.roll(), 6 ); delete five; - + stdlib->nextRand = 1; TS_ASSERT_EQUALS( dice.roll(), 2 ); } diff --git a/test/cxxtest/sample/mock/roll.cpp b/test/cxxtest/sample/mock/roll.cpp index 20ea967af3..75ca31bedd 100644 --- a/test/cxxtest/sample/mock/roll.cpp +++ b/test/cxxtest/sample/mock/roll.cpp @@ -6,6 +6,6 @@ int main() Dice dice; printf( "First roll: %u\n", dice.roll() ); printf( "Second roll: %u\n", dice.roll() ); - + return 0; } |