summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkitty <nepeta@canaglie.net>2026-04-21 15:22:44 +1000
committerkitty <nepeta@canaglie.net>2026-04-21 15:22:44 +1000
commitc10f3eddea7c38cade2a4c31024ddea45378f97f (patch)
tree6039da881b65408739590cc9335d0e38e8ce1b40
parent91da2eec88a22ab89f9d8c268a64d04609b3bf84 (diff)
a few tests
but include is broken (empty lines close the file) so i need to fix that
-rw-r--r--test.fs48
1 files changed, 46 insertions, 2 deletions
diff --git a/test.fs b/test.fs
index a0544d3..42de941 100644
--- a/test.fs
+++ b/test.fs
@@ -1,8 +1,52 @@
\ tests
\ (C) 1995 JOHNS HOPKINS UNIVERSITY / APPLIED PHYSICS LABORATORY
\ MAY BE DISTRIBUTED FREELY AS LONG AS THIS COPYRIGHT NOTICE REMAINS.
-\ ↑ some of the tests are lifted from the test suite.
+\ ↑ some of the tests are lifted from the test suite and the standard
\ no point in coming up with my own when this is here
true verbose !
-testing peepee bullshit
+
+testing basic assumptions
+
+t{ -> }t
+t{ : bitsset? if 0 0 else 0 then ; -> }t
+t{ 0 bitsset? -> 0 }t
+t{ 1 bitsset? -> 0 0 }t
+t{ -1 bitsset? -> 0 0 }t
+
+testing booleans
+
+t{ 0 0 and -> 0 }t
+t{ 0 1 and -> 0 }t
+t{ 1 0 and -> 0 }t
+t{ 1 1 and -> 1 }t
+
+t{ 0 invert 1 and -> 1 }t
+t{ 1 invert 1 and -> 0 }t
+
+0 constant 0s
+0 invert constant 1s
+
+t{ 0s invert -> 1s }t
+t{ 1s invert -> 0s }t
+
+t{ 0s 0s and -> 0s }t
+t{ 0s 1s and -> 0s }t
+t{ 1s 0s and -> 0s }t
+t{ 1s 1s and -> 1s }t
+
+t{ 0s 0s or -> 0s }t
+t{ 0s 1s or -> 1s }t
+t{ 1s 0s or -> 1s }t
+t{ 1s 1s or -> 1s }t
+
+t{ 0s 0s xor -> 0s }t
+t{ 0s 1s xor -> 1s }t
+t{ 1s 0s xor -> 1s }t
+t{ 1s 1s xor -> 0s }t
+
+t{ 123 constant x123 -> }t
+t{ x123 -> 123 }t
+t{ : equ constant ; -> }t
+t{ x123 equ y123 -> }t
+t{ y123 -> 123 }t