Skip to content

Commit 6402a77

Browse files
committed
Add atsign-inferred to several tests
1 parent 600fefc commit 6402a77

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

test/runtests.jl

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,22 @@ using Base.Test
1010
@test_throws ArgumentError :a .. "b"
1111
I = 0..3
1212
@test string(I) == "0..3"
13-
@test convert(UnitRange, I) === 0:3
14-
@test range(I) === 0:3
15-
@test convert(UnitRange{Int16}, I) === Int16(0):Int16(3)
13+
@test @inferred(convert(UnitRange, I)) === 0:3
14+
@test @inferred(range(I)) === 0:3
15+
@test @inferred(convert(UnitRange{Int16}, I)) === Int16(0):Int16(3)
1616
J = 3..2
1717
K = 5..4
1818
L = 3 ± 2
19-
M = ClosedInterval(2, 5.0)
19+
M = @inferred(ClosedInterval(2, 5.0))
2020
@test string(M) == "2.0..5.0"
21-
N = ClosedInterval(UInt8(255), 300)
22-
O = CartesianIndex(1, 2, 3, 4) ± 2
21+
N = @inferred(ClosedInterval(UInt8(255), 300))
22+
O = @inferred(CartesianIndex(1, 2, 3, 4) ± 2)
2323
@test O == (-1..3, 0..4, 1..5, 2..6)
2424

2525
@test eltype(I) == Int
2626
@test eltype(M) == Float64
27-
@test convert(ClosedInterval{Float64}, I) === 0.0..3.0
28-
@test convert(ClosedInterval{Float64}, 0:3) === 0.0..3.0
27+
@test @inferred(convert(ClosedInterval{Float64}, I)) === 0.0..3.0
28+
@test @inferred(convert(ClosedInterval{Float64}, 0:3)) === 0.0..3.0
2929
@test !(convert(ClosedInterval{Float64}, I) === 0..3)
3030
@test ClosedInterval{Float64}(1,3) === 1.0..3.0
3131
@test ClosedInterval(0.5..2.5) === 0.5..2.5
@@ -50,8 +50,8 @@ using Base.Test
5050
@test 2 in I
5151
@test 1..2 in 0.5..2.5
5252

53-
@test I L == ClosedInterval(0, 5)
54-
@test I L == ClosedInterval(1, 3)
53+
@test @inferred(I L) == ClosedInterval(0, 5)
54+
@test @inferred(I L) == ClosedInterval(1, 3)
5555
@test isempty(J K)
5656
@test isempty((2..5) (7..10))
5757
@test isempty((1..10) (7..2))

0 commit comments

Comments
 (0)