Skip to content

Commit

Permalink
Add some in/equality test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
dgryski committed Oct 23, 2012
1 parent 409456f commit 45b6fc8
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion testdata
Expand Up @@ -372,4 +372,26 @@ def inc(x): x |= .+1; inc(.[].a)

[10 >= 0, 10 >= 10, 10 >= 20, 10 <= 0, 10 <= 10, 10 <= 20]
{}
[true,true,false,false,true,true]
[true,true,false,false,true,true]

# And some in/equality tests
[ 10 == 10, 10 != 10, 10 != 11, 10 == 11]
{}
[true,false,true,false]

["hello" == "hello", "hello" != "hello", "hello" == "world", "hello" != "world" ]
{}
[true,false,false,true]

[[1,2,3] == [1,2,3], [1,2,3] != [1,2,3], [1,2,3] == [4,5,6], [1,2,3] != [4,5,6]]
{}
[true,false,false,true]

[{"foo":42} == {"foo":42},{"foo":42} != {"foo":42}, {"foo":42} != {"bar":42}, {"foo":42} == {"bar":42}]
{}
[true,false,true,false]

# ugly complicated thing
[{"foo":[1,2,{"bar":18},"world"]} == {"foo":[1,2,{"bar":18},"world"]},{"foo":[1,2,{"bar":18},"world"]} == {"foo":[1,2,{"bar":19},"world"]}]
{}
[true,false]

0 comments on commit 45b6fc8

Please sign in to comment.