mirror of
https://github.com/cosinekitty/astronomy.git
synced 2026-03-23 17:03:37 -04:00
Includes coordinate transform logic support in C, JavaScript, and Python. Will start porting to C# soon.
30 lines
1.1 KiB
Bash
Executable File
30 lines
1.1 KiB
Bash
Executable File
#!/bin/bash
|
|
Fail()
|
|
{
|
|
echo "ERROR($0): $1"
|
|
exit 1
|
|
}
|
|
./ctbuild $1 || exit 1
|
|
./ctest refraction || Fail "Failure in ctest refraction"
|
|
./ctest rotation || Fail "Failure in ctest rotation"
|
|
./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 diff temp/c_check.txt dotnet/csharp_test/csharp_check.txt || Fail "Diff(C,C#) 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
|