rust/tests/rustdoc-js/generics.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

74 lines
1.6 KiB
JavaScript
Raw Normal View History

// exact-check
const QUERY = [
'R<P>',
2021-08-23 20:19:43 +00:00
'"P"',
'P',
'ExtraCreditStructMulti<ExtraCreditInnerMulti, ExtraCreditInnerMulti>',
2021-08-23 20:19:43 +00:00
'TraitCat',
'TraitDog',
2021-08-11 18:14:26 +00:00
'Result<String>',
];
const EXPECTED = [
{
// R<P>
'returned': [
{ 'path': 'generics', 'name': 'alef' },
],
'in_args': [
{ 'path': 'generics', 'name': 'alpha' },
],
},
{
2021-08-11 18:14:26 +00:00
// "P"
'others': [
{ 'path': 'generics', 'name': 'P' },
],
'returned': [
{ 'path': 'generics', 'name': 'alef' },
],
'in_args': [
{ 'path': 'generics', 'name': 'alpha' },
],
},
{
2021-08-11 18:14:26 +00:00
// P
'returned': [
{ 'path': 'generics', 'name': 'alef' },
],
'in_args': [
{ 'path': 'generics', 'name': 'alpha' },
],
},
{
2021-12-20 16:45:52 +00:00
// "ExtraCreditStructMulti"<ExtraCreditInnerMulti, ExtraCreditInnerMulti>
'in_args': [
{ 'path': 'generics', 'name': 'extracreditlabhomework' },
],
'returned': [],
},
2021-08-23 20:19:43 +00:00
{
2021-08-11 18:14:26 +00:00
// TraitCat
2021-08-23 20:19:43 +00:00
'in_args': [
{ 'path': 'generics', 'name': 'gamma' },
],
},
{
2021-08-11 18:14:26 +00:00
// TraitDog
2021-08-23 20:19:43 +00:00
'in_args': [
{ 'path': 'generics', 'name': 'gamma' },
],
},
2021-08-11 18:14:26 +00:00
{
// Result<String>
'others': [],
'returned': [
{ 'path': 'generics', 'name': 'super_soup' },
],
'in_args': [
{ 'path': 'generics', 'name': 'super_soup' },
],
},
];