forked from Telodendria/Telodendria
Remove unit testing code.
Until I can do it properly, I don't want to do it at all.
This commit is contained in:
parent
07f4ecd2d7
commit
fe29b9f848
3 changed files with 3 additions and 42 deletions
6
TODO.txt
6
TODO.txt
|
@ -27,15 +27,15 @@ Milestone: v0.2.0
|
||||||
Due: July 1, 2023
|
Due: July 1, 2023
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
[ ] Clean up memory API
|
[!] Clean up memory API
|
||||||
[ ] Use double hashing instead of linear probing
|
[!] Use double hashing instead of linear probing
|
||||||
[!] Store block info inside the block, not as a separate block
|
[!] Store block info inside the block, not as a separate block
|
||||||
- This makes it too easy to clobber the memory information. By
|
- This makes it too easy to clobber the memory information. By
|
||||||
making it a separate block, there's less of a chance of the
|
making it a separate block, there's less of a chance of the
|
||||||
information getting destroyed. It's worth a few extra bytes of
|
information getting destroyed. It's worth a few extra bytes of
|
||||||
memory to make accidents harder, I think.
|
memory to make accidents harder, I think.
|
||||||
[x] Add recipe to td script to upload patches to the Matrix room
|
[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
|
[~] Convert documentation to man pages
|
||||||
[~] Internal API docs
|
[~] Internal API docs
|
||||||
[x] Array
|
[x] Array
|
||||||
|
|
|
@ -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
|
|
25
tools/bin/td
25
tools/bin/td
|
@ -147,31 +147,6 @@ recipe_format() {
|
||||||
done
|
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
|
# Deploy the Telodendria website by copying the required files to
|
||||||
# a web root defined by TELODENDRIA_PUB.
|
# a web root defined by TELODENDRIA_PUB.
|
||||||
recipe_site() {
|
recipe_site() {
|
||||||
|
|
Loading…
Reference in a new issue