Skip to content

Commit

Permalink
internal/core/export: use matrix for TestValue
Browse files Browse the repository at this point in the history
Issue #3060

Signed-off-by: Marcel van Lohuizen <[email protected]>
Change-Id: I760fb3953f2b7e89914b9b3eccdc3152f9610dd5
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1194185
Reviewed-by: Daniel Martí <[email protected]>
TryBot-Result: CUEcueckoo <[email protected]>
Unity-Result: CUE porcuepine <[email protected]>
  • Loading branch information
mpvl committed May 3, 2024
1 parent 3f52195 commit f418fc3
Show file tree
Hide file tree
Showing 14 changed files with 2,938 additions and 5 deletions.
115 changes: 115 additions & 0 deletions internal/core/export/testdata/main/adt.txtar
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,121 @@ Reordering.
[errorListDef #Def]
[errorListDef 0]
[errorListDef 1]
-- out/value-v3 --
== Simplified
_|_ // e3: index out of range [2] with length 2
== Raw
_|_ // e3: index out of range [2] with length 2
== Final
_|_ // e3: index out of range [2] with length 2
== All
{
@foo(bar)
p1: {}
d1: {
foobar: int
}
bar: "bar"
d2: {
foobar: {
name: "xx"
foo: "xx"
}
}

// Issue #1910
a: _
comp: {
for k, v in [0]
let w = v {
"\(a)": w
"bar": w
}
}
bytes: '\xeb \x1a\xf5\xaa\xf0\xd6\x06)'
c1: true
s1: """
multi
bar
line
"""
l1: [3, ...int]
l2: [...int]
l3: []
l4: [1, 2]
l5: {
#foo: int
[1, 3]
}
#foo: int
l6: {
#foo: int
[1, 3]
}
n1: 1.0
n10: 10

// t is true
t: true
e1: <1.0
e2: >1.0 & <10
e3: _|_ // e3: index out of range [2] with length 2
e4: _|_ // e4: index 3 out of range (and 1 more errors)
e5: _|_ // e3: index out of range [2] with length 2 (and 1 more errors)
e6: false
e7: true
e8?: true
m1: {
// foo is an optional field
foo?: 3

// bar is a field
bar: 4

// baz is a required field.
baz!: 5
}
y1: {
src: [1, 2, 3]
foo0: 1
bar1: 2
bar2: 3
foo1: 2
x: [1, 2, 3]
foo2: 3
}
preserveKeyFieldInComprehension: 1
errorStructDef: {
a: 1
b: _|_ // errorStructDef.b: conflicting values 2 and 1
#Def: 1
}
errorList: [1, _|_]
x: int
errorListDef: {
#Def: 1
[1, _|_]
}
}
== Eval
_|_ // e3: index out of range [2] with length 2
-- diff/-out/value-v3<==>+out/value --
diff old new
--- old
+++ new
@@ -56,8 +56,8 @@
e1: <1.0
e2: >1.0 & <10
e3: _|_ // e3: index out of range [2] with length 2
- e4: _|_ // e4: index 3 out of range
- e5: _|_ // e3: index out of range [2] with length 2
+ e4: _|_ // e4: index 3 out of range (and 1 more errors)
+ e5: _|_ // e3: index out of range [2] with length 2 (and 1 more errors)
e6: false
e7: true
e8?: true
-- diff/value/todo/p3 --
Error message change.
-- out/value --
== Simplified
_|_ // e3: index out of range [2] with length 2
Expand Down
Loading

0 comments on commit f418fc3

Please sign in to comment.