aboutsummaryrefslogtreecommitdiffstats
path: root/libtellurian_distance_radians.c
diff options
context:
space:
mode:
Diffstat (limited to 'libtellurian_distance_radians.c')
-rw-r--r--libtellurian_distance_radians.c31
1 files changed, 30 insertions, 1 deletions
diff --git a/libtellurian_distance_radians.c b/libtellurian_distance_radians.c
index d7c5547..7401edd 100644
--- a/libtellurian_distance_radians.c
+++ b/libtellurian_distance_radians.c
@@ -17,5 +17,34 @@ libtellurian_distance_radians(double latitude1, double longitude1,
#else
-TODO_TEST
+
+
+int
+main(void)
+{
+ double rs, ra1, ra2;
+ double s, a1, a2;
+
+ libtellurian_vincenty_inverse__(1, 2, 3, 4, &rs, &ra1, &ra2);
+
+ s = libtellurian_distance_radians(1, 2, 3, 4, &a1, &a2);
+ ASSERT(s == rs);
+ ASSERT(a1 == ra1);
+ ASSERT(a2 == ra2);
+
+ s = libtellurian_distance_radians(1, 2, 3, 4, &a1, NULL);
+ ASSERT(s == rs);
+ ASSERT(a1 == ra1);
+
+ s = libtellurian_distance_radians(1, 2, 3, 4, NULL, &a2);
+ ASSERT(s == rs);
+ ASSERT(a2 == ra2);
+
+ s = libtellurian_distance_radians(1, 2, 3, 4, NULL, NULL);
+ ASSERT(s == rs);
+
+ return 0;
+}
+
+
#endif