From ccbbe046f0efb2c9a63e78d307f2c1b96c1c3e64 Mon Sep 17 00:00:00 2001 From: etobi Date: Tue, 3 Nov 2009 22:04:11 +0100 Subject: added tools --- tools/newtestclass | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100755 tools/newtestclass (limited to 'tools/newtestclass') diff --git a/tools/newtestclass b/tools/newtestclass new file mode 100755 index 0000000..652f354 --- /dev/null +++ b/tools/newtestclass @@ -0,0 +1,29 @@ +#!/bin/sh + +class=$1 +lowerclass=`echo $class | tr [:upper:] [:lower:]` +include="$lowerclass".h +testfile="$lowerclass"_test.cc + +cp `dirname $0`/sourcefileheader.txt $testfile + +cat >> $testfile < +#include "#INCLUDE#" + +namespace +{ + +class #CLASS#Test: public CxxTest::TestSuite +{ + public: + void TestSimple() + { + } +}; + +}; +EOF + +sed "s/#CLASS#/$class/g" $testfile >$testfile.tmp ; mv $testfile.tmp $testfile +sed "s/#INCLUDE#/$include/g" $testfile >$testfile.tmp ; mv $testfile.tmp $testfile -- cgit v1.2.3