Skip to content

Commit 51bfdd9

Browse files
committed
Add tests
1 parent 11e5303 commit 51bfdd9

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

stdlib/Test/src/Test.jl

+1
Original file line numberDiff line numberDiff line change
@@ -1648,6 +1648,7 @@ julia> @testset let logi = log(im)
16481648
end
16491649
Test Failed at none:3
16501650
Expression: !(iszero(real(logi)))
1651+
Evaluated: !(iszero(0.0))
16511652
Context: logi = 0.0 + 1.5707963267948966im
16521653
16531654
ERROR: There was an error during testing

stdlib/Test/test/runtests.jl

+9
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,10 @@ let fails = @testset NoThrowTestSet begin
163163
@test_throws r"sqrt\([Cc]omplx" sqrt(-1)
164164
@test_throws str->occursin("a T", str) error("a test")
165165
@test_throws ["BoundsError", "acquire", "1-element", "at index [2]"] [1][2]
166+
# 27 - Fail - issetequal
167+
a = [1, 2]
168+
b = [1, 3]
169+
@test issetequal(a, b)
166170
end
167171
for fail in fails
168172
@test fail isa Test.Fail
@@ -298,6 +302,11 @@ let fails = @testset NoThrowTestSet begin
298302
@test occursin(r"Message: \"BoundsError.* 1-element.*at index \[2\]", str)
299303
end
300304

305+
let str = sprint(show, fails[27])
306+
@test occursin("Expression: issetequal(a, b)", str)
307+
@test occursin("Evaluated: issetequal([1, 2], [1, 3])", str)
308+
end
309+
301310
end
302311

303312
struct BadError <: Exception end

0 commit comments

Comments
 (0)