Skip to content

Commit 778f46d

Browse files
committed
Rust: adjust unit tests and expected output
1 parent 8e8efed commit 778f46d

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

rust/ql/test/TestUtils.qll

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
private import rust
22

3-
predicate toBeTested(Element e) { not e instanceof CrateElement }
3+
predicate toBeTested(Element e) { not e instanceof CrateElement and not e instanceof Builtin }
44

55
class CrateElement extends Element {
66
CrateElement() {
@@ -9,3 +9,7 @@ class CrateElement extends Element {
99
any(Crate c).getModule() = this.(AstNode).getParentNode*()
1010
}
1111
}
12+
13+
class Builtin extends AstNode {
14+
Builtin() { this.getFile().getAbsolutePath().matches("%/builtins/%.rs") }
15+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
| 60 |
1+
| 77 |

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
| Inconsistencies - Path resolution | 0 |
1010
| Inconsistencies - SSA | 0 |
1111
| Inconsistencies - data flow | 0 |
12-
| Lines of code extracted | 60 |
12+
| Lines of code extracted | 77 |
1313
| Lines of user code extracted | 60 |
1414
| Macro calls - resolved | 8 |
1515
| Macro calls - total | 9 |

0 commit comments

Comments
 (0)