From 610f01bd0bb22ffde29a621867efe6cdaea724aa Mon Sep 17 00:00:00 2001 From: artemp Date: Wed, 28 Jan 2015 12:54:33 +0100 Subject: [PATCH] update params_test - #2651 --- tests/cpp_tests/params_test.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/tests/cpp_tests/params_test.cpp b/tests/cpp_tests/params_test.cpp index 936261c36..0e83a805e 100644 --- a/tests/cpp_tests/params_test.cpp +++ b/tests/cpp_tests/params_test.cpp @@ -96,14 +96,10 @@ int main(int argc, char** argv) // https://github.com/mapnik/mapnik/issues/2471 //BOOST_TEST( (params.get("null") && *params.get("null") == mapnik::value_null()) ); - std::string rvalue("rvalue"); - params["rvalue"] = rvalue; - BOOST_TEST(params.get("rvalue") == std::string("rvalue")); - // Currently this fails because rvalue gets moved and nulled out - // Is this really the right behavior? - std::clog << "FIXME: line 104 of tests/cpp_tests/params_test.cpp\n"; - std::clog << "https://github.com/mapnik/mapnik/issues/2651\n"; - //BOOST_TEST(rvalue == std::string("rvalue")); + std::string value("value"); + params["value"] = value; + BOOST_TEST(params.get("value") == std::string("value")); + BOOST_TEST(value == std::string("value")); // ensure that const member is not moved incorrectly when added to params detail::string_holder holder;