mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-21 15:56:58 +02:00
Simplify some test code.
This commit is contained in:
+1
-10
@@ -42,14 +42,8 @@ int ma_run_tests(int argc, char** argv)
|
|||||||
int result;
|
int result;
|
||||||
ma_bool32 hasError = MA_FALSE;
|
ma_bool32 hasError = MA_FALSE;
|
||||||
size_t iTest;
|
size_t iTest;
|
||||||
fs* pFS;
|
|
||||||
|
|
||||||
if (fs_init(NULL, &pFS) != FS_SUCCESS) {
|
fs_mkdir(NULL, TEST_OUTPUT_DIR);
|
||||||
printf("Failed to initialize the file system.\n");
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
fs_mkdir(pFS, TEST_OUTPUT_DIR);
|
|
||||||
|
|
||||||
for (iTest = 0; iTest < g_Tests.count; iTest += 1) {
|
for (iTest = 0; iTest < g_Tests.count; iTest += 1) {
|
||||||
printf("=== BEGIN %s ===\n", g_Tests.pTests[iTest].pName);
|
printf("=== BEGIN %s ===\n", g_Tests.pTests[iTest].pName);
|
||||||
@@ -61,9 +55,6 @@ int ma_run_tests(int argc, char** argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fs_uninit(pFS);
|
|
||||||
pFS = NULL;
|
|
||||||
|
|
||||||
if (hasError) {
|
if (hasError) {
|
||||||
return 1; /* Something failed. */
|
return 1; /* Something failed. */
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user