summaryrefslogtreecommitdiff
path: root/libs/phoenix/test/stdlib/cmath.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/phoenix/test/stdlib/cmath.cpp')
-rw-r--r--libs/phoenix/test/stdlib/cmath.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/libs/phoenix/test/stdlib/cmath.cpp b/libs/phoenix/test/stdlib/cmath.cpp
index 6be29cdd9..fa17c71d3 100644
--- a/libs/phoenix/test/stdlib/cmath.cpp
+++ b/libs/phoenix/test/stdlib/cmath.cpp
@@ -1,5 +1,6 @@
/*=============================================================================
Copyright (c) 2001-2007 Joel de Guzman
+ Copyright (c) 2014 John Fletcher
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -16,11 +17,14 @@ int main()
{
double eps = 0.000001;
using namespace boost::phoenix::arg_names;
- boost::function<bool(double, double)> f = fabs(_1 - _2) < eps;
+ boost::function<bool(double, double)> f = boost::phoenix::fabs(_1 - _2) < eps;
- double x = boost::phoenix::pow(_1,_2)(2.,0.);
+ double x = boost::phoenix::pow(_1,_2)(2.,2.);
+ double y = boost::phoenix::atan2(_1,_2)(1.,1.);
+ double z = boost::phoenix::tan(_1)(y);
BOOST_TEST(f(0.0, 0 * eps));
BOOST_TEST(!f(0.0, eps));
- BOOST_TEST(fabs(x-1.) < eps );
+ BOOST_TEST(std::fabs(x-4.) < eps );
+ BOOST_TEST(std::fabs(z-1.) < eps );
}