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