diff options
author | dec05eba <dec05eba@protonmail.com> | 2019-10-06 20:17:27 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-07-25 14:36:46 +0200 |
commit | a9a8cf8d337470bb9b4466aea9593df7f5fac776 (patch) | |
tree | 22c197c8217cd216e58f8a47a6820d96ff279138 /tests | |
parent | fa03e7d230f2625c384ca9a7c314b6d05ab44e70 (diff) |
Implicit cast to larger size, number suffix for number bitsize
Diffstat (limited to 'tests')
-rw-r--r-- | tests/bytecode.amal | 11 | ||||
-rw-r--r-- | tests/glfw.amal | 7 |
2 files changed, 3 insertions, 15 deletions
diff --git a/tests/bytecode.amal b/tests/bytecode.amal index 5ba26ed..730a26e 100644 --- a/tests/bytecode.amal +++ b/tests/bytecode.amal @@ -1,14 +1,3 @@ -extern const printf: fn(fmt: ?&c_char, ...) c_int; - const main = fn { - var value = 23 + 50; - if value < 23 - printf("less!\n"); - else - printf("more!\n"); - while value > 0 { - printf("value: %ld\n", value); - value = value - 1; - } }
\ No newline at end of file diff --git a/tests/glfw.amal b/tests/glfw.amal index e3c2fc6..37608fc 100644 --- a/tests/glfw.amal +++ b/tests/glfw.amal @@ -2,15 +2,14 @@ extern const glfwInit: fn() i32; extern const glfwTerminate: fn() i32; // should return void.... -extern const glfwCreateWindow: fn(x: i32, y: i32, title: str, monitor: usize, share: usize) usize; -extern const glfwWindowShouldClose: fn(window: usize) i64; +extern const glfwCreateWindow: fn(x: i32, y: i32, title: str, monitor: u64, share: u64) u64; +extern const glfwWindowShouldClose: fn(window: u64) i32; const main = fn { glfwInit(); - const window = glfwCreateWindow(50, 50, "hello, world", 0, 0); + const window = glfwCreateWindow(50i32, 50i32, "hello, world", 0, 0); while glfwWindowShouldClose(window) == 0 { } glfwTerminate(); - //const a = 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1; }
\ No newline at end of file |