all repos — hex @ 16a08d74be8162d83080c21dd44f1b80fc2c8b1f

A tiny, minimalist, slightly-esoteric concatenative programming lannguage.

Added tests.
h3rald h3rald@h3rald.com
Tue, 26 Nov 2024 11:06:37 +0000
commit

16a08d74be8162d83080c21dd44f1b80fc2c8b1f

parent

779295e59a463144560572aebf2689b38d66694a

1 files changed, 28 insertions(+), 0 deletions(-)

jump to
M tests.hextests.hex

@@ -35,21 +35,49 @@ ("a" free 0x1) test i

("aaa" type "string" == 0x1 type "integer" == () type "quotation" == and and) test i ((0x1 0x2 +) i 0x3 ==) test i ("0x2 0x2 -" eval 0x0 ==) test i +;5 (0x4 0x5 + 0x9 ==) test i (0x5 0x3 - 0x2 ==) test i (0x5 0x2 * 0xa ==) test i (0x5 0x2 / 0x2 ==) test i (0x4 0x2 % 0x0 ==) test i +;10 (0x10101 0x01010 & 0x0 ==) test i (0x10111 0x01000 | 0x11111 ==) test i (0x1 0x1 ^ 0x0 ==) test i (0x1 ~ 0xfffffffe ==) test i (0x1 0x4 << 0x10 ==) test i +;15 (0x10 0x4 >> 0x1 ==) test i +("10" int 0x10 ==) test i +(0x10 str "10" ==) test i +(0xa dec "10" ==) test i +("10" hex 0xa ==) test i +;20 +("aaa" "aaa" ==) test i +(0x20 0x20 ==) test i +(0x21 0x22 !=) test i +("abba" "aaa" !=) test i +(0x2 0x1 >) test i +;25 + +(0x2 0x2 >=) test i +(0x2 0x3 <) test i +(0x3 0x3 <=) test i +(0x2 0x3 and) test i +(0x1 0x0 or) test i +;30 + +(0x1 0x0 xor) test i +(0x1 0x1 xor not) test i +("hello" " world" cat "hello world" ==) test i +((0x1 "a") ("b") cat (0x1 "a" "b") ==) test i +((0x1 0x2 0x3) 0x1 0x2 slice (0x2 0x3) ==) test i +("hello" 0x0 0x3 slice "hell" ==) test i ; --- Report "\nSuccessful Tests: " print successes dec print "/" print successes failures + dec puts