diff options
Diffstat (limited to 'src/tests/tests.cpp')
-rw-r--r-- | src/tests/tests.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/tests/tests.cpp b/src/tests/tests.cpp index 578418ffb..d3467460e 100644 --- a/src/tests/tests.cpp +++ b/src/tests/tests.cpp @@ -234,6 +234,18 @@ bool Test::Result::test_gte(const std::string& what, size_t produced, size_t exp return test_success(); } +bool Test::Result::test_ne(const std::string& what, size_t produced, size_t expected) + { + if(produced != expected) + { + return test_success(); + } + + std::ostringstream err; + err << who() << " " << what << " produced " << produced << " prohibited value"; + return test_failure(err.str()); + } + #if defined(BOTAN_HAS_BIGINT) bool Test::Result::test_eq(const std::string& what, const BigInt& produced, const BigInt& expected) { |