mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-16 17:58:27 +00:00
Added --randmem test parameter
This commit is contained in:
parent
ea68bb8027
commit
82e481b520
3 changed files with 66 additions and 14 deletions
|
@ -25,6 +25,7 @@
|
|||
static const char *common_usage[] = {
|
||||
"[-h | --help]",
|
||||
"[--trackmem]",
|
||||
"[--randmem]",
|
||||
"[--log all|error|system|audio|video|render|input]",
|
||||
};
|
||||
|
||||
|
@ -95,7 +96,8 @@ SDLTest_CommonState *SDLTest_CommonCreateState(char **argv, Uint32 flags)
|
|||
for (i = 1; argv[i]; ++i) {
|
||||
if (SDL_strcasecmp(argv[i], "--trackmem") == 0) {
|
||||
SDLTest_TrackAllocations();
|
||||
break;
|
||||
} else if (SDL_strcasecmp(argv[i], "--randmem") == 0) {
|
||||
SDLTest_RandFillAllocations();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -170,6 +172,10 @@ int SDLTest_CommonArg(SDLTest_CommonState *state, int index)
|
|||
/* Already handled in SDLTest_CommonCreateState() */
|
||||
return 1;
|
||||
}
|
||||
if (SDL_strcasecmp(argv[index], "--randmem") == 0) {
|
||||
/* Already handled in SDLTest_CommonCreateState() */
|
||||
return 1;
|
||||
}
|
||||
if (SDL_strcasecmp(argv[index], "--log") == 0) {
|
||||
++index;
|
||||
if (!argv[index]) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue