Skip to content

Commit caaba9d

Browse files
committed
skip tests on 1.0, and add a few
1 parent e95f3e8 commit caaba9d

File tree

1 file changed

+27
-3
lines changed

1 file changed

+27
-3
lines changed

test/runtests.jl

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,20 +111,44 @@ end
111111
@test unit(first(M * v)) == u"m*V"
112112
@test M * v == M_ * v == M * v_ == M_ * v_
113113

114-
@test CNT[] == 10
114+
VERSION >= v"1.3" && @test CNT[] == 10
115115

116116
@test unit(first(v' * M)) == u"m*V"
117117
@test v' * M == v_' * M == v_' * M == v_' * M_
118118

119-
@test CNT[] == 15
119+
VERSION >= v"1.3" && @test CNT[] == 15
120120

121121
@test unit(v' * v) == u"V*V"
122122
@test v' * v == v_' * v == v_' * v == v_' * v_
123123

124-
@test CNT[] == 20
124+
VERSION >= v"1.3" && @test CNT[] == 20
125+
126+
# Mixed with & without units
127+
N = rand(3,3)
128+
w = rand(3)
129+
130+
CNT[] = 0
131+
132+
@test unit(first(M * N)) == u"m"
133+
@test unit(first(N * M)) == u"m"
134+
135+
@test unit(first(M * w)) == u"m"
136+
@test unit(first(N * v)) == u"V"
137+
138+
@show CNT[] # not specialised yet
139+
125140
end
126141
@testset "> Matrix multiplication: mul!" begin
142+
A = rand(3,3) .* u"m"
143+
B = rand(3,3) .* u"m"
144+
C = fill(zero(eltype(A*B)), 3, 3)
145+
CNT[] = 0
146+
147+
mul!(C, A, B)
148+
mul!(C, A, B, true, true)
149+
mul!(C, A, B, 3, 7) # not specialised yet
127150

151+
@show CNT[]
128152
end
129153
end
130154

0 commit comments

Comments
 (0)