summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2020-06-06 19:44:36 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2020-06-06 19:44:36 +0200
commit540f839cb5868dac3eb409f509b85995826cf559 (patch)
tree42d2b9414edb748ad5d32efffcfeced18bf0b0b4 /tools
parentfa5985ed620c3cd4c7b9712b6b80a2e2c1a8ba31 (diff)
Add unit-test framework.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/add_file25
1 files changed, 1 insertions, 24 deletions
diff --git a/tools/add_file b/tools/add_file
index d9deb50..e86c117 100755
--- a/tools/add_file
+++ b/tools/add_file
@@ -62,34 +62,11 @@ function ccfile() {
echo -n $hf >> $1;
echo '"' >> $1;
echo '' >> $1;
-
- local hn=`echo $1 | cut -d'.' -f1 | tr 'a-z.' 'A-Z_'`
- echo "#ifdef TEST_${hn}" >> $1;
- echo "//Additional dependency files" >> $1;
- echo "//deps:" >> $1;
- echo "//Required cflags (autoconf vars may be used)" >> $1;
- echo "//cflags:" >> $1;
- echo "//Required link options (autoconf vars may be used)" >> $1;
- echo "//libs:" >> $1;
- echo "#include \"test.h\"" >> $1;
- echo "" >> $1;
- echo "TEST_BEGIN;" >> $1;
- echo "" >> $1;
- echo "// TODO: Put some testcode here (see test.h for usable macros)." >> $1;
- echo "TEST_TRUE(false, \"No tests yet!\");" >> $1;
- echo "" >> $1;
- echo "TEST_END;" >> $1;
- echo "" >> $1;
- echo "#endif/*TEST_${hn}*/" >> $1;
}
function hfile() {
allfile $1;
- local hn=`echo $1 | tr 'a-z.' 'A-Z_'`
- local pr=`echo $PROJECT | tr 'a-z.' 'A-Z_'`
- echo "#ifndef __${pr}_${hn}__" >> $1;
- echo "#define __${pr}_${hn}__" >> $1;
- echo "#endif/*__${pr}_${hn}__*/" >> $1;
+ echo "#pragma once" >> $1;
}
if [ "$#" = "1" ]; then