|
3 | 3 | "description": "Each `src` should produce an error when processed. Each test description indicates the error reason, but this text should not be asserted against. Error names are defined in the spec.", |
4 | 4 | "defaultTestProperties": { |
5 | 5 | "testType": "syntax", |
6 | | - "locale": "en-US", |
7 | | - "expErrors": true |
| 6 | + "locale": "en-US" |
8 | 7 | }, |
9 | 8 | "tests": [ |
10 | 9 | { |
11 | | - "description": "Variant Key Mismatch", |
12 | | - "src": ".match {$foo :x} * * {{foo}}" |
| 10 | + "src": ".match {$foo :x} * * {{foo}}", |
| 11 | + "expErrors": [ |
| 12 | + { |
| 13 | + "type": "variant-key-mismatch" |
| 14 | + } |
| 15 | + ] |
13 | 16 | }, |
14 | 17 | { |
15 | | - "description": "Variant Key Mismatch", |
16 | | - "src": ".match {$foo :x} {$bar :x} * {{foo}}" |
| 18 | + "src": ".match {$foo :x} {$bar :x} * {{foo}}", |
| 19 | + "expErrors": [ |
| 20 | + { |
| 21 | + "type": "variant-key-mismatch" |
| 22 | + } |
| 23 | + ] |
17 | 24 | }, |
18 | 25 | { |
19 | | - "description": "Missing Fallback Variant", |
20 | | - "src": ".match {:foo} 1 {{_}}" |
| 26 | + "src": ".match {:foo} 1 {{_}}", |
| 27 | + "expErrors": [ |
| 28 | + { |
| 29 | + "type": "missing-fallback-variant" |
| 30 | + } |
| 31 | + ] |
21 | 32 | }, |
22 | 33 | { |
23 | | - "description": "Missing Fallback Variant", |
24 | | - "src": ".match {:foo} other {{_}}" |
| 34 | + "src": ".match {:foo} other {{_}}", |
| 35 | + "expErrors": [ |
| 36 | + { |
| 37 | + "type": "missing-fallback-variant" |
| 38 | + } |
| 39 | + ] |
25 | 40 | }, |
26 | 41 | { |
27 | | - "description": "Missing Fallback Variant", |
28 | | - "src": ".match {:foo} {:bar} * 1 {{_}} 1 * {{_}}" |
| 42 | + "src": ".match {:foo} {:bar} * 1 {{_}} 1 * {{_}}", |
| 43 | + "expErrors": [ |
| 44 | + { |
| 45 | + "type": "missing-fallback-variant" |
| 46 | + } |
| 47 | + ] |
29 | 48 | }, |
30 | 49 | { |
31 | | - "description": "Missing Selector Annotation", |
32 | | - "src": ".match {$foo} one {{one}} * {{other}}" |
| 50 | + "src": ".match {$foo} one {{one}} * {{other}}", |
| 51 | + "expErrors": [ |
| 52 | + { |
| 53 | + "type": "missing-selector-annotation" |
| 54 | + } |
| 55 | + ] |
33 | 56 | }, |
34 | 57 | { |
35 | | - "description": "Missing Selector Annotation", |
36 | | - "src": ".input {$foo} .match {$foo} one {{one}} * {{other}}" |
| 58 | + "src": ".input {$foo} .match {$foo} one {{one}} * {{other}}", |
| 59 | + "expErrors": [ |
| 60 | + { |
| 61 | + "type": "missing-selector-annotation" |
| 62 | + } |
| 63 | + ] |
37 | 64 | }, |
38 | 65 | { |
39 | | - "description": "Missing Selector Annotation", |
40 | | - "src": ".local $foo = {$bar} .match {$foo} one {{one}} * {{other}}" |
| 66 | + "src": ".local $foo = {$bar} .match {$foo} one {{one}} * {{other}}", |
| 67 | + "expErrors": [ |
| 68 | + { |
| 69 | + "type": "missing-selector-annotation" |
| 70 | + } |
| 71 | + ] |
41 | 72 | }, |
42 | 73 | { |
43 | | - "description": "Duplicate Declaration", |
44 | | - "src": ".input {$foo} .input {$foo} {{_}}" |
| 74 | + "src": ".input {$foo} .input {$foo} {{_}}", |
| 75 | + "expErrors": [ |
| 76 | + { |
| 77 | + "type": "duplicate-declaration" |
| 78 | + } |
| 79 | + ] |
45 | 80 | }, |
46 | 81 | { |
47 | | - "description": "Duplicate Declaration", |
48 | | - "src": ".input {$foo} .local $foo = {42} {{_}}" |
| 82 | + "src": ".input {$foo} .local $foo = {42} {{_}}", |
| 83 | + "expErrors": [ |
| 84 | + { |
| 85 | + "type": "duplicate-declaration" |
| 86 | + } |
| 87 | + ] |
49 | 88 | }, |
50 | 89 | { |
51 | | - "description": "Duplicate Declaration", |
52 | | - "src": ".local $foo = {42} .input {$foo} {{_}}" |
| 90 | + "src": ".local $foo = {42} .input {$foo} {{_}}", |
| 91 | + "expErrors": [ |
| 92 | + { |
| 93 | + "type": "duplicate-declaration" |
| 94 | + } |
| 95 | + ] |
53 | 96 | }, |
54 | 97 | { |
55 | | - "description": "Duplicate Declaration", |
56 | | - "src": ".local $foo = {:unknown} .local $foo = {42} {{_}}" |
| 98 | + "src": ".local $foo = {:unknown} .local $foo = {42} {{_}}", |
| 99 | + "expErrors": [ |
| 100 | + { |
| 101 | + "type": "duplicate-declaration" |
| 102 | + } |
| 103 | + ] |
57 | 104 | }, |
58 | 105 | { |
59 | | - "description": "Duplicate Declaration", |
60 | | - "src": ".local $foo = {$bar} .local $bar = {42} {{_}}" |
61 | | - }, |
| 106 | + "src": ".local $foo = {$bar} .local $bar = {42} {{_}}", |
| 107 | + "expErrors": [ |
| 108 | + { |
| 109 | + "type": "duplicate-declaration" |
| 110 | + } |
| 111 | + ] |
| 112 | + }, |
62 | 113 | { |
63 | | - "description": "Duplicate Declaration", |
64 | | - "src": ".local $foo = {$foo} {{_}}" |
65 | | - }, |
| 114 | + "src": ".local $foo = {$foo} {{_}}", |
| 115 | + "expErrors": [ |
| 116 | + { |
| 117 | + "type": "duplicate-declaration" |
| 118 | + } |
| 119 | + ] |
| 120 | + }, |
66 | 121 | { |
67 | | - "description": "Duplicate Declaration", |
68 | | - "src": ".local $foo = {$bar} .local $bar = {$baz} {{_}}" |
69 | | - }, |
| 122 | + "src": ".local $foo = {$bar} .local $bar = {$baz} {{_}}", |
| 123 | + "expErrors": [ |
| 124 | + { |
| 125 | + "type": "duplicate-declaration" |
| 126 | + } |
| 127 | + ] |
| 128 | + }, |
70 | 129 | { |
71 | | - "description": "Duplicate Declaration", |
72 | | - "src": ".local $foo = {$bar :func} .local $bar = {$baz} {{_}}" |
73 | | - }, |
| 130 | + "src": ".local $foo = {$bar :func} .local $bar = {$baz} {{_}}", |
| 131 | + "expErrors": [ |
| 132 | + { |
| 133 | + "type": "duplicate-declaration" |
| 134 | + } |
| 135 | + ] |
| 136 | + }, |
74 | 137 | { |
75 | | - "description": "Duplicate Declaration", |
76 | | - "src": ".local $foo = {42 :func opt=$foo} {{_}}" |
77 | | - }, |
| 138 | + "src": ".local $foo = {42 :func opt=$foo} {{_}}", |
| 139 | + "expErrors": [ |
| 140 | + { |
| 141 | + "type": "duplicate-declaration" |
| 142 | + } |
| 143 | + ] |
| 144 | + }, |
78 | 145 | { |
79 | | - "description": "Duplicate Declaration", |
80 | | - "src": ".local $foo = {42 :func opt=$bar} .local $bar = {42} {{_}}" |
81 | | - }, |
| 146 | + "src": ".local $foo = {42 :func opt=$bar} .local $bar = {42} {{_}}", |
| 147 | + "expErrors": [ |
| 148 | + { |
| 149 | + "type": "duplicate-declaration" |
| 150 | + } |
| 151 | + ] |
| 152 | + }, |
82 | 153 | { |
83 | | - "description": "Duplicate Option Name", |
84 | | - "src": "bad {:placeholder option=x option=x}" |
85 | | - }, |
| 154 | + "src": "bad {:placeholder option=x option=x}", |
| 155 | + "expErrors": [ |
| 156 | + { |
| 157 | + "type": "duplicate-option-name" |
| 158 | + } |
| 159 | + ] |
| 160 | + }, |
86 | 161 | { |
87 | | - "description": "Duplicate Option Name", |
88 | | - "src": "bad {:placeholder ns:option=x ns:option=y}" |
| 162 | + "src": "bad {:placeholder ns:option=x ns:option=y}", |
| 163 | + "expErrors": [ |
| 164 | + { |
| 165 | + "type": "duplicate-option-name" |
| 166 | + } |
| 167 | + ] |
89 | 168 | } |
90 | 169 | ] |
91 | 170 | } |
0 commit comments