File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,8 @@ macro test_or_throws(extype, ex)
5555 )
5656end
5757
58+ is_finite_nonzero (x) = isfinite (x) && ! iszero (x)
59+
5860@testset " Construction" begin
5961 @test isa (NoUnits, FreeUnits)
6062 @test typeof (𝐋) === Unitful. Dimensions{(Unitful. Dimension {:Length} (1 ),)}
225227 # return NaN, Inf, or 0 in these cases, i.e. either returns a finite
226228 # result or throws an error indicating that it cannot handle the
227229 # conversion.
228- is_finite_nonzero (x) = isfinite (x) && ! iszero (x)
229230 @test_or_throws ArgumentError is_finite_nonzero (uconvert (u " kb^12" , 1 u " b^12" ))
230231 @test_or_throws ArgumentError is_finite_nonzero (uconvert (u " ab^11" , 1 u " Tb^11" ))
231232 @test_or_throws ArgumentError is_finite_nonzero (uconvert (u " Tb^11" , 1 u " ab^11" ))
You can’t perform that action at this time.
0 commit comments