Skip to content

Commit

Permalink
Added --bar-width and --bar-gap test cases
Browse files Browse the repository at this point in the history
See #208
  • Loading branch information
chrisn committed Aug 14, 2024
1 parent fac1d0c commit e26bb08
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/OptionHandlerTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -995,3 +995,17 @@ TEST_F(OptionHandlerTest, shouldFailIfUnknownWaveformBarStyle)
}

//------------------------------------------------------------------------------

TEST_F(OptionHandlerTest, shouldFailIfBarGapIsNegative)
{
std::vector<const char*> args{ "--waveform-style", "bars", "--bar-gap", "-1" };
runTests("test_file_stereo.wav", FileFormat::Wav, FileFormat::Png, &args, false, nullptr, "Invalid bar gap: minimum 0\n");
}

//------------------------------------------------------------------------------

TEST_F(OptionHandlerTest, shouldFailIfBarWidthIsZero)
{
std::vector<const char*> args{ "--waveform-style", "bars", "--bar-width", "0" };
runTests("test_file_stereo.wav", FileFormat::Wav, FileFormat::Png, &args, false, nullptr, "Invalid bar width: minimum 1\n");
}

0 comments on commit e26bb08

Please sign in to comment.