Commit 8ae440b8 authored by David Reid's avatar David Reid

Start work on automated test.

parent 2b6564a7
#include "../test_common/ma_test_common.c"
#include "ma_test_automated_data_converter.c"
int main(int argc, char** argv)
{
ma_result result;
ma_bool32 hasError = MA_FALSE;
size_t iTest;
(void)argc;
(void)argv;
result = ma_register_test("Data Conversion", test_entry__data_converter);
if (result != MA_SUCCESS) {
return result;
}
for (iTest = 0; iTest < g_Tests.count; iTest += 1) {
printf("=== BEGIN %s ===\n", g_Tests.pTests[iTest].pName);
result = g_Tests.pTests[iTest].onEntry(argc, argv);
printf("=== END %s : %s ===\n", g_Tests.pTests[iTest].pName, (result == 0) ? "PASSED" : "FAILED");
if (result != 0) {
hasError = MA_TRUE;
}
}
if (hasError) {
return -1; /* Something failed. */
} else {
return 0; /* Everything passed. */
}
}
\ No newline at end of file
This diff is collapsed.
...@@ -5,6 +5,10 @@ ...@@ -5,6 +5,10 @@
#define DR_WAV_IMPLEMENTATION #define DR_WAV_IMPLEMENTATION
#include "../../extras/dr_wav.h" #include "../../extras/dr_wav.h"
/* Make sure we include the Speex resampler so we can test it. */
#define MINIAUDIO_SPEEX_RESAMPLER_IMPLEMENTATION
#include "../../extras/speex_resampler/ma_speex_resampler.h"
#define MINIAUDIO_IMPLEMENTATION #define MINIAUDIO_IMPLEMENTATION
#include "../../miniaudio.h" #include "../../miniaudio.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment