From a0a8c6218d027dd4b8b877cd9941a55fc6b4de65 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 4 Mar 2009 23:22:32 +0000 Subject: Add a unit test program --- test.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 test.c (limited to 'test.c') diff --git a/test.c b/test.c new file mode 100644 index 0000000..b807681 --- /dev/null +++ b/test.c @@ -0,0 +1,33 @@ +/* + * test.c + * + * Unit tests + * + * (c) 2009 Thomas White + * + * Triclinator - solve nasty triclinic unit cells + * + */ + + +#include +#include +#include + +#include "crystal.h" + +int main(void) +{ + Cell cell; + + cell.a = 1.0; + cell.b = 1.0; + cell.c = 1.0; + cell.al = DEG2RAD(90.0); + cell.be = DEG2RAD(120.0); + cell.ga = DEG2RAD(90.0); + + printf("%8.5f deg\n", RAD2DEG(plane_angle(cell, 0, 0, 1, 0, 1, 0))); + + return 0; +} -- cgit v1.2.3