Commit 3ad01f40 authored by Chris Müller's avatar Chris Müller
Browse files

add prototype for runtime unittests

parent 4ec237e5
......@@ -5,5 +5,5 @@ set(TEST_SOURCES
add_executable(cherry-testsuite ${TEST_SOURCES})
target_link_libraries(cherry-testsuite crystal cherry-core)
target_link_libraries(cherry-testsuite crystal gc cherry-core)
......@@ -17,15 +17,19 @@
*/
#include <crystal/unittest.h>
#include <cherry/runtime.h>
void test_suite_lex();
int main(int argc, char** argv)
{
org_cherry_initialize(0);
cry_unittest_initialize(argc, argv);
test_suite_lex();
test_suite_runtime();
cry_unittest_finalize();
......
......@@ -21,7 +21,15 @@
static void test_symbollist(const_pointer data)
{
struct org_cherry_symbollist* sym = org_cherry_symbollist();
struct org_cherry_Value* A = org_cherry_symbollist_get(sym, "A");
struct org_cherry_Value* B = org_cherry_symbollist_get(sym, "B");
struct org_cherry_Value* C = org_cherry_symbollist_get(sym, "A");
assert(A != B);
assert(A == C);
assert(B != C);
}
void test_suite_runtime()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment