MCPcopy Create free account
hub / github.com/Geode-solutions/OpenGeode / test_comparison

Function test_comparison

tests/geometry/test-point.cpp:32–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30#include <geode/tests/common.hpp>
31
32void test_comparison()
33{
34 const geode::Point3D p{ { 2, 1.0, 2.6 } };
35 const geode::Point3D p2 = p;
36
37 geode::OpenGeodeGeometryException::test(
38 p == p2, "Points should be equal" );
39 const geode::Point2D P{ { 15, 2.6 } };
40 const geode::Point2D P2{ { 16, 2.6 } };
41 geode::OpenGeodeGeometryException::test(
42 P != P2, "Points should be different" );
43
44 const geode::Point3D p_epsilon{ { 2.0000000001, 1, 2.6 } };
45 geode::OpenGeodeGeometryException::test(
46 p.inexact_equal( p_epsilon ), "Points should be almost equal" );
47}
48
49void test_operators()
50{

Callers 1

testFunction · 0.70

Calls 2

testFunction · 0.70
inexact_equalMethod · 0.45

Tested by

no test coverage detected