about summary refs log tree commit diff
path: root/tests/rustdoc-js-std/parser-generics.js
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-06-10 11:20:10 +0200
committerGitHub <noreply@github.com>2023-06-10 11:20:10 +0200
commit299929e0357c031eabb98f7c0fcf3cd9170c6c3a (patch)
tree52f46aed8610e06ecece268d70a54829949830db /tests/rustdoc-js-std/parser-generics.js
parent4d36c84668f57628c5241e444d5e1449d1ae5eca (diff)
parent9803651ee84545f8913b6fe9e76c8bd13603bb6e (diff)
downloadrust-299929e0357c031eabb98f7c0fcf3cd9170c6c3a.tar.gz
rust-299929e0357c031eabb98f7c0fcf3cd9170c6c3a.zip
Rollup merge of #112468 - GuillaumeGomez:change-rustdoc-js-formats, r=notriddle
Change format of rustdoc-js tests by putting query and correction directly alongside the expected values

As I was working on fixing merge conflicts in #108537, I faced quite a big issue when trying to update the `rustdoc-js*` tests. To make it much simpler, this PR moves the `query` and `correction` directly alongside the expected data so now we know what is the query that is being run without needing to add comments or going back to the top of the file.

r? ```@notriddle```
Diffstat (limited to 'tests/rustdoc-js-std/parser-generics.js')
-rw-r--r--tests/rustdoc-js-std/parser-generics.js15
1 files changed, 6 insertions, 9 deletions
diff --git a/tests/rustdoc-js-std/parser-generics.js b/tests/rustdoc-js-std/parser-generics.js
index 5a2266dbe36..eb3cf455155 100644
--- a/tests/rustdoc-js-std/parser-generics.js
+++ b/tests/rustdoc-js-std/parser-generics.js
@@ -1,14 +1,6 @@
-const QUERY = [
-    'A<B<C<D>,  E>',
-    'p<> u8',
-    '"p"<a>',
-    'p<u<x>>',
-    'p<u<x>, r>',
-    'p<u<x, r>>',
-];
-
 const PARSED = [
     {
+        query: 'A<B<C<D>,  E>',
         elems: [],
         foundElems: 0,
         original: 'A<B<C<D>,  E>',
@@ -17,6 +9,7 @@ const PARSED = [
         error: 'Unclosed `<`',
     },
     {
+        query: 'p<> u8',
         elems: [
             {
                 name: "p",
@@ -42,6 +35,7 @@ const PARSED = [
         error: null,
     },
     {
+        query: '"p"<a>',
         elems: [
             {
                 name: "p",
@@ -67,6 +61,7 @@ const PARSED = [
         error: null,
     },
     {
+        query: 'p<u<x>>',
         elems: [
             {
                 name: "p",
@@ -100,6 +95,7 @@ const PARSED = [
         error: null,
     },
     {
+        query: 'p<u<x>, r>',
         elems: [
             {
                 name: "p",
@@ -140,6 +136,7 @@ const PARSED = [
         error: null,
     },
     {
+        query: 'p<u<x, r>>',
         elems: [
             {
                 name: "p",