From 7fab6b807ef5b86c97577170b7b5fdc667e3fa20 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Tue, 15 Jan 2019 15:04:03 -0800 Subject: math: Replace boost::*::{lcm,gcd}() with portable versions Boost changed the lcm() and gcd() functions in Boost 1.67. This creates portable UHD versions to be used instead. They use various Boost versions under the hood conditionally. --- host/tests/math_test.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'host/tests') diff --git a/host/tests/math_test.cpp b/host/tests/math_test.cpp index 575cfe071..4714f6625 100644 --- a/host/tests/math_test.cpp +++ b/host/tests/math_test.cpp @@ -9,8 +9,12 @@ #include #include -// We need an empty test -BOOST_AUTO_TEST_CASE(test_) +BOOST_AUTO_TEST_CASE(test_lcm) { - BOOST_CHECK_EQUAL(true, true); + BOOST_CHECK_EQUAL(uhd::math::lcm(2, 3), 6); +} + +BOOST_AUTO_TEST_CASE(test_gcd) +{ + BOOST_CHECK_EQUAL(uhd::math::gcd(6, 15), 3); } -- cgit v1.2.3