remove some shadowing warnings
This commit is contained in:
parent
a426aef7c7
commit
b0c479cab9
@ -153,10 +153,10 @@ TEST_CASE("CFDP TLV LV", "[CfdpTlvLv]") {
|
|||||||
REQUIRE(result == HasReturnvaluesIF::RETURN_OK);
|
REQUIRE(result == HasReturnvaluesIF::RETURN_OK);
|
||||||
REQUIRE(deserSize == 3);
|
REQUIRE(deserSize == 3);
|
||||||
REQUIRE(rawBuf[0] == 2);
|
REQUIRE(rawBuf[0] == 2);
|
||||||
uint16_t sourceId = 0;
|
uint16_t sourceIdRaw = 0;
|
||||||
result = SerializeAdapter::deSerialize(&sourceId, rawBuf.data() + 1, &deserSize,
|
result = SerializeAdapter::deSerialize(&sourceIdRaw, rawBuf.data() + 1, &deserSize,
|
||||||
SerializeIF::Endianness::BIG);
|
SerializeIF::Endianness::BIG);
|
||||||
REQUIRE(sourceId == 0x0ff0);
|
REQUIRE(sourceIdRaw == 0x0ff0);
|
||||||
|
|
||||||
auto lvEmpty = Lv(nullptr, 0);
|
auto lvEmpty = Lv(nullptr, 0);
|
||||||
REQUIRE(lvEmpty.getSerializedSize() == 1);
|
REQUIRE(lvEmpty.getSerializedSize() == 1);
|
||||||
@ -169,7 +169,7 @@ TEST_CASE("CFDP TLV LV", "[CfdpTlvLv]") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
SECTION("LV Deserialization") {
|
SECTION("LV Deserialization") {
|
||||||
std::array<uint8_t, 8> lvRawBuf;
|
std::array<uint8_t, 8> lvRawBuf{};
|
||||||
serPtr = lvRawBuf.data();
|
serPtr = lvRawBuf.data();
|
||||||
result =
|
result =
|
||||||
sourceId.serialize(&serPtr, &deserSize, lvRawBuf.size(), SerializeIF::Endianness::NETWORK);
|
sourceId.serialize(&serPtr, &deserSize, lvRawBuf.size(), SerializeIF::Endianness::NETWORK);
|
||||||
@ -186,10 +186,10 @@ TEST_CASE("CFDP TLV LV", "[CfdpTlvLv]") {
|
|||||||
REQUIRE(result == HasReturnvaluesIF::RETURN_OK);
|
REQUIRE(result == HasReturnvaluesIF::RETURN_OK);
|
||||||
REQUIRE(uninitLv.getSerializedSize() == 3);
|
REQUIRE(uninitLv.getSerializedSize() == 3);
|
||||||
const uint8_t* storedValue = uninitLv.getValue(nullptr);
|
const uint8_t* storedValue = uninitLv.getValue(nullptr);
|
||||||
uint16_t sourceId = 0;
|
uint16_t sourceIdRaw = 0;
|
||||||
result = SerializeAdapter::deSerialize(&sourceId, storedValue, &deserSize,
|
result = SerializeAdapter::deSerialize(&sourceIdRaw, storedValue, &deserSize,
|
||||||
SerializeIF::Endianness::BIG);
|
SerializeIF::Endianness::BIG);
|
||||||
REQUIRE(sourceId == 0x0ff0);
|
REQUIRE(sourceIdRaw == 0x0ff0);
|
||||||
|
|
||||||
auto lvEmpty = Lv(nullptr, 0);
|
auto lvEmpty = Lv(nullptr, 0);
|
||||||
REQUIRE(lvEmpty.getSerializedSize() == 1);
|
REQUIRE(lvEmpty.getSerializedSize() == 1);
|
||||||
@ -306,7 +306,7 @@ TEST_CASE("CFDP TLV LV", "[CfdpTlvLv]") {
|
|||||||
FaultHandlerOverrideTlv faultOverrideTlv(cfdp::ConditionCode::FILESTORE_REJECTION,
|
FaultHandlerOverrideTlv faultOverrideTlv(cfdp::ConditionCode::FILESTORE_REJECTION,
|
||||||
cfdp::FaultHandlerCode::NOTICE_OF_CANCELLATION);
|
cfdp::FaultHandlerCode::NOTICE_OF_CANCELLATION);
|
||||||
size_t sz = 0;
|
size_t sz = 0;
|
||||||
ReturnValue_t result =
|
result =
|
||||||
faultOverrideTlv.serialize(&serPtr, &sz, rawBuf.size(), SerializeIF::Endianness::NETWORK);
|
faultOverrideTlv.serialize(&serPtr, &sz, rawBuf.size(), SerializeIF::Endianness::NETWORK);
|
||||||
REQUIRE(faultOverrideTlv.getSerializedSize() == 3);
|
REQUIRE(faultOverrideTlv.getSerializedSize() == 3);
|
||||||
REQUIRE(sz == 3);
|
REQUIRE(sz == 3);
|
||||||
|
Loading…
Reference in New Issue
Block a user