Skip to content

Commit

Permalink
Merge pull request godotengine#96564 from Geometror/tests-audio-tag
Browse files Browse the repository at this point in the history
[Tests] Make `[Audio]` tag consistent with other test environment tags
  • Loading branch information
akien-mga committed Sep 4, 2024
2 parents c12d86a + 36a0ec1 commit 9b4a965
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions tests/scene/test_audio_stream_wav.h
Original file line number Diff line number Diff line change
Expand Up @@ -181,27 +181,27 @@ void run_test(String file_name, AudioStreamWAV::Format data_format, bool stereo,
}
}

TEST_CASE("[AudioStreamWAV] Mono PCM8 format") {
TEST_CASE("[Audio][AudioStreamWAV] Mono PCM8 format") {
run_test("test_pcm8_mono.wav", AudioStreamWAV::FORMAT_8_BITS, false, WAV_RATE, WAV_COUNT);
}

TEST_CASE("[AudioStreamWAV] Mono PCM16 format") {
TEST_CASE("[Audio][AudioStreamWAV] Mono PCM16 format") {
run_test("test_pcm16_mono.wav", AudioStreamWAV::FORMAT_16_BITS, false, WAV_RATE, WAV_COUNT);
}

TEST_CASE("[AudioStreamWAV] Stereo PCM8 format") {
TEST_CASE("[Audio][AudioStreamWAV] Stereo PCM8 format") {
run_test("test_pcm8_stereo.wav", AudioStreamWAV::FORMAT_8_BITS, true, WAV_RATE, WAV_COUNT);
}

TEST_CASE("[AudioStreamWAV] Stereo PCM16 format") {
TEST_CASE("[Audio][AudioStreamWAV] Stereo PCM16 format") {
run_test("test_pcm16_stereo.wav", AudioStreamWAV::FORMAT_16_BITS, true, WAV_RATE, WAV_COUNT);
}

TEST_CASE("[AudioStreamWAV] Alternate mix rate") {
TEST_CASE("[Audio][AudioStreamWAV] Alternate mix rate") {
run_test("test_pcm16_stereo_38000Hz.wav", AudioStreamWAV::FORMAT_16_BITS, true, 38000, 38000);
}

TEST_CASE("[AudioStreamWAV] save_to_wav() adds '.wav' file extension automatically") {
TEST_CASE("[Audio][AudioStreamWAV] save_to_wav() adds '.wav' file extension automatically") {
String save_path = TestUtils::get_temp_path("test_wav_extension");
Vector<uint8_t> test_data = gen_pcm8_test(WAV_RATE, WAV_COUNT, false);
Ref<AudioStreamWAV> stream = memnew(AudioStreamWAV);
Expand All @@ -213,7 +213,7 @@ TEST_CASE("[AudioStreamWAV] save_to_wav() adds '.wav' file extension automatical
CHECK(error == OK);
}

TEST_CASE("[AudioStreamWAV] Default values") {
TEST_CASE("[Audio][AudioStreamWAV] Default values") {
Ref<AudioStreamWAV> stream = memnew(AudioStreamWAV);
CHECK(stream->get_format() == AudioStreamWAV::FORMAT_8_BITS);
CHECK(stream->get_loop_mode() == AudioStreamWAV::LOOP_DISABLED);
Expand All @@ -227,11 +227,11 @@ TEST_CASE("[AudioStreamWAV] Default values") {
CHECK(stream->get_stream_name() == "");
}

TEST_CASE("[AudioStreamWAV] Save empty file") {
TEST_CASE("[Audio][AudioStreamWAV] Save empty file") {
run_test("test_empty.wav", AudioStreamWAV::FORMAT_8_BITS, false, WAV_RATE, 0);
}

TEST_CASE("[AudioStreamWAV] Saving IMA ADPCM is not supported") {
TEST_CASE("[Audio][AudioStreamWAV] Saving IMA ADPCM is not supported") {
String save_path = TestUtils::get_temp_path("test_adpcm.wav");
Ref<AudioStreamWAV> stream = memnew(AudioStreamWAV);
stream->set_format(AudioStreamWAV::FORMAT_IMA_ADPCM);
Expand Down
2 changes: 1 addition & 1 deletion tests/test_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ struct GodotTestCaseListener : public doctest::IReporter {
return;
}

if (name.contains("Audio")) {
if (name.contains("[Audio]")) {
// The last driver index should always be the dummy driver.
int dummy_idx = AudioDriverManager::get_driver_count() - 1;
AudioDriverManager::initialize(dummy_idx);
Expand Down

0 comments on commit 9b4a965

Please sign in to comment.