blob: 134204fff16390312119339e59c9898110095937 [file] [log] [blame]
# DO NOT EDIT; generated by go run testdata/gen.go
#
#name: bounds
#evalPartial
-- in.cue --
i1: >1 & 5
i2: (>=0 & <=10) & 5
i3: !=null & []
i4: !=2 & !=4
s1: >=0 & <=10 & !=1 // no simplification
s2: >=0 & <=10 & !=11 // >=0 & <=10
s3: >5 & !=5 // >5
s4: <10 & !=10 // <10
s5: !=2 & !=2
// TODO: could change inequality
s6: !=2 & >=2
s7: >=2 & !=2
s8: !=5 & >5
s10: >=0 & <=10 & <12 & >1 // >1 & <=10
s11: >0 & >=0 & <=12 & <12 // >0 & <12
s20: >=10 & <=10 // 10
s22: >5 & <=6 // no simplification
s22a: >5 & (<=6 & int) // 6
s22b: (int & >5) & <=6 // 6
s22c: >=5 & (<6 & int) // 5
s22d: (int & >=5) & <6 // 5
s22e: (>=5 & <6) & int // 5
s22f: int & (>=5 & <6) // 5
s23: >0 & <2 // no simplification
s23a: (>0 & <2) & int // int & 1
s23b: int & (>0 & <2) // int & 1
s23c: (int & >0) & <2 // int & 1
s23d: >0 & (int & <2) // int & 1
s23e: >0.0 & <2.0 // no simplification
s30: >0 & int
e1: null & !=null
e2: !=null & null
e3: >1 & 1
e4: <0 & 0
e5: >1 & <0
e6: >11 & <11
e7: >=11 & <11
e8: >11 & <=11
e9: >"a" & <1
-- out/def --
i1: 5
i2: 5
i3: []
i4: !=2 & !=4
s1: >=0 & <=10 & !=1
s2: >=0 & <=10
s3: >5
s4: <10
s5: !=2
// TODO: could change inequality
s6: !=2
s7: !=2
s8: >5
s10: >1 & <=10
s11: >0 & <12
s20: 10
s22: >5 & <=6
s22a: 6
s22b: 6
s22c: 5
s22d: 5
s22e: 5
s22f: 5
s23: >0 & <2
s23a: 1
s23b: 1
s23c: 1
s23d: 1
s23e: >0.0 & <2.0
s30: >0
e1: _|_ // invalid value null (excluded by !=null)
e2: _|_ // invalid value null (excluded by !=null)
e3: _|_ // invalid value 1 (out of bound >1)
e4: _|_ // invalid value 0 (out of bound <0)
e5: _|_ // conflicting bounds >1 and <0
e6: _|_ // conflicting bounds >11 and <11
e7: _|_ // conflicting bounds >=11 and <11
e8: _|_ // conflicting bounds >11 and <=11
e9: _|_ // conflicting values >"a" and <1 (mismatched types string and number)
-- out/legacy-debug --
<0>{i1: 5, i2: 5, i3: [], i4: (!=2 & !=4), s1: (>=0 & <=10 & !=1), s2: (>=0 & <=10), s3: >5, s4: <10, s5: !=2, s6: (!=2 & >=2), s7: (>=2 & !=2), s8: >5, s10: (<=10 & >1), s11: (>0 & <12), s20: 10, s22: (>5 & <=6), s22a: 6, s22b: 6, s22c: 5, s22d: 5, s22e: 5, s22f: 5, s23: (>0 & <2), s23a: 1, s23b: 1, s23c: 1, s23d: 1, s23e: (>0.0 & <2.0), s30: int & >0, e1: _|_((!=null & null):invalid value null (excluded by !=null)), e2: _|_((!=null & null):invalid value null (excluded by !=null)), e3: _|_((>1 & 1):invalid value 1 (out of bound >1)), e4: _|_((<0 & 0):invalid value 0 (out of bound <0)), e5: _|_(conflicting bounds >1 and <0), e6: _|_(conflicting bounds >11 and <11), e7: _|_(conflicting bounds >=11 and <11), e8: _|_(conflicting bounds >11 and <=11), e9: _|_((>"a" & <1):conflicting values >"a" and <1 (mismatched types string and number))}
-- out/compile --
--- in.cue
{
i1: (>1 & 5)
i2: ((>=0 & <=10) & 5)
i3: (!=null & [])
i4: (!=2 & !=4)
s1: ((>=0 & <=10) & !=1)
s2: ((>=0 & <=10) & !=11)
s3: (>5 & !=5)
s4: (<10 & !=10)
s5: (!=2 & !=2)
s6: (!=2 & >=2)
s7: (>=2 & !=2)
s8: (!=5 & >5)
s10: (((>=0 & <=10) & <12) & >1)
s11: (((>0 & >=0) & <=12) & <12)
s20: (>=10 & <=10)
s22: (>5 & <=6)
s22a: (>5 & (<=6 & int))
s22b: ((int & >5) & <=6)
s22c: (>=5 & (<6 & int))
s22d: ((int & >=5) & <6)
s22e: ((>=5 & <6) & int)
s22f: (int & (>=5 & <6))
s23: (>0 & <2)
s23a: ((>0 & <2) & int)
s23b: (int & (>0 & <2))
s23c: ((int & >0) & <2)
s23d: (>0 & (int & <2))
s23e: (>0.0 & <2.0)
s30: (>0 & int)
e1: (null & !=null)
e2: (!=null & null)
e3: (>1 & 1)
e4: (<0 & 0)
e5: (>1 & <0)
e6: (>11 & <11)
e7: (>=11 & <11)
e8: (>11 & <=11)
e9: (>"a" & <1)
}
-- out/eval --
Errors:
e1: invalid value !=null (mismatched types (bool|string|bytes|list|struct|number) and null)
e2: invalid value null (mismatched types null and (bool|string|bytes|list|struct|number))
e5: incompatible bounds >1 and <0
e6: incompatible bounds >11 and <11
e7: incompatible bounds >=11 and <11
e8: incompatible bounds >11 and <=11
e9: invalid value <1 (mismatched types number and string)
e3: invalid value 1 (out of bound >1):
./in.cue:42:5
e4: invalid value 0 (out of bound <0):
./in.cue:43:5
Result:
(_|_){
// [eval]
i1: (int){ 5 }
i2: (int){ 5 }
i3: (#list){
}
i4: (number){ &(!=2, !=4) }
s1: (number){ &(>=0, <=10, !=1) }
s2: (number){ &(>=0, <=10) }
s3: (number){ >5 }
s4: (number){ <10 }
s5: (number){ &(!=2, !=2) }
s6: (number){ &(>=2, !=2) }
s7: (number){ &(>=2, !=2) }
s8: (number){ >5 }
s10: (number){ &(>1, <=10) }
s11: (number){ &(>0, <12) }
s20: (number){ 10 }
s22: (number){ &(>5, <=6) }
s22a: (int){ 6 }
s22b: (int){ 6 }
s22c: (int){ 5 }
s22d: (int){ 5 }
s22e: (int){ 5 }
s22f: (int){ 5 }
s23: (number){ &(>0, <2) }
s23a: (int){ 1 }
s23b: (int){ 1 }
s23c: (int){ 1 }
s23d: (int){ 1 }
s23e: (number){ &(>0.0, <2.0) }
s30: (int){ &(>0, int) }
e1: (_|_){
// [eval] e1: invalid value !=null (mismatched types (bool|string|bytes|list|struct|number) and null)
}
e2: (_|_){
// [eval] e2: invalid value null (mismatched types null and (bool|string|bytes|list|struct|number))
}
e3: (_|_){
// [eval] e3: invalid value 1 (out of bound >1):
// ./in.cue:42:5
}
e4: (_|_){
// [eval] e4: invalid value 0 (out of bound <0):
// ./in.cue:43:5
}
e5: (_|_){
// [eval] e5: incompatible bounds >1 and <0
}
e6: (_|_){
// [eval] e6: incompatible bounds >11 and <11
}
e7: (_|_){
// [eval] e7: incompatible bounds >=11 and <11
}
e8: (_|_){
// [eval] e8: incompatible bounds >11 and <=11
}
e9: (_|_){
// [eval] e9: invalid value <1 (mismatched types number and string)
}
}