test: unify all the command line usage logging.

This commit is contained in:
Ryan C. Gordon
2019-05-28 17:39:13 -04:00
parent 9b5811592d
commit b5d3b6fc25
14 changed files with 71 additions and 41 deletions

View File

@@ -80,8 +80,8 @@ main(int argc, char *argv[])
}
}
if (consumed < 0) {
SDL_Log("Usage: %s %s [--iterations #] [--execKey #] [--seed string] [--filter suite_name|test_name]\n",
argv[0], SDLTest_CommonUsage(state));
static const char *options[] = { "[--iterations #]", "[--execKey #]", "[--seed string]", "[--filter suite_name|test_name]", NULL };
SDLTest_CommonLogUsage(state, argv[0], options);
quit(1);
}

View File

@@ -203,7 +203,7 @@ main(int argc, char *argv[])
break;
}
if (consumed < 0) {
SDL_Log("Usage: %s %s\n", argv[0], SDLTest_CommonUsage(state));
SDLTest_CommonLogUsage(state, argv[0], NULL);
quit(1);
}
i += consumed;

View File

@@ -256,8 +256,8 @@ main(int argc, char *argv[])
}
}
if (consumed < 0) {
SDL_Log("Usage: %s %s [--blend none|blend|add|mod] [--cyclecolor] [--cyclealpha]\n",
argv[0], SDLTest_CommonUsage(state));
static const char *options[] = { "[--blend none|blend|add|mod]", "[--cyclecolor]", "[--cyclealpha]", NULL };
SDLTest_CommonLogUsage(state, argv[0], options);
return 1;
}
i += consumed;

View File

@@ -52,7 +52,7 @@ main(int argc, char *argv[])
consumed = -1;
}
if (consumed < 0) {
SDL_Log("Usage: %s %s\n", argv[0], SDLTest_CommonUsage(state));
SDLTest_CommonLogUsage(state, argv[0], NULL);
quit(1);
}
i += consumed;

View File

@@ -248,8 +248,8 @@ main(int argc, char *argv[])
}
}
if (consumed < 0) {
SDL_Log("Usage: %s %s [--fsaa n] [--accel n]\n", argv[0],
SDLTest_CommonUsage(state));
static const char *options[] = { "[--fsaa n]", "[--accel n]", NULL };
SDLTest_CommonLogUsage(state, argv[0], options);
quit(1);
}
i += consumed;

View File

@@ -146,8 +146,8 @@ main(int argc, char *argv[])
}
}
if (consumed < 0) {
SDL_Log("Usage: %s %s [--fsaa] [--accel] [--zdepth %%d]\n", argv[0],
SDLTest_CommonUsage(state));
static const char *options[] = { "[--fsaa]", "[--accel]", "[--zdepth %d]", NULL };
SDLTest_CommonLogUsage(state, argv[0], options);
quit(1);
}
i += consumed;

View File

@@ -518,8 +518,8 @@ main(int argc, char *argv[])
}
}
if (consumed < 0) {
SDL_Log ("Usage: %s %s [--fsaa] [--accel] [--zdepth %%d]\n", argv[0],
SDLTest_CommonUsage(state));
static const char *options[] = { "[--fsaa]", "[--accel]", "[--zdepth %d]", NULL };
SDLTest_CommonLogUsage(state, argv[0], options);
quit(1);
}
i += consumed;

View File

@@ -315,8 +315,8 @@ main(int argc, char *argv[])
}
}
if (consumed < 0) {
SDL_Log("Usage: %s %s [--blend none|blend|add|mod] [--cyclecolor] [--cyclealpha]\n",
argv[0], SDLTest_CommonUsage(state));
static const char *options[] = { "[--blend none|blend|add|mod]", "[--cyclecolor]", "[--cyclealpha]", NULL };
SDLTest_CommonLogUsage(state, argv[0], options);
return 1;
}
i += consumed;

View File

@@ -275,8 +275,8 @@ main(int argc, char *argv[])
}
}
if (consumed < 0) {
SDL_Log("Usage: %s %s [--composite]\n",
argv[0], SDLTest_CommonUsage(state));
static const char *options[] = { "[--composite]", NULL };
SDLTest_CommonLogUsage(state, argv[0], options);
quit(1);
}
i += consumed;

View File

@@ -340,8 +340,8 @@ main(int argc, char *argv[])
}
}
if (consumed < 0) {
SDL_Log("Usage: %s %s [--blend none|blend|add|mod] [--cyclecolor] [--cyclealpha] [--iterations N] [num_sprites] [icon.bmp]\n",
argv[0], SDLTest_CommonUsage(state));
static const char *options[] = { "[--blend none|blend|add|mod]", "[--cyclecolor]", "[--cyclealpha]", "[--iterations N]", "[num_sprites]", "[icon.bmp]", NULL };
SDLTest_CommonLogUsage(state, argv[0], options);
quit(1);
}
i += consumed;

View File

@@ -161,8 +161,8 @@ main(int argc, char *argv[])
}
}
if (consumed < 0) {
SDL_Log("Usage: %s %s [--target]\n",
argv[0], SDLTest_CommonUsage(state));
static const char *options[] = { "[--target]", NULL };
SDLTest_CommonLogUsage(state, argv[0], options);
quit(1);
}
i += consumed;