Skip to content

Commit

Permalink
Merge pull request #993 from daleglass-overte/skip-capacity-test-in-d…
Browse files Browse the repository at this point in the history
…ebug

Skip packet capacity test when built in debug mode, as it triggers an assertion
  • Loading branch information
daleglass authored Jun 3, 2024
2 parents 6c754c1 + b1aa801 commit 53de22f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/networking/src/PacketTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ void PacketTests::readTest() {
}

void PacketTests::writePastCapacityTest() {
#ifndef QT_NO_DEBUG
QSKIP("This test triggers an assertion when built in debug mode");
#else
auto packet = NLPacket::create(PacketType::Unknown);

auto size = packet->getPayloadCapacity();
Expand All @@ -116,6 +119,7 @@ void PacketTests::writePastCapacityTest() {

// NLPacket::write() shouldn't allow the caller to write if no space is left
QCOMPARE(packet->getPayloadSize(), size);
#endif
}

void PacketTests::primitiveTest() {
Expand Down

0 comments on commit 53de22f

Please sign in to comment.