Remove unit testing code.

Until I can do it properly, I don't want to do it at all.
This commit is contained in:
Jordan Bancino 2022-11-18 22:27:23 +00:00
parent 07f4ecd2d7
commit fe29b9f848
3 changed files with 3 additions and 42 deletions

View file

@ -27,15 +27,15 @@ Milestone: v0.2.0
Due: July 1, 2023
-----------------
[ ] Clean up memory API
[ ] Use double hashing instead of linear probing
[!] Clean up memory API
[!] Use double hashing instead of linear probing
[!] Store block info inside the block, not as a separate block
- This makes it too easy to clobber the memory information. By
making it a separate block, there's less of a chance of the
information getting destroyed. It's worth a few extra bytes of
memory to make accidents harder, I think.
[x] Add recipe to td script to upload patches to the Matrix room
[ ] Figure out how to write unit tests for array/hashmap/etc
[!] Figure out how to write unit tests for array/hashmap/etc
[~] Convert documentation to man pages
[~] Internal API docs
[x] Array

View file

@ -1,14 +0,0 @@
#ifndef TELODENDRIA_UNITTEST_H
#define TELODENDRIA_UNITTEST_H
#include <stdio.h>
#include <stdlib.h>
#define TEST(body) int main(void) { body; return 0; }
#define ASSERT(condition) if (!(condition)) { \
printf("%s:%d: Assertion failed: %s\n", __FILE__, __LINE__, #condition); \
exit(1); \
}
#endif

View file

@ -147,31 +147,6 @@ recipe_format() {
done
}
# Execute all the unit tests and report any failures.
recipe_test() {
passed=0
failed=0
mkdir -p "build/tests"
for testSrc in $(find tests -name 'Test*.c'); do
testBin=$(basename "$testSrc" .c)
testBin="build/tests/$testBin"
if ! $CC $CFLAGS -I src -o "$testBin" "$testSrc"; then
failed=$((failed + 1))
break;
fi
if ! "$testBin"; then
failed=$((failed + 1))
break;
fi
passed=$((passed + 1))
done
echo "Passed: $passed, failed: $failed"
echo "Total: $((passed + failed))"
}
# Deploy the Telodendria website by copying the required files to
# a web root defined by TELODENDRIA_PUB.
recipe_site() {