summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rwxr-xr-xtest/a.outbin0 -> 16712 bytes
-rw-r--r--test/memory_test.c2
-rw-r--r--test/meson.build5
-rw-r--r--test/sdl_audio.c12
4 files changed, 16 insertions, 3 deletions
diff --git a/test/a.out b/test/a.out
new file mode 100755
index 0000000..bd6f439
--- /dev/null
+++ b/test/a.out
Binary files differ
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;
+}