diff options
author | Alexander Blair <snipa@jagtech.io> | 2020-03-12 01:13:48 -0700 |
---|---|---|
committer | Alexander Blair <snipa@jagtech.io> | 2020-03-12 01:13:49 -0700 |
commit | 820ab9fdea6ede11aced3726f3998558f8677ad6 (patch) | |
tree | 2b8df276eff7637e4c9dd20f5acd9a55e12deea7 /tests/unit_tests/epee_utils.cpp | |
parent | Merge pull request #6268 (diff) | |
parent | Various improvements to the ZMQ JSON-RPC handling: (diff) | |
download | monero-820ab9fdea6ede11aced3726f3998558f8677ad6.tar.xz |
Merge pull request #6273
0f78b06e Various improvements to the ZMQ JSON-RPC handling: (Lee Clagett)
Diffstat (limited to 'tests/unit_tests/epee_utils.cpp')
-rw-r--r-- | tests/unit_tests/epee_utils.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/unit_tests/epee_utils.cpp b/tests/unit_tests/epee_utils.cpp index 6f887afda..ee44ea2d5 100644 --- a/tests/unit_tests/epee_utils.cpp +++ b/tests/unit_tests/epee_utils.cpp @@ -850,6 +850,17 @@ TEST(ToHex, Array) ); } +TEST(ToHex, ArrayFromPod) +{ + std::array<char, 64> expected{{'5', 'f', '2', 'b', '0', '1'}}; + std::fill(expected.begin() + 6, expected.end(), '0'); + + EXPECT_EQ( + expected, + (epee::to_hex::array(crypto::ec_point{{0x5F, 0x2B, 0x01, 0x00}})) + ); +} + TEST(ToHex, Ostream) { std::stringstream out; |