summaryrefslogtreecommitdiffstats
path: root/tests/rustdoc-js/slice-array.js
diff options
context:
space:
mode:
Diffstat (limited to 'tests/rustdoc-js/slice-array.js')
-rw-r--r--tests/rustdoc-js/slice-array.js46
1 files changed, 27 insertions, 19 deletions
diff --git a/tests/rustdoc-js/slice-array.js b/tests/rustdoc-js/slice-array.js
index 8c21e06dc..d676d0577 100644
--- a/tests/rustdoc-js/slice-array.js
+++ b/tests/rustdoc-js/slice-array.js
@@ -1,65 +1,73 @@
// exact-check
-const QUERY = [
- 'R<primitive:slice<P>>',
- 'primitive:slice<R<P>>',
- 'R<primitive:slice<Q>>',
- 'primitive:slice<R<Q>>',
- 'R<primitive:array<Q>>',
- 'primitive:array<R<Q>>',
- 'primitive:array<TraitCat>',
- 'primitive:array<TraitDog>',
-];
-
const EXPECTED = [
{
- // R<primitive:slice<P>>
+ 'query': 'R<primitive:slice<P>>',
'returned': [],
'in_args': [
{ 'path': 'slice_array', 'name': 'alpha' },
],
},
{
- // primitive:slice<R<P>>
+ 'query': 'primitive:slice<R<P>>',
'returned': [
{ 'path': 'slice_array', 'name': 'alef' },
],
'in_args': [],
},
{
- // R<primitive:slice<Q>>
+ 'query': 'R<primitive:slice<Q>>',
'returned': [],
'in_args': [],
},
{
- // primitive:slice<R<Q>>
+ 'query': 'primitive:slice<R<Q>>',
'returned': [],
'in_args': [],
},
{
- // R<primitive:array<Q>>
+ 'query': 'R<primitive:array<Q>>',
'returned': [
{ 'path': 'slice_array', 'name': 'bet' },
],
'in_args': [],
},
{
- // primitive:array<R<Q>>
+ 'query': 'primitive:array<R<Q>>',
'returned': [],
'in_args': [
{ 'path': 'slice_array', 'name': 'beta' },
],
},
{
- // primitive::array<TraitCat>
+ 'query': 'primitive:array<TraitCat>',
'in_args': [
{ 'path': 'slice_array', 'name': 'gamma' },
],
},
{
- // primitive::array<TraitDog>
+ 'query': 'primitive:array<TraitDog>',
'in_args': [
{ 'path': 'slice_array', 'name': 'gamma' },
],
},
+ {
+ 'query': '[TraitCat]',
+ 'in_args': [
+ { 'path': 'slice_array', 'name': 'gamma' },
+ { 'path': 'slice_array', 'name': 'epsilon' },
+ ],
+ },
+ {
+ 'query': 'R<[Q]>',
+ 'returned': [
+ { 'path': 'slice_array', 'name': 'bet' },
+ ],
+ },
+ {
+ 'query': 'R<[P]>',
+ 'in_args': [
+ { 'path': 'slice_array', 'name': 'alpha' },
+ ],
+ },
];