Added some more tests

This commit is contained in:
Michael Mandl 2018-11-24 20:08:01 +01:00
parent a2b85eba83
commit 09f8fa4faf

View file

@ -14,4 +14,16 @@ TEST_CASE("default initialization")
REQUIRE(!(age < age2)); 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);
}
}
}