diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2018-04-06 11:30:10 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2018-04-06 16:35:09 +0100 |
commit | 25a81f12e881bd07a967189cc3a511fe1a94aaa2 (patch) | |
tree | 71c7007f6d083b3e89bd62b3cd4ea8a93150b99d | |
parent | C++17 (diff) | |
download | libadhocutil-25a81f12e881bd07a967189cc3a511fe1a94aaa2.tar.bz2 libadhocutil-25a81f12e881bd07a967189cc3a511fe1a94aaa2.tar.xz libadhocutil-25a81f12e881bd07a967189cc3a511fe1a94aaa2.zip |
C++17
Remove all boost things now in the standard library from tests.
-rw-r--r-- | libadhocutil/unittests/testCache.cpp | 2 | ||||
-rw-r--r-- | libadhocutil/unittests/testCurl.cpp | 9 | ||||
-rw-r--r-- | libadhocutil/unittests/testOptionals.cpp | 8 |
3 files changed, 10 insertions, 9 deletions
diff --git a/libadhocutil/unittests/testCache.cpp b/libadhocutil/unittests/testCache.cpp index 9e40fc0..2918bcc 100644 --- a/libadhocutil/unittests/testCache.cpp +++ b/libadhocutil/unittests/testCache.cpp @@ -1,7 +1,7 @@ #define BOOST_TEST_MODULE Cache #include <boost/test/unit_test.hpp> -#include <boost/bind.hpp> +#include <functional> #include "cache.h" #include "cache.impl.h" #include <boost/version.hpp> diff --git a/libadhocutil/unittests/testCurl.cpp b/libadhocutil/unittests/testCurl.cpp index c202f79..729f018 100644 --- a/libadhocutil/unittests/testCurl.cpp +++ b/libadhocutil/unittests/testCurl.cpp @@ -1,7 +1,7 @@ #define BOOST_TEST_MODULE Curl #include <boost/test/unit_test.hpp> -#include <boost/bind.hpp> +#include <functional> #include "curlHandle.h" #include "curlMultiHandle.h" #include "curlStream.h" @@ -115,14 +115,15 @@ mapFileToName(std::map<std::string, std::string> & map, const std::string & file BOOST_AUTO_TEST_CASE( fetch_multi ) { + using std::placeholders::_1; CurlMultiHandle cmh; std::map<std::string, std::string> files; cmh.addCurl("file://" + rootDir.string() + "/testBuffer.cpp", - boost::bind(&mapFileToName, boost::ref(files), "testBuffer.cpp", _1)); + std::bind(&mapFileToName, std::ref(files), "testBuffer.cpp", _1)); cmh.addCurl("file://" + rootDir.string() + "/testCurl.cpp", - boost::bind(&mapFileToName, boost::ref(files), "testCurl.cpp", _1)); + std::bind(&mapFileToName, std::ref(files), "testCurl.cpp", _1)); cmh.addCurl("file://" + rootDir.string() + "/testLocks.cpp", - boost::bind(&mapFileToName, boost::ref(files), "testLocks.cpp", _1)); + std::bind(&mapFileToName, std::ref(files), "testLocks.cpp", _1)); cmh.performAll(); BOOST_REQUIRE_EQUAL(3, files.size()); BOOST_REQUIRE_EQUAL("Locks", files["testLocks.cpp"]); diff --git a/libadhocutil/unittests/testOptionals.cpp b/libadhocutil/unittests/testOptionals.cpp index 793e1e5..90e247b 100644 --- a/libadhocutil/unittests/testOptionals.cpp +++ b/libadhocutil/unittests/testOptionals.cpp @@ -2,7 +2,7 @@ #include <boost/test/unit_test.hpp> #include <optionalUtils.h> -#include <boost/optional.hpp> +#include <optional> #include <Ice/Exception.h> #include <Ice/Optional.h> @@ -10,13 +10,13 @@ using namespace AdHoc; BOOST_AUTO_TEST_CASE ( general ) { - boost::optional<int> x; - boost::optional<double> y = 2.3; + std::optional<int> x; + std::optional<double> y = 2.3; Ice::optional<float> ix; Ice::optional<short> iy = 4; std::string * p = nullptr; std::string * q = new std::string("str"); - boost::optional<std::string> r; + std::optional<std::string> r; Ice::optional<std::string> s; bool b(p); |