From 163c915c728deb88f3fb0cacc3a3710293d37899 Mon Sep 17 00:00:00 2001 From: cesaaargm Date: Tue, 21 May 2024 18:08:25 +0200 Subject: [PATCH] [TAS-161] debug tag_verification :: extract build_message, unit test for BuildTagMessageM0 and fix unit test for TagVerification --- src/tests/single_test_main.cc | 1 - .../osnma/osnma_msg_receiver_test.cc | 10 +++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/tests/single_test_main.cc b/src/tests/single_test_main.cc index de02b421c..beece7581 100644 --- a/src/tests/single_test_main.cc +++ b/src/tests/single_test_main.cc @@ -86,7 +86,6 @@ int main(int argc, char **argv) catch (...) { } // catch the "testing::internal::::ClassUniqueToAlwaysTrue" from gtest - google::InitGoogleLogging(argv[0]); #else absl::ParseCommandLine(argc, argv); try diff --git a/src/tests/unit-tests/signal-processing-blocks/osnma/osnma_msg_receiver_test.cc b/src/tests/unit-tests/signal-processing-blocks/osnma/osnma_msg_receiver_test.cc index fe39fc979..1769dfb45 100644 --- a/src/tests/unit-tests/signal-processing-blocks/osnma/osnma_msg_receiver_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/osnma/osnma_msg_receiver_test.cc @@ -40,8 +40,8 @@ protected: std::tm input_time = {0, 0, 5, 16, 8 - 1, 2023 - 1900, 0}; set_time(input_time); - std::string pemFilePath = "OSNMA_PublicKey_20230803105952_newPKID_1.pem"; - std::string merkleFilePath = "OSNMA_MerkleTree_20230803105953_newPKID_1.xml"; + std::string pemFilePath = "/home/cgm/CLionProjects/osnma/data/OSNMA_PublicKey_20230803105952_newPKID_1.pem"; + std::string merkleFilePath = "/home/cgm/CLionProjects/osnma/data/OSNMA_MerkleTree_20230803105953_newPKID_1.xml"; osnma = osnma_msg_receiver_make(pemFilePath, merkleFilePath); } void TearDown() override{ @@ -93,7 +93,11 @@ TEST_F(OsnmaMsgReceiverTest, OsnmaTestVectorsSimulation) { initializeGoogleLog(); // Arrange - std::vector testVectors = readTestVectorsFromFile(/*"/home/cgm/CLionProjects/osnma/src/tests/data/*/"16_AUG_2023_GST_05_00_01.csv"); + std::vector testVectors = readTestVectorsFromFile("/home/cgm/CLionProjects/osnma/data/16_AUG_2023_GST_05_00_01.csv"); + if (testVectors.empty()){ + ASSERT_TRUE(false); + } + bool end_of_hex_stream{false}; int offset_byte{0}; int byte_index{0}; // index containing the last byte position of the hex stream that was retrieved. Takes advantage that all TVs have same size