|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r66782 - sandbox/SOC/2010/phoenix3/libs/phoenix/test/operator
From: thom.heller_at_[hidden]
Date: 2010-11-26 18:32:08
Author: theller
Date: 2010-11-26 18:32:02 EST (Fri, 26 Nov 2010)
New Revision: 66782
URL: http://svn.boost.org/trac/boost/changeset/66782
Log:
added testcase
Text files modified:
sandbox/SOC/2010/phoenix3/libs/phoenix/test/operator/arithmetic_tests.cpp | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/test/operator/arithmetic_tests.cpp
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/test/operator/arithmetic_tests.cpp (original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/test/operator/arithmetic_tests.cpp 2010-11-26 18:32:02 EST (Fri, 26 Nov 2010)
@@ -5,6 +5,7 @@
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#include <boost/detail/lightweight_test.hpp>
+
#include <boost/phoenix/core.hpp>
#include <boost/phoenix/operator.hpp>
@@ -52,6 +53,16 @@
BOOST_TEST((123 / val(456))() == 123 / 456);
BOOST_TEST((123 % val(456))() == 123 % 456);
}
+ {
+ // testcase contributed from Philip Reh, failed in Phoenix V2
+ using boost::phoenix::arg_names::arg1;
+ using boost::phoenix::arg_names::arg2;
+
+ int x[2];
+
+ BOOST_TEST((&arg1 - &arg2)(x[0], x[1]) == &x[0] - &x[1]);
+ BOOST_TEST((arg1 - arg2)(&x[0], &x[1]) == &x[0] - &x[1]);
+ }
return boost::report_errors();
}
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk