1
0
forked from fsfw/fsfw

windows unittests succeed

This commit is contained in:
2023-01-26 18:14:35 +01:00
parent c66fab90f9
commit 9589d702dd
8 changed files with 17 additions and 13 deletions

View File

@ -42,7 +42,9 @@ TEST_CASE("EOF PDU", "[cfdp][pdu]") {
REQUIRE(sz == 20);
eofInfo.setConditionCode(cfdp::ConditionCode::FILESTORE_REJECTION);
eofInfo.setFileSize(0x10ffffff10, true);
uint64_t value = 0x13ffffffff;
size_t vlaue1 = value;
eofInfo.setFileSize(0x13fffefd10, true);
pduConf.largeFile = true;
// Should serialize with fault location now
auto serializeWithFaultLocation = EofPduCreator(pduConf, eofInfo);
@ -57,7 +59,7 @@ TEST_CASE("EOF PDU", "[cfdp][pdu]") {
uint64_t fileSizeLarge = 0;
result = SerializeAdapter::deSerialize(&fileSizeLarge, buf.data() + 16, nullptr,
SerializeIF::Endianness::NETWORK);
REQUIRE(fileSizeLarge == 0x10ffffff10);
REQUIRE(fileSizeLarge == 0x13fffefd10);
REQUIRE(buf[sz - 4] == cfdp::TlvType::ENTITY_ID);
// width of entity ID is 2
REQUIRE(buf[sz - 3] == 2);

View File

@ -40,7 +40,6 @@ TEST_CASE("PlacementFactory Tests", "[containers]") {
REQUIRE(storagePool.getFreeElement(&address, sizeof(uint64_t), &ptr) ==
static_cast<int>(returnvalue::OK));
REQUIRE(storagePool.deleteData(address) == static_cast<int>(returnvalue::OK));
// Check that PlacementFactory checks for nullptr
ptr = nullptr;
REQUIRE(factory.destroy(ptr) == static_cast<int>(returnvalue::FAILED));

View File

@ -221,9 +221,12 @@ TEST_CASE("Host Filesystem", "[hal][host]") {
SECTION("Remove recursively") {
fs::create_directory(dir0.string().c_str());
ofstream of(fileInDir0);
of.close();
CHECK(fs::is_directory(dir0));
CHECK(fs::is_regular_file(fileInDir0));
REQUIRE(hostFs.removeDirectory(FilesystemParams(dir0.string().c_str()), true) ==
// See note at the top
std::string dir0_string = dir0.string();
REQUIRE(hostFs.removeDirectory(FilesystemParams(dir0_string.c_str()), true) ==
returnvalue::OK);
CHECK(not fs::is_directory(dir0));
CHECK(not fs::is_regular_file(fileInDir0));