Added some more tests
This commit is contained in:
parent
a2b85eba83
commit
09f8fa4faf
1 changed files with 12 additions and 0 deletions
12
test/Age.cpp
12
test/Age.cpp
|
@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue