Skip to content

Commit 1577282

Browse files
committed
Move tests to use static assertions
1 parent 3b2ea1b commit 1577282

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

libraries/ESP8266HTTPClient/src/ESP8266HTTPClient.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@
2828
#include <StreamDev.h>
2929
#include <base64.h>
3030

31+
static_assert(std::is_default_constructible_v<HTTPClient>, "");
32+
static_assert(!std::is_copy_constructible_v<HTTPClient>, "");
33+
static_assert(std::is_move_constructible_v<HTTPClient>, "");
34+
static_assert(std::is_move_assignable_v<HTTPClient>, "");
35+
3136
static int StreamReportToHttpClientReport (Stream::Report streamSendError)
3237
{
3338
switch (streamSendError)

tests/device/test_sw_http_client/test_sw_http_client.ino

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -212,17 +212,6 @@ TEST_CASE("HTTPS GET request", "[HTTPClient]")
212212
}
213213
}
214214

215-
TEST_CASE("Move constructible", "[HTTPClient]")
216-
{
217-
{
218-
std::optional<HTTPClient> maybe;
219-
maybe = std::make_optional(HTTPClient());
220-
}
221-
{
222-
HTTPClient http(std::move(HTTPClient()));
223-
}
224-
}
225-
226215
void loop()
227216
{
228217
}

0 commit comments

Comments
 (0)