From 3d909981106454a9fe5ed4b27fd94f0135ef0871 Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Sat, 6 Jun 2020 15:21:43 +0200 Subject: test stoul() --- tests/test-webserver.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests/test-webserver.cpp') diff --git a/tests/test-webserver.cpp b/tests/test-webserver.cpp index f7020af..5838dfa 100644 --- a/tests/test-webserver.cpp +++ b/tests/test-webserver.cpp @@ -36,6 +36,13 @@ TEST(property_tree, put) EXPECT_EQ(ss.str(), "\nname1.txtname2.txt"); } +TEST(string, stoul) +{ + unsigned long l = std::stoul("-1"); + + EXPECT_EQ(l, std::numeric_limits::max()); +} + int main(int argc, char* argv[]) { ::testing::InitGoogleMock(&argc, argv); -- cgit v1.2.3