diff options
author | Jack Lloyd <[email protected]> | 2017-09-22 13:58:37 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2017-09-22 13:58:37 -0400 |
commit | 97cb5cd996e64f9979b5969457a7fe2bde073a64 (patch) | |
tree | 55a2040a86aec990368b6a985e61d6686d7c6f0d /src | |
parent | a9f894773b4c7edcd80948c6ba70fa17f37e29be (diff) |
Test reading an invalid message number from a Pipe
Diffstat (limited to 'src')
-rw-r--r-- | src/tests/test_filters.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/tests/test_filters.cpp b/src/tests/test_filters.cpp index 0d4793505..d3993cce3 100644 --- a/src/tests/test_filters.cpp +++ b/src/tests/test_filters.cpp @@ -211,6 +211,10 @@ class Filter_Tests final : public Test pipe.end_msg(); + result.test_throws("pipe error", + "Invalid argument Pipe::read: Invalid message number 100", + [&]() { uint8_t b; size_t got = pipe.read(&b, 1, 100); BOTAN_UNUSED(got); }); + pipe.append(nullptr); // ignored pipe.prepend(nullptr); // ignored pipe.pop(); // empty pipe, so ignored |