Skip to content

Commit

Permalink
fix tests reacting to changes of fcwt argument default values
Browse files Browse the repository at this point in the history
  • Loading branch information
lschneiderbauer committed Jan 5, 2025
1 parent d62a1d8 commit df55bda
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
18 changes: 8 additions & 10 deletions tests/testthat/test-fcwt_batch.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ test_that("fcwt batching yields identical result in single-batch case", {
freq_begin = 50,
freq_end = 1000,
n_freqs = 10,
sigma = 1,
# no aggregation
y_sample_freq = 44100
sigma = 1
)

res_batch_2 <-
Expand Down Expand Up @@ -47,31 +45,31 @@ test_that("fcwt batching yields identical result in single-batch case", {
)

expect_equal(
sc_dim_time(res0), sc_dim_time(res_batch)
sc_dim_time(res_batch), sc_dim_time(res0)
)
expect_equal(
sc_dim_time(res0), sc_dim_time(res_batch_2)
sc_dim_time(res_batch_2), sc_dim_time(res0)
)
expect_equal(
sc_dim_time(res0), sc_dim_time(res_batch_3)
sc_dim_time(res_batch_3), sc_dim_time(res0)
)

expect_equal(
res0,
res_batch
res_batch,
res0
)

expect_equal(
res0,
res_batch_2,
res0,
# we still have boundary effects that influence the values
# to some degree
tolerance = 10^-3
)

expect_equal(
res0,
res_batch_3,
res0,
# we still have boundary effects that influence the values
# to some degree
tolerance = 10^-3
Expand Down
3 changes: 3 additions & 0 deletions tests/testthat/test-fcwtr_scalogram.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ test_that("rbind() for fcwtr_scalogram", {
fcwt(
ts_sin_440[1:1000],
x_sample_freq = 22100,
y_sample_freq = 22100,
freq_begin = 50,
freq_end = 1000,
n_freqs = 10,
Expand Down Expand Up @@ -109,6 +110,7 @@ test_that("[] works", {
fcwt(
ts_sin_440[1:1000],
x_sample_freq = 44100,
y_sample_freq = 44100,
freq_begin = 50,
freq_end = 1000,
n_freqs = 10,
Expand Down Expand Up @@ -209,6 +211,7 @@ test_that("`agg()` gives the same result as c++ aggregation", {
fcwt(
ts_sin_440[1:1000],
x_sample_freq = 44100,
y_sample_freq = 44100,
freq_begin = 50,
freq_end = 1000,
n_freqs = 1,
Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-wnd.R
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ test_that("wnd_from_target_size works", {
fcwt(
ts_sin_440[1:1000],
x_sample_freq = 44100,
y_sample_freq = 44100,
freq_begin = 50,
freq_end = 1000,
n_freqs = 10,
Expand Down

0 comments on commit df55bda

Please sign in to comment.