CPP: Add test cases.

This commit is contained in:
Geoffrey White
2019-09-03 17:46:30 +01:00
parent c4d74c3922
commit bac39e6288
2 changed files with 10 additions and 0 deletions

View File

@@ -37,4 +37,7 @@ int Main()
// GOOD: method call with the same parameters in a different order (we only track year, month, day)
EraInfo * pDateTimeUtil4 = EraInfo::EraInfoFromDate(1, 2, 8, 1, 1989, L"\u5e73\u6210");
// BAD: constructor creating a EraInfo with exact Reiwa era start date [NOT DETECTED]
EraInfo * pDateTimeUtil5 = new EraInfo(2019, 5, 1);
}

View File

@@ -52,6 +52,13 @@ int main()
st1.wMonth = 1;
st1.wYear = 1990;
// BAD: Creation of SYSTEMTIME stuct corresponding to the beginning of Reiwa era [NOT DETECTED]
SYSTEMTIME st2;
st2.wDay = 1;
st2.wMonth = 5;
st2.wYear = 2019;
return 0;
}