GCC build fixes

This commit is contained in:
Ben Clayton 2019-11-14 00:12:19 +00:00
parent a4b9640ffc
commit d13d4a4151
6 changed files with 12 additions and 9 deletions

View File

@ -10,7 +10,7 @@
"defines": [],
"compilerPath": "/usr/bin/gcc",
"cStandard": "c11",
"cppStandard": "c++17",
"cppStandard": "c++11",
"intelliSenseMode": "clang-x64"
}
],

View File

@ -17,6 +17,7 @@
#include <assert.h>
#include <type_traits>
#include <utility> // std::move
namespace dap {

View File

@ -18,6 +18,7 @@
#include "typeof.h"
#include "types.h"
#include <cstddef> // ptrdiff_t
#include <type_traits>
namespace dap {

View File

@ -78,10 +78,10 @@ TEST(Any, Object) {
ASSERT_TRUE(any.is<dap::object>());
if (any.is<dap::object>()) {
auto got = any.get<dap::object>();
ASSERT_EQ(got.size(), 3);
ASSERT_EQ(got.count("one"), 1);
ASSERT_EQ(got.count("two"), 1);
ASSERT_EQ(got.count("three"), 1);
ASSERT_EQ(got.size(), 3U);
ASSERT_EQ(got.count("one"), 1U);
ASSERT_EQ(got.count("two"), 1U);
ASSERT_EQ(got.count("three"), 1U);
ASSERT_TRUE(got["one"].is<dap::integer>());
ASSERT_TRUE(got["two"].is<dap::integer>());
ASSERT_TRUE(got["three"].is<dap::integer>());

View File

@ -18,6 +18,7 @@
#include <condition_variable>
#include <cstdarg>
#include <cstdio>
#include <cstring> // strlen
#include <deque>
#include <mutex>

View File

@ -179,7 +179,7 @@ TEST_F(SessionTest, Request) {
ASSERT_EQ(received.i, request.i);
ASSERT_EQ(received.n, request.n);
ASSERT_EQ(received.a, request.a);
ASSERT_EQ(received.o.size(), 3);
ASSERT_EQ(received.o.size(), 3U);
ASSERT_EQ(received.o["a"].get<dap::integer>(),
request.o["a"].get<dap::integer>());
ASSERT_EQ(received.o["b"].get<dap::number>(),
@ -208,7 +208,7 @@ TEST_F(SessionTest, RequestResponseSuccess) {
ASSERT_EQ(got.response.i, dap::integer(99));
ASSERT_EQ(got.response.n, dap::number(123.456));
ASSERT_EQ(got.response.a, dap::array<dap::integer>({5, 4, 3, 2, 1}));
ASSERT_EQ(got.response.o.size(), 3);
ASSERT_EQ(got.response.o.size(), 3U);
ASSERT_EQ(got.response.o["one"].get<dap::integer>(), dap::integer(1));
ASSERT_EQ(got.response.o["two"].get<dap::number>(), dap::number(2));
ASSERT_EQ(got.response.o["three"].get<dap::string>(), dap::string("3"));
@ -267,7 +267,7 @@ TEST_F(SessionTest, ResponseSentHandlerSuccess) {
ASSERT_EQ(got.response.i, dap::integer(99));
ASSERT_EQ(got.response.n, dap::number(123.456));
ASSERT_EQ(got.response.a, dap::array<dap::integer>({5, 4, 3, 2, 1}));
ASSERT_EQ(got.response.o.size(), 3);
ASSERT_EQ(got.response.o.size(), 3U);
ASSERT_EQ(got.response.o["one"].get<dap::integer>(), dap::integer(1));
ASSERT_EQ(got.response.o["two"].get<dap::number>(), dap::number(2));
ASSERT_EQ(got.response.o["three"].get<dap::string>(), dap::string("3"));
@ -308,7 +308,7 @@ TEST_F(SessionTest, Event) {
ASSERT_EQ(got.i, event.i);
ASSERT_EQ(got.n, event.n);
ASSERT_EQ(got.a, event.a);
ASSERT_EQ(got.o.size(), 3);
ASSERT_EQ(got.o.size(), 3U);
ASSERT_EQ(got.o["a"].get<dap::integer>(), event.o["a"].get<dap::integer>());
ASSERT_EQ(got.o["b"].get<dap::number>(), event.o["b"].get<dap::number>());
ASSERT_EQ(got.o["c"].get<dap::string>(), event.o["c"].get<dap::string>());