Skip to content

Commit 6c171c8

Browse files
committed
C++: Add more tests for modified years with and without leap year checks (UncheckedLeapYearAfterYearModification). Switch to using 'postprocess' for unit tests.
1 parent d0bd845 commit 6c171c8

File tree

4 files changed

+1232
-114
lines changed

4 files changed

+1232
-114
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,60 @@
1-
| test.cpp:314:5:314:9 | wYear | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:12:7:12:11 | wYear | wYear | test.cpp:309:13:309:14 | st | st |
2-
| test.cpp:327:5:327:9 | wYear | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:12:7:12:11 | wYear | wYear | test.cpp:322:13:322:14 | st | st |
3-
| test.cpp:338:6:338:10 | wYear | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:12:7:12:11 | wYear | wYear | test.cpp:333:62:333:63 | st | st |
4-
| test.cpp:484:5:484:9 | wYear | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:12:7:12:11 | wYear | wYear | test.cpp:480:13:480:14 | st | st |
5-
| test.cpp:497:5:497:9 | wYear | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:12:7:12:11 | wYear | wYear | test.cpp:492:13:492:14 | st | st |
6-
| test.cpp:509:5:509:9 | wYear | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:12:7:12:11 | wYear | wYear | test.cpp:505:13:505:14 | st | st |
7-
| test.cpp:606:11:606:17 | tm_year | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:56:6:56:12 | tm_year | tm_year | test.cpp:602:12:602:19 | timeinfo | timeinfo |
8-
| test.cpp:634:11:634:17 | tm_year | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:56:6:56:12 | tm_year | tm_year | test.cpp:628:12:628:19 | timeinfo | timeinfo |
9-
| test.cpp:636:11:636:17 | tm_year | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:56:6:56:12 | tm_year | tm_year | test.cpp:628:12:628:19 | timeinfo | timeinfo |
10-
| test.cpp:640:5:640:9 | wYear | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:12:7:12:11 | wYear | wYear | test.cpp:629:13:629:14 | st | st |
11-
| test.cpp:642:5:642:9 | wYear | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:12:7:12:11 | wYear | wYear | test.cpp:629:13:629:14 | st | st |
12-
| test.cpp:718:5:718:9 | wYear | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:12:7:12:11 | wYear | wYear | test.cpp:712:13:712:14 | st | st |
13-
| test.cpp:731:5:731:9 | wYear | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:12:7:12:11 | wYear | wYear | test.cpp:725:13:725:14 | st | st |
14-
| test.cpp:732:5:732:9 | wYear | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:12:7:12:11 | wYear | wYear | test.cpp:725:13:725:14 | st | st |
15-
| test.cpp:733:5:733:9 | wYear | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:12:7:12:11 | wYear | wYear | test.cpp:725:13:725:14 | st | st |
1+
#select
2+
| test.cpp:422:5:422:9 | wYear | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:12:7:12:11 | wYear | wYear | test.cpp:417:13:417:14 | st | st |
3+
| test.cpp:440:5:440:9 | wYear | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:12:7:12:11 | wYear | wYear | test.cpp:435:13:435:14 | st | st |
4+
| test.cpp:456:6:456:10 | wYear | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:12:7:12:11 | wYear | wYear | test.cpp:451:62:451:63 | st | st |
5+
| test.cpp:647:5:647:9 | wYear | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:12:7:12:11 | wYear | wYear | test.cpp:643:13:643:14 | st | st |
6+
| test.cpp:665:5:665:9 | wYear | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:12:7:12:11 | wYear | wYear | test.cpp:661:13:661:14 | st | st |
7+
| test.cpp:681:5:681:9 | wYear | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:12:7:12:11 | wYear | wYear | test.cpp:677:13:677:14 | st | st |
8+
| test.cpp:792:11:792:17 | tm_year | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:58:6:58:12 | tm_year | tm_year | test.cpp:789:12:789:19 | timeinfo | timeinfo |
9+
| test.cpp:813:11:813:17 | tm_year | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:58:6:58:12 | tm_year | tm_year | test.cpp:806:12:806:19 | timeinfo | timeinfo |
10+
| test.cpp:818:5:818:9 | wYear | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:12:7:12:11 | wYear | wYear | test.cpp:807:13:807:14 | st | st |
11+
| test.cpp:954:6:954:10 | wYear | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:12:7:12:11 | wYear | wYear | test.cpp:947:14:947:15 | st | st |
12+
| test.cpp:972:6:972:10 | wYear | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:12:7:12:11 | wYear | wYear | test.cpp:965:14:965:15 | st | st |
13+
| test.cpp:990:6:990:10 | wYear | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:12:7:12:11 | wYear | wYear | test.cpp:984:14:984:15 | st | st |
14+
| test.cpp:1077:5:1077:9 | wYear | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:12:7:12:11 | wYear | wYear | test.cpp:1071:13:1071:14 | st | st |
15+
| test.cpp:1135:9:1135:15 | tm_year | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:92:17:92:23 | tm_year | tm_year | test.cpp:1126:35:1126:36 | tm | tm |
16+
| test.cpp:1137:9:1137:15 | tm_year | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:92:17:92:23 | tm_year | tm_year | test.cpp:1126:35:1126:36 | tm | tm |
17+
| test.cpp:1591:11:1591:17 | tm_year | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:58:6:58:12 | tm_year | tm_year | test.cpp:1590:41:1590:48 | timeinfo | timeinfo |
18+
| test.cpp:1599:11:1599:17 | tm_year | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:58:6:58:12 | tm_year | tm_year | test.cpp:1598:41:1598:48 | timeinfo | timeinfo |
19+
| test.cpp:1645:11:1645:17 | tm_year | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:58:6:58:12 | tm_year | tm_year | test.cpp:1644:57:1644:64 | timeinfo | timeinfo |
20+
| test.cpp:1656:11:1656:17 | tm_year | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:58:6:58:12 | tm_year | tm_year | test.cpp:1655:57:1655:64 | timeinfo | timeinfo |
21+
| test.cpp:1667:11:1667:17 | tm_year | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:58:6:58:12 | tm_year | tm_year | test.cpp:1666:30:1666:37 | timeinfo | timeinfo |
22+
| test.cpp:1678:11:1678:17 | tm_year | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:58:6:58:12 | tm_year | tm_year | test.cpp:1677:30:1677:37 | timeinfo | timeinfo |
23+
| test.cpp:1690:11:1690:17 | tm_year | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:58:6:58:12 | tm_year | tm_year | test.cpp:1689:30:1689:37 | timeinfo | timeinfo |
24+
| test.cpp:1702:11:1702:17 | tm_year | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:58:6:58:12 | tm_year | tm_year | test.cpp:1701:30:1701:37 | timeinfo | timeinfo |
25+
| test.cpp:1712:11:1712:17 | tm_year | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:58:6:58:12 | tm_year | tm_year | test.cpp:1711:30:1711:37 | timeinfo | timeinfo |
26+
| test.cpp:1723:11:1723:17 | tm_year | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:58:6:58:12 | tm_year | tm_year | test.cpp:1722:40:1722:47 | timeinfo | timeinfo |
27+
| test.cpp:1758:11:1758:17 | tm_year | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:58:6:58:12 | tm_year | tm_year | test.cpp:1757:45:1757:52 | timeinfo | timeinfo |
28+
| test.cpp:1763:11:1763:17 | tm_year | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:58:6:58:12 | tm_year | tm_year | test.cpp:1762:45:1762:52 | timeinfo | timeinfo |
29+
| test.cpp:1792:11:1792:17 | tm_year | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:58:6:58:12 | tm_year | tm_year | test.cpp:1788:38:1788:45 | timeinfo | timeinfo |
30+
| test.cpp:1799:11:1799:17 | tm_year | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | test.cpp:58:6:58:12 | tm_year | tm_year | test.cpp:1798:36:1798:43 | timeinfo | timeinfo |
31+
testFailures
32+
| test.cpp:422:5:422:9 | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | Unexpected result: Alert |
33+
| test.cpp:440:5:440:9 | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | Unexpected result: Alert |
34+
| test.cpp:456:6:456:10 | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | Unexpected result: Alert |
35+
| test.cpp:647:5:647:9 | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | Unexpected result: Alert |
36+
| test.cpp:665:5:665:9 | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | Unexpected result: Alert |
37+
| test.cpp:681:5:681:9 | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | Unexpected result: Alert |
38+
| test.cpp:792:11:792:17 | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | Unexpected result: Alert |
39+
| test.cpp:813:11:813:17 | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | Unexpected result: Alert |
40+
| test.cpp:818:5:818:9 | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | Unexpected result: Alert |
41+
| test.cpp:954:6:954:10 | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | Unexpected result: Alert |
42+
| test.cpp:972:6:972:10 | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | Unexpected result: Alert |
43+
| test.cpp:990:6:990:10 | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | Unexpected result: Alert |
44+
| test.cpp:1077:5:1077:9 | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | Unexpected result: Alert |
45+
| test.cpp:1135:9:1135:15 | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | Unexpected result: Alert |
46+
| test.cpp:1137:9:1137:15 | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | Unexpected result: Alert |
47+
| test.cpp:1591:11:1591:17 | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | Unexpected result: Alert |
48+
| test.cpp:1599:11:1599:17 | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | Unexpected result: Alert |
49+
| test.cpp:1645:11:1645:17 | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | Unexpected result: Alert |
50+
| test.cpp:1656:11:1656:17 | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | Unexpected result: Alert |
51+
| test.cpp:1667:11:1667:17 | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | Unexpected result: Alert |
52+
| test.cpp:1678:11:1678:17 | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | Unexpected result: Alert |
53+
| test.cpp:1690:11:1690:17 | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | Unexpected result: Alert |
54+
| test.cpp:1702:11:1702:17 | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | Unexpected result: Alert |
55+
| test.cpp:1712:11:1712:17 | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | Unexpected result: Alert |
56+
| test.cpp:1723:11:1723:17 | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | Unexpected result: Alert |
57+
| test.cpp:1758:11:1758:17 | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | Unexpected result: Alert |
58+
| test.cpp:1763:11:1763:17 | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | Unexpected result: Alert |
59+
| test.cpp:1792:11:1792:17 | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | Unexpected result: Alert |
60+
| test.cpp:1799:11:1799:17 | Field $@ on variable $@ has been modified, but no appropriate check for LeapYear was found. | Unexpected result: Alert |
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.ql
1+
query: Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.ql
2+
postprocess: utils/test/InlineExpectationsTestQuery.ql
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
| test.cpp:317:2:317:21 | call to SystemTimeToFileTime | Return value of $@ function should be verified to check for any error because variable $@ is not guaranteed to be safe. | test.cpp:63:1:63:20 | SystemTimeToFileTime | SystemTimeToFileTime | test.cpp:309:13:309:14 | st | st |
2-
| test.cpp:330:2:330:21 | call to SystemTimeToFileTime | Return value of $@ function should be verified to check for any error because variable $@ is not guaranteed to be safe. | test.cpp:63:1:63:20 | SystemTimeToFileTime | SystemTimeToFileTime | test.cpp:322:13:322:14 | st | st |
3-
| test.cpp:341:2:341:21 | call to SystemTimeToFileTime | Return value of $@ function should be verified to check for any error because variable $@ is not guaranteed to be safe. | test.cpp:63:1:63:20 | SystemTimeToFileTime | SystemTimeToFileTime | test.cpp:333:62:333:63 | st | st |
4-
| test.cpp:720:2:720:21 | call to SystemTimeToFileTime | Return value of $@ function should be verified to check for any error because variable $@ is not guaranteed to be safe. | test.cpp:63:1:63:20 | SystemTimeToFileTime | SystemTimeToFileTime | test.cpp:712:13:712:14 | st | st |
5-
| test.cpp:735:2:735:21 | call to SystemTimeToFileTime | Return value of $@ function should be verified to check for any error because variable $@ is not guaranteed to be safe. | test.cpp:63:1:63:20 | SystemTimeToFileTime | SystemTimeToFileTime | test.cpp:725:13:725:14 | st | st |
1+
| test.cpp:425:2:425:21 | call to SystemTimeToFileTime | Return value of $@ function should be verified to check for any error because variable $@ is not guaranteed to be safe. | test.cpp:101:1:101:20 | SystemTimeToFileTime | SystemTimeToFileTime | test.cpp:417:13:417:14 | st | st |
2+
| test.cpp:443:2:443:21 | call to SystemTimeToFileTime | Return value of $@ function should be verified to check for any error because variable $@ is not guaranteed to be safe. | test.cpp:101:1:101:20 | SystemTimeToFileTime | SystemTimeToFileTime | test.cpp:435:13:435:14 | st | st |
3+
| test.cpp:459:2:459:21 | call to SystemTimeToFileTime | Return value of $@ function should be verified to check for any error because variable $@ is not guaranteed to be safe. | test.cpp:101:1:101:20 | SystemTimeToFileTime | SystemTimeToFileTime | test.cpp:451:62:451:63 | st | st |
4+
| test.cpp:956:3:956:22 | call to SystemTimeToFileTime | Return value of $@ function should be verified to check for any error because variable $@ is not guaranteed to be safe. | test.cpp:101:1:101:20 | SystemTimeToFileTime | SystemTimeToFileTime | test.cpp:947:14:947:15 | st | st |
5+
| test.cpp:974:3:974:22 | call to SystemTimeToFileTime | Return value of $@ function should be verified to check for any error because variable $@ is not guaranteed to be safe. | test.cpp:101:1:101:20 | SystemTimeToFileTime | SystemTimeToFileTime | test.cpp:965:14:965:15 | st | st |
6+
| test.cpp:1081:2:1081:21 | call to SystemTimeToFileTime | Return value of $@ function should be verified to check for any error because variable $@ is not guaranteed to be safe. | test.cpp:101:1:101:20 | SystemTimeToFileTime | SystemTimeToFileTime | test.cpp:1071:13:1071:14 | st | st |

0 commit comments

Comments
 (0)