From c670211f880ced64e6e80252fdf649e38c72d87f Mon Sep 17 00:00:00 2001 From: Mostafa Date: Tue, 15 Oct 2024 15:18:51 +0800 Subject: [PATCH] update C++ tests --- tests/chains/Pactus/SignerTests.cpp | 6 +++--- tests/chains/Pactus/TestCases.h | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/chains/Pactus/SignerTests.cpp b/tests/chains/Pactus/SignerTests.cpp index b7a6adb06f1..17b46fbce0c 100644 --- a/tests/chains/Pactus/SignerTests.cpp +++ b/tests/chains/Pactus/SignerTests.cpp @@ -26,7 +26,7 @@ TEST(PactusSigner, Sign) { ANY_SIGN(input, TWCoinTypePactus); EXPECT_EQ(output.error(), Common::Proto::OK); - ASSERT_EQ(hex(output.signed_transaction_data()), "000101020300e807047465737401037098338e0b6808119dfd4457ab806b9c2059b89b037a14ae24533816e7faaa6ed28fcdde8e55a7df21a09c0150ac25c7125271489b0cd230549257c93fb8c6265f2914a988ba7b81c1bc47fff027412dd59447867911035ff69742d171060a1f132ac38b95acc6e39ec0bd0995794161374b22c696dabb98e93f6ca9300b22f3b904921fbf560bb72145f4fa"); - ASSERT_EQ(hex(output.signature()), "50ac25c7125271489b0cd230549257c93fb8c6265f2914a988ba7b81c1bc47fff027412dd59447867911035ff69742d171060a1f132ac38b95acc6e39ec0bd09"); - ASSERT_EQ(hex(output.transaction_id()), "34cd4656a98f7eb996e83efdc384cefbe3a9c52dca79a99245b4eacc0b0b4311"); + ASSERT_EQ(hex(output.signed_transaction_data()), TransferTransaction1::SIGNED_TRANSACTION_DATA); + ASSERT_EQ(hex(output.signature()), TransferTransaction1::SIGNATURE); + ASSERT_EQ(hex(output.transaction_id()), TransferTransaction1::TRANSACTION_ID); } diff --git a/tests/chains/Pactus/TestCases.h b/tests/chains/Pactus/TestCases.h index a3de8cfc9bf..4418eb3d588 100644 --- a/tests/chains/Pactus/TestCases.h +++ b/tests/chains/Pactus/TestCases.h @@ -30,8 +30,6 @@ static TW::Pactus::Proto::SigningInput createSigningInput() { } const std::string PRIVATE_KEY_HEX = "4e51f1f3721f644ac7a193be7f5e7b8c2abaa3467871daf4eacb5d3af080e5d6"; -const std::string PRE_HASH = - "b5e97db07fa0bd0e5598aa3643a9bc6f6693bddc1a9fec9e674a461eaa00b19307968dab936c1bad187c60ce4082f307d030d780e91e694ae03aef16aba73f3063000000000000000200000000000000000000000000000000000000000000000000000000000000010d6170746f735f6163636f756e74087472616e7366657200022007968dab936c1bad187c60ce4082f307d030d780e91e694ae03aef16aba73f3008e803000000000000fe4d3200000000006400000000000000c2276ada0000000021"; const std::string SIGNATURE = "50ac25c7125271489b0cd230549257c93fb8c6265f2914a988ba7b81c1bc47fff027412dd59447867911035ff69742d171060a1f132ac38b95acc6e39ec0bd09"; const std::string DATA_TO_SIGN =