Skip to content

Commit 7d9aad8

Browse files
committed
Add unittest for ranges
1 parent 807bd21 commit 7d9aad8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/unittests.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,12 @@ end
189189

190190
end
191191

192+
@testset "Ranges" begin
193+
x = [xi for xi in 0.0u"km/s":0.1u"km/s":1.0u"km/s"]
194+
@test x[2] == 0.1u"km/s"
195+
@test x[end] == 1.0u"km/s"
196+
end
197+
192198
@testset "Complex numbers" begin
193199
x = (0.5 + 0.6im) * u"km/s"
194200
@test string(x) == "(500.0 + 600.0im) m s⁻¹"

0 commit comments

Comments
 (0)