You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/disambiguities.jl
-8Lines changed: 0 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -12,11 +12,3 @@ Base.:*(l::AbstractDimensions, r::Number) = error("Please use an `UnionAbstractQ
12
12
Base.:*(l::Number, r::AbstractDimensions) =error("Please use an `UnionAbstractQuantity` for multiplication. You used multiplication on types: $(typeof(l)) and $(typeof(r)).")
13
13
Base.:/(l::AbstractDimensions, r::Number) =error("Please use an `UnionAbstractQuantity` for division. You used division on types: $(typeof(l)) and $(typeof(r)).")
14
14
Base.:/(l::Number, r::AbstractDimensions) =error("Please use an `UnionAbstractQuantity` for division. You used division on types: $(typeof(l)) and $(typeof(r)).")
15
-
16
-
ifVERSION<v"1.7"
17
-
for I in (Base.MultiplicativeInverses.UnsignedMultiplicativeInverse, Base.MultiplicativeInverses.SignedMultiplicativeInverse)
18
-
@evalfunction Base.div(x::T, y::$I{T}, r::RoundingMode=RoundToZero) where {T<:AbstractGenericQuantity}
19
-
returnnew_quantity(typeof(x), div(ustrip(x), y, r), dimension(x))
Copy file name to clipboardExpand all lines: test/unittests.jl
+34-10Lines changed: 34 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,12 @@ using StaticArrays: SArray, MArray
9
9
using LinearAlgebra: norm
10
10
using Test
11
11
12
+
functionrecord_show(s, f=show)
13
+
io =IOBuffer()
14
+
f(io, s)
15
+
returnString(take!(io))
16
+
end
17
+
12
18
@testset"Basic utilities"begin
13
19
14
20
for Q in [Quantity, GenericQuantity], T in [DEFAULT_VALUE_TYPE, Float16, Float32, Float64], R in [DEFAULT_DIM_BASE_TYPE, Rational{Int16}, Rational{Int32}, SimpleRatio{Int}, SimpleRatio{SafeInt16}]
0 commit comments