Skip to content

Commit e26bb08

Browse files
committed
Added --bar-width and --bar-gap test cases
See #208
1 parent fac1d0c commit e26bb08

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

test/OptionHandlerTest.cpp

+14
Original file line numberDiff line numberDiff line change
@@ -995,3 +995,17 @@ TEST_F(OptionHandlerTest, shouldFailIfUnknownWaveformBarStyle)
995995
}
996996

997997
//------------------------------------------------------------------------------
998+
999+
TEST_F(OptionHandlerTest, shouldFailIfBarGapIsNegative)
1000+
{
1001+
std::vector<const char*> args{ "--waveform-style", "bars", "--bar-gap", "-1" };
1002+
runTests("test_file_stereo.wav", FileFormat::Wav, FileFormat::Png, &args, false, nullptr, "Invalid bar gap: minimum 0\n");
1003+
}
1004+
1005+
//------------------------------------------------------------------------------
1006+
1007+
TEST_F(OptionHandlerTest, shouldFailIfBarWidthIsZero)
1008+
{
1009+
std::vector<const char*> args{ "--waveform-style", "bars", "--bar-width", "0" };
1010+
runTests("test_file_stereo.wav", FileFormat::Wav, FileFormat::Png, &args, false, nullptr, "Invalid bar width: minimum 1\n");
1011+
}

0 commit comments

Comments
 (0)