mirror of
https://github.com/cosinekitty/astronomy.git
synced 2026-04-08 00:27:28 -04:00
27 lines
905 B
Bash
Executable File
27 lines
905 B
Bash
Executable File
#!/bin/bash
|
|
Fail()
|
|
{
|
|
echo "ERROR($0): $1"
|
|
exit 1
|
|
}
|
|
./ctbuild $1 || exit 1
|
|
./ctest moon || Fail "Failure in ctest moon"
|
|
time ./ctest || Fail "Failure reported by ctest."
|
|
./generate check temp/c_check.txt || Fail "Verification failure for C unit test output."
|
|
./ctest diff temp/c_check.txt temp/js_check.txt || Fail "Diff(C,JS) failure."
|
|
./ctest seasons seasons/seasons.txt || Fail "Failed C seasons test."
|
|
./ctest moonphase moonphase/moonphases.txt || Fail "Failed C moon phase test."
|
|
|
|
./ctest elongation || Fail "Failed C elongation tests."
|
|
for file in temp/c_longitude_*.txt; do
|
|
./generate check ${file} || Fail "Failed verification of file ${file}"
|
|
echo ""
|
|
done
|
|
|
|
./ctest riseset riseset/riseset.txt || Fail "Failed C rise/set tests."
|
|
./ctest magnitude || Fail "Failed C magnitude tests."
|
|
./ctest apsis apsides/moon.txt || Fail "Failed C apsis tests."
|
|
|
|
echo "unit_test_c: success"
|
|
exit 0
|