Aryadev Chavali
5a78b01a57
test_stream: don't write null terminator to mock file
2026-02-06 04:52:49 +00:00
Aryadev Chavali
2c1aebc8a5
test: seed random number generator
2026-02-06 04:52:40 +00:00
Aryadev Chavali
9452a14567
test_stream: make filename bigger, and increase the random alphabet
2026-02-06 04:34:10 +00:00
Aryadev Chavali
01fb0bf131
test_stream: randomise filename
...
Just to make sure it's not hardcoded or anything.
2026-02-05 20:51:45 +00:00
Aryadev Chavali
a662454ea7
test_stream: implement stream_test_peek_next
2026-02-05 20:47:28 +00:00
Aryadev Chavali
fde3dbbf9a
test_lisp_api: "cons'" -> "conses"
2026-02-05 20:36:02 +00:00
Aryadev Chavali
9e357cbc3b
tests: TEST_START only logs if TEST_VERBOSE is enabled.
2026-02-05 20:34:49 +00:00
Aryadev Chavali
0b3d659f14
tests: TEST_INIT -> TEST_START, TEST_PASSED -> TEST_END
2026-02-05 20:34:29 +00:00
Aryadev Chavali
0e6a43ec5f
test_stream: setup prologue and epilogue as fake tests in the suite
...
Standard old test functions, but they don't call TEST_INIT or
TEST_PASSED. They're placed at the start and at the end of the test
array.
Those macros just do printing anyway, so they're not necessary.
2026-02-05 20:31:18 +00:00
Aryadev Chavali
2ddddf5774
test_stream: implement stream_test_file
...
We might need to setup a prelude for initialising a file in the
filesystem for testing here - not only does stream_test_file need it,
but I see later tests requiring an equivalence check for files and
strings (variants of a stream).
2026-02-05 20:22:03 +00:00
Aryadev Chavali
3612313e76
test: TEST_INIT macro as a prologue for any unit test
2026-02-05 07:37:36 +00:00
Aryadev Chavali
762dabd3e5
tests: Better suite creation
...
While the previous method of in-lining a stack allocated array of
tests into the suite struct declaration was nice, we had to update
size manually.
This macro will allow us to just append new tests to the suite without
having to care for that. It generates a uniquely named variable for
the test array, then uses that test array in the suite declaration.
Nice and easy.
2026-02-05 06:44:35 +00:00
Aryadev Chavali
df1076f7d7
tests: enable STREAM_SUITE
2026-02-05 06:17:31 +00:00
Aryadev Chavali
a809d9de25
test_stream: Enable only stream_test_string
2026-02-05 06:17:21 +00:00
Aryadev Chavali
3b14144ccc
test_stream: implement stream_test_string
2026-02-05 06:17:13 +00:00
Aryadev Chavali
bd838c02ab
test_stream: basic skeleton
2026-02-05 06:06:03 +00:00
Aryadev Chavali
54e9edcba6
test_lisp_api: added sys_test
2026-02-05 05:48:00 +00:00
Aryadev Chavali
34d3417e74
symtable: sym_table_cleanup -> sym_table_free
2026-02-05 05:39:22 +00:00
Aryadev Chavali
3d0e373862
test_lisp_api: added sym_unique_test
2026-02-05 05:34:54 +00:00
Aryadev Chavali
0e8cdd7507
test_lisp_api: sym_test -> sym_fresh_test
2026-02-05 05:34:39 +00:00
Aryadev Chavali
4d693c8a92
test_lisp_api: int_test -> smi_test, added smi_oob_test
2026-02-05 05:24:34 +00:00
Aryadev Chavali
1c88253b3c
tests: fix size of LISP_API_SUITE tests
2026-02-05 05:23:38 +00:00
Aryadev Chavali
91264d96e4
test: Added definition to make default testing less verbose
...
TEST_VERBOSE is a preprocesser directive which TEST is dependent on.
By default it is 0, in which case TEST simply fails if the condition
is not true. Otherwise, a full log (as done previously) is made.
2026-02-05 05:16:11 +00:00
Aryadev Chavali
d88d7f7f23
tests: c23 allows you to inline stack allocated arrays in struct decls
2026-02-05 05:10:19 +00:00
Aryadev Chavali
16be3392b0
tests: slight cleanliness
2026-02-05 05:10:12 +00:00
Aryadev Chavali
2705ef9bb7
tests: Meaningful and pretty logging for tests
2026-02-05 04:56:11 +00:00
Aryadev Chavali
45ef1fa01a
tests: Added string view suite
...
sv_copy is the only function, but we may have others later.
2026-02-05 04:48:42 +00:00
Aryadev Chavali
9095b118fd
tests: split of symtable testing into its own suite
...
makes sense to be there, not in the lisp API
2026-02-05 04:48:42 +00:00
Aryadev Chavali
438a494ac7
lisp: sys_cleanup -> sys_free
2026-02-05 04:04:54 +00:00
Aryadev Chavali
500661d68e
LICENSE: Unlicense -> GPL Version 2
2026-02-05 04:04:54 +00:00
Aryadev Chavali
ea2f745f1e
Split out tests a bit, made a stronger API for running the full test suite
2026-02-04 20:44:04 +00:00
Aryadev Chavali
ce7185f923
Split off testing API into header, separate from source
...
This is so I could generate new test units using the same API.
2026-02-04 20:06:04 +00:00
Aryadev Chavali
27108aa811
Update license formats for all source code
2026-02-03 19:02:47 +00:00
Aryadev Chavali
2ec1dfa083
Move some stuff around for cleanliness
2026-01-21 09:33:35 +00:00