Skip to content

Commit

Permalink
chore(strings): support multi bit params in test
Browse files Browse the repository at this point in the history
  • Loading branch information
mayeul-zama committed Nov 15, 2024
1 parent abee59d commit 19f43f0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tfhe/src/strings/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ mod test {
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 crate::shortint::PBSParameters;

use super::ciphertext::FheString;
use super::client_key::EncU16;
Expand Down Expand Up @@ -51,8 +51,8 @@ mod test {
}

#[allow(clippy::too_many_arguments)]
pub fn test_all(
params: ClassicPBSParameters,
pub fn test_all<P: Into<PBSParameters>>(
params: P,
str: &str,
str_pad: Option<u32>,
pat: &str,
Expand Down Expand Up @@ -131,7 +131,7 @@ mod test {
}

impl TestKeys {
pub fn new(params: ClassicPBSParameters, test_kind: TestKind) -> Self {
pub fn new<P: Into<PBSParameters>>(params: P, test_kind: TestKind) -> Self {
let (ck, sk) = KEY_CACHE.get_from_params(params, crate::integer::IntegerKeyKind::Radix);

Self { ck, sk, test_kind }
Expand Down

0 comments on commit 19f43f0

Please sign in to comment.