From 11128935416db5072896ba4cb5c33adfe792b6d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Lindstr=C3=B8m?= Date: Thu, 12 Sep 2024 17:36:25 +0200 Subject: [PATCH] Add test for empty vk (#832) --- fastcrypto-zkp/src/bls12381/api/tests.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fastcrypto-zkp/src/bls12381/api/tests.rs b/fastcrypto-zkp/src/bls12381/api/tests.rs index 372204948a..b20ef4094c 100644 --- a/fastcrypto-zkp/src/bls12381/api/tests.rs +++ b/fastcrypto-zkp/src/bls12381/api/tests.rs @@ -219,6 +219,10 @@ fn test_prepare_pvk_bytes() { let mut modified_bytes = vk_bytes.clone(); modified_bytes.pop(); assert!(prepare_pvk_bytes(&modified_bytes).is_err()); + + // Empty vk + let empty_vk = vec![]; + assert!(prepare_pvk_bytes(&empty_vk).is_err()); } #[test]