aboutsummaryrefslogtreecommitdiff
path: root/tests/main.c
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2019-03-18 23:47:45 +0100
committerdec05eba <dec05eba@protonmail.com>2020-07-25 14:36:46 +0200
commit2323ca6c9ec3c8ee76b9acf13745b80b92952a6a (patch)
tree93013237dbcb0fa96ceb5f3c026fd040aff464cf /tests/main.c
parent5a93c32a59775cd1be4b4f450e8230016b434366 (diff)
Add struct, import caching, binop ops etc
Diffstat (limited to 'tests/main.c')
-rw-r--r--tests/main.c5
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;