summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordeva <deva>2009-07-30 09:55:24 +0000
committerdeva <deva>2009-07-30 09:55:24 +0000
commitfca987525e5b6db7b4387f694122598f0a586576 (patch)
treeb159fb07cab59563dce05cec68aa37138a81a623
parent7648d777302595d819e2a34e41bbda157392667b (diff)
Added automatically generated test section in cc files.
-rw-r--r--tools/PracroAdd10
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/PracroAdd b/tools/PracroAdd
index cbcdb64..c2ffdf0 100644
--- a/tools/PracroAdd
+++ b/tools/PracroAdd
@@ -57,6 +57,16 @@ 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 "" >> $1;
+ echo "int main()" >> $1;
+ echo "{" >> $1;
+ echo " return 0;" >> $1;
+ echo "}" >> $1;
+ echo "" >> $1;
+ echo "#endif/*TEST_${hn}*/" >> $1;
}
function hfile() {