Added some more tests

pull/18/head
mandlm 2018-11-24 20:08:01 +01:00
parent a2b85eba83
commit 09f8fa4faf
1 changed files with 12 additions and 0 deletions

View File

@ -14,4 +14,16 @@ TEST_CASE("default initialization")
REQUIRE(!(age < age2));
}
TEST_CASE("year/month initialization")
{
for (unsigned int year = 0; year <= 100; ++year)
{
for (unsigned int month = 1; month <= 12; ++month)
{
Age age(year, month);
REQUIRE(age.years() == year);
REQUIRE(age.months() == month);
}
}
}