-
Notifications
You must be signed in to change notification settings - Fork 0
/
fuzz.sh
79 lines (78 loc) · 1.41 KB
/
fuzz.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
./FuzzTestScript.py
for((i=1; i<=1000; ++i))
do
input="$i"".txt"
output="$i""output.txt"
./main<$input>$output
done
echo "diffing squares"
for((i=1;i<=10;++i))
do
expected="square.txt"
actual="$i""output.txt"
diff $expected $actual
if [ $? != 0 ]; then
echo $actual
echo "T H E R E H A S B E E N A N E R R O R"
fi
done
echo "diffing rectangles"
for((i=11;i<=30;++i))
do
expected="rectangle.txt"
actual="$i""output.txt"
diff $expected $actual
if [ $? != 0 ];
then
echo $actual
echo "T H E R E H A S B E E N A N E R R O R"
fi
done
echo "diffing rhombi"
for((i=31;i<=40;++i))
do
expected="rhombus.txt"
actual="$i""output.txt"
diff $expected $actual
if [ $? != 0 ];
then
echo $actual
echo "T H E R E H A S B E E N A N E R R O R"
fi
done
echo "diffing trapezoids"
for((i=41;i<=50;++i))
do
expected="trapezoid.txt"
actual="$i""output.txt"
diff $expected $actual
if [ $? != 0 ];
then
echo $actual
echo "T H E R E H A S B E E N A N E R R O R"
fi
done
echo "diffing kites"
for((i=51;i<=60;++i))
do
expected="kite.txt"
actual="$i""output.txt"
diff $expected $actual
if [ $? != 0 ];
then
echo $actual
echo "T H E R E H A S B E E N A N E R R O R"
fi
done
echo "diffing quadrilaterals"
for((i=61;i<=70;++i))
do
expected="quadrilateral.txt"
actual="$i""output.txt"
diff $expected $actual
if [ $? != 0 ];
then
echo $actual
echo "T H E R E H A S B E E N A N E R R O R"
fi
done