From ab0c5259e5a3238e176e4b1aed942f5384a2d0c6 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Wed, 18 Sep 2019 13:33:05 +0200 Subject: Fix leak on parse failure --- tests/glfw.amal | 2 ++ tests/main.c | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/glfw.amal b/tests/glfw.amal index d0f02d4..e3c2fc6 100644 --- a/tests/glfw.amal +++ b/tests/glfw.amal @@ -1,3 +1,5 @@ +#!/usr/bin/env amalgam + extern const glfwInit: fn() i32; extern const glfwTerminate: fn() i32; // should return void.... extern const glfwCreateWindow: fn(x: i32, y: i32, title: str, monitor: usize, share: usize) usize; diff --git a/tests/main.c b/tests/main.c index 265a0ea..019f8d9 100644 --- a/tests/main.c +++ b/tests/main.c @@ -190,8 +190,6 @@ static void test_load_gl(void) { FAIL_TEST_CLEANUP(full_path); } - printf("glfw init ptr: %p, glfw terminate: %p\n", glfwInit, glfwTerminate); - if(amal_program_register_extern_func(&program, create_buffer_view_auto("glfwInit"), glfwInit, 0) != 0) { fprintf(stderr, "Unexpected error (alloc failure)\n"); FAIL_TEST_CLEANUP(full_path); -- cgit v1.2.3