Skip to content

Commit 7b265b2

Browse files
committed
Rust: Add a deliberately unresolvable macro call to the test.
1 parent 7279cc4 commit 7b265b2

File tree

6 files changed

+14
-12
lines changed

6 files changed

+14
-12
lines changed

rust/ql/test/query-tests/diagnostics/ExtractionWarnings.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@
55
| does_not_compile.rs:2:26:2:25 | expected SEMICOLON | Extraction warning in does_not_compile.rs with message expected SEMICOLON | 1 |
66
| does_not_compile.rs:2:32:2:31 | expected field name or number | Extraction warning in does_not_compile.rs with message expected field name or number | 1 |
77
| error.rs:2:5:2:17 | An error! | Extraction warning in error.rs with message An error! | 1 |
8+
| my_macro.rs:17:9:17:27 | macro expansion failed: could not resolve macro 'myUndefinedMacro' | Extraction warning in my_macro.rs with message macro expansion failed: could not resolve macro 'myUndefinedMacro' | 1 |
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
| 59 |
1+
| 60 |
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
| 59 |
1+
| 60 |
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
| my_struct.rs:0:0:0:0 | my_struct.rs | 20 |
22
| comments.rs:0:0:0:0 | comments.rs | 13 |
33
| main.rs:0:0:0:0 | main.rs | 8 |
4-
| my_macro.rs:0:0:0:0 | my_macro.rs | 7 |
4+
| my_macro.rs:0:0:0:0 | my_macro.rs | 8 |
55
| lib.rs:0:0:0:0 | lib.rs | 5 |
66
| does_not_compile.rs:0:0:0:0 | does_not_compile.rs | 3 |
77
| error.rs:0:0:0:0 | error.rs | 3 |
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
| Elements extracted | 376 |
1+
| Elements extracted | 383 |
22
| Elements unextracted | 0 |
33
| Extraction errors | 0 |
4-
| Extraction warnings | 7 |
4+
| Extraction warnings | 8 |
55
| Files extracted - total | 7 |
6-
| Files extracted - with errors | 2 |
7-
| Files extracted - without errors | 5 |
6+
| Files extracted - with errors | 3 |
7+
| Files extracted - without errors | 4 |
88
| Inconsistencies - AST | 0 |
99
| Inconsistencies - CFG | 0 |
1010
| Inconsistencies - data flow | 7 |
11-
| Lines of code extracted | 59 |
12-
| Lines of user code extracted | 59 |
11+
| Lines of code extracted | 60 |
12+
| Lines of user code extracted | 60 |
1313
| Macro calls - resolved | 8 |
14-
| Macro calls - total | 8 |
14+
| Macro calls - total | 9 |

rust/ql/test/query-tests/diagnostics/my_macro.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
2-
* total lines in this file: 18
3-
* of which code: 10
2+
* total lines in this file: 19
3+
* of which code: 11
44
* of which only comments: 6
55
* of which blank: 2
66
*/
@@ -14,5 +14,6 @@ macro_rules! myMacro {
1414
pub fn my_func() {
1515
if true {
1616
myMacro!();
17+
myUndefinedMacro!();
1718
}
1819
}

0 commit comments

Comments
 (0)