From dab6cd1d44dfa558620425a5c0f49fb66abcb01a Mon Sep 17 00:00:00 2001 From: Przemyslaw Rokosz Date: Tue, 27 Aug 2024 08:52:55 +0200 Subject: [PATCH] update ut --- test/video/overlay/layout_test.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/test/video/overlay/layout_test.cpp b/test/video/overlay/layout_test.cpp index 30baea1..34c7909 100644 --- a/test/video/overlay/layout_test.cpp +++ b/test/video/overlay/layout_test.cpp @@ -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 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 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 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 res = uut->parse(consts::correct_file); + EXPECT_NE(nullptr, res); + + EXPECT_EQ(4, res->size());//FIXME 6 } }