diff --git a/executables/unit_test.cpp b/executables/unit_test.cpp index cc832df7..eb33b1cf 100644 --- a/executables/unit_test.cpp +++ b/executables/unit_test.cpp @@ -109,7 +109,9 @@ static void test_fec_stream_random_bs_fs_overhead_dropped(){ // Test encryption+packet validation and packet validation only static void test_encrypt_decrypt_validate(const bool use_key_from_file,bool message_signing_only) { - std::cout << "Using generated keypair (default seed otherwise):" << (use_key_from_file ? "y" : "n") << "\n"; + const std::string TEST_TYPE=message_signing_only ? "Sign" : "Encrypt&Sign"; + const std::string TEST_KEY_TYPE=use_key_from_file ? "key from file" : "default key"; + fmt::print("Testing {} with {}\n",TEST_TYPE,TEST_KEY_TYPE); const std::string KEY_FILENAME="../example_key/txrx.key"; wb::KeyPairTxRx keyPairTxRx{}; if(use_key_from_file){ @@ -119,11 +121,6 @@ static void test_encrypt_decrypt_validate(const bool use_key_from_file,bool mess keyPairTxRx=wb::generate_keypair_from_bind_phrase("openhd"); std::cout<<"Generating keypair from bind phrase took:"<data(), enrypted_wrong_sign->size()); assert(decrypted== nullptr); } - std::cout << "encryption test passed\n"; + fmt::print("Test {} with {} passed\n",TEST_TYPE,TEST_KEY_TYPE); }