aboutsummaryrefslogtreecommitdiff
path: root/tests/unit_tests/ringct.cpp
diff options
context:
space:
mode:
authorLee Clagett <code@leeclagett.com>2017-02-27 13:33:16 -0500
committerLee Clagett <code@leeclagett.com>2017-04-11 16:35:00 -0400
commit4a8f96f95da51e6b570a00ddcfefe100844d8f8b (patch)
treeac8e18d7c08d336eac28481727f2accc00b1b544 /tests/unit_tests/ringct.cpp
parentMerge pull request #1956 (diff)
downloadmonero-4a8f96f95da51e6b570a00ddcfefe100844d8f8b.tar.xz
Improvements for epee binary to hex functions:
- Performance improvements - Added `span` for zero-copy pointer+length arguments - Added `std::ostream` overload for direct writing to output buffers - Removal of unused `string_tools::buff_to_hex`
Diffstat (limited to '')
-rw-r--r--tests/unit_tests/ringct.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/unit_tests/ringct.cpp b/tests/unit_tests/ringct.cpp
index 0e2cb3903..af6afa636 100644
--- a/tests/unit_tests/ringct.cpp
+++ b/tests/unit_tests/ringct.cpp
@@ -32,6 +32,7 @@
#include <cstdint>
#include <algorithm>
+#include <sstream>
#include "ringct/rctTypes.h"
#include "ringct/rctSigs.h"
@@ -1048,3 +1049,13 @@ TEST(ringct, reject_gen_non_simple_ver_simple)
rct::rctSig sig = make_sample_rct_sig(NELTS(inputs), inputs, NELTS(outputs), outputs, true);
ASSERT_FALSE(rct::verRctSimple(sig));
}
+
+TEST(ringct, key_ostream)
+{
+ std::stringstream out;
+ out << "BEGIN" << rct::H << "END";
+ EXPECT_EQ(
+ std::string{"BEGIN<8b655970153799af2aeadc9ff1add0ea6c7251d54154cfa92c173a0dd39c1f94>END"},
+ out.str()
+ );
+}