29#include <gtest/gtest.h>
63TEST(SocketTest, DefaultBehavior)
70 EXPECT_EQ(-1, listen_socket.
getfd());
75TEST(SocketTest, DisableAll)
79 EXPECT_EQ(-1, listen_socket.
getfd());
84TEST(SocketTest, ListenToPort)
88 EXPECT_NE(-1, listen_socket.
getfd());
93TEST(SocketTest, RelistenWithSameInstanceSamePort)
102 EXPECT_ANY_THROW(listen_socket.
listen());
104 "panic: panic condition listening occurred: "
105 "Socket already listening!\n";
110TEST(SocketTest, RelistenWithDifferentInstanceOnDifferentPort)
122TEST(SocketTest, RelistenWithDifferentInstanceOnSamePort)
137 EXPECT_ANY_THROW(listen_socket.
accept());
139 "panic: panic condition sfd == -1 occurred: mock: Failed to accept "
140 "connection: Bad file descriptor\n";
MockListenSocket(int port)
virtual bool listen(int port)
static bool allDisabled()
std::vector< SwitchingFiber * > expected({ &a, &b, &a, &a, &a, &b, &c, &a, &c, &c, &c })
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
thread_local GTestLogOutput gtestLogOutput
static const int TestPort2
TEST(SocketTest, DefaultBehavior)
static const int TestPort1