summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/sdl.c6
-rw-r--r--tests/tests.rs2
2 files changed, 5 insertions, 3 deletions
diff --git a/tests/sdl.c b/tests/sdl.c
index a3c3d8f..31331c0 100644
--- a/tests/sdl.c
+++ b/tests/sdl.c
@@ -8,8 +8,10 @@ int main(void) {
SDL_Init(SDL_INIT_EVERYTHING);
SDL_Window *window = SDL_CreateWindow("hi", 0, 0, 1280, 720, SDL_WINDOW_SHOWN|SDL_WINDOW_OPENGL);
SDL_GLContext ctx = SDL_GL_CreateContext(window);
- PFNGLCLEARPROC glClear = SDL_GL_GetProcAddress("glClear");
- PFNGLCLEARCOLORPROC glClearColor = SDL_GL_GetProcAddress("glClearColor");
+ // we save a byte this way since we don't need an extra relocation.
+ void *(*volatile get_proc_address)() = SDL_GL_GetProcAddress;
+ PFNGLCLEARPROC glClear = get_proc_address("glClear");
+ PFNGLCLEARCOLORPROC glClearColor = get_proc_address("glClearColor");
SDL_GL_SetSwapInterval(1);
while (true) {
SDL_Event event;
diff --git a/tests/tests.rs b/tests/tests.rs
index 24e1881..761fe41 100644
--- a/tests/tests.rs
+++ b/tests/tests.rs
@@ -52,7 +52,7 @@ mod tests {
fn tiny_c() {
let mut linker = test_linker();
add(&mut linker, "tiny.c", true);
- link(&linker, "test.out", "entry");
+ link(&linker, "tiny.out", "entry");
let output = run("tiny.out");
assert!(output.stdout.is_empty());
}