Skip to content

Commit

Permalink
update ut
Browse files Browse the repository at this point in the history
  • Loading branch information
neri14 committed Aug 27, 2024
1 parent 9c29c2d commit dab6cd1
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions test/video/overlay/layout_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,28 @@ class layout_test : public ::testing::Test {

TEST_F(layout_test, load_nonexistant_file_fails)
{
EXPECT_EQ(nullptr, uut->parse(consts::nonexistant_file));
std::shared_ptr<layout> res = uut->parse(consts::nonexistant_file);
EXPECT_EQ(nullptr, res);
}

TEST_F(layout_test, load_empty_xml_fails)
{
EXPECT_EQ(nullptr, uut->parse(consts::empty_file));
std::shared_ptr<layout> res = uut->parse(consts::empty_file);
EXPECT_EQ(nullptr, res);
}

TEST_F(layout_test, load_different_xml_fails)
{
EXPECT_EQ(nullptr, uut->parse(consts::different_file));
std::shared_ptr<layout> res = uut->parse(consts::different_file);
EXPECT_EQ(nullptr, res);
}

TEST_F(layout_test, load_correct_xml_file)
{
EXPECT_NE(nullptr, uut->parse(consts::correct_file));
std::shared_ptr<layout> res = uut->parse(consts::correct_file);
EXPECT_NE(nullptr, res);

EXPECT_EQ(4, res->size());//FIXME 6
}

}
Expand Down

0 comments on commit dab6cd1

Please sign in to comment.