Skip to content

Commit

Permalink
test results
Browse files Browse the repository at this point in the history
  • Loading branch information
wheeheee committed Jan 14, 2025
1 parent 953be66 commit f28ca8d
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions test/filter_conversion.jl
Original file line number Diff line number Diff line change
Expand Up @@ -237,10 +237,22 @@ end
end
end
# test that ^ doesn't cause stack overflow
@test_nowarn PolynomialRatio([1.0], [2.0])^typemin(Int8)
@test_nowarn ZeroPoleGain([1], [2], 3)^typemin(Int8)
@test_nowarn Biquad(1:5...)^typemin(Int8)
@test_nowarn SecondOrderSections(Biquad(1:5...))^typemin(Int8)
let H = PolynomialRatio([1.0], [2.0])^typemin(Int8)
@test coefb(H) == [2.0^128]
@test coefa(H) == [1.0]
end
let zpg = ZeroPoleGain([1], [2], 3)^typemin(Int8)
@test length(zpg.z) == length(zpg.p) == 128
@test all(==(2), zpg.z)
@test all(==(1), zpg.p)
end
let bq = Biquad(1:5...)
sos1 = bq^typemin(Int8)
sos2 = SecondOrderSections(bq)^typemin(Int8)
@test all(==(inv(bq)), sos1.biquads)
@test all(==(inv(bq)), sos2.biquads)
@test sos1.g == sos2.g == 1
end
end

@testset "types" begin
Expand Down

0 comments on commit f28ca8d

Please sign in to comment.