rust/tests/rustdoc-js-std/parser-paths.js
2024-10-30 10:35:38 -07:00

136 lines
3.1 KiB
JavaScript

const PARSED = [
{
query: 'A::B',
elems: [{
name: "A::B",
fullPath: ["a", "b"],
pathWithoutLast: ["a"],
pathLast: "b",
generics: [],
typeFilter: -1,
}],
foundElems: 1,
userQuery: "A::B",
returned: [],
error: null,
},
{
query: "a:: a",
elems: [{
name: "a:: a",
fullPath: ["a", "a"],
pathWithoutLast: ["a"],
pathLast: "a",
generics: [],
typeFilter: -1,
}],
foundElems: 1,
userQuery: 'a:: a',
returned: [],
error: null,
},
{
query: "a ::a",
elems: [{
name: "a ::a",
fullPath: ["a", "a"],
pathWithoutLast: ["a"],
pathLast: "a",
generics: [],
typeFilter: -1,
}],
foundElems: 1,
userQuery: 'a ::a',
returned: [],
error: null,
},
{
query: "a :: a",
elems: [{
name: "a :: a",
fullPath: ["a", "a"],
pathWithoutLast: ["a"],
pathLast: "a",
generics: [],
typeFilter: -1,
}],
foundElems: 1,
userQuery: 'a :: a',
returned: [],
error: null,
},
{
query: 'A::B,C',
elems: [
{
name: "A::B",
fullPath: ["a", "b"],
pathWithoutLast: ["a"],
pathLast: "b",
generics: [],
typeFilter: -1,
},
{
name: "C",
fullPath: ["c"],
pathWithoutLast: [],
pathLast: "c",
generics: [],
typeFilter: -1,
},
],
foundElems: 2,
userQuery: 'A::B,C',
returned: [],
error: null,
},
{
query: 'A::B<f>,C',
elems: [
{
name: "A::B",
fullPath: ["a", "b"],
pathWithoutLast: ["a"],
pathLast: "b",
generics: [
{
name: "f",
fullPath: ["f"],
pathWithoutLast: [],
pathLast: "f",
generics: [],
},
],
typeFilter: -1,
},
{
name: "C",
fullPath: ["c"],
pathWithoutLast: [],
pathLast: "c",
generics: [],
typeFilter: -1,
},
],
foundElems: 2,
userQuery: 'A::B<f>,C',
returned: [],
error: null,
},
{
query: 'mod::a',
elems: [{
name: "mod::a",
fullPath: ["mod", "a"],
pathWithoutLast: ["mod"],
pathLast: "a",
generics: [],
typeFilter: -1,
}],
foundElems: 1,
userQuery: "mod::a",
returned: [],
error: null,
},
];