From a9a8cf8d337470bb9b4466aea9593df7f5fac776 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sun, 6 Oct 2019 20:17:27 +0200 Subject: Implicit cast to larger size, number suffix for number bitsize --- tests/bytecode.amal | 11 ----------- tests/glfw.amal | 7 +++---- 2 files changed, 3 insertions(+), 15 deletions(-) (limited to 'tests') 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 -- cgit v1.2.3