diff options
author | dec05eba <dec05eba@protonmail.com> | 2019-09-21 13:59:39 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-07-25 14:36:46 +0200 |
commit | c811a743a1528db1d05970e1aa14162ef7c70b75 (patch) | |
tree | 4560ab5d9084c385946415e9fc2dbf187e26c844 /tests/main.c | |
parent | 142a13ad3f77c0ad1bd321d1a1f864a5117896d1 (diff) |
Implement vararg, verify arguments to parameters
Diffstat (limited to 'tests/main.c')
-rw-r--r-- | tests/main.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/main.c b/tests/main.c index 019f8d9..0b3a744 100644 --- a/tests/main.c +++ b/tests/main.c @@ -251,6 +251,10 @@ static void test_load(const char *filepath) { fprintf(stderr, "Unexpected error (alloc failure)\n"); FAIL_TEST_CLEANUP(full_path); } + if(amal_program_register_extern_func(&program, create_buffer_view_auto("printf"), printf, sizeof(const char*)) != 0) { + fprintf(stderr, "Unexpected error (alloc failure)\n"); + FAIL_TEST_CLEANUP(full_path); + } result = amal_compiler_load_file(&options, &program, filepath); if(result != AMAL_COMPILER_OK) { |