Added move assignment operator to Client class. (#1873)
Some checks failed
test / ubuntu (push) Has been cancelled
test / macos (push) Has been cancelled
test / windows (push) Has been cancelled

This commit is contained in:
Hlado 2024-06-30 18:17:00 +03:00 committed by GitHub
parent 177d8420a1
commit 8cd0ed0509
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 1 deletions

View file

@ -1530,6 +1530,7 @@ public:
const std::string &client_key_path);
Client(Client &&) = default;
Client &operator=(Client &&) = default;
~Client();

View file

@ -54,11 +54,17 @@ MultipartFormData &get_file_value(MultipartFormDataItems &files,
#endif
}
TEST(ConstructorTest, MoveConstructible) {
TEST(ClientTest, MoveConstructible) {
EXPECT_FALSE(std::is_copy_constructible<Client>::value);
EXPECT_TRUE(std::is_nothrow_move_constructible<Client>::value);
}
TEST(ClientTest, MoveAssignable)
{
EXPECT_FALSE(std::is_copy_assignable<Client>::value);
EXPECT_TRUE(std::is_nothrow_move_assignable<Client>::value);
}
#ifdef _WIN32
TEST(StartupTest, WSAStartup) {
WSADATA wsaData;