Browse Source

testdata: update binop.go for string comparison tests

pull/2278/head
Damian Gryski 3 years ago
committed by Ron Evans
parent
commit
3ba8bc92cd
  1. 7
      testdata/binop.go
  2. 5
      testdata/binop.txt

7
testdata/binop.go

@ -24,6 +24,13 @@ func main() {
println("ab" < "aa")
println("aa" < "ab")
h := "hello"
println("h < h", h < h)
println("h <= h", h <= h)
println("h == h", h == h)
println("h >= h", h >= h)
println("h > h", h > h)
println("array equality")
println(a1 == [2]int{1, 2})
println(a1 != [2]int{1, 2})

5
testdata/binop.txt

@ -20,6 +20,11 @@ true
false
false
true
h < h false
h <= h true
h == h true
h >= h true
h > h false
array equality
true
false

Loading…
Cancel
Save