summaryrefslogtreecommitdiffhomepage
path: root/tests/test-webserver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test-webserver.cpp')
-rw-r--r--tests/test-webserver.cpp23
1 files changed, 10 insertions, 13 deletions
diff --git a/tests/test-webserver.cpp b/tests/test-webserver.cpp
index 5838dfa..7683b93 100644
--- a/tests/test-webserver.cpp
+++ b/tests/test-webserver.cpp
@@ -1,5 +1,9 @@
-#include "gmock/gmock.h"
-#include "gtest/gtest.h"
+#define BOOST_TEST_MODULE webserver_test
+
+#include <boost/test/included/unit_test.hpp>
+#include <boost/test/data/dataset.hpp>
+#include <boost/test/data/monomorphic.hpp>
+#include <boost/test/data/test_case.hpp>
#include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/xml_parser.hpp>
@@ -10,7 +14,7 @@
using namespace std::string_literals;
namespace pt = boost::property_tree;
-TEST(property_tree, put)
+BOOST_AUTO_TEST_CASE(property_tree_put)
{
pt::ptree p;
pt::ptree list;
@@ -33,19 +37,12 @@ TEST(property_tree, put)
pt::xml_parser::write_xml(ss, p /*, pt::xml_parser::xml_writer_make_settings<std::string>(' ', 1)*/);
- EXPECT_EQ(ss.str(), "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<list><listentry type=\"file1\">name1.txt</listentry><listentry type=\"file2\">name2.txt</listentry></list>");
+ BOOST_CHECK_EQUAL(ss.str(), "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<list><listentry type=\"file1\">name1.txt</listentry><listentry type=\"file2\">name2.txt</listentry></list>");
}
-TEST(string, stoul)
+BOOST_AUTO_TEST_CASE(string_stoul)
{
unsigned long l = std::stoul("-1");
- EXPECT_EQ(l, std::numeric_limits<unsigned long>::max());
+ BOOST_CHECK_EQUAL(l, std::numeric_limits<unsigned long>::max());
}
-
-
-int main(int argc, char* argv[]) {
- ::testing::InitGoogleMock(&argc, argv);
- return RUN_ALL_TESTS();
-}
-