Skip to content

Commit 18b4ba9

Browse files
committed
cmd/cue: re-enable cue exp gengotypes testscript
Now that it no longer causes a panic under evalv3, after the merge of https://cuelang.org/cl/1212030. All expected errors are still there, just in slightly different order, like `fail.cue."18_IntListClosed2".types.IntListClosed2` being moved down a bit. The only other change is some error positions being lost. Marcel is already aware of evalv3 not being as good as evalv2 at tracking positions in errors, and for this particular test we don't care about positions, so it's fine in this case. Signed-off-by: Daniel Martí <[email protected]> Change-Id: I99937cabfae8bac6934f9c3eae9efda766d1a68a Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1212210 TryBot-Result: CUEcueckoo <[email protected]> Unity-Result: CUE porcuepine <[email protected]> Reviewed-by: Matthew Sackman <[email protected]>
1 parent e22ea96 commit 18b4ba9

File tree

1 file changed

+6
-57
lines changed

1 file changed

+6
-57
lines changed

cmd/cue/cmd/testdata/script/exp_gengotypes.txtar

+6-57
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
skip 'TODO(evalv3): make this test work, and not panic, on evalv3'
2-
31
exec cue exp gengotypes ./root
42
! stderr .
53

@@ -167,90 +165,48 @@ _typeTests: [...#typeTest] & [
167165
-- cuetest/fail_check.stderr --
168166
fail.both."16_IntList".types.IntList.0: conflicting values "foo" and int (mismatched types string and int):
169167
./cuetest/all.cue:67:40
170-
./cuetest/fail_check.cue:7:12
171-
./cuetest/fail_check.cue:7:17
172-
./root/root.cue:12:10
173-
./root/types.cue:26:20
174168
./root/types.cue:26:23
175169
fail.both."16_IntList".types.IntList.1: conflicting values "bar" and int (mismatched types string and int):
176170
./cuetest/all.cue:67:47
177-
./cuetest/fail_check.cue:7:12
178-
./cuetest/fail_check.cue:7:17
179-
./root/root.cue:12:10
180-
./root/types.cue:26:20
181171
./root/types.cue:26:23
182172
fail.both."20_IntMap".types.IntMap.one: conflicting values "x" and int (mismatched types string and int):
183173
./cuetest/all.cue:71:47
184-
./cuetest/fail_check.cue:7:12
185-
./cuetest/fail_check.cue:7:17
186-
./root/root.cue:12:10
187174
./root/types.cue:28:29
188175
fail.both."20_IntMap".types.IntMap.two: conflicting values "y" and int (mismatched types string and int):
189176
./cuetest/all.cue:71:59
190-
./cuetest/fail_check.cue:7:12
191-
./cuetest/fail_check.cue:7:17
192-
./root/root.cue:12:10
193177
./root/types.cue:28:29
194178
fail.both."37_NonEmptyString".types.NonEmptyString: conflicting values string and 123 (mismatched types string and int):
195-
./cuetest/all.cue:20:1
196-
./cuetest/all.cue:27:2
197-
./cuetest/all.cue:28:56
198179
./cuetest/all.cue:89:43
199180
./root/types.cue:38:23
200181
fail.both."40_NonEmptyString".types.NonEmptyString: conflicting values string and [1,2,3] (mismatched types string and list):
201-
./cuetest/all.cue:20:1
202-
./cuetest/all.cue:27:2
203-
./cuetest/all.cue:28:56
204182
./cuetest/all.cue:92:43
205183
./root/types.cue:38:23
206184
fail.both."42_LinkedList".types.LinkedList.next: conflicting values "x" and {item?:_,next?:#linkedList} (mismatched types string and struct):
207185
./cuetest/all.cue:94:50
208-
./cuetest/fail_check.cue:7:12
209-
./cuetest/fail_check.cue:7:17
210-
./root/root.cue:12:10
211-
./root/types.cue:40:23
212186
./root/types.cue:43:14
213-
./root/types.cue:45:9
214-
fail.both.notList: conflicting values [1,2,3] and {doc?:_} (mismatched types list and struct):
187+
fail.both.notList: conflicting values [1,2,3] and {embedded2?:int} (mismatched types list and struct):
215188
./cuetest/all.cue:5:24
216-
./cuetest/fail_check.cue:7:12
217-
./cuetest/fail_check.cue:7:17
218-
./root/root.cue:83:8
219-
fail.both.notString: conflicting values "not_a_struct" and {doc?:_} (mismatched types string and struct):
189+
./root/root.cue:95:2
190+
fail.both.notString: conflicting values "not_a_struct" and {embedded2?:int} (mismatched types string and struct):
220191
./cuetest/all.cue:4:24
221-
./cuetest/fail_check.cue:7:12
222-
./cuetest/fail_check.cue:7:17
223-
./root/root.cue:83:8
192+
./root/root.cue:95:2
224193
fail.cue."11_Int8".types.Int8: invalid value 99999 (out of bound <=127):
225194
./cuetest/all.cue:61:30
226195
fail.cue."12_Int8".types.Int8: invalid value -99999 (out of bound >=-128):
227196
./cuetest/all.cue:62:30
228-
fail.cue."18_IntListClosed2".types.IntListClosed2: incompatible list lengths (2 and 4)
229197
fail.cue."29_NullOrStruct".types.NullOrStruct: 2 errors in empty disjunction:
230198
fail.cue."29_NullOrStruct".types.NullOrStruct: conflicting values "foo" and null (mismatched types string and null):
231199
./cuetest/all.cue:81:43
232-
./cuetest/fail_check.cue:7:12
233-
./cuetest/fail_check.cue:7:17
234-
./root/root.cue:12:10
235200
./root/types.cue:35:23
236201
fail.cue."29_NullOrStruct".types.NullOrStruct: conflicting values "foo" and {foo?:int} (mismatched types string and struct):
237202
./cuetest/all.cue:81:43
238-
./cuetest/fail_check.cue:7:12
239-
./cuetest/fail_check.cue:7:17
240-
./root/root.cue:12:10
241203
./root/types.cue:35:30
242204
fail.cue."32_NullOrString".types.NullOrString: 2 errors in empty disjunction:
243205
fail.cue."32_NullOrString".types.NullOrString: conflicting values 123 and null (mismatched types int and null):
244206
./cuetest/all.cue:84:43
245-
./cuetest/fail_check.cue:7:12
246-
./cuetest/fail_check.cue:7:17
247-
./root/root.cue:12:10
248207
./root/types.cue:36:23
249208
fail.cue."32_NullOrString".types.NullOrString: conflicting values 123 and string (mismatched types int and string):
250209
./cuetest/all.cue:84:43
251-
./cuetest/fail_check.cue:7:12
252-
./cuetest/fail_check.cue:7:17
253-
./root/root.cue:12:10
254210
./root/types.cue:36:30
255211
fail.cue."39_UniqueStrings".types.UniqueStrings: invalid value ["foo","foo"] (does not satisfy list.UniqueItems): equal value ("foo") at position 0 and 1:
256212
./cuetest/all.cue:25:55
@@ -260,20 +216,13 @@ fail.cue."9_Uint".types.Uint: invalid value -34 (out of bound >=0):
260216
fail.cue.discBoth.discriminatorField: 2 errors in empty disjunction:
261217
fail.cue.discBoth.discriminatorField.one: field not allowed:
262218
./cuetest/all.cue:14:43
263-
./cuetest/fail_check.cue:7:12
264-
./cuetest/fail_check.cue:7:17
265-
./root/root.cue:76:50
266219
fail.cue.discBoth.discriminatorField.two: field not allowed:
267220
./cuetest/all.cue:14:51
268-
./cuetest/fail_check.cue:7:12
269-
./cuetest/fail_check.cue:7:17
270-
./root/root.cue:76:29
271221
fail.cue.isNotEqual.mustEqual2: conflicting values 8 and 99:
272222
./cuetest/all.cue:11:37
273223
./cuetest/all.cue:11:52
274-
./cuetest/fail_check.cue:7:12
275-
./cuetest/fail_check.cue:7:17
276-
./root/root.cue:79:15
224+
fail.cue."18_IntListClosed2".types.IntListClosed2: incompatible list lengths (2 and 4):
225+
./cuetest/all.cue:69:38
277226
fail.cue."34_NumericBounds".types.NumericBounds: invalid value 5555 (out of bound <100):
278227
./root/types.cue:37:28
279228
./cuetest/all.cue:86:43

0 commit comments

Comments
 (0)