Johan B.W. de Vries 6055cddab2 Extends the test framework to prepare for compilation tests
Feat: add now can add two full strings

Fix: it2 would have different working for emit eof

Fix: eq and lt would return bools on it0 and it1

Fix: Functions always return something (there is no such
thing as an empty type).

Fix: Return value from main is now always ignored.

Fix: Output from check is same on all iterations
2025-05-04 14:33:10 +02:00

30 lines
321 B
Plaintext

func tst a b:
declare var
calc var add a b
emit a
emit " + "
emit b
emit " = "
emit var
emit eol
/
main:
declare var
calc var add "1" "2"
emit "1 + 2 = "
emit var
emit eol
calc var add "10" "20"
emit "10 + 20 = "
emit var
emit eol
calc var add "101" "202"
emit "101 + 202 = "
emit var
emit eol
/