From 5d5529a8d57386dc5f7fd521147d9cdd0c67b0ff Mon Sep 17 00:00:00 2001 From: Klemens David Morgenstern Date: Wed, 30 Jan 2019 15:49:10 +0800 Subject: [PATCH 1/5] broke bandit --- test/bandit.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/bandit.cpp b/test/bandit.cpp index 3957399..350c14e 100644 --- a/test/bandit.cpp +++ b/test/bandit.cpp @@ -6,7 +6,7 @@ using namespace bandit; go_bandit([]() { describe("our first test", []() { it("might fail", [&]() { - AssertThat(5, Equals(5)); + AssertThat(6, Equals(5)); }); }); }); @@ -18,7 +18,7 @@ go_bandit([]() { const auto add = [](int i, int j) { return i + j; }; - const auto subtract = [](int i, int j) { return i - j; }; + const auto subtract = [](int i, int j) { return i + j; }; it("can add", [&]() From 921d15fd4f630599c9e34bf894291a5fdc07ccb4 Mon Sep 17 00:00:00 2001 From: Klemens David Morgenstern Date: Wed, 30 Jan 2019 16:25:14 +0800 Subject: [PATCH 2/5] broke cpputest --- test/cpputest.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/cpputest.cpp b/test/cpputest.cpp index d33e8dc..e74073d 100644 --- a/test/cpputest.cpp +++ b/test/cpputest.cpp @@ -12,12 +12,12 @@ TEST_GROUP(ClassName) TEST(ClassName, Create) { - CHECK(true); + CHECK(false); CHECK_EQUAL(1,1); - LONGS_EQUAL(1,1); + LONGS_EQUAL(2,1); DOUBLES_EQUAL(1.000, 1.001, .01); STRCMP_EQUAL("hello", "hello"); - // FAIL("The prior tests pass, but this one doesn't"); + FAIL("The prior tests pass, but this one doesn't"); } #include "CppUTest/CommandLineTestRunner.h" From b278cabb4843d6ce926b10d8068c4424caec745b Mon Sep 17 00:00:00 2001 From: Klemens David Morgenstern Date: Wed, 30 Jan 2019 16:30:05 +0800 Subject: [PATCH 3/5] Broke cute --- test/cute.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/cute.cpp b/test/cute.cpp index 137c5df..cc6246e 100644 --- a/test/cute.cpp +++ b/test/cute.cpp @@ -9,7 +9,7 @@ void thisIsATest() { first = "Hello"; second = "World"; expected = "Hello World"; - ASSERT_EQUAL(expected, first + " " + second); + ASSERT_EQUAL(expected, first + "-" + second); } bool runAllTests(int argc, char const *argv[]) { From 6770142d3191f6f14a74b9de355882b68f87b2ce Mon Sep 17 00:00:00 2001 From: Klemens David Morgenstern Date: Wed, 30 Jan 2019 16:31:22 +0800 Subject: [PATCH 4/5] Broken cxxtest --- test/cxxtest.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test/cxxtest.cpp b/test/cxxtest.cpp index 2b572fc..2e7a7ce 100644 --- a/test/cxxtest.cpp +++ b/test/cxxtest.cpp @@ -6,17 +6,16 @@ class MyTestSuite1 : public CxxTest::TestSuite void testAddition(void) { TS_ASSERT(1 + 1 > 1); - TS_ASSERT_EQUALS(1 + 1, 2); + TS_ASSERT_EQUALS(2 + 1, 2); } void testXYZ() { - TS_ABORT(); - TS_ASSERT(true); + TS_ASSERT(false); } void testBar() { - // throw std::runtime_error("Some exception"); + throw std::runtime_error("Some exception"); } }; \ No newline at end of file From 8180addc73db94c2e2b070796b16844597959873 Mon Sep 17 00:00:00 2001 From: Klemens David Morgenstern Date: Wed, 30 Jan 2019 20:04:50 +0800 Subject: [PATCH 5/5] Broke gtest --- test/gtest.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/gtest.cpp b/test/gtest.cpp index 3cf5b14..f456169 100644 --- a/test/gtest.cpp +++ b/test/gtest.cpp @@ -3,16 +3,16 @@ TEST(SquareRootTest, PositiveNos) { -ASSERT_NE(6, 36.0); -ASSERT_GE(2, 1); -ASSERT_LE(2, 5); -ASSERT_EQ(3, 3); + ASSERT_NE(6, 35.0); + ASSERT_GE(2, 3); + ASSERT_LE(2, 1); + ASSERT_EQ(4, 3); } TEST(SquareRootTest, NegativeNos) { -ASSERT_EQ(-1.0, -1.0); -ASSERT_DOUBLE_EQ(42.0, 4.2 * 10.); + ASSERT_EQ(-1.3, -1.0); + ASSERT_EQ(42, 4.2 * 10.); } int main(int argc, char **argv) {