Add parser tests
This commit is contained in:
parent
7cefee027a
commit
f5833e759e
10 changed files with 643 additions and 6 deletions
81
src/test/rustdoc-js-std/parser-generics.js
Normal file
81
src/test/rustdoc-js-std/parser-generics.js
Normal file
|
@ -0,0 +1,81 @@
|
|||
const QUERY = ['<P>', 'A<B<C<D>, E>'];
|
||||
|
||||
const PARSED = [
|
||||
{
|
||||
args: [],
|
||||
elemName: null,
|
||||
elems: [{
|
||||
name: "",
|
||||
fullPath: [""],
|
||||
pathWithoutLast: [],
|
||||
pathLast: "",
|
||||
generics: [
|
||||
{
|
||||
name: "p",
|
||||
fullPath: ["p"],
|
||||
pathWithoutLast: [],
|
||||
pathLast: "p",
|
||||
generics: [],
|
||||
},
|
||||
],
|
||||
}],
|
||||
foundElems: 1,
|
||||
id: "<P>",
|
||||
nameSplit: null,
|
||||
original: "<P>",
|
||||
returned: [],
|
||||
typeFilter: -1,
|
||||
val: "<p>",
|
||||
error: null,
|
||||
},
|
||||
{
|
||||
args: [],
|
||||
elemName: null,
|
||||
elems: [{
|
||||
name: "a",
|
||||
fullPath: ["a"],
|
||||
pathWithoutLast: [],
|
||||
pathLast: "a",
|
||||
generics: [
|
||||
{
|
||||
name: "b",
|
||||
fullPath: ["b"],
|
||||
pathWithoutLast: [],
|
||||
pathLast: "b",
|
||||
generics: [
|
||||
{
|
||||
name: "c",
|
||||
fullPath: ["c"],
|
||||
pathWithoutLast: [],
|
||||
pathLast: "c",
|
||||
generics: [
|
||||
{
|
||||
name: "d",
|
||||
fullPath: ["d"],
|
||||
pathWithoutLast: [],
|
||||
pathLast: "d",
|
||||
generics: [],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "e",
|
||||
fullPath: ["e"],
|
||||
pathWithoutLast: [],
|
||||
pathLast: "e",
|
||||
generics: [],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
}],
|
||||
foundElems: 1,
|
||||
id: 'A<B<C<D>, E>',
|
||||
nameSplit: null,
|
||||
original: 'A<B<C<D>, E>',
|
||||
returned: [],
|
||||
typeFilter: -1,
|
||||
val: 'a<b<c<d>, e>',
|
||||
error: null,
|
||||
}
|
||||
];
|
Loading…
Add table
Add a link
Reference in a new issue