aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-09-22 13:58:37 -0400
committerJack Lloyd <[email protected]>2017-09-22 13:58:37 -0400
commit97cb5cd996e64f9979b5969457a7fe2bde073a64 (patch)
tree55a2040a86aec990368b6a985e61d6686d7c6f0d /src
parenta9f894773b4c7edcd80948c6ba70fa17f37e29be (diff)
Test reading an invalid message number from a Pipe
Diffstat (limited to 'src')
-rw-r--r--src/tests/test_filters.cpp4
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