Skip to content

Commit 00f7a21

Browse files
committed
cue: enable even more tests on evalv3 which pass now
The TestAllows skipped test when structure sharing is disabled seems to pass now. TestEval's P3 reordering appears to be resolved too. Finally, the skipped test case in TestValidate seems to pass on evalv3 now as well. In fact, the skip boolean was not actually used. While here, remove the now-unused skip/todo booleans from test tables. Signed-off-by: Daniel Martí <[email protected]> Change-Id: I4b1ad4ce62084523deed1b2bb780784a3ca695b4 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1212092 TryBot-Result: CUEcueckoo <[email protected]> Unity-Result: CUE porcuepine <[email protected]> Reviewed-by: Matthew Sackman <[email protected]>
1 parent bd1839a commit 00f7a21

File tree

1 file changed

+0
-30
lines changed

1 file changed

+0
-30
lines changed

cue/types_test.go

-30
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ func TestAPI(t *testing.T) {
5858
input string
5959
fun func(i cue.Value) cue.Value
6060
want string
61-
skip bool
6261
}{{
6362
// Issue #567
6463
input: `
@@ -149,9 +148,6 @@ func TestAPI(t *testing.T) {
149148
want: `"test1"`,
150149
}}
151150
for _, tc := range testCases {
152-
if tc.skip {
153-
continue
154-
}
155151
m := cuetdtest.FullMatrix
156152
m.Run(t, "", func(t *testing.T, m *cuetdtest.M) {
157153
ctx := m.CueContext()
@@ -766,8 +762,6 @@ func TestFields(t *testing.T) {
766762
err string
767763
opts []cue.Option
768764
path string
769-
770-
todoV3 bool
771765
}{{
772766
value: `{ #def: 1, _hidden: 2, opt?: 3, reg: 4 }`,
773767
res: "{reg:4,}",
@@ -1438,8 +1432,6 @@ func TestAllows(t *testing.T) {
14381432
in string
14391433
sel cue.Selector
14401434
allow bool
1441-
1442-
todo_nosharing bool
14431435
}{{
14441436
desc: "allow new field in open struct",
14451437
in: `
@@ -1626,8 +1618,6 @@ func TestAllows(t *testing.T) {
16261618
`,
16271619
sel: cue.AnyString,
16281620
allow: true,
1629-
1630-
todo_nosharing: true,
16311621
}, {
16321622
desc: "disallow label in disjunction",
16331623
in: `
@@ -1670,9 +1660,6 @@ func TestAllows(t *testing.T) {
16701660

16711661
for _, tc := range testCases {
16721662
cuetdtest.FullMatrix.Run(t, tc.desc, func(t *testing.T, m *cuetdtest.M) {
1673-
if tc.todo_nosharing {
1674-
m.TODO_NoSharing(t)
1675-
}
16761663
ctx := m.CueContext()
16771664
v := mustCompile(t, ctx, tc.in)
16781665
v = v.LookupPath(path)
@@ -1876,8 +1863,6 @@ func TestTemplate(t *testing.T) {
18761863
value string
18771864
path []string
18781865
want string
1879-
1880-
skip bool
18811866
}{{
18821867
value: `
18831868
a: [Name=string]: Name
@@ -1909,8 +1894,6 @@ func TestTemplate(t *testing.T) {
19091894
`,
19101895
path: []string{"a", "foo", "b", ""},
19111896
want: `{"c":"foolabel","d":"label"}`,
1912-
1913-
skip: true, // TODO: reordering
19141897
}}
19151898
for _, tc := range testCases {
19161899
cuetdtest.FullMatrix.Run(t, "", func(t *testing.T, m *cuetdtest.M) {
@@ -1938,7 +1921,6 @@ func TestElem(t *testing.T) {
19381921
value string
19391922
path []string
19401923
want string
1941-
skip bool
19421924
}{{
19431925
value: `
19441926
a: [...int]
@@ -1970,7 +1952,6 @@ func TestElem(t *testing.T) {
19701952
`,
19711953
path: []string{"a", "foo", "b", ""},
19721954
want: "{\n\tc: \"foo\" + string\n\td: string\n}",
1973-
skip: true, // TODO(p3): Skip because this is just a reordering.
19741955
}}
19751956
for _, tc := range testCases {
19761957
cuetdtest.FullMatrix.Run(t, "", func(t *testing.T, m *cuetdtest.M) {
@@ -2514,8 +2495,6 @@ func TestValidate(t *testing.T) {
25142495
in string
25152496
err bool
25162497
opts []cue.Option
2517-
2518-
skip bool
25192498
}{{
25202499
desc: "issue #51",
25212500
in: `
@@ -2594,15 +2573,6 @@ func TestValidate(t *testing.T) {
25942573
`,
25952574
opts: []cue.Option{cue.DisallowCycles(true)},
25962575
err: true,
2597-
2598-
// TODO: in the new evaluator these are not considered to be cycles
2599-
// but rather incomplete errors. This is actually the correct behavior
2600-
// and the old evaluator treats errors like this by default.
2601-
// The option tested in this test was added for backwards compatibility
2602-
// when the old evaluator was made to treat these kinds of errors
2603-
// equally. With the new evaluator we can no longer distinguish these
2604-
// errors. For now, at least. Consider what to do with this option.
2605-
skip: true,
26062576
}, {
26072577
desc: "builtins are okay",
26082578
in: `

0 commit comments

Comments
 (0)