diff options
author | Jack Lloyd <[email protected]> | 2016-07-21 11:28:36 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2016-07-21 11:28:36 -0400 |
commit | 1e9dc69d56fab948546f8b99b7ab0fc38cbeb6e4 (patch) | |
tree | c50eabf3f3353df98414655099aa499825338c72 /src/tests/tests.cpp | |
parent | cf00df79de807d2ff236cc4c21c1f7549cbfad2f (diff) | |
parent | bc02dc731d1a02780e792b63c6c0a75b9e9b5ff4 (diff) |
Merge GH #545 OctetString tests
Diffstat (limited to 'src/tests/tests.cpp')
-rw-r--r-- | src/tests/tests.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/tests/tests.cpp b/src/tests/tests.cpp index aae4174b9..578418ffb 100644 --- a/src/tests/tests.cpp +++ b/src/tests/tests.cpp @@ -190,6 +190,23 @@ bool Test::Result::test_eq(const std::string& what, size_t produced, size_t expe return test_is_eq(what, produced, expected); } +bool Test::Result::test_eq(const std::string& what, OctetString produced, OctetString expected) + { + std::ostringstream out; + out << m_who << " " << what; + + if(produced == expected) + { + out << " produced expected result " << produced.as_string(); + return test_success(out.str()); + } + else + { + out << " produced unexpected result " << produced.as_string() << " expected " << expected.as_string(); + return test_failure(out.str()); + } + } + bool Test::Result::test_lt(const std::string& what, size_t produced, size_t expected) { if(produced >= expected) |