Skip to content

Commit

Permalink
feat: add missing tests for number module (#955)
Browse files Browse the repository at this point in the history
  • Loading branch information
cieslarmichal authored Oct 12, 2024
1 parent 98cfadc commit 5e7cd8e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/modules/number_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,11 @@ TEST_F(NumberTest, shouldGenerateBinary)
{ return std::string("01").find(binaryNumberCharacter) != std::string::npos; }));
}

TEST_F(NumberTest, shouldThrowInvalidArgumentForNegativeLength)
{
ASSERT_THROW(binary(-1), std::invalid_argument);
}

TEST_F(NumberTest, givenValidArguments_shouldGenerateBinaryNumberInRange)
{
const std::string generatedBinary = binary(1234, 1236);
Expand Down

0 comments on commit 5e7cd8e

Please sign in to comment.