File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ include("support/util.jl")
1515 " SampleBuf.jl" ,
1616 " SampleStream.jl" ,
1717 " SinSource.jl" ,
18+ " units.jl"
1819 # "WAVDisplay.jl"
1920 ])
2021end
Original file line number Diff line number Diff line change 88 @test inseconds (1.0 s,44100 Hz) == 1.0
99 @test inseconds (10 ms,44100 Hz) == 1 // 100
1010 @test inseconds (1.0 ,44100 Hz) == 1.0
11+ @test inseconds (1.0 ,44100 Hz) == inseconds (1.0 )
12+ @test_throws ErrorException inseconds (441 frames)
1113 end
1214
1315 @testset " converting to frames" begin
1719 @test inframes (10.5 frames,44100 Hz) == 10.5
1820 @test inframes (10 frames) == 10
1921 @test inframes (10 ) == 10
22+ @test inframes (1 s, 44100 ) == inframes (1000 ms,44100 Hz)
23+ @test inframes (10 Hz, 0.1 ) == 1
24+ @test inframes (Int, 1 ) == inframes (1 )
2025 @test_throws ErrorException inframes (1 s)
26+ @test_throws ErrorException inframes (Int, 1 s)
2127 end
2228
2329 @testset " converting to Hz" begin
2430 @test inHz (100 Hz) == inHz (0.1 kHz)
2531 @test inHz (100 Hz) == 100
2632 @test inHz (1 kHz) == 1000
2733 @test inHz (100 ) == 100
34+ @test inHz (441 frames, 1000 ) == 0.441
35+ @test inHz (1.0 , 441000 ) == inHz (1.0 )
36+ @test_throws ErrorException inHz (441 frames)
2837 end
2938end
You can’t perform that action at this time.
0 commit comments