Test: add noise Wave generation testing

Refs: #9
gen-noise
rkcf 2023-02-28 11:50:42 -06:00
parent 60f379031e
commit 315c1b7194
1 changed files with 10 additions and 0 deletions

View File

@ -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);
}