diff options
author | Jack Lloyd <[email protected]> | 2017-04-27 10:59:10 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2017-04-27 10:59:10 -0400 |
commit | 1c1bd38d73c32f7d34e1616ea52cf71714a9bf70 (patch) | |
tree | e0e8b703080c1717e112f08c80f6d76516bb52f0 /src/tests | |
parent | 7d3426f010fa287b8c16240418e6700d4d5add5c (diff) | |
parent | e095f78432381666a0465755ff62ad6e70fa1c68 (diff) |
Merge GH #1027 Add error return to botan_mp_to_str
Diffstat (limited to 'src/tests')
-rw-r--r-- | src/tests/test_ffi.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/tests/test_ffi.cpp b/src/tests/test_ffi.cpp index 48d7c28c4..d5ddace04 100644 --- a/src/tests/test_ffi.cpp +++ b/src/tests/test_ffi.cpp @@ -780,6 +780,9 @@ class FFI_Unit_Tests : public Test TEST_FFI_OK(botan_mp_to_str, (r, 10, str_buf, &str_len)); result.test_eq("botan_mp_mod_mul", std::string(str_buf), "123945920473931248854653259523111998693"); + str_len = 0; + TEST_FFI_RC(BOTAN_FFI_ERROR_INSUFFICIENT_BUFFER_SPACE, botan_mp_to_str, (r, 10, str_buf, &str_len)); + size_t x_bytes; botan_mp_rand_bits(x, rng, 512); TEST_FFI_OK(botan_mp_num_bytes, (x, &x_bytes)); |