aboutsummaryrefslogtreecommitdiff
path: root/tests/iii
diff options
context:
space:
mode:
Diffstat (limited to 'tests/iii')
-rw-r--r--tests/iii/memory-call-arity/case.json8
-rw-r--r--tests/iii/memory-call-arity/notes.md5
-rw-r--r--tests/iii/memory-call-arity/program.cps1
-rw-r--r--tests/iii/memory-pointer-type/case.json8
-rw-r--r--tests/iii/memory-pointer-type/notes.md5
-rw-r--r--tests/iii/memory-pointer-type/program.cps4
-rw-r--r--tests/iii/memory-size-type/case.json8
-rw-r--r--tests/iii/memory-size-type/notes.md5
-rw-r--r--tests/iii/memory-size-type/program.cps1
9 files changed, 45 insertions, 0 deletions
diff --git a/tests/iii/memory-call-arity/case.json b/tests/iii/memory-call-arity/case.json
new file mode 100644
index 0000000..3159635
--- /dev/null
+++ b/tests/iii/memory-call-arity/case.json
@@ -0,0 +1,8 @@
+{
+ "errors": [
+ {
+ "reason": "FREE\\ expects\\ 1\\ arg",
+ "line": 1
+ }
+ ]
+}
diff --git a/tests/iii/memory-call-arity/notes.md b/tests/iii/memory-call-arity/notes.md
new file mode 100644
index 0000000..456445e
--- /dev/null
+++ b/tests/iii/memory-call-arity/notes.md
@@ -0,0 +1,5 @@
+# Rejection notes
+
+Human review: pending.
+
+The explicit memory builtin rejects the invalid argument before emitting a runtime call.
diff --git a/tests/iii/memory-call-arity/program.cps b/tests/iii/memory-call-arity/program.cps
new file mode 100644
index 0000000..2ae44d4
--- /dev/null
+++ b/tests/iii/memory-call-arity/program.cps
@@ -0,0 +1 @@
+FREE()
diff --git a/tests/iii/memory-pointer-type/case.json b/tests/iii/memory-pointer-type/case.json
new file mode 100644
index 0000000..557c4b9
--- /dev/null
+++ b/tests/iii/memory-pointer-type/case.json
@@ -0,0 +1,8 @@
+{
+ "errors": [
+ {
+ "reason": "Cannot\\ implicitly\\ convert",
+ "line": 4
+ }
+ ]
+}
diff --git a/tests/iii/memory-pointer-type/notes.md b/tests/iii/memory-pointer-type/notes.md
new file mode 100644
index 0000000..456445e
--- /dev/null
+++ b/tests/iii/memory-pointer-type/notes.md
@@ -0,0 +1,5 @@
+# Rejection notes
+
+Human review: pending.
+
+The explicit memory builtin rejects the invalid argument before emitting a runtime call.
diff --git a/tests/iii/memory-pointer-type/program.cps b/tests/iii/memory-pointer-type/program.cps
new file mode 100644
index 0000000..2c1abeb
--- /dev/null
+++ b/tests/iii/memory-pointer-type/program.cps
@@ -0,0 +1,4 @@
+TYPE Raw = C_TYPE("void*")
+TYPE P = ^INTEGER
+DECLARE Pointer : P
+FREE(Pointer)
diff --git a/tests/iii/memory-size-type/case.json b/tests/iii/memory-size-type/case.json
new file mode 100644
index 0000000..9753757
--- /dev/null
+++ b/tests/iii/memory-size-type/case.json
@@ -0,0 +1,8 @@
+{
+ "errors": [
+ {
+ "reason": "Allocation\\ size\\ must\\ be\\ INTEGER\\ or\\ a\\ C\\ integer",
+ "line": 1
+ }
+ ]
+}
diff --git a/tests/iii/memory-size-type/notes.md b/tests/iii/memory-size-type/notes.md
new file mode 100644
index 0000000..456445e
--- /dev/null
+++ b/tests/iii/memory-size-type/notes.md
@@ -0,0 +1,5 @@
+# Rejection notes
+
+Human review: pending.
+
+The explicit memory builtin rejects the invalid argument before emitting a runtime call.
diff --git a/tests/iii/memory-size-type/program.cps b/tests/iii/memory-size-type/program.cps
new file mode 100644
index 0000000..0215fef
--- /dev/null
+++ b/tests/iii/memory-size-type/program.cps
@@ -0,0 +1 @@
+MALLOC(1.5)