uhd/host/tests/math_test.cpp
Martin Braun ae5211d71d uhd: Update license headers
All copyright is now attributed to "Ettus Research, a National
Instruments company".

SPDX headers were also updated to latest version 3.0.
2018-02-19 16:54:52 -08:00

19 lines
441 B
C++

//
// Copyright 2014 Ettus Research LLC
// Copyright 2018 Ettus Research, a National Instruments Company
//
// SPDX-License-Identifier: GPL-3.0-or-later
//
#include <boost/test/unit_test.hpp>
#include <stdint.h>
#include <uhd/utils/math.hpp>
// NOTE: This is not the only math test case, see e.g. special tests
// for fp comparison.
BOOST_AUTO_TEST_CASE(test_log2){
double y = uhd::math::log2(16.0);
BOOST_CHECK_EQUAL(y, 4.0);
}