Skip to content

Commit 3590cca

Browse files
committed
Rust: fix tests
1 parent e935bd6 commit 3590cca

File tree

11 files changed

+1092
-11
lines changed

11 files changed

+1092
-11
lines changed

rust/ql/test/extractor-tests/canonical_path/canonical_paths.expected

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ canonicalPath
55
| lib.rs:1:1:1:14 | mod anonymous | test::anonymous |
66
| lib.rs:2:1:2:12 | mod regular | test::regular |
77
| regular.rs:1:1:2:18 | struct Struct | test::regular::Struct |
8+
| regular.rs:2:12:2:17 | fn eq | <test::regular::Struct as core::cmp::PartialEq>::eq |
9+
| regular.rs:2:12:2:17 | impl ...::Eq for Struct::<...> { ... } | <test::regular::Struct as core::cmp::Eq> |
10+
| regular.rs:2:12:2:17 | impl ...::PartialEq for Struct::<...> { ... } | <test::regular::Struct as core::cmp::PartialEq> |
811
| regular.rs:4:1:6:1 | trait Trait | test::regular::Trait |
912
| regular.rs:5:5:5:16 | fn f | <_ as test::regular::Trait>::f |
1013
| regular.rs:8:1:10:1 | impl Trait for Struct { ... } | <test::regular::Struct as test::regular::Trait> |
@@ -42,6 +45,9 @@ canonicalPaths
4245
| lib.rs:1:1:1:14 | mod anonymous | repo::test | crate::anonymous |
4346
| lib.rs:2:1:2:12 | mod regular | repo::test | crate::regular |
4447
| regular.rs:1:1:2:18 | struct Struct | repo::test | crate::regular::Struct |
48+
| regular.rs:2:12:2:17 | fn eq | repo::test | <crate::regular::Struct as crate::cmp::PartialEq>::eq |
49+
| regular.rs:2:12:2:17 | impl ...::Eq for Struct::<...> { ... } | None | None |
50+
| regular.rs:2:12:2:17 | impl ...::PartialEq for Struct::<...> { ... } | None | None |
4551
| regular.rs:4:1:6:1 | trait Trait | repo::test | crate::regular::Trait |
4652
| regular.rs:5:5:5:16 | fn f | repo::test | crate::regular::Trait::f |
4753
| regular.rs:8:1:10:1 | impl Trait for Struct { ... } | None | None |
@@ -66,6 +72,8 @@ resolvedPaths
6672
| anonymous.rs:29:9:29:9 | s | None | None |
6773
| anonymous.rs:29:9:29:13 | s.g() | None | None |
6874
| anonymous.rs:30:9:30:14 | nested | None | None |
75+
| regular.rs:1:1:1:24 | other | None | None |
76+
| regular.rs:1:1:1:24 | self | None | None |
6977
| regular.rs:27:13:27:21 | Struct {...} | repo::test | crate::regular::Struct |
7078
| regular.rs:28:5:28:5 | s | None | None |
7179
| regular.rs:28:5:28:9 | s.f() | repo::test | <crate::regular::Struct as crate::regular::Trait>::f |

rust/ql/test/extractor-tests/canonical_path_disabled/canonical_paths.expected

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ canonicalPath
55
| lib.rs:1:1:1:14 | mod anonymous | test::anonymous |
66
| lib.rs:2:1:2:12 | mod regular | test::regular |
77
| regular.rs:4:1:5:18 | struct Struct | test::regular::Struct |
8+
| regular.rs:5:12:5:17 | fn eq | <test::regular::Struct as core::cmp::PartialEq>::eq |
9+
| regular.rs:5:12:5:17 | impl ...::Eq for Struct::<...> { ... } | <test::regular::Struct as core::cmp::Eq> |
10+
| regular.rs:5:12:5:17 | impl ...::PartialEq for Struct::<...> { ... } | <test::regular::Struct as core::cmp::PartialEq> |
811
| regular.rs:7:1:9:1 | trait Trait | test::regular::Trait |
912
| regular.rs:8:5:8:16 | fn f | <_ as test::regular::Trait>::f |
1013
| regular.rs:11:1:13:1 | impl Trait for Struct { ... } | <test::regular::Struct as test::regular::Trait> |
@@ -42,6 +45,9 @@ canonicalPaths
4245
| lib.rs:1:1:1:14 | mod anonymous | None | None |
4346
| lib.rs:2:1:2:12 | mod regular | None | None |
4447
| regular.rs:4:1:5:18 | struct Struct | None | None |
48+
| regular.rs:5:12:5:17 | fn eq | None | None |
49+
| regular.rs:5:12:5:17 | impl ...::Eq for Struct::<...> { ... } | None | None |
50+
| regular.rs:5:12:5:17 | impl ...::PartialEq for Struct::<...> { ... } | None | None |
4551
| regular.rs:7:1:9:1 | trait Trait | None | None |
4652
| regular.rs:8:5:8:16 | fn f | None | None |
4753
| regular.rs:11:1:13:1 | impl Trait for Struct { ... } | None | None |
@@ -66,6 +72,8 @@ resolvedPaths
6672
| anonymous.rs:32:9:32:9 | s | None | None |
6773
| anonymous.rs:32:9:32:13 | s.g() | None | None |
6874
| anonymous.rs:33:9:33:14 | nested | None | None |
75+
| regular.rs:4:1:4:24 | other | None | None |
76+
| regular.rs:4:1:4:24 | self | None | None |
6977
| regular.rs:30:13:30:21 | Struct {...} | None | None |
7078
| regular.rs:31:5:31:5 | s | None | None |
7179
| regular.rs:31:5:31:9 | s.f() | None | None |
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
| gen_enum.rs:4:5:7:34 | enum E | hasExtendedCanonicalPath: | no | hasCrateOrigin: | no | hasAttributeMacroExpansion: | no | getNumberOfAttrs: | 0 | hasGenericParamList: | no | hasName: | yes | hasVariantList: | yes | hasVisibility: | no | hasWhereClause: | no |
1+
| gen_enum.rs:4:5:7:34 | enum E | hasExtendedCanonicalPath: | no | hasCrateOrigin: | no | hasAttributeMacroExpansion: | no | getNumberOfDeriveMacroExpansions: | 0 | getNumberOfAttrs: | 0 | hasGenericParamList: | no | hasName: | yes | hasVariantList: | yes | hasVisibility: | no | hasWhereClause: | no |
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
| gen_macro_items.rs:5:5:5:38 | MacroItems | getNumberOfItems: | 2 |
2+
| gen_macro_items.rs:13:12:13:14 | MacroItems | getNumberOfItems: | 1 |
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
| gen_macro_items.rs:5:5:5:38 | MacroItems | 0 | gen_macro_items.rs:5:5:5:38 | use ...::Path |
22
| gen_macro_items.rs:5:5:5:38 | MacroItems | 1 | gen_macro_items.rs:5:5:5:38 | fn get_parent |
3+
| gen_macro_items.rs:13:12:13:14 | MacroItems | 0 | gen_macro_items.rs:13:12:13:14 | impl ...::Debug for Bar::<...> { ... } |
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
| gen_struct.rs:4:5:8:5 | struct Point | hasExtendedCanonicalPath: | no | hasCrateOrigin: | no | hasAttributeMacroExpansion: | no | getNumberOfAttrs: | 0 | hasFieldList: | yes | hasGenericParamList: | no | hasName: | yes | hasVisibility: | no | hasWhereClause: | no |
1+
| gen_struct.rs:4:5:8:5 | struct Point | hasExtendedCanonicalPath: | no | hasCrateOrigin: | no | hasAttributeMacroExpansion: | no | getNumberOfDeriveMacroExpansions: | 0 | getNumberOfAttrs: | 0 | hasFieldList: | yes | hasGenericParamList: | no | hasName: | yes | hasVisibility: | no | hasWhereClause: | no |
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
| gen_union.rs:4:5:7:32 | union U | hasExtendedCanonicalPath: | no | hasCrateOrigin: | no | hasAttributeMacroExpansion: | no | getNumberOfAttrs: | 0 | hasGenericParamList: | no | hasName: | yes | hasStructFieldList: | yes | hasVisibility: | no | hasWhereClause: | no |
1+
| gen_union.rs:4:5:7:32 | union U | hasExtendedCanonicalPath: | no | hasCrateOrigin: | no | hasAttributeMacroExpansion: | no | getNumberOfDeriveMacroExpansions: | 0 | getNumberOfAttrs: | 0 | hasGenericParamList: | no | hasName: | yes | hasStructFieldList: | yes | hasVisibility: | no | hasWhereClause: | no |

rust/ql/test/library-tests/dataflow/sources/CONSISTENCY/PathResolutionConsistency.expected

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@ multiplePathResolutions
8686
| test_futures_io.rs:25:23:25:61 | ...::try_from | file://:0:0:0:0 | fn try_from |
8787
| test_futures_io.rs:145:26:145:43 | ...::with_capacity | file://:0:0:0:0 | fn with_capacity |
8888
| test_futures_io.rs:145:26:145:43 | ...::with_capacity | file://:0:0:0:0 | fn with_capacity |
89+
| web_frameworks.rs:40:5:40:26 | ...::write_str | file://:0:0:0:0 | fn write_str |
90+
| web_frameworks.rs:40:5:40:26 | ...::write_str | file://:0:0:0:0 | fn write_str |
91+
| web_frameworks.rs:40:5:40:26 | ...::write_str | file://:0:0:0:0 | fn write_str |
92+
| web_frameworks.rs:40:5:40:26 | ...::write_str | file://:0:0:0:0 | fn write_str |
8993
multipleCanonicalPaths
9094
| file://:0:0:0:0 | fn to_ordering | file://:0:0:0:0 | Crate([email protected]) | <typenum::Equal as core::cmp::Ord>::to_ordering |
9195
| file://:0:0:0:0 | fn to_ordering | file://:0:0:0:0 | Crate([email protected]) | <typenum::Equal as typenum::marker_traits::Ord>::to_ordering |

0 commit comments

Comments
 (0)