DEADSOFTWARE

Добавлены типы INTEGER и BOOLEAN
[dsw-obn.git] / test.c
diff --git a/test.c b/test.c
index 2247eac4b7f42e6c463a01918e822d2adf45915e..7149026862087a8f63577916ffd361e8b89b08ef 100644 (file)
--- a/test.c
+++ b/test.c
@@ -7,10 +7,13 @@ static oberon_type_t boolean = { "BOOLEAN", OBERON_TYPE_BOOLEAN, sizeof(int) };
 static const char source[] =
        "MODULE Test;"
        "VAR"
+       "       k : INTEGER;"
        "       i : INTEGER;"
        "       b : BOOLEAN;"
        "BEGIN"
-       "       i := 10;"
+       "       k := 10;"
+       "       i := k;"
+       "       b := TRUE;"
        "END Test."
 ;
 
@@ -24,5 +27,6 @@ main(int argc, char ** argv)
        oberon_register_global_type(ctx, &integer);
        oberon_register_global_type(ctx, &boolean);
        mod = oberon_compile_module(ctx, source);
+       oberon_destroy_context(ctx);
        return 0;
 }