geom/segment: extract point distance unit test
This commit is contained in:
parent
426a3a3fde
commit
48b04765d7
@ -2,11 +2,10 @@
|
|||||||
|
|
||||||
#include "geom/segment.hpp"
|
#include "geom/segment.hpp"
|
||||||
|
|
||||||
int
|
|
||||||
main (int, char**)
|
|
||||||
{
|
|
||||||
cruft::TAP::logger tap;
|
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
void test_point_distance (cruft::TAP::logger &tap)
|
||||||
|
{
|
||||||
static struct {
|
static struct {
|
||||||
cruft::point3f a, b;
|
cruft::point3f a, b;
|
||||||
cruft::point3f q;
|
cruft::point3f q;
|
||||||
@ -23,6 +22,14 @@ main (int, char**)
|
|||||||
auto d = distance (s, t.q);
|
auto d = distance (s, t.q);
|
||||||
tap.expect_eq (d, t.distance, "%!", t.message);
|
tap.expect_eq (d, t.distance, "%!", t.message);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
int
|
||||||
|
main (int, char**)
|
||||||
|
{
|
||||||
|
cruft::TAP::logger tap;
|
||||||
|
test_point_distance (tap);
|
||||||
return tap.status ();
|
return tap.status ();
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user