Skip to content

Commit 40bc120

Browse files
committed
Only test vectorized round, ceil, floor, and trunc on 0.4 and 0.5.
1 parent 586d784 commit 40bc120

File tree

1 file changed

+31
-29
lines changed

1 file changed

+31
-29
lines changed

test/runtests.jl

Lines changed: 31 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -98,35 +98,37 @@ if VERSION < v"0.4.0-dev+1387"
9898
@test isdefined(Main, :AbstractString)
9999
end
100100

101-
@test round(Int, 3//4) == 1
102-
@test round(Int, 1) == 1
103-
@test round(Int, 1.1) == 1
104-
@test round(Int, [1, 1]) == [1, 1]
105-
@test round(Int, [1.1, 1.1]) == [1, 1]
106-
@test round(Int, [1 1]) == [1 1]
107-
@test round(Int, [1.1 1.1]) == [1 1]
108-
@test round(Int, fill(1.1, 2, 3, 4)) == fill(1, 2, 3, 4)
109-
@test ceil(Int, 1) == 1
110-
@test ceil(Int, 1.1) == 2
111-
@test ceil(Int, [1, 1]) == [1, 1]
112-
@test ceil(Int, [1.1, 1.1]) == [2, 2]
113-
@test ceil(Int, [1 1]) == [1 1]
114-
@test ceil(Int, [1.1 1.1]) == [2 2]
115-
@test ceil(Int, fill(1.1, 2, 3, 4)) == fill(2, 2, 3, 4)
116-
@test floor(Int, 1) == 1
117-
@test floor(Int, 1.1) == 1
118-
@test floor(Int, [1, 1]) == [1, 1]
119-
@test floor(Int, [1.1, 1.1]) == [1, 1]
120-
@test floor(Int, [1 1]) == [1 1]
121-
@test floor(Int, [1.1 1.1]) == [1 1]
122-
@test floor(Int, fill(1.1, 2, 3, 4)) == fill(1, 2, 3, 4)
123-
@test trunc(Int, 1) == 1
124-
@test trunc(Int, 1.1) == 1
125-
@test trunc(Int, [1, 1]) == [1, 1]
126-
@test trunc(Int, [1.1, 1.1]) == [1, 1]
127-
@test trunc(Int, [1 1]) == [1 1]
128-
@test trunc(Int, [1.1 1.1]) == [1 1]
129-
@test trunc(Int, fill(1.1, 2, 3, 4)) == fill(1, 2, 3, 4)
101+
if VERSION < v"0.6.0-"
102+
@test round(Int, 3//4) == 1
103+
@test round(Int, 1) == 1
104+
@test round(Int, 1.1) == 1
105+
@test round(Int, [1, 1]) == [1, 1]
106+
@test round(Int, [1.1, 1.1]) == [1, 1]
107+
@test round(Int, [1 1]) == [1 1]
108+
@test round(Int, [1.1 1.1]) == [1 1]
109+
@test round(Int, fill(1.1, 2, 3, 4)) == fill(1, 2, 3, 4)
110+
@test ceil(Int, 1) == 1
111+
@test ceil(Int, 1.1) == 2
112+
@test ceil(Int, [1, 1]) == [1, 1]
113+
@test ceil(Int, [1.1, 1.1]) == [2, 2]
114+
@test ceil(Int, [1 1]) == [1 1]
115+
@test ceil(Int, [1.1 1.1]) == [2 2]
116+
@test ceil(Int, fill(1.1, 2, 3, 4)) == fill(2, 2, 3, 4)
117+
@test floor(Int, 1) == 1
118+
@test floor(Int, 1.1) == 1
119+
@test floor(Int, [1, 1]) == [1, 1]
120+
@test floor(Int, [1.1, 1.1]) == [1, 1]
121+
@test floor(Int, [1 1]) == [1 1]
122+
@test floor(Int, [1.1 1.1]) == [1 1]
123+
@test floor(Int, fill(1.1, 2, 3, 4)) == fill(1, 2, 3, 4)
124+
@test trunc(Int, 1) == 1
125+
@test trunc(Int, 1.1) == 1
126+
@test trunc(Int, [1, 1]) == [1, 1]
127+
@test trunc(Int, [1.1, 1.1]) == [1, 1]
128+
@test trunc(Int, [1 1]) == [1 1]
129+
@test trunc(Int, [1.1 1.1]) == [1 1]
130+
@test trunc(Int, fill(1.1, 2, 3, 4)) == fill(1, 2, 3, 4)
131+
end
130132

131133
# n % Type
132134
for T in Any[Int16, Int32, UInt32, Int64, UInt64]

0 commit comments

Comments
 (0)