From ecb8cde6f9a3a2d7001dcc955161145ed18236c7 Mon Sep 17 00:00:00 2001 From: Weird Constructor Date: Sat, 22 May 2021 11:24:03 +0200 Subject: [PATCH] test more extreme resampling --- tests/basics.rs | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/tests/basics.rs b/tests/basics.rs index bfc1b21..2fb04e6 100644 --- a/tests/basics.rs +++ b/tests/basics.rs @@ -1128,14 +1128,26 @@ fn check_node_sampl_1() { assert_float_eq!(min, -0.9998); assert_float_eq!(max, 1.0); - let fft = run_and_get_fft4096(&mut node_exec, 800, 0.0); + let fft = run_and_get_fft4096(&mut node_exec, 800, 20.0); assert_eq!(fft[0], (441, 940)); matrix.set_param(freq_p, SAtom::param(0.1)); - let fft = run_and_get_fft4096(&mut node_exec, 800, 0.0); - assert_eq!(fft[0], (894, 982)); + let fft = run_and_get_fft4096(&mut node_exec, 800, 20.0); + assert_eq!(fft[0], (894, 988)); matrix.set_param(freq_p, SAtom::param(-0.1)); - let fft = run_and_get_fft4096(&mut node_exec, 800, 0.0); - assert_eq!(fft[0], (226, 965)); + let fft = run_and_get_fft4096(&mut node_exec, 800, 20.0); + assert_eq!(fft[0], (226, 966)); + + matrix.set_param(freq_p, SAtom::param(-0.2)); + let fft = run_and_get_fft4096(&mut node_exec, 800, 20.0); + assert_eq!(fft[0], (108, 953)); + + matrix.set_param(freq_p, SAtom::param(0.2)); + let fft = run_and_get_fft4096(&mut node_exec, 800, 20.0); + assert_eq!(fft[0], (1776, 877)); + + matrix.set_param(freq_p, SAtom::param(0.4)); + let fft = run_and_get_fft4096(&mut node_exec, 800, 20.0); + assert_eq!(fft[0], (7127, 1029)); }