Skip to content

Commit

Permalink
test: airline testcase (#789)
Browse files Browse the repository at this point in the history
- testcase added for airline module for code coverage

Signed-off-by: Guru Mehar Rachaputi <[email protected]>
  • Loading branch information
00thirdeye00 authored Jul 5, 2024
1 parent 5bd8ff2 commit 4f6d66f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tests/modules/airline/AirlineTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

0 comments on commit 4f6d66f

Please sign in to comment.