Files
astronomy/generate/adhoc_c
Don Cross f0f7db74dd Added ad-hoc tests to find discrepancy between JS and C code.
The JS and C SkyPos functions are calculating slightly
different values. It looks like the C code is actually
a little more accurate. I want to understand why.
2019-05-18 22:23:08 -04:00

21 lines
380 B
Bash
Executable File

#!/bin/bash
Fail()
{
echo "ERROR($0): $1"
exit 1
}
[[ -z "${CC}" ]] && CC=gcc
echo "$0: C compiler = ${CC}"
BUILDOPT='-g -O0'
${CC} ${BUILDOPT} -Wall -Werror -o ctest -I ../source/c/ ../source/c/astronomy.c ctest.c -lm || Fail "Error building ctest"
echo "$0: Built 'ctest' program."
./ctest adhoc || Fail "Failure reported by ctest."
echo "adhoc_c: success"
exit 0