From 2c0f1098351d6c0763d985c2085ec676a7992e2d Mon Sep 17 00:00:00 2001 From: Paul David Date: Tue, 9 May 2017 21:36:02 -0400 Subject: Types: Added equality/inquality operators to support Boost.Python additions - Added to subdev_spec_pair_t - Added to range_t - Added tests for the inequalities --- host/tests/ranges_test.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'host/tests/ranges_test.cpp') diff --git a/host/tests/ranges_test.cpp b/host/tests/ranges_test.cpp index 85bb4c3c4..49607b9a3 100644 --- a/host/tests/ranges_test.cpp +++ b/host/tests/ranges_test.cpp @@ -68,3 +68,12 @@ BOOST_AUTO_TEST_CASE(test_ranges_clip2){ BOOST_CHECK_CLOSE(mr.clip(3.1, true), 3., tolerance); BOOST_CHECK_CLOSE(mr.clip(4., true), 3., tolerance); } + +BOOST_AUTO_TEST_CASE(test_ranges_compare){ + range_t range(1); + range_t n_range(1); + range_t d_range(2); + + BOOST_CHECK(range == n_range); + BOOST_CHECK(range != d_range); +} -- cgit v1.2.3