From 11a0fe2b407ae47b1f97f9a0da22937f06b43675 Mon Sep 17 00:00:00 2001 From: "Mayeul@Zama" <69792125+mayeul-zama@users.noreply.github.com> Date: Thu, 14 Nov 2024 16:30:28 +0100 Subject: [PATCH] chore(strings): support multi bit params in test --- tfhe/src/strings/mod.rs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/tfhe/src/strings/mod.rs b/tfhe/src/strings/mod.rs index 13bdf1e5a5..5ca854f09f 100644 --- a/tfhe/src/strings/mod.rs +++ b/tfhe/src/strings/mod.rs @@ -15,16 +15,15 @@ pub(crate) use test::TestKeys; #[cfg(test)] mod test { + use super::ciphertext::FheString; + use super::client_key::EncU16; use crate::integer::keycache::KEY_CACHE; use crate::integer::{ClientKey, ServerKey}; use crate::shortint::parameters::{ PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64, PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64, PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64, }; - use crate::shortint::ClassicPBSParameters; - - use super::ciphertext::FheString; - use super::client_key::EncU16; + use crate::shortint::PBSParameters; #[test] fn test_all() { @@ -51,8 +50,8 @@ mod test { } #[allow(clippy::too_many_arguments)] - pub fn test_all_impl( - params: ClassicPBSParameters, + pub fn test_all_impl>( + params: P, str: &str, str_pad: Option, pat: &str, @@ -131,7 +130,7 @@ mod test { } impl TestKeys { - pub fn new(params: ClassicPBSParameters, test_kind: TestKind) -> Self { + pub fn new>(params: P, test_kind: TestKind) -> Self { let (ck, sk) = KEY_CACHE.get_from_params(params, crate::integer::IntegerKeyKind::Radix); Self { ck, sk, test_kind }