Skip to content

Commit 0d29e73

Browse files
committed
Use REQURE CHECK to abort test if no Frame
1 parent fe8ea21 commit 0d29e73

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

tests/Frame_Tests.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ TEST(Default_Constructor)
4545
{
4646
// Create a "blank" default Frame
4747
std::shared_ptr<Frame> f1(new Frame());
48-
49-
CHECK(f1 != nullptr); // Test aborts here if we didn't get a Frame
48+
REQUIRE CHECK(f1 != nullptr);
5049

5150
// Check basic default parameters
5251
CHECK_EQUAL(1, f1->GetHeight());
@@ -78,8 +77,7 @@ TEST(Data_Access)
7877

7978
// Get first frame
8079
std::shared_ptr<Frame> f1 = c1.GetFrame(1);
81-
82-
CHECK(f1 != nullptr);
80+
REQUIRE CHECK(f1 != nullptr);
8381

8482
CHECK_EQUAL(1, f1->number);
8583
CHECK_EQUAL(1280, f1->GetWidth());
@@ -91,13 +89,13 @@ TEST(AddImage_QImage)
9189
{
9290
// Create a "blank" default Frame
9391
std::shared_ptr<Frame> f1(new Frame());
92+
REQUIRE CHECK(f1 != nullptr);
9493

9594
// Load an image
9695
std::stringstream path;
9796
path << TEST_MEDIA_PATH << "front.png";
9897
std::shared_ptr<QImage> i1(new QImage(QString::fromStdString(path.str()))) ;
9998

100-
CHECK(f1 != nullptr); // Test aborts here if we didn't get a Frame
10199
CHECK_EQUAL(false, i1->isNull());
102100

103101
f1->AddImage(i1);

0 commit comments

Comments
 (0)