testcases for rint double rounding issue
[libc-test.git] / src / math / gen / gentests.sh
blobb47ce7c520ed9f971ea83d29fc251a9a494d791a
1 #!/bin/sh
3 D=..
4 sed 's/^T(//;s/,//;s/)//' functions.h | while read N T
5 do
6 [ "$T" ] || continue
8 [ -e $D/$N.c ] || {
9 cp template/$T.c $D/$N.c || continue
10 ND=`echo $N |sed 's/l$//'`
12 H=''
13 for i in crlibm/$N.h ucb/$N.h sanity/$N.h
15 [ -e $D/$i ] && H="$H#include \"$i\"\\n"
16 done
17 DH=''
18 for i in crlibm/$ND.h ucb/$ND.h sanity/$ND.h
20 [ -e $D/$i ] && DH="$DH#include \"$i\"\\n"
21 done
23 sed -i "s/___/$N/g;s,DHEADERS,$DH,;s,HEADERS,$H," $D/$N.c
25 done