]> granicus.if.org Git - icinga2/commitdiff
Add a unit test for Convert::ToLong(double) - fails
authorMichael Friedrich <michael.friedrich@icinga.com>
Wed, 30 Jan 2019 13:23:57 +0000 (14:23 +0100)
committerMichael Friedrich <michael.friedrich@icinga.com>
Mon, 11 Feb 2019 12:15:11 +0000 (13:15 +0100)
(cherry picked from commit b1362aeb9b6822a88ce4e3a187974f5ef20a4bad)

test/base-convert.cpp

index 26919b61f96f1c065f05f5c32e2e7fe06c44fa9f..48499b1cba6c8346a64015960073501434ce3798 100644 (file)
@@ -33,6 +33,8 @@ BOOST_AUTO_TEST_CASE(tolong)
        BOOST_CHECK_THROW(Convert::ToLong("7a"), boost::exception);
 
        BOOST_CHECK(Convert::ToLong(Value(-7)) == -7);
+
+       BOOST_CHECK(Convert::ToLong(3.141386593) == 3);
 }
 
 BOOST_AUTO_TEST_CASE(todouble)