From f8d715ce7658d2ea2b2888907e828d9524d55f8f Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Sat, 28 Dec 2019 15:50:37 -0500 Subject: [PATCH] tests: Don't use REQUIRE in unit tests It's not supported in the older UnitTest++ version still in use on Ubuntu Xenial. --- tests/Frame_Tests.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/Frame_Tests.cpp b/tests/Frame_Tests.cpp index 76e4ba57b..a92906a3d 100644 --- a/tests/Frame_Tests.cpp +++ b/tests/Frame_Tests.cpp @@ -46,7 +46,7 @@ TEST(Default_Constructor) // Create a "blank" default Frame std::shared_ptr f1(new Frame()); - REQUIRE CHECK(f1 != nullptr); // Test aborts here if we didn't get a Frame + CHECK(f1 != nullptr); // Test aborts here if we didn't get a Frame // Check basic default parameters CHECK_EQUAL(1, f1->GetHeight()); @@ -61,7 +61,7 @@ TEST(Default_Constructor) // Calling GetImage() paints a blank frame, by default std::shared_ptr i1 = f1->GetImage(); - REQUIRE CHECK(i1 != nullptr); + CHECK(i1 != nullptr); CHECK_EQUAL(true,f1->has_image_data); CHECK_EQUAL(false,f1->has_audio_data); @@ -79,7 +79,7 @@ TEST(Data_Access) // Get first frame std::shared_ptr f1 = c1.GetFrame(1); - REQUIRE CHECK(f1 != nullptr); + CHECK(f1 != nullptr); CHECK_EQUAL(1, f1->number); CHECK_EQUAL(1280, f1->GetWidth()); @@ -97,8 +97,8 @@ TEST(AddImage_QImage) path << TEST_MEDIA_PATH << "front.png"; std::shared_ptr i1(new QImage(QString::fromStdString(path.str()))) ; - REQUIRE CHECK(f1 != nullptr); // Test aborts here if we didn't get a Frame - REQUIRE CHECK_EQUAL(false, i1->isNull()); + CHECK(f1 != nullptr); // Test aborts here if we didn't get a Frame + CHECK_EQUAL(false, i1->isNull()); f1->AddImage(i1); @@ -119,7 +119,7 @@ TEST(Copy_Constructor) path << TEST_MEDIA_PATH << "front.png"; std::shared_ptr i1( new QImage(QString::fromStdString(path.str())) ); - REQUIRE CHECK_EQUAL(false, i1->isNull()); + CHECK_EQUAL(false, i1->isNull()); // Add image to f1, then copy f1 to f2 f1.AddImage(i1);