mirror of
https://github.com/github/codeql.git
synced 2026-04-27 17:55:19 +02:00
CPP: Add test cases.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user