From 2323ca6c9ec3c8ee76b9acf13745b80b92952a6a Mon Sep 17 00:00:00 2001 From: dec05eba Date: Mon, 18 Mar 2019 23:47:45 +0100 Subject: Add struct, import caching, binop ops etc --- tests/main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'tests/main.c') diff --git a/tests/main.c b/tests/main.c index 8e45ba4..2b57bcf 100644 --- a/tests/main.c +++ b/tests/main.c @@ -43,9 +43,8 @@ static CHECK_RESULT int test_hash_map() { int main() { amal_compiler compiler; + FileScopeReference *file_scope; int result; - const char *filepath; - filepath = "tests/main.amal"; return_if_error(test_hash_map()); @@ -55,7 +54,7 @@ int main() { return 1; } - result = amal_compiler_load_file(&compiler, create_buffer_view(filepath, strlen(filepath))); + result = amal_compiler_load_file(&compiler, "tests/main.amal", &file_scope); if(result != AMAL_COMPILER_OK) { fprintf(stderr, "Failed to load file, error code: %d\n", result); return 1; -- cgit v1.2.3