blob: 2b5e7b5fd55fa5a1a283893abc7bced18bdc66e1 [file] [log] [blame]
# generated from the original tests.
# Henceforth it may be nicer to group tests into separate files.
-- in.cue --
import "struct"
t1: struct.MinFields(0) & ""
t2: struct.MinFields(0) & {a: 1}
t3: struct.MinFields(2) & {a: 1}
t4: struct.MaxFields(0) & {a: 1}
t5: struct.MaxFields(2) & {a: 1}
-- out/structs --
Errors:
t1: conflicting values struct.MinFields(0) and "" (mismatched types struct and string)
t3: invalid value {a:1} (does not satisfy struct.MinFields(2)):
./in.cue:5:5
t4: invalid value {a:1} (does not satisfy struct.MaxFields(0)):
./in.cue:6:5
Result:
(_|_){
// [eval]
t1: (_|_){
// [eval] t1: conflicting values struct.MinFields(0) and "" (mismatched types struct and string)
}
t2: (struct){
a: (int){ 1 }
}
t3: (_|_){
// [eval] t3: invalid value {a:1} (does not satisfy struct.MinFields(2)):
// ./in.cue:5:5
a: (int){ 1 }
}
t4: (_|_){
// [eval] t4: invalid value {a:1} (does not satisfy struct.MaxFields(0)):
// ./in.cue:6:5
a: (int){ 1 }
}
t5: (struct){
a: (int){ 1 }
}
}