From 315c1b71940d52c471dc161a3860cfc1d6bccd6a Mon Sep 17 00:00:00 2001 From: rkcf Date: Tue, 28 Feb 2023 11:50:42 -0600 Subject: [PATCH] Test: add noise Wave generation testing Refs: #9 --- tests/generators_test.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/generators_test.cpp b/tests/generators_test.cpp index 6790a0c..ffe628b 100644 --- a/tests/generators_test.cpp +++ b/tests/generators_test.cpp @@ -33,3 +33,13 @@ TEST(Generator, InverseSawWave) { // Starts at 1 EXPECT_EQ(t[0], 1); } + +TEST(Generator, NoiseWave) +{ + sample_table_t t = gen_noise(); + // Always start and end at 0 + EXPECT_EQ(t[0], 0); + EXPECT_EQ(t[DEFAULT_N_SAMPLES - 1], 0); + // Check second value, probably not equal to 0 + EXPECT_NE(t[1], 0); +}