Skip to content

Commit

Permalink
Adding test for string equality.
Browse files Browse the repository at this point in the history
This required updating various baseline files.
  • Loading branch information
whart222 committed May 5, 2013
1 parent fde737b commit 84d7fa1
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 47 deletions.
2 changes: 2 additions & 0 deletions sample/SimpleTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ class SimpleTest : public CxxTest::TestSuite {
TS_ASSERT_EQUALS(1, 2);
TS_ASSERT_EQUALS('a', 'A');
TS_ASSERT_EQUALS(1.0, -12345678900000000000000000000000000000000000000000.1234);
const char* tmp = "foo";
TS_ASSERT_EQUALS("foo", tmp);
}

void testAddition() {
Expand Down
20 changes: 10 additions & 10 deletions test/error.out
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,23 @@ SimpleTest.h:14: Error: Expected (1 == 2), found (1 != 2)
SimpleTest.h:15: Error: Expected ('a' == 'A'), found ('a' != 'A')
SimpleTest.h:16: Error: Expected (1.0 == -12345678900000000000000000000000000000000000000000.1234), found (1.0000 != -1.2345E50)
In SimpleTest::testAddition:
SimpleTest.h:21: Error: Expected (2 + 2 == 5), found (4 != 5)
SimpleTest.h:23: Error: Expected (2 + 2 == 5), found (4 != 5)
In SimpleTest::TestMultiplication:
SimpleTest.h:26: Error: Expected (4 * 4 == 44), found (16 != 44)
SimpleTest.h:27: Error: Expected (-2 * -2 != 4), found (4)
SimpleTest.h:28: Error: Expected (4 * 4 == 44), found (16 != 44)
SimpleTest.h:29: Error: Expected (-2 * -2 != 4), found (4)
In SimpleTest::testComparison:
SimpleTest.h:32: Error: Expected (-1 < -2), found (-1 >= -2)
SimpleTest.h:34: Error: Expected (-1 < -2), found (-1 >= -2)
In SimpleTest::testTheWorldIsCrazy:
SimpleTest.h:36: Error: Expected (true == false), found (true != false)
SimpleTest.h:38: Error: Expected (true == false), found (true != false)
In SimpleTest::test_Failure:
SimpleTest.h:40: Error: Test failed: Not implemented
SimpleTest.h:41: Error: Test failed: 1569779912
SimpleTest.h:42: Error: Test failed: Not implemented
SimpleTest.h:43: Error: Test failed: 1569779912
In SimpleTest::test_TS_SKIP_macro:
SimpleTest.h:45: Warning: Test skipped: Simply skip this test
SimpleTest.h:47: Warning: Test skipped: Simply skip this test
s
In SimpleTest::test_TS_WARN_macro:
SimpleTest.h:50: Warning: Just a friendly warning
SimpleTest.h:51: Warning: Warnings don't abort the test
SimpleTest.h:52: Warning: Just a friendly warning
SimpleTest.h:53: Warning: Warnings don't abort the test
.
In TestFunky::testPets:
TraitsTest.h:53: Error: Expected (pet1 == pet2), found (Pet("dog") != Pet("cat"))
Expand Down
20 changes: 10 additions & 10 deletions test/paren.out
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,23 @@ SimpleTest.h(14): Error: Expected (1 == 2), found (1 != 2)
SimpleTest.h(15): Error: Expected ('a' == 'A'), found ('a' != 'A')
SimpleTest.h(16): Error: Expected (1.0 == -12345678900000000000000000000000000000000000000000.1234), found (1.0000 != -1.2345E50)
In SimpleTest::testAddition:
SimpleTest.h(21): Error: Expected (2 + 2 == 5), found (4 != 5)
SimpleTest.h(23): Error: Expected (2 + 2 == 5), found (4 != 5)
In SimpleTest::TestMultiplication:
SimpleTest.h(26): Error: Expected (4 * 4 == 44), found (16 != 44)
SimpleTest.h(27): Error: Expected (-2 * -2 != 4), found (4)
SimpleTest.h(28): Error: Expected (4 * 4 == 44), found (16 != 44)
SimpleTest.h(29): Error: Expected (-2 * -2 != 4), found (4)
In SimpleTest::testComparison:
SimpleTest.h(32): Error: Expected (-1 < -2), found (-1 >= -2)
SimpleTest.h(34): Error: Expected (-1 < -2), found (-1 >= -2)
In SimpleTest::testTheWorldIsCrazy:
SimpleTest.h(36): Error: Expected (true == false), found (true != false)
SimpleTest.h(38): Error: Expected (true == false), found (true != false)
In SimpleTest::test_Failure:
SimpleTest.h(40): Error: Test failed: Not implemented
SimpleTest.h(41): Error: Test failed: 1569779912
SimpleTest.h(42): Error: Test failed: Not implemented
SimpleTest.h(43): Error: Test failed: 1569779912
In SimpleTest::test_TS_SKIP_macro:
SimpleTest.h(45): Warning: Test skipped: Simply skip this test
SimpleTest.h(47): Warning: Test skipped: Simply skip this test
s
In SimpleTest::test_TS_WARN_macro:
SimpleTest.h(50): Warning: Just a friendly warning
SimpleTest.h(51): Warning: Warnings don't abort the test
SimpleTest.h(52): Warning: Just a friendly warning
SimpleTest.h(53): Warning: Warnings don't abort the test
.
In TestFunky::testPets:
TraitsTest.h(53): Error: Expected (pet1 == pet2), found (Pet("dog") != Pet("cat"))
Expand Down
32 changes: 16 additions & 16 deletions test/preamble.out
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,21 @@ MessageTest.h:21: Error: Assertion failed: value != 0
In SimpleTest::testEquality:
SimpleTest.h:14: Error: Expected (1 == 2), found (1 != 2)
In SimpleTest::testAddition:
SimpleTest.h:21: Error: Expected (2 + 2 == 5), found (4 != 5)
SimpleTest.h:23: Error: Expected (2 + 2 == 5), found (4 != 5)
In SimpleTest::TestMultiplication:
SimpleTest.h:26: Error: Expected (4 * 4 == 44), found (16 != 44)
SimpleTest.h:28: Error: Expected (4 * 4 == 44), found (16 != 44)
In SimpleTest::testComparison:
SimpleTest.h:32: Error: Expected (-1 < -2), found (-1 >= -2)
SimpleTest.h:34: Error: Expected (-1 < -2), found (-1 >= -2)
In SimpleTest::testTheWorldIsCrazy:
SimpleTest.h:36: Error: Expected (true == false), found (true != false)
SimpleTest.h:38: Error: Expected (true == false), found (true != false)
In SimpleTest::test_Failure:
SimpleTest.h:40: Error: Test failed: Not implemented
SimpleTest.h:42: Error: Test failed: Not implemented
In SimpleTest::test_TS_SKIP_macro:
SimpleTest.h:45: Warning: Test skipped: Simply skip this test
SimpleTest.h:47: Warning: Test skipped: Simply skip this test
s
In SimpleTest::test_TS_WARN_macro:
SimpleTest.h:50: Warning: Just a friendly warning
SimpleTest.h:51: Warning: Warnings don't abort the test
SimpleTest.h:52: Warning: Just a friendly warning
SimpleTest.h:53: Warning: Warnings don't abort the test
.
In TestFunky::testPets:
TraitsTest.h:53: Error: Expected (pet1 == pet2), found (Pet("dog") != Pet("cat"))
Expand All @@ -50,21 +50,21 @@ MessageTest.h:21: Error: Assertion failed: value != 0
In SimpleTest::testEquality:
SimpleTest.h:14: Error: Expected (1 == 2), found (1 != 2)
In SimpleTest::testAddition:
SimpleTest.h:21: Error: Expected (2 + 2 == 5), found (4 != 5)
SimpleTest.h:23: Error: Expected (2 + 2 == 5), found (4 != 5)
In SimpleTest::TestMultiplication:
SimpleTest.h:26: Error: Expected (4 * 4 == 44), found (16 != 44)
SimpleTest.h:28: Error: Expected (4 * 4 == 44), found (16 != 44)
In SimpleTest::testComparison:
SimpleTest.h:32: Error: Expected (-1 < -2), found (-1 >= -2)
SimpleTest.h:34: Error: Expected (-1 < -2), found (-1 >= -2)
In SimpleTest::testTheWorldIsCrazy:
SimpleTest.h:36: Error: Expected (true == false), found (true != false)
SimpleTest.h:38: Error: Expected (true == false), found (true != false)
In SimpleTest::test_Failure:
SimpleTest.h:40: Error: Test failed: Not implemented
SimpleTest.h:42: Error: Test failed: Not implemented
In SimpleTest::test_TS_SKIP_macro:
SimpleTest.h:45: Warning: Test skipped: Simply skip this test
SimpleTest.h:47: Warning: Test skipped: Simply skip this test
s
In SimpleTest::test_TS_WARN_macro:
SimpleTest.h:50: Warning: Just a friendly warning
SimpleTest.h:51: Warning: Warnings don't abort the test
SimpleTest.h:52: Warning: Just a friendly warning
SimpleTest.h:53: Warning: Warnings don't abort the test
.
In TestFunky::testPets:
TraitsTest.h:53: Error: Expected (pet1 == pet2), found (Pet("dog") != Pet("cat"))
Expand Down
20 changes: 10 additions & 10 deletions test/suite.out
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@ SimpleTest.h:14: Error: Expected (1 == 2), found (1 != 2)
SimpleTest.h:15: Error: Expected ('a' == 'A'), found ('a' != 'A')
SimpleTest.h:16: Error: Expected (1.0 == -12345678900000000000000000000000000000000000000000.1234), found (1.0000 != -1.2345E50)
In SimpleTest::testAddition:
SimpleTest.h:21: Error: Expected (2 + 2 == 5), found (4 != 5)
SimpleTest.h:23: Error: Expected (2 + 2 == 5), found (4 != 5)
In SimpleTest::TestMultiplication:
SimpleTest.h:26: Error: Expected (4 * 4 == 44), found (16 != 44)
SimpleTest.h:27: Error: Expected (-2 * -2 != 4), found (4)
SimpleTest.h:28: Error: Expected (4 * 4 == 44), found (16 != 44)
SimpleTest.h:29: Error: Expected (-2 * -2 != 4), found (4)
In SimpleTest::testComparison:
SimpleTest.h:32: Error: Expected (-1 < -2), found (-1 >= -2)
SimpleTest.h:34: Error: Expected (-1 < -2), found (-1 >= -2)
In SimpleTest::testTheWorldIsCrazy:
SimpleTest.h:36: Error: Expected (true == false), found (true != false)
SimpleTest.h:38: Error: Expected (true == false), found (true != false)
In SimpleTest::test_Failure:
SimpleTest.h:40: Error: Test failed: Not implemented
SimpleTest.h:41: Error: Test failed: 1569779912
SimpleTest.h:42: Error: Test failed: Not implemented
SimpleTest.h:43: Error: Test failed: 1569779912
In SimpleTest::test_TS_SKIP_macro:
SimpleTest.h:45: Warning: Test skipped: Simply skip this test
SimpleTest.h:47: Warning: Test skipped: Simply skip this test
s
In SimpleTest::test_TS_WARN_macro:
SimpleTest.h:50: Warning: Just a friendly warning
SimpleTest.h:51: Warning: Warnings don't abort the test
SimpleTest.h:52: Warning: Just a friendly warning
SimpleTest.h:53: Warning: Warnings don't abort the test
.
Failed 6 and Skipped 1 of 8 tests
Success rate: 14%
Expand Down
2 changes: 1 addition & 1 deletion test/suite_test.out
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Running cxxtest tests (1 test)
In SimpleTest::testAddition:
SimpleTest.h:21: Error: Expected (2 + 2 == 5), found (4 != 5)
SimpleTest.h:23: Error: Expected (2 + 2 == 5), found (4 != 5)
Failed 1 and Skipped 0 of 1 test
Success rate: 0%
Error level = 1

0 comments on commit 84d7fa1

Please sign in to comment.