diff options
author | practicalswift <practicalswift@users.noreply.github.com> | 2018-12-12 14:31:38 +0100 |
---|---|---|
committer | practicalswift <practicalswift@users.noreply.github.com> | 2018-12-13 09:37:23 +0100 |
commit | c84c2b8c92eb56b3b3793fc95265158f5eeb00db (patch) | |
tree | 38a2fd3c0b2c44f4d68bb7c7e41609207f701a10 /src/test/key_tests.cpp | |
parent | 6d0a14703e288d72ff19d4d89defbc853233899f (diff) |
tests: Test for expected return values when calling functions returning a success code
Diffstat (limited to 'src/test/key_tests.cpp')
-rw-r--r-- | src/test/key_tests.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/key_tests.cpp b/src/test/key_tests.cpp index 91cafd05d9..a768b4bcbd 100644 --- a/src/test/key_tests.cpp +++ b/src/test/key_tests.cpp @@ -163,7 +163,7 @@ BOOST_AUTO_TEST_CASE(key_signature_tests) for (int i = 1; i <=20; ++i) { sig.clear(); - key.Sign(msg_hash, sig, false, i); + BOOST_CHECK(key.Sign(msg_hash, sig, false, i)); found = sig[3] == 0x21 && sig[4] == 0x00; if (found) { break; @@ -179,7 +179,7 @@ BOOST_AUTO_TEST_CASE(key_signature_tests) sig.clear(); std::string msg = "A message to be signed" + std::to_string(i); msg_hash = Hash(msg.begin(), msg.end()); - key.Sign(msg_hash, sig); + BOOST_CHECK(key.Sign(msg_hash, sig)); found = sig[3] == 0x20; BOOST_CHECK(sig.size() <= 70); found_small |= sig.size() < 70; |