File tree Expand file tree Collapse file tree 3 files changed +1382
-0
lines changed Expand file tree Collapse file tree 3 files changed +1382
-0
lines changed Original file line number Diff line number Diff line change 4545SDL_DYNAPI_PROCS_H = SDL_ROOT / "src/dynapi/SDL_dynapi_procs.h"
4646SDL_DYNAPI_OVERRIDES_H = SDL_ROOT / "src/dynapi/SDL_dynapi_overrides.h"
4747SDL_DYNAPI_SYM = SDL_ROOT / "src/dynapi/SDL_dynapi.sym"
48+ TESTSYMBOLS = SDL_ROOT / "test/testsymbols.c"
4849
4950RE_EXTERN_C = re .compile (r'.*extern[ "]*C[ "].*' )
5051RE_COMMENT_REMOVE_CONTENT = re .compile (r'\/\*.*\*/' )
@@ -511,6 +512,20 @@ def add_dyn_api(proc: SdlProcedure) -> None:
511512 for line in new_input :
512513 f .write (line )
513514
515+ # File: test/testsymbols.c
516+ #
517+ # Add before "extra symbols go here" line
518+ with TESTSYMBOLS .open () as f :
519+ new_input = []
520+ for line in f :
521+ if "extra symbols go here" in line :
522+ new_input .append (f" SDL_SYMBOL_ITEM({ proc .name } ),\n " )
523+ new_input .append (line )
524+
525+ with TESTSYMBOLS .open ("w" , newline = "" ) as f :
526+ for line in new_input :
527+ f .write (line )
528+
514529
515530def main ():
516531 parser = argparse .ArgumentParser ()
Original file line number Diff line number Diff line change @@ -319,6 +319,7 @@ add_sdl_test_executable(testdraw SOURCES testdraw.c)
319319add_sdl_test_executable(testdrawchessboard SOURCES testdrawchessboard.c)
320320add_sdl_test_executable(testdropfile MAIN_CALLBACKS SOURCES testdropfile.c)
321321add_sdl_test_executable(testerror NONINTERACTIVE DISABLE_THREADS_ARGS "--no-threads" SOURCES testerror.c)
322+ add_sdl_test_executable(testsymbols NONINTERACTIVE NOTRACKMEM NONINTERACTIVE_ARGS 0 10 20 40 80 160 320 640 SOURCES testsymbols.c)
322323
323324set (build_options_dependent_tests )
324325
You can’t perform that action at this time.
0 commit comments