some more fixes
This commit is contained in:
@ -10,26 +10,26 @@
|
||||
TEST_CASE("LocalPoolVector", "[LocPoolVecTest]") {
|
||||
auto queue = MessageQueueMock(1);
|
||||
LocalPoolOwnerBase poolOwner(queue, objects::TEST_LOCAL_POOL_OWNER_BASE);
|
||||
REQUIRE(poolOwner.initializeHkManager() == retval::CATCH_OK);
|
||||
REQUIRE(poolOwner.initializeHkManagerAfterTaskCreation() == retval::CATCH_OK);
|
||||
REQUIRE(poolOwner.initializeHkManager() == result::OK);
|
||||
REQUIRE(poolOwner.initializeHkManagerAfterTaskCreation() == result::OK);
|
||||
|
||||
SECTION("BasicTest") {
|
||||
// very basic test.
|
||||
lp_vec_t<uint16_t, 3> testVector =
|
||||
lp_vec_t<uint16_t, 3>(objects::TEST_LOCAL_POOL_OWNER_BASE, lpool::uint16Vec3Id);
|
||||
REQUIRE(testVector.read() == retval::CATCH_OK);
|
||||
REQUIRE(testVector.read() == result::OK);
|
||||
testVector.value[0] = 5;
|
||||
testVector.value[1] = 232;
|
||||
testVector.value[2] = 32023;
|
||||
|
||||
REQUIRE(testVector.commit(true) == retval::CATCH_OK);
|
||||
REQUIRE(testVector.commit(true) == result::OK);
|
||||
CHECK(testVector.isValid());
|
||||
|
||||
testVector.value[0] = 0;
|
||||
testVector.value[1] = 0;
|
||||
testVector.value[2] = 0;
|
||||
|
||||
CHECK(testVector.read() == retval::CATCH_OK);
|
||||
CHECK(testVector.read() == result::OK);
|
||||
CHECK(testVector.value[0] == 5);
|
||||
CHECK(testVector.value[1] == 232);
|
||||
CHECK(testVector.value[2] == 32023);
|
||||
@ -40,7 +40,7 @@ TEST_CASE("LocalPoolVector", "[LocPoolVecTest]") {
|
||||
(we can't throw exceptions) */
|
||||
testVector[4] = 12;
|
||||
CHECK(testVector[2] == 12);
|
||||
CHECK(testVector.commit() == retval::CATCH_OK);
|
||||
CHECK(testVector.commit() == result::OK);
|
||||
|
||||
/* Use read-only reference. */
|
||||
const lp_vec_t<uint16_t, 3>& roTestVec = testVector;
|
||||
@ -57,7 +57,7 @@ TEST_CASE("LocalPoolVector", "[LocPoolVecTest]") {
|
||||
uint8_t* vecPtr = reinterpret_cast<uint8_t*>(serializedVector);
|
||||
size_t serSize = 0;
|
||||
REQUIRE(testVector.serialize(&vecPtr, &serSize, maxSize, SerializeIF::Endianness::MACHINE) ==
|
||||
retval::CATCH_OK);
|
||||
result::OK);
|
||||
|
||||
CHECK(serSize == 6);
|
||||
CHECK(serializedVector[0] == 5);
|
||||
@ -74,7 +74,7 @@ TEST_CASE("LocalPoolVector", "[LocPoolVecTest]") {
|
||||
|
||||
const uint8_t* constVecPtr = reinterpret_cast<const uint8_t*>(serializedVector);
|
||||
REQUIRE(testVector.deSerialize(&constVecPtr, &serSize, SerializeIF::Endianness::MACHINE) ==
|
||||
retval::CATCH_OK);
|
||||
result::OK);
|
||||
CHECK(testVector[0] == 16);
|
||||
CHECK(testVector[1] == 7832);
|
||||
CHECK(testVector[2] == 39232);
|
||||
|
Reference in New Issue
Block a user