1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
Description: Skip sf::Packet tests that fail on big-endian
Author: James Cowgill <jcowgill@debian.org>
Bug: https://github.com/SFML/SFML/issues/2290
Last-Updated: 2024-12-08
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/test/Network/Packet.test.cpp
+++ b/test/Network/Packet.test.cpp
@@ -125,6 +125,9 @@ TEST_CASE("[Network] sf::Packet")
SECTION("float")
{
+ if (__BYTE_ORDER__ != __ORDER_LITTLE_ENDIAN__)
+ SKIP("broken on big-endian - https://github.com/SFML/SFML/issues/2290");
+
packet << 123.456f;
const auto* dataPtr = static_cast<const std::byte*>(packet.getData());
const std::vector bytes(dataPtr, dataPtr + packet.getDataSize());
@@ -134,6 +137,9 @@ TEST_CASE("[Network] sf::Packet")
SECTION("double")
{
+ if (__BYTE_ORDER__ != __ORDER_LITTLE_ENDIAN__)
+ SKIP("broken on big-endian - https://github.com/SFML/SFML/issues/2290");
+
packet << 789.123;
const auto* dataPtr = static_cast<const std::byte*>(packet.getData());
const std::vector bytes(dataPtr, dataPtr + packet.getDataSize());
|