diff options
author | Thomas White <taw@bitwiz.org.uk> | 2009-03-04 23:22:32 +0000 |
---|---|---|
committer | Thomas White <taw@bitwiz.org.uk> | 2009-03-04 23:23:00 +0000 |
commit | a0a8c6218d027dd4b8b877cd9941a55fc6b4de65 (patch) | |
tree | e1c4e07803b33c1a72f26d19c9a6016c9915fb42 /test.c | |
parent | 219f63c4bcbf877a41a70c6fd37ac63bd90b85b6 (diff) |
Add a unit test program
Diffstat (limited to 'test.c')
-rw-r--r-- | test.c | 33 |
1 files changed, 33 insertions, 0 deletions
@@ -0,0 +1,33 @@ +/* + * test.c + * + * Unit tests + * + * (c) 2009 Thomas White <taw27@cam.ac.uk> + * + * Triclinator - solve nasty triclinic unit cells + * + */ + + +#include <stdlib.h> +#include <stdio.h> +#include <math.h> + +#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; +} |