diff options
author | deva <deva> | 2009-07-30 09:55:24 +0000 |
---|---|---|
committer | deva <deva> | 2009-07-30 09:55:24 +0000 |
commit | fca987525e5b6db7b4387f694122598f0a586576 (patch) | |
tree | b159fb07cab59563dce05cec68aa37138a81a623 /tools/PracroAdd | |
parent | 7648d777302595d819e2a34e41bbda157392667b (diff) |
Added automatically generated test section in cc files.
Diffstat (limited to 'tools/PracroAdd')
-rw-r--r-- | tools/PracroAdd | 10 |
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() { |