about summary refs log tree commit diff
path: root/tests/rustdoc-js/generics-unbox.js
diff options
context:
space:
mode:
authorMichael Howell <michael@notriddle.com>2023-09-09 16:49:29 -0700
committerMichael Howell <michael@notriddle.com>2023-09-09 16:58:37 -0700
commit269cb579479ab950e85a2e4078810501c29d7465 (patch)
treeb6d4aa94a25ff007dc8d576055a30f5f8551519f /tests/rustdoc-js/generics-unbox.js
parent9ccb217422628107b9b6388a30879ec0866ebc9c (diff)
downloadrust-269cb579479ab950e85a2e4078810501c29d7465.tar.gz
rust-269cb579479ab950e85a2e4078810501c29d7465.zip
rustdoc-search: fix bugs when unboxing and reordering combine
Diffstat (limited to 'tests/rustdoc-js/generics-unbox.js')
-rw-r--r--tests/rustdoc-js/generics-unbox.js38
1 files changed, 38 insertions, 0 deletions
diff --git a/tests/rustdoc-js/generics-unbox.js b/tests/rustdoc-js/generics-unbox.js
new file mode 100644
index 00000000000..9cdfc7ac8b6
--- /dev/null
+++ b/tests/rustdoc-js/generics-unbox.js
@@ -0,0 +1,38 @@
+// exact-check
+
+const EXPECTED = [
+    {
+        'query': 'Inside<T> -> Out1<T>',
+        'others': [
+            { 'path': 'generics_unbox', 'name': 'alpha' },
+        ],
+    },
+    {
+        'query': 'Inside<T> -> Out3<T>',
+        'others': [
+            { 'path': 'generics_unbox', 'name': 'beta' },
+            { 'path': 'generics_unbox', 'name': 'gamma' },
+        ],
+    },
+    {
+        'query': 'Inside<T> -> Out4<T>',
+        'others': [
+            { 'path': 'generics_unbox', 'name': 'beta' },
+            { 'path': 'generics_unbox', 'name': 'gamma' },
+        ],
+    },
+    {
+        'query': 'Inside<T> -> Out3<U, T>',
+        'others': [
+            { 'path': 'generics_unbox', 'name': 'beta' },
+            { 'path': 'generics_unbox', 'name': 'gamma' },
+        ],
+    },
+    {
+        'query': 'Inside<T> -> Out4<U, T>',
+        'others': [
+            { 'path': 'generics_unbox', 'name': 'beta' },
+            { 'path': 'generics_unbox', 'name': 'gamma' },
+        ],
+    },
+];