From 7790e27b3423901e2080bfd3c600a65a48d42886 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Fri, 1 May 2026 18:37:38 +0300 Subject: start adding proper tests --- tests/ptrs/ptrs.fwd | 8 ++++++++ tests/ptrs/test.mk | 1 + 2 files changed, 9 insertions(+) create mode 100644 tests/ptrs/ptrs.fwd create mode 100644 tests/ptrs/test.mk (limited to 'tests/ptrs') diff --git a/tests/ptrs/ptrs.fwd b/tests/ptrs/ptrs.fwd new file mode 100644 index 0000000..fbb9cbb --- /dev/null +++ b/tests/ptrs/ptrs.fwd @@ -0,0 +1,8 @@ +import "../../mod/libfwdmem.so" + +main() +{ + fwdmalloc(sizeof(i64)) => *i64 i; + /* deref not allowed on raw pointers */ + i* + 20 => int something; +} diff --git a/tests/ptrs/test.mk b/tests/ptrs/test.mk new file mode 100644 index 0000000..3003a8c --- /dev/null +++ b/tests/ptrs/test.mk @@ -0,0 +1 @@ +XFAIL += ptrs,'deref of raw ptr not allowed' -- cgit v1.2.3