rust/tests/rustdoc-js/generics.js

74 lines
1.6 KiB
JavaScript
Raw Normal View History

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