@@ -10,22 +10,22 @@ using Base.Test
10
10
@test_throws ArgumentError :a .. " b"
11
11
I = 0 .. 3
12
12
@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 )
16
16
J = 3 .. 2
17
17
K = 5 .. 4
18
18
L = 3 ± 2
19
- M = ClosedInterval (2 , 5.0 )
19
+ M = @inferred ( ClosedInterval (2 , 5.0 ) )
20
20
@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 )
23
23
@test O == (- 1 .. 3 , 0 .. 4 , 1 .. 5 , 2 .. 6 )
24
24
25
25
@test eltype (I) == Int
26
26
@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
29
29
@test ! (convert (ClosedInterval{Float64}, I) === 0 .. 3 )
30
30
@test ClosedInterval {Float64} (1 ,3 ) === 1.0 .. 3.0
31
31
@test ClosedInterval (0.5 .. 2.5 ) === 0.5 .. 2.5
@@ -50,8 +50,8 @@ using Base.Test
50
50
@test 2 in I
51
51
@test 1 .. 2 in 0.5 .. 2.5
52
52
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 )
55
55
@test isempty (J ∩ K)
56
56
@test isempty ((2 .. 5 ) ∩ (7 .. 10 ))
57
57
@test isempty ((1 .. 10 ) ∩ (7 .. 2 ))
0 commit comments