Skip to content

Commit

Permalink
cue: exempt test for DisallowCycle
Browse files Browse the repository at this point in the history
See comment in code why.

Issue #3060

Signed-off-by: Marcel van Lohuizen <mpvl@gmail.com>
Change-Id: I2d398c59683918c600ebf14b8fca0148e1aa7b54
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1194102
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
  • Loading branch information
mpvl committed May 1, 2024
1 parent d3ed229 commit 1259cf9
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion cue/types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2374,6 +2374,8 @@ func TestValidate(t *testing.T) {
in string
err bool
opts []Option

skip bool
}{{
desc: "issue #51",
in: `
Expand Down Expand Up @@ -2452,6 +2454,15 @@ func TestValidate(t *testing.T) {
`,
opts: []Option{DisallowCycles(true)},
err: true,

// TODO: in the new evaluator these are not considered to be cycles
// but rather incomplete errors. This is actually the correct behavior
// and the old evaluator treats errors like this by default.
// The option tested in this test was added for backwards compatibility
// when the old evaluator was made to treat these kinds of errors
// equally. With the new evaluator we can no longer distinguish these
// errors. For now, at least. Consider what to do with this option.
skip: true,
}, {
desc: "builtins are okay",
in: `
Expand Down Expand Up @@ -2499,7 +2510,9 @@ func TestValidate(t *testing.T) {
}}
for _, tc := range testCases {
runMatrix(t, tc.desc, func(t *testing.T, cfg *evalConfig) {
TODO_V3(t, cfg)
if tc.skip {
TODO_V3(t, cfg)
}

r := cfg.runtime()

Expand Down

0 comments on commit 1259cf9

Please sign in to comment.