commit 818fa308046bfc1d678ee069d9b7e912867fb6c0
parent 002c8e09725a5a925cfbbe8f927a0d3c445a4adc
Author: Bor Grošelj Simić <bgs@turminal.net>
Date: Mon, 18 Apr 2022 19:13:11 +0200
24-imports.ha: use static assert inside rt::compile snippets
Signed-off-by: Bor Grošelj Simić <bgs@turminal.net>
Diffstat:
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/tests/24-imports.ha b/tests/24-imports.ha
@@ -8,33 +8,33 @@ fn accept() void = {
assert(rt::compile("
use rt;
use test = rt;
- export fn main() void = assert(&rt::free_ == &test::free_);
+ export fn main() void = static assert(&rt::free_ == &test::free_);
") == 0);
assert(rt::compile("
use rt;
use rt::{free_, malloc};
- export fn main() void = assert(
+ export fn main() void = static assert(
&rt::free_ == &free_ && &rt::malloc == &malloc
);
") == 0);
assert(rt::compile("
use rt;
use rt::*;
- export fn main() void = assert(
+ export fn main() void = static assert(
&rt::free_ == &free_ && &rt::malloc == &malloc
);
") == 0);
assert(rt::compile("
use rt;
use rt::{test = free_, malloc};
- export fn main() void = assert(
+ export fn main() void = static assert(
&rt::free_ == &test && &rt::malloc == &malloc
);
") == 0);
assert(rt::compile("
use rt;
use test = rt::{test = free_, malloc};
- export fn main() void = assert(
+ export fn main() void = static assert(
&rt::free_ == &test::test && &rt::malloc == &test::malloc
);
") == 0);
@@ -47,13 +47,13 @@ fn reject() void = {
") != 0);
assert(rt::compile("
use rt::{free_};
- export fn main() void = assert(
+ export fn main() void = static assert(
&rt::free_ != null
);
") != 0);
assert(rt::compile("
use rt::{free_};
- export fn main() void = assert(
+ export fn main() void = static assert(
&malloc != null
);
") != 0);
@@ -69,11 +69,11 @@ fn reject() void = {
") != 0);
assert(rt::compile("
use rt::{test = free_, malloc};
- export fn main() void = assert(&free_ != null);
+ export fn main() void = static assert(&free_ != null);
") != 0);
assert(rt::compile("
use test = rt::{test = free_, malloc};
- export fn main() void = assert(&test != null);
+ export fn main() void = static assert(&test != null);
") != 0);
};