[Scroller] Fix the calculation double type number. Round off to the nearest whole...
[framework/uifw/elementary.git] / TC / elm_ts / segmentcontrol / tc_gen.sh
1 #!/bin/sh
2
3 TMPSTR=$0
4 SCRIPT=${TMPSTR##*/}
5
6 if [ $# -lt 3 ]; then
7         echo "Usage) $SCRIPT module_name winset_name api_name"
8         exit 1
9 fi
10
11 MODULE=$1
12 WINSET=$2
13 API=$3
14 TEMPLATE=utc_MODULE_API_func.c.in
15 TESTCASE=utc_${MODULE}_${API}_func
16
17 sed -e  '
18         s^@API@^'"$API"'^g
19         s^@MODULE@^'"$MODULE"'^g
20         ' $TEMPLATE > $TESTCASE.c
21
22 if [ ! -e "$TESTCASE.c" ]; then
23         echo "Failed"
24         exit 1
25 fi
26
27 echo "/elm_ts/$WINSET/$TESTCASE" >> tslist
28
29 echo "Testcase file is $TESTCASE.c"
30 echo "$TESTCASE is added to tslist"
31 echo "Done"
32 echo "please put \"$TESTCASE\" as Target in Makefile"