diff options
Diffstat (limited to 'tests/main.c')
-rw-r--r-- | tests/main.c | 5 |
1 files changed, 2 insertions, 3 deletions
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; |