Boost logo

Boost Users :

Subject: [Boost-users] Using boost.Test check_is_small for my own
From: Olaf Peter (ope-devel_at_[hidden])
Date: 2013-05-26 15:02:49


Hello,

I try to use parts of boost.test lib not for unit testing self but
inside an algorithm. Anyway, at the end of header
http://www.boost.org/doc/libs/1_53_0/boost/test/floating_point_comparison.hpp
this is written inside anonymous namespace it works obviously, but not
at me. What happened here and how to fix it? Did I not read the header
carefully?

Thanks,
Olaf

---8<----
#include <boost/test/floating_point_comparison.hpp>

namespace tools {

     using boost::test_tools::check_is_small_t;

     check_is_small_t const& check_is_small =
unit_test::ut_detail::static_constant<check_is_small_t>::value;
}

int main()
{
     bool ok = tools::check_is_small(900, 0.1);
}
--->8----

test.cpp:5:30: error: 'boost::test_tools::check_is_small_t' has not been
declared
test.cpp:7:5: error: 'check_is_small_t' does not name a type
test.cpp: In function 'int main()':
test.cpp:12:15: error: 'check_is_small' is not a member of 'tools'


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net