From 8220acce829835705706137649ddcd96ace6a0df Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Fri, 6 Apr 2012 14:20:04 -0700 Subject: [PATCH] more params tests --- tests/cpp_tests/params_test.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/cpp_tests/params_test.cpp b/tests/cpp_tests/params_test.cpp index 9caecafcd..baf430e19 100644 --- a/tests/cpp_tests/params_test.cpp +++ b/tests/cpp_tests/params_test.cpp @@ -53,6 +53,22 @@ int main( int, char*[] ) params["bool"] = "no"; BOOST_TEST( (params.get("bool") && *params.get("bool") == false)); + // strings + params["string"] = "hello"; + BOOST_TEST( (params.get("string") && *params.get("string") == "hello") ); + + // int + params["int"] = 1; + BOOST_TEST( (params.get("int") && *params.get("int") == 1) ); + + // double + params["double"] = 1.5; + BOOST_TEST( (params.get("double") && *params.get("double") == 1.5) ); + + // value_null + params["null"] = mapnik::value_null(); + //BOOST_TEST( (params.get("null")/* && *params.get("null") == mapnik::value_null()*/) ); + if (!::boost::detail::test_errors()) { std::clog << "C++ parameters: \x1b[1;32m✓ \x1b[0m\n"; } else {