From 4f6d66fb761f47e66f309638b8cfb56a98b00f0a Mon Sep 17 00:00:00 2001 From: Guru Mehar Rachaputi Date: Fri, 5 Jul 2024 13:34:35 +0200 Subject: [PATCH] test: airline testcase (#789) - testcase added for airline module for code coverage Signed-off-by: Guru Mehar Rachaputi --- tests/modules/airline/AirlineTest.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/modules/airline/AirlineTest.cpp b/tests/modules/airline/AirlineTest.cpp index 5ab6f15de..54a1eca03 100644 --- a/tests/modules/airline/AirlineTest.cpp +++ b/tests/modules/airline/AirlineTest.cpp @@ -179,9 +179,16 @@ TEST_F(AirlineTest, shouldGenerateFlightNumberLeadingZeros) ASSERT_TRUE(leadingZero); } -TEST_F(AirlineTest, shouldGenerateFlightNumberByRange) +TEST_F(AirlineTest, shouldGenerateFlightNumberByRangeNoLeadingZeros) { const auto flightNumber = flightNumberByRange(false, {1, 6}); ASSERT_TRUE(flightNumber.length() <= 6); } + +TEST_F(AirlineTest, shouldGenerateFlightNumberByRangeLeadingZeros) +{ + const auto flightNumber = flightNumberByRange(true, {1, 8}); + + ASSERT_TRUE(flightNumber.length() <= 8); +}