]> git.lizzy.rs Git - rust.git/blob - tests/rustdoc-js/doc-alias.js
Run the tools builder on all PRs
[rust.git] / tests / rustdoc-js / doc-alias.js
1 // exact-check
2
3 const QUERY = [
4     'StructItem',
5     'StructFieldItem',
6     'StructMethodItem',
7     'ImplTraitItem',
8     'StructImplConstItem',
9     'ImplTraitFunction',
10     'EnumItem',
11     'VariantItem',
12     'EnumMethodItem',
13     'TypedefItem',
14     'TraitItem',
15     'TraitTypeItem',
16     'AssociatedConstItem',
17     'TraitFunctionItem',
18     'FunctionItem',
19     'ModuleItem',
20     'ConstItem',
21     'StaticItem',
22     'UnionItem',
23     'UnionFieldItem',
24     'UnionMethodItem',
25     'MacroItem',
26 ];
27
28 const EXPECTED = [
29     {
30         // StructItem
31         'others': [
32             {
33                 'path': 'doc_alias',
34                 'name': 'Struct',
35                 'alias': 'StructItem',
36                 'href': '../doc_alias/struct.Struct.html',
37                 'is_alias': true
38             },
39         ],
40     },
41     {
42         // StructFieldItem
43         'others': [
44             {
45                 'path': 'doc_alias::Struct',
46                 'name': 'field',
47                 'alias': 'StructFieldItem',
48                 'href': '../doc_alias/struct.Struct.html#structfield.field',
49                 'is_alias': true
50             },
51         ],
52     },
53     {
54         // StructMethodItem
55         'others': [
56             {
57                 'path': 'doc_alias::Struct',
58                 'name': 'method',
59                 'alias': 'StructMethodItem',
60                 'href': '../doc_alias/struct.Struct.html#method.method',
61                 'is_alias': true
62             },
63         ],
64     },
65     {
66         // ImplTraitItem
67         'others': [],
68     },
69     {
70         // StructImplConstItem
71         'others': [
72             {
73                 'path': 'doc_alias::Struct',
74                 'name': 'ImplConstItem',
75                 'alias': 'StructImplConstItem',
76                 'href': '../doc_alias/struct.Struct.html#associatedconstant.ImplConstItem',
77                 'is_alias': true
78             },
79         ],
80     },
81     {
82         // ImplTraitFunction
83         'others': [
84             {
85                 'path': 'doc_alias::Struct',
86                 'name': 'function',
87                 'alias': 'ImplTraitFunction',
88                 'href': '../doc_alias/struct.Struct.html#method.function',
89                 'is_alias': true
90             },
91         ],
92     },
93     {
94         // EnumItem
95         'others': [
96             {
97                 'path': 'doc_alias',
98                 'name': 'Enum',
99                 'alias': 'EnumItem',
100                 'href': '../doc_alias/enum.Enum.html',
101                 'is_alias': true
102             },
103         ],
104     },
105     {
106         // VariantItem
107         'others': [
108             {
109                 'path': 'doc_alias::Enum',
110                 'name': 'Variant',
111                 'alias': 'VariantItem',
112                 'href': '../doc_alias/enum.Enum.html#variant.Variant',
113                 'is_alias': true
114             },
115         ],
116     },
117     {
118         // EnumMethodItem
119         'others': [
120             {
121                 'path': 'doc_alias::Enum',
122                 'name': 'method',
123                 'alias': 'EnumMethodItem',
124                 'href': '../doc_alias/enum.Enum.html#method.method',
125                 'is_alias': true
126             },
127         ],
128     },
129     {
130         // TypedefItem
131         'others': [
132             {
133                 'path': 'doc_alias',
134                 'name': 'Typedef',
135                 'alias': 'TypedefItem',
136                 'href': '../doc_alias/type.Typedef.html',
137                 'is_alias': true
138             },
139         ],
140     },
141     {
142         // TraitItem
143         'others': [
144             {
145                 'path': 'doc_alias',
146                 'name': 'Trait',
147                 'alias': 'TraitItem',
148                 'href': '../doc_alias/trait.Trait.html',
149                 'is_alias': true
150             },
151         ],
152     },
153     {
154         // TraitTypeItem
155         'others': [
156             {
157                 'path': 'doc_alias::Trait',
158                 'name': 'Target',
159                 'alias': 'TraitTypeItem',
160                 'href': '../doc_alias/trait.Trait.html#associatedtype.Target',
161                 'is_alias': true
162             },
163         ],
164     },
165     {
166         // AssociatedConstItem
167         'others': [
168             {
169                 'path': 'doc_alias::Trait',
170                 'name': 'AssociatedConst',
171                 'alias': 'AssociatedConstItem',
172                 'href': '../doc_alias/trait.Trait.html#associatedconstant.AssociatedConst',
173                 'is_alias': true
174             },
175         ],
176     },
177     {
178         // TraitFunctionItem
179         'others': [
180             {
181                 'path': 'doc_alias::Trait',
182                 'name': 'function',
183                 'alias': 'TraitFunctionItem',
184                 'href': '../doc_alias/trait.Trait.html#tymethod.function',
185                 'is_alias': true
186             },
187         ],
188     },
189     {
190         // FunctionItem
191         'others': [
192             {
193                 'path': 'doc_alias',
194                 'name': 'function',
195                 'alias': 'FunctionItem',
196                 'href': '../doc_alias/fn.function.html',
197                 'is_alias': true
198             },
199         ],
200     },
201     {
202         // ModuleItem
203         'others': [
204             {
205                 'path': 'doc_alias',
206                 'name': 'Module',
207                 'alias': 'ModuleItem',
208                 'href': '../doc_alias/Module/index.html',
209                 'is_alias': true
210             },
211         ],
212     },
213     {
214         // ConstItem
215         'others': [
216             {
217                 'path': 'doc_alias',
218                 'name': 'Const',
219                 'alias': 'ConstItem',
220                 'href': '../doc_alias/constant.Const.html',
221                 'is_alias': true
222             },
223             {
224                 'path': 'doc_alias::Struct',
225                 'name': 'ImplConstItem',
226             },
227         ],
228     },
229     {
230         // StaticItem
231         'others': [
232             {
233                 'path': 'doc_alias',
234                 'name': 'Static',
235                 'alias': 'StaticItem',
236                 'href': '../doc_alias/static.Static.html',
237                 'is_alias': true
238             },
239         ],
240     },
241     {
242         // UnionItem
243         'others': [
244             {
245                 'path': 'doc_alias',
246                 'name': 'Union',
247                 'alias': 'UnionItem',
248                 'href': '../doc_alias/union.Union.html',
249                 'is_alias': true
250             },
251             // Not an alias!
252             {
253                 'path': 'doc_alias::Union',
254                 'name': 'union_item',
255                 'href': '../doc_alias/union.Union.html#structfield.union_item'
256             },
257         ],
258     },
259     {
260         // UnionFieldItem
261         'others': [
262             {
263                 'path': 'doc_alias::Union',
264                 'name': 'union_item',
265                 'alias': 'UnionFieldItem',
266                 'href': '../doc_alias/union.Union.html#structfield.union_item',
267                 'is_alias': true
268             },
269         ],
270     },
271     {
272         // UnionMethodItem
273         'others': [
274             {
275                 'path': 'doc_alias::Union',
276                 'name': 'method',
277                 'alias': 'UnionMethodItem',
278                 'href': '../doc_alias/union.Union.html#method.method',
279                 'is_alias': true
280             },
281         ],
282     },
283     {
284         // MacroItem
285         'others': [
286             {
287                 'path': 'doc_alias',
288                 'name': 'Macro',
289                 'alias': 'MacroItem',
290                 'href': '../doc_alias/macro.Macro.html',
291                 'is_alias': true
292             },
293         ],
294     },
295 ];