Skip to content

Commit

Permalink
disable TcpBindBadAddress when not running WIN32
Browse files Browse the repository at this point in the history
even though bind(2) should fail if I read the manpage correctly, it
seems to 'just work' and I have no clue why. disabling for now...
  • Loading branch information
FolkertVanVerseveld committed Feb 21, 2024
1 parent eeb7c7b commit 8dc7bb8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
3 changes: 2 additions & 1 deletion game/tests/net.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,8 @@ TEST(Tcp, BindDummy) {
} catch (std::runtime_error&) {}
}

TEST(Tcp, BindBadAddress) {
// FIXME find out why a.b.c.d works on linux
TEST_F(NoUnixFixture, TcpBindBadAddress) {
Net net;
TcpSocket tcp;
try {
Expand Down
9 changes: 9 additions & 0 deletions game/tests/util.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@ class NoUnixOrTracyFixture : public ::testing::Test {
}
};

class NoUnixFixture : public ::testing::Test {
protected:
void SetUp() override {
#if _WIN32 == 0
GTEST_SKIP() << "WIN32 only test";
#endif
}
};

class NoHeadlessFixture : public ::testing::Test {
protected:
void SetUp() override {
Expand Down

0 comments on commit 8dc7bb8

Please sign in to comment.