Re-formatted all source files
This commit is contained in:
parent
5c6ed8191b
commit
d0f64ef440
77 changed files with 2443 additions and 2332 deletions
42
test/Age.cpp
42
test/Age.cpp
|
@ -4,37 +4,37 @@
|
|||
|
||||
TEST_CASE("default initialization")
|
||||
{
|
||||
Age age;
|
||||
REQUIRE(age.years() == 0);
|
||||
REQUIRE(age.months() == 0);
|
||||
REQUIRE(age.toString() == "0;0");
|
||||
Age age;
|
||||
REQUIRE(age.years() == 0);
|
||||
REQUIRE(age.months() == 0);
|
||||
REQUIRE(age.toString() == "0;0");
|
||||
|
||||
Age age2;
|
||||
REQUIRE(!(age < age));
|
||||
REQUIRE(!(age < age2));
|
||||
Age age2;
|
||||
REQUIRE(!(age < age));
|
||||
REQUIRE(!(age < age2));
|
||||
}
|
||||
|
||||
TEST_CASE("year/month initialization")
|
||||
{
|
||||
for (unsigned int year = 0; year <= 100; ++year)
|
||||
{
|
||||
for (unsigned int month = 0; month < 12; ++month)
|
||||
{
|
||||
Age age(year, month);
|
||||
for (unsigned int year = 0; year <= 100; ++year)
|
||||
{
|
||||
for (unsigned int month = 0; month < 12; ++month)
|
||||
{
|
||||
Age age(year, month);
|
||||
|
||||
REQUIRE(age.years() == year);
|
||||
REQUIRE(age.months() == month);
|
||||
}
|
||||
}
|
||||
REQUIRE(age.years() == year);
|
||||
REQUIRE(age.months() == month);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("age by reference")
|
||||
{
|
||||
QDate birth(1970, 1, 1);
|
||||
QDate reference(1980, 1, 1);
|
||||
QDate birth(1970, 1, 1);
|
||||
QDate reference(1980, 1, 1);
|
||||
|
||||
Age age(birth, reference);
|
||||
Age age(birth, reference);
|
||||
|
||||
REQUIRE(age.years() == 10);
|
||||
REQUIRE(age.months() == 0);
|
||||
REQUIRE(age.years() == 10);
|
||||
REQUIRE(age.months() == 0);
|
||||
}
|
||||
|
|
|
@ -2,6 +2,5 @@
|
|||
|
||||
TEST_CASE("Dummy")
|
||||
{
|
||||
REQUIRE(true == true);
|
||||
REQUIRE(true == true);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue