Update FSFW from upstream #71
@ -168,7 +168,7 @@ if(FSFW_BUILD_TESTS)
|
|||||||
configure_file(unittests/testcfg/TestsConfig.h.in tests/TestsConfig.h)
|
configure_file(unittests/testcfg/TestsConfig.h.in tests/TestsConfig.h)
|
||||||
|
|
||||||
project(${FSFW_TEST_TGT} CXX C)
|
project(${FSFW_TEST_TGT} CXX C)
|
||||||
add_executable(${FSFW_TEST_TGT} unittests/tmtcpacket/testCcsds.cpp)
|
add_executable(${FSFW_TEST_TGT})
|
||||||
if(IPO_SUPPORTED AND FSFW_ENABLE_IPO)
|
if(IPO_SUPPORTED AND FSFW_ENABLE_IPO)
|
||||||
set_property(TARGET ${FSFW_TEST_TGT} PROPERTY INTERPROCEDURAL_OPTIMIZATION
|
set_property(TARGET ${FSFW_TEST_TGT} PROPERTY INTERPROCEDURAL_OPTIMIZATION
|
||||||
TRUE)
|
TRUE)
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
#include "../osal/Endiness.h"
|
#include "fsfw/osal/Endiness.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper class to convert variables or bitstreams between machine
|
* Helper class to convert variables or bitstreams between machine
|
||||||
@ -36,7 +36,7 @@
|
|||||||
*/
|
*/
|
||||||
class EndianConverter {
|
class EndianConverter {
|
||||||
private:
|
private:
|
||||||
EndianConverter(){};
|
EndianConverter() = default;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
@ -49,8 +49,8 @@ class EndianConverter {
|
|||||||
#error BYTE_ORDER_SYSTEM not defined
|
#error BYTE_ORDER_SYSTEM not defined
|
||||||
#elif BYTE_ORDER_SYSTEM == LITTLE_ENDIAN
|
#elif BYTE_ORDER_SYSTEM == LITTLE_ENDIAN
|
||||||
T tmp;
|
T tmp;
|
||||||
uint8_t *pointerOut = (uint8_t *)&tmp;
|
auto *pointerOut = reinterpret_cast<uint8_t *>(&tmp);
|
||||||
uint8_t *pointerIn = (uint8_t *)∈
|
auto *pointerIn = reinterpret_cast<uint8_t *>(&in);
|
||||||
for (size_t count = 0; count < sizeof(T); count++) {
|
for (size_t count = 0; count < sizeof(T); count++) {
|
||||||
pointerOut[sizeof(T) - count - 1] = pointerIn[count];
|
pointerOut[sizeof(T) - count - 1] = pointerIn[count];
|
||||||
}
|
}
|
||||||
@ -73,7 +73,6 @@ class EndianConverter {
|
|||||||
for (size_t count = 0; count < size; count++) {
|
for (size_t count = 0; count < size; count++) {
|
||||||
out[size - count - 1] = in[count];
|
out[size - count - 1] = in[count];
|
||||||
}
|
}
|
||||||
return;
|
|
||||||
#elif BYTE_ORDER_SYSTEM == BIG_ENDIAN
|
#elif BYTE_ORDER_SYSTEM == BIG_ENDIAN
|
||||||
memcpy(out, in, size);
|
memcpy(out, in, size);
|
||||||
return;
|
return;
|
||||||
@ -90,8 +89,8 @@ class EndianConverter {
|
|||||||
#error BYTE_ORDER_SYSTEM not defined
|
#error BYTE_ORDER_SYSTEM not defined
|
||||||
#elif BYTE_ORDER_SYSTEM == BIG_ENDIAN
|
#elif BYTE_ORDER_SYSTEM == BIG_ENDIAN
|
||||||
T tmp;
|
T tmp;
|
||||||
uint8_t *pointerOut = (uint8_t *)&tmp;
|
auto *pointerOut = reinterpret_cast<uint8_t *>(&tmp);
|
||||||
uint8_t *pointerIn = (uint8_t *)∈
|
auto *pointerIn = reinterpret_cast<uint8_t *>(&in);
|
||||||
for (size_t count = 0; count < sizeof(T); count++) {
|
for (size_t count = 0; count < sizeof(T); count++) {
|
||||||
pointerOut[sizeof(T) - count - 1] = pointerIn[count];
|
pointerOut[sizeof(T) - count - 1] = pointerIn[count];
|
||||||
}
|
}
|
||||||
@ -116,7 +115,6 @@ class EndianConverter {
|
|||||||
return;
|
return;
|
||||||
#elif BYTE_ORDER_SYSTEM == LITTLE_ENDIAN
|
#elif BYTE_ORDER_SYSTEM == LITTLE_ENDIAN
|
||||||
memcpy(out, in, size);
|
memcpy(out, in, size);
|
||||||
return;
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
|
|
||||||
#include "../returnvalues/HasReturnvaluesIF.h"
|
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @defgroup serialize Serialization
|
* @defgroup serialize Serialization
|
||||||
@ -105,13 +105,13 @@ class SerializeIF {
|
|||||||
/**
|
/**
|
||||||
* Forwards to regular @deSerialize call with network endianness
|
* Forwards to regular @deSerialize call with network endianness
|
||||||
*/
|
*/
|
||||||
virtual ReturnValue_t deSerializeNe(const uint8_t** buffer, size_t* size, size_t maxSize) {
|
virtual ReturnValue_t deSerializeNe(const uint8_t** buffer, size_t* size) {
|
||||||
return deSerialize(buffer, size, SerializeIF::Endianness::NETWORK);
|
return deSerialize(buffer, size, SerializeIF::Endianness::NETWORK);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* If endianness is not explicitly specified, use machine endianness
|
* If endianness is not explicitly specified, use machine endianness
|
||||||
*/
|
*/
|
||||||
virtual ReturnValue_t deSerialize(const uint8_t** buffer, size_t *size, size_t maxSize) {
|
virtual ReturnValue_t deSerialize(const uint8_t** buffer, size_t *size) {
|
||||||
return deSerialize(buffer, size, SerializeIF::Endianness::MACHINE);
|
return deSerialize(buffer, size, SerializeIF::Endianness::MACHINE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -156,14 +156,14 @@ class SerializeIF {
|
|||||||
/**
|
/**
|
||||||
* Forwards to regular @serialize call with network endianness
|
* Forwards to regular @serialize call with network endianness
|
||||||
*/
|
*/
|
||||||
virtual ReturnValue_t deSerializeNe(uint8_t *buffer, size_t maxSize) const {
|
virtual ReturnValue_t deSerializeNe(const uint8_t *buffer, size_t maxSize) {
|
||||||
return serialize(buffer, maxSize, SerializeIF::Endianness::NETWORK);
|
return deSerialize(buffer, maxSize, SerializeIF::Endianness::NETWORK);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* If endianness is not explicitly specified, use machine endianness
|
* If endianness is not explicitly specified, use machine endianness
|
||||||
*/
|
*/
|
||||||
virtual ReturnValue_t deSerialize(uint8_t *buffer, size_t maxSize) const {
|
virtual ReturnValue_t deSerialize(const uint8_t *buffer, size_t maxSize) {
|
||||||
return serialize(buffer, maxSize, SerializeIF::Endianness::MACHINE);
|
return deSerialize(buffer, maxSize, SerializeIF::Endianness::MACHINE);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
#define FSFW_TESTS_SIMPLESERIALIZABLE_H
|
#define FSFW_TESTS_SIMPLESERIALIZABLE_H
|
||||||
|
|
||||||
#include "fsfw/serialize.h"
|
#include "fsfw/serialize.h"
|
||||||
|
#include "fsfw/osal/Endiness.h"
|
||||||
|
|
||||||
class SimpleSerializable : public SerializeIF {
|
class SimpleSerializable : public SerializeIF {
|
||||||
public:
|
public:
|
||||||
@ -24,9 +25,13 @@ class SimpleSerializable : public SerializeIF {
|
|||||||
}
|
}
|
||||||
someU8 = **buffer;
|
someU8 = **buffer;
|
||||||
*size -= 1;
|
*size -= 1;
|
||||||
|
*buffer += 1;
|
||||||
return SerializeAdapter::deSerialize(&someU16, buffer, size, streamEndianness);
|
return SerializeAdapter::deSerialize(&someU16, buffer, size, streamEndianness);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[[nodiscard]] uint8_t getU8() const { return someU8; }
|
||||||
|
[[nodiscard]] uint16_t getU16() const { return someU16; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
uint8_t someU8 = 1;
|
uint8_t someU8 = 1;
|
||||||
uint16_t someU16 = 0x0203;
|
uint16_t someU16 = 0x0203;
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
target_sources(${FSFW_TEST_TGT} PRIVATE
|
target_sources(${FSFW_TEST_TGT} PRIVATE
|
||||||
TestSerialBufferAdapter.cpp
|
testSerialBufferAdapter.cpp
|
||||||
TestSerialization.cpp
|
testSerializeAdapter.cpp
|
||||||
TestSerialLinkedPacket.cpp
|
testSerialLinkedPacket.cpp
|
||||||
|
testSerializeIF.cpp
|
||||||
)
|
)
|
||||||
|
@ -26,13 +26,13 @@ class TestPacket : public SerialLinkedListAdapter<SerializeIF> {
|
|||||||
setLinks();
|
setLinks();
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t getHeader() const { return header.entry; }
|
[[nodiscard]] uint32_t getHeader() const { return header.entry; }
|
||||||
|
|
||||||
const uint8_t* getBuffer() { return buffer.entry.getConstBuffer(); }
|
[[nodiscard]] const uint8_t* getBuffer() const { return buffer.entry.getConstBuffer(); }
|
||||||
|
|
||||||
size_t getBufferLength() { return buffer.getSerializedSize(); }
|
size_t getBufferLength() { return buffer.getSerializedSize(); }
|
||||||
|
|
||||||
uint16_t getTail() const { return tail.entry; }
|
[[nodiscard]] uint16_t getTail() const { return tail.entry; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void setLinks() {
|
void setLinks() {
|
||||||
@ -47,4 +47,4 @@ class TestPacket : public SerialLinkedListAdapter<SerializeIF> {
|
|||||||
SerializeElement<uint32_t> tail = 0;
|
SerializeElement<uint32_t> tail = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* UNITTEST_TESTFW_NEWTESTS_TESTTEMPLATE_H_ */
|
#endif /* UNITTEST_HOSTED_TESTSERIALLINKEDPACKET_H_ */
|
@ -92,7 +92,7 @@ TEST_CASE("Serial Buffer Adapter", "[single-file]") {
|
|||||||
testArray[3] = 1;
|
testArray[3] = 1;
|
||||||
testArray[4] = 1;
|
testArray[4] = 1;
|
||||||
testArray[5] = 0;
|
testArray[5] = 0;
|
||||||
std::array<uint8_t, 4> test_recv_array;
|
std::array<uint8_t, 4> test_recv_array{};
|
||||||
arrayPtr = testArray.data();
|
arrayPtr = testArray.data();
|
||||||
// copy testArray[1] to testArray[4] into receive buffer, skip
|
// copy testArray[1] to testArray[4] into receive buffer, skip
|
||||||
// size field (testArray[0]) for deSerialization.
|
// size field (testArray[0]) for deSerialization.
|
||||||
@ -116,7 +116,7 @@ TEST_CASE("Serial Buffer Adapter", "[single-file]") {
|
|||||||
testArray[3] = 1;
|
testArray[3] = 1;
|
||||||
testArray[4] = 1;
|
testArray[4] = 1;
|
||||||
testArray[5] = 0;
|
testArray[5] = 0;
|
||||||
std::array<uint8_t, 4> test_recv_array;
|
std::array<uint8_t, 4> test_recv_array{};
|
||||||
arrayPtr = testArray.data() + 2;
|
arrayPtr = testArray.data() + 2;
|
||||||
// copy testArray[1] to testArray[4] into receive buffer, skip
|
// copy testArray[1] to testArray[4] into receive buffer, skip
|
||||||
// size field (testArray[0])
|
// size field (testArray[0])
|
@ -1,11 +1,10 @@
|
|||||||
#include "TestSerialLinkedPacket.h"
|
|
||||||
|
|
||||||
#include <fsfw/globalfunctions/arrayprinter.h>
|
#include <fsfw/globalfunctions/arrayprinter.h>
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <catch2/catch_test_macros.hpp>
|
#include <catch2/catch_test_macros.hpp>
|
||||||
|
|
||||||
#include "CatchDefinitions.h"
|
#include "CatchDefinitions.h"
|
||||||
|
#include "SerialLinkedListAdapterPacket.h"
|
||||||
|
|
||||||
TEST_CASE("Serial Linked Packet", "[SerLinkPacket]") {
|
TEST_CASE("Serial Linked Packet", "[SerLinkPacket]") {
|
||||||
// perform set-up here
|
// perform set-up here
|
172
unittests/serialize/testSerializeIF.cpp
Normal file
172
unittests/serialize/testSerializeIF.cpp
Normal file
@ -0,0 +1,172 @@
|
|||||||
|
|
||||||
|
#include <array>
|
||||||
|
#include <catch2/catch_test_macros.hpp>
|
||||||
|
|
||||||
|
#include "mocks/SimpleSerializable.h"
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
TEST_CASE("Serialize IF Serialize", "[serialize-if-ser]") {
|
||||||
|
auto simpleSer = SimpleSerializable();
|
||||||
|
array<uint8_t, 16> buf{};
|
||||||
|
uint8_t* ptr = buf.data();
|
||||||
|
size_t len = 0;
|
||||||
|
|
||||||
|
SECTION("Little Endian Normal") {
|
||||||
|
REQUIRE(simpleSer.serialize(&ptr, &len, buf.size(), SerializeIF::Endianness::LITTLE) == HasReturnvaluesIF::RETURN_OK);
|
||||||
|
CHECK(buf[0] == 1);
|
||||||
|
CHECK(buf[1] == 3);
|
||||||
|
CHECK(buf[2] == 2);
|
||||||
|
// Verify pointer arithmetic and size increment
|
||||||
|
CHECK(ptr == buf.data() + 3);
|
||||||
|
CHECK(len == 3);
|
||||||
|
}
|
||||||
|
|
||||||
|
SECTION("Little Endian Simple") {
|
||||||
|
REQUIRE(simpleSer.SerializeIF::serialize(buf.data(), buf.size(), SerializeIF::Endianness::LITTLE) == HasReturnvaluesIF::RETURN_OK);
|
||||||
|
CHECK(buf[0] == 1);
|
||||||
|
CHECK(buf[1] == 3);
|
||||||
|
CHECK(buf[2] == 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
SECTION("Big Endian Normal") {
|
||||||
|
SECTION("Explicit") {
|
||||||
|
REQUIRE(simpleSer.serialize(&ptr, &len, buf.size(), SerializeIF::Endianness::BIG) ==
|
||||||
|
HasReturnvaluesIF::RETURN_OK);
|
||||||
|
}
|
||||||
|
SECTION("Network 0") {
|
||||||
|
REQUIRE(simpleSer.serialize(&ptr, &len, buf.size(), SerializeIF::Endianness::NETWORK) == HasReturnvaluesIF::RETURN_OK);
|
||||||
|
}
|
||||||
|
SECTION("Network 1") {
|
||||||
|
REQUIRE(simpleSer.serializeNe(&ptr, &len, buf.size()) == HasReturnvaluesIF::RETURN_OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
CHECK(buf[0] == 1);
|
||||||
|
CHECK(buf[1] == 2);
|
||||||
|
CHECK(buf[2] == 3);
|
||||||
|
// Verify pointer arithmetic and size increment
|
||||||
|
CHECK(ptr == buf.data() + 3);
|
||||||
|
CHECK(len == 3);
|
||||||
|
}
|
||||||
|
|
||||||
|
SECTION("Big Endian Simple") {
|
||||||
|
SECTION("Explicit") {
|
||||||
|
REQUIRE(simpleSer.SerializeIF::serialize(buf.data(), buf.size(), SerializeIF::Endianness::BIG) ==
|
||||||
|
HasReturnvaluesIF::RETURN_OK);
|
||||||
|
}
|
||||||
|
SECTION("Network 0") {
|
||||||
|
REQUIRE(simpleSer.SerializeIF::serialize(buf.data(), buf.size(), SerializeIF::Endianness::NETWORK) == HasReturnvaluesIF::RETURN_OK);
|
||||||
|
}
|
||||||
|
SECTION("Network 1") {
|
||||||
|
REQUIRE(simpleSer.SerializeIF::serializeNe(buf.data(), buf.size()) == HasReturnvaluesIF::RETURN_OK);
|
||||||
|
}
|
||||||
|
CHECK(buf[0] == 1);
|
||||||
|
CHECK(buf[1] == 2);
|
||||||
|
CHECK(buf[2] == 3);
|
||||||
|
}
|
||||||
|
|
||||||
|
SECTION("Machine Endian Implicit") {
|
||||||
|
REQUIRE(simpleSer.SerializeIF::serialize(&ptr, &len, buf.size()) ==
|
||||||
|
HasReturnvaluesIF::RETURN_OK);
|
||||||
|
CHECK(buf[0] == 1);
|
||||||
|
#if BYTE_ORDER_SYSTEM == LITTLE_ENDIAN
|
||||||
|
CHECK(buf[1] == 3);
|
||||||
|
CHECK(buf[2] == 2);
|
||||||
|
#else
|
||||||
|
CHECK(buf[1] == 2);
|
||||||
|
CHECK(buf[2] == 3);
|
||||||
|
#endif
|
||||||
|
// Verify pointer arithmetic and size increment
|
||||||
|
CHECK(ptr == buf.data() + 3);
|
||||||
|
CHECK(len == 3);
|
||||||
|
}
|
||||||
|
|
||||||
|
SECTION("Machine Endian Simple Implicit") {
|
||||||
|
REQUIRE(simpleSer.SerializeIF::serialize(buf.data(), buf.size()) ==
|
||||||
|
HasReturnvaluesIF::RETURN_OK);
|
||||||
|
CHECK(buf[0] == 1);
|
||||||
|
#if BYTE_ORDER_SYSTEM == LITTLE_ENDIAN
|
||||||
|
CHECK(buf[1] == 3);
|
||||||
|
CHECK(buf[2] == 2);
|
||||||
|
#else
|
||||||
|
CHECK(buf[1] == 2);
|
||||||
|
CHECK(buf[2] == 3);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST_CASE("SerializeIF Deserialize", "[serialize-if-de]") {
|
||||||
|
auto simpleSer = SimpleSerializable();
|
||||||
|
array<uint8_t, 3> buf = {5, 0, 1};
|
||||||
|
const uint8_t* ptr = buf.data();
|
||||||
|
size_t len = buf.size();
|
||||||
|
|
||||||
|
SECTION("Little Endian Normal") {
|
||||||
|
REQUIRE(simpleSer.deSerialize(&ptr, &len, SerializeIF::Endianness::LITTLE) == HasReturnvaluesIF::RETURN_OK);
|
||||||
|
CHECK(simpleSer.getU8() == 5);
|
||||||
|
CHECK(simpleSer.getU16() == 0x0100);
|
||||||
|
CHECK(ptr == buf.data() + 3);
|
||||||
|
CHECK(len == 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
SECTION("Little Endian Simple") {
|
||||||
|
REQUIRE(simpleSer.SerializeIF::deSerialize(ptr, len, SerializeIF::Endianness::LITTLE) == HasReturnvaluesIF::RETURN_OK);
|
||||||
|
CHECK(simpleSer.getU8() == 5);
|
||||||
|
CHECK(simpleSer.getU16() == 0x0100);
|
||||||
|
}
|
||||||
|
|
||||||
|
SECTION("Big Endian Normal") {
|
||||||
|
SECTION("Explicit") {
|
||||||
|
REQUIRE(simpleSer.deSerialize(&ptr, &len, SerializeIF::Endianness::BIG) == HasReturnvaluesIF::RETURN_OK);
|
||||||
|
}
|
||||||
|
SECTION("Network 0") {
|
||||||
|
REQUIRE(simpleSer.deSerialize(&ptr, &len, SerializeIF::Endianness::NETWORK) == HasReturnvaluesIF::RETURN_OK);
|
||||||
|
}
|
||||||
|
SECTION("Network 1") {
|
||||||
|
REQUIRE(simpleSer.SerializeIF::deSerializeNe(&ptr, &len) == HasReturnvaluesIF::RETURN_OK);
|
||||||
|
}
|
||||||
|
CHECK(simpleSer.getU8() == 5);
|
||||||
|
CHECK(simpleSer.getU16() == 1);
|
||||||
|
CHECK(ptr == buf.data() + 3);
|
||||||
|
CHECK(len == 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
SECTION("Big Endian Simple") {
|
||||||
|
SECTION("Explicit") {
|
||||||
|
REQUIRE(simpleSer.SerializeIF::deSerialize(buf.data(), buf.size(), SerializeIF::Endianness::BIG) ==
|
||||||
|
HasReturnvaluesIF::RETURN_OK);
|
||||||
|
}
|
||||||
|
SECTION("Network 0") {
|
||||||
|
REQUIRE(simpleSer.SerializeIF::deSerialize(buf.data(), buf.size(), SerializeIF::Endianness::NETWORK) == HasReturnvaluesIF::RETURN_OK);
|
||||||
|
}
|
||||||
|
SECTION("Network 1") {
|
||||||
|
REQUIRE(simpleSer.SerializeIF::deSerializeNe(buf.data(), buf.size()) == HasReturnvaluesIF::RETURN_OK);
|
||||||
|
}
|
||||||
|
CHECK(simpleSer.getU8() == 5);
|
||||||
|
CHECK(simpleSer.getU16() == 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
SECTION("Machine Endian Implicit") {
|
||||||
|
REQUIRE(simpleSer.SerializeIF::deSerialize(&ptr, &len) == HasReturnvaluesIF::RETURN_OK);
|
||||||
|
CHECK(simpleSer.getU8() == 5);
|
||||||
|
#if BYTE_ORDER_SYSTEM == LITTLE_ENDIAN
|
||||||
|
CHECK(simpleSer.getU16() == 0x0100);
|
||||||
|
#else
|
||||||
|
CHECK(simpleSer.getU16() == 1);
|
||||||
|
#endif
|
||||||
|
// Verify pointer arithmetic and size increment
|
||||||
|
CHECK(ptr == buf.data() + 3);
|
||||||
|
CHECK(len == 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
SECTION("Machine Endian Simple Implicit") {
|
||||||
|
REQUIRE(simpleSer.SerializeIF::deSerialize(buf.data(), buf.size()) ==
|
||||||
|
HasReturnvaluesIF::RETURN_OK);
|
||||||
|
CHECK(simpleSer.getU8() == 5);
|
||||||
|
#if BYTE_ORDER_SYSTEM == LITTLE_ENDIAN
|
||||||
|
CHECK(simpleSer.getU16() == 0x0100);
|
||||||
|
#else
|
||||||
|
CHECK(simpleSer.getU16() == 1);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user