3 function check_success
()
9 result
=`./degrees_converter "$value" | cut -d' ' -f3`
10 diff=`echo "$result - $expected" | bc -l`
13 echo "$value -> $result != $expected"
19 function check_failure
()
25 result
=`./degrees_converter "$value" | cut -d' ' -f3`
26 diff=`echo "$result - $expected" | bc -l`
29 echo "$value -> $result = $expected"
35 check_success
3.5 3.5 3°
30 "3°30'0.00"
36 check_failure
3.5 3.6 3°
40 "3°30'1.00"