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