aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/test_aead.cpp
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-12-31 12:13:34 -0500
committerJack Lloyd <[email protected]>2017-12-31 12:13:34 -0500
commit987662117c2b98b12fdbe8e8ab3eaf8c93c748e3 (patch)
tree8d6481b2f16eb51c04b96300f2a82367057d5eb9 /src/tests/test_aead.cpp
parent9cbb2a31bce90e6da7a20b8e742deb314611e1fe (diff)
Add a test that update_granularity > minimum_final_size
FFI requires so this so make sure it's true. GH #1377
Diffstat (limited to 'src/tests/test_aead.cpp')
-rw-r--r--src/tests/test_aead.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/tests/test_aead.cpp b/src/tests/test_aead.cpp
index efd59f6a8..13d6ee320 100644
--- a/src/tests/test_aead.cpp
+++ b/src/tests/test_aead.cpp
@@ -347,6 +347,10 @@ class AEAD_Tests final : public Text_Based_Test
result.test_eq("same provider", enc_provider, dec_provider);
+ // FFI currently requires this, so assure it is true for all modes
+ result.test_gte("enc buffer sizes ok", enc->update_granularity(), enc->minimum_final_size());
+ result.test_gte("dec buffer sizes ok", dec->update_granularity(), dec->minimum_final_size());
+
// test enc
result.merge(test_enc(key, nonce, input, expected, ad, algo));