Skip to content

Commit

Permalink
Add test for comparison calls
Browse files Browse the repository at this point in the history
  • Loading branch information
omus committed Jun 9, 2017
1 parent 2a37b80 commit d4e2b57
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ fails = @testset NoThrowTestSet begin
@test 1/1 2/1
# Fail - chained comparison
@test 1+0 == 2+0 == 3+0
# Fail - comparison call
@test ==(1 - 2, 2 - 1)
# Error - unexpected pass
@test_broken true
end
Expand Down Expand Up @@ -98,6 +100,10 @@ str = sprint(show, fails[5])
@test contains(str, "Evaluated: 1 == 2 == 3")

str = sprint(show, fails[6])
@test contains(str, "Expression: 1 - 2 == 2 - 1")
@test contains(str, "Evaluated: -1 == 1")

str = sprint(show, fails[7])
@test contains(str, "Unexpected Pass")
@test contains(str, "Expression: true")

Expand Down

0 comments on commit d4e2b57

Please sign in to comment.