diff options
Diffstat (limited to 'test')
| -rwxr-xr-x | test/a.out | bin | 0 -> 16712 bytes | |||
| -rw-r--r-- | test/memory_test.c | 2 | ||||
| -rw-r--r-- | test/meson.build | 5 | ||||
| -rw-r--r-- | test/sdl_audio.c | 12 |
4 files changed, 16 insertions, 3 deletions
diff --git a/test/a.out b/test/a.out Binary files differnew file mode 100755 index 0000000..bd6f439 --- /dev/null +++ b/test/a.out diff --git a/test/memory_test.c b/test/memory_test.c index 4b00aab..8966a4f 100644 --- a/test/memory_test.c +++ b/test/memory_test.c @@ -1,6 +1,6 @@ #include <stdio.h> -#include "cetris.h" +#include <cetris.h> int main(void) { cetris_game game; diff --git a/test/meson.build b/test/meson.build index 351be02..f5b9ae4 100644 --- a/test/meson.build +++ b/test/meson.build @@ -1,5 +1,6 @@ mem_test = ['memory_test.c'] executable('mem_test', mem_test, - include_directories: cetris_inc, - install: false) + dependencies: cetris, + include_directories: cetris_inc, + install: false) diff --git a/test/sdl_audio.c b/test/sdl_audio.c new file mode 100644 index 0000000..53f2514 --- /dev/null +++ b/test/sdl_audio.c @@ -0,0 +1,12 @@ +#include <SDL2/SDL.h> + +int main(void) { + int i, count = SDL_GetNumAudioDevices(0); + + printf("count: %i\n", count); + for (i = 0; i < count; ++i) { + SDL_Log("Audio device %d: %s", i, SDL_GetAudioDeviceName(i, 0)); + printf("Audio device %d: %s", i, SDL_GetAudioDeviceName(i, 0)); + } + return 0; +} |