From 09f8fa4faf6b2b818ded3a8b9da3a7dccaee400e Mon Sep 17 00:00:00 2001 From: Michael Mandl Date: Sat, 24 Nov 2018 20:08:01 +0100 Subject: [PATCH] Added some more tests --- test/Age.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/Age.cpp b/test/Age.cpp index 46948b8..34b3788 100644 --- a/test/Age.cpp +++ b/test/Age.cpp @@ -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); + } + } +}