Skip to content

Commit

Permalink
fix(typo): rename parametrized parameterized
Browse files Browse the repository at this point in the history
  • Loading branch information
mayeul-zama committed Nov 26, 2024
1 parent ade9a66 commit 9584f57
Show file tree
Hide file tree
Showing 130 changed files with 817 additions and 811 deletions.
8 changes: 4 additions & 4 deletions tfhe/src/core_crypto/algorithms/test/ggsw_encryption.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ fn ggsw_encrypt_decrypt_custom_mod<Scalar: UnsignedTorus>(params: ClassicTestPar
}
}

create_parametrized_test_with_non_native_parameters!(ggsw_encrypt_decrypt_custom_mod);
create_parameterized_test_with_non_native_parameters!(ggsw_encrypt_decrypt_custom_mod);

fn ggsw_par_encrypt_decrypt_custom_mod<Scalar: UnsignedTorus + Send + Sync>(
params: ClassicTestParams<Scalar>,
Expand Down Expand Up @@ -308,7 +308,7 @@ fn ggsw_par_encrypt_decrypt_custom_mod<Scalar: UnsignedTorus + Send + Sync>(
}
}

create_parametrized_test_with_non_native_parameters!(ggsw_par_encrypt_decrypt_custom_mod);
create_parameterized_test_with_non_native_parameters!(ggsw_par_encrypt_decrypt_custom_mod);

fn ggsw_seeded_encrypt_decrypt_custom_mod<Scalar: UnsignedTorus>(
params: ClassicTestParams<Scalar>,
Expand Down Expand Up @@ -379,7 +379,7 @@ fn ggsw_seeded_encrypt_decrypt_custom_mod<Scalar: UnsignedTorus>(
}
}

create_parametrized_test!(ggsw_seeded_encrypt_decrypt_custom_mod);
create_parameterized_test!(ggsw_seeded_encrypt_decrypt_custom_mod);

fn ggsw_seeded_par_encrypt_decrypt_custom_mod<Scalar: UnsignedTorus + Sync + Send>(
params: ClassicTestParams<Scalar>,
Expand Down Expand Up @@ -450,4 +450,4 @@ fn ggsw_seeded_par_encrypt_decrypt_custom_mod<Scalar: UnsignedTorus + Sync + Sen
}
}

create_parametrized_test!(ggsw_seeded_par_encrypt_decrypt_custom_mod);
create_parameterized_test!(ggsw_seeded_par_encrypt_decrypt_custom_mod);
14 changes: 7 additions & 7 deletions tfhe/src/core_crypto/algorithms/test/glwe_encryption.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ fn glwe_encrypt_assign_decrypt_custom_mod<Scalar: UnsignedTorus>(
}
}

create_parametrized_test_with_non_native_parameters!(glwe_encrypt_assign_decrypt_custom_mod);
create_parameterized_test_with_non_native_parameters!(glwe_encrypt_assign_decrypt_custom_mod);

fn glwe_encrypt_decrypt_custom_mod<Scalar: UnsignedTorus>(params: ClassicTestParams<Scalar>) {
let glwe_dimension = params.glwe_dimension;
Expand Down Expand Up @@ -141,7 +141,7 @@ fn glwe_encrypt_decrypt_custom_mod<Scalar: UnsignedTorus>(params: ClassicTestPar
}
}

create_parametrized_test_with_non_native_parameters!(glwe_encrypt_decrypt_custom_mod);
create_parameterized_test_with_non_native_parameters!(glwe_encrypt_decrypt_custom_mod);

fn glwe_list_encrypt_decrypt_custom_mod<Scalar: UnsignedTorus>(params: ClassicTestParams<Scalar>) {
let glwe_dimension = params.glwe_dimension;
Expand Down Expand Up @@ -217,7 +217,7 @@ fn glwe_list_encrypt_decrypt_custom_mod<Scalar: UnsignedTorus>(params: ClassicTe
}
}

create_parametrized_test_with_non_native_parameters!(glwe_list_encrypt_decrypt_custom_mod);
create_parameterized_test_with_non_native_parameters!(glwe_list_encrypt_decrypt_custom_mod);

fn glwe_trivial_encrypt_decrypt_custom_mod<Scalar: UnsignedTorus>(
params: ClassicTestParams<Scalar>,
Expand Down Expand Up @@ -282,7 +282,7 @@ fn glwe_trivial_encrypt_decrypt_custom_mod<Scalar: UnsignedTorus>(
}
}

create_parametrized_test_with_non_native_parameters!(glwe_trivial_encrypt_decrypt_custom_mod);
create_parameterized_test_with_non_native_parameters!(glwe_trivial_encrypt_decrypt_custom_mod);

fn glwe_allocate_trivial_encrypt_decrypt_custom_mod<Scalar: UnsignedTorus>(
params: ClassicTestParams<Scalar>,
Expand Down Expand Up @@ -340,7 +340,7 @@ fn glwe_allocate_trivial_encrypt_decrypt_custom_mod<Scalar: UnsignedTorus>(
}
}

create_parametrized_test_with_non_native_parameters!(
create_parameterized_test_with_non_native_parameters!(
glwe_allocate_trivial_encrypt_decrypt_custom_mod
);

Expand Down Expand Up @@ -424,7 +424,7 @@ fn glwe_seeded_encrypt_decrypt_custom_mod<Scalar: UnsignedTorus>(
}
}

create_parametrized_test!(glwe_seeded_encrypt_decrypt_custom_mod);
create_parameterized_test!(glwe_seeded_encrypt_decrypt_custom_mod);

fn glwe_seeded_list_encrypt_decrypt_custom_mod<Scalar: UnsignedTorus>(
params: ClassicTestParams<Scalar>,
Expand Down Expand Up @@ -505,4 +505,4 @@ fn glwe_seeded_list_encrypt_decrypt_custom_mod<Scalar: UnsignedTorus>(
}
}

create_parametrized_test!(glwe_seeded_list_encrypt_decrypt_custom_mod);
create_parameterized_test!(glwe_seeded_list_encrypt_decrypt_custom_mod);
22 changes: 11 additions & 11 deletions tfhe/src/core_crypto/algorithms/test/glwe_linear_algebra.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ fn glwe_encrypt_add_assign_decrypt_custom_mod<Scalar: UnsignedTorus>(
}
}

create_parametrized_test!(glwe_encrypt_add_assign_decrypt_custom_mod);
create_parameterized_test!(glwe_encrypt_add_assign_decrypt_custom_mod);

fn glwe_encrypt_add_decrypt_custom_mod<Scalar: UnsignedTorus>(params: ClassicTestParams<Scalar>) {
let glwe_dimension = params.glwe_dimension;
Expand Down Expand Up @@ -165,7 +165,7 @@ fn glwe_encrypt_add_decrypt_custom_mod<Scalar: UnsignedTorus>(params: ClassicTes
}
}

create_parametrized_test!(glwe_encrypt_add_decrypt_custom_mod);
create_parameterized_test!(glwe_encrypt_add_decrypt_custom_mod);

fn glwe_encrypt_plaintext_list_add_assign_decrypt_custom_mod<Scalar: UnsignedTorus>(
params: ClassicTestParams<Scalar>,
Expand Down Expand Up @@ -244,7 +244,7 @@ fn glwe_encrypt_plaintext_list_add_assign_decrypt_custom_mod<Scalar: UnsignedTor
}
}

create_parametrized_test!(glwe_encrypt_plaintext_list_add_assign_decrypt_custom_mod);
create_parameterized_test!(glwe_encrypt_plaintext_list_add_assign_decrypt_custom_mod);

fn glwe_encrypt_plaintext_list_sub_assign_decrypt_custom_mod<Scalar: UnsignedTorus>(
params: ClassicTestParams<Scalar>,
Expand Down Expand Up @@ -323,7 +323,7 @@ fn glwe_encrypt_plaintext_list_sub_assign_decrypt_custom_mod<Scalar: UnsignedTor
}
}

create_parametrized_test!(glwe_encrypt_plaintext_list_sub_assign_decrypt_custom_mod);
create_parameterized_test!(glwe_encrypt_plaintext_list_sub_assign_decrypt_custom_mod);

fn glwe_encrypt_plaintext_add_assign_decrypt_custom_mod<Scalar: UnsignedTorus>(
params: ClassicTestParams<Scalar>,
Expand Down Expand Up @@ -403,7 +403,7 @@ fn glwe_encrypt_plaintext_add_assign_decrypt_custom_mod<Scalar: UnsignedTorus>(
}
}

create_parametrized_test!(glwe_encrypt_plaintext_add_assign_decrypt_custom_mod);
create_parameterized_test!(glwe_encrypt_plaintext_add_assign_decrypt_custom_mod);

fn glwe_encrypt_plaintext_sub_assign_decrypt_custom_mod<Scalar: UnsignedTorus>(
params: ClassicTestParams<Scalar>,
Expand Down Expand Up @@ -483,7 +483,7 @@ fn glwe_encrypt_plaintext_sub_assign_decrypt_custom_mod<Scalar: UnsignedTorus>(
}
}

create_parametrized_test!(glwe_encrypt_plaintext_sub_assign_decrypt_custom_mod);
create_parameterized_test!(glwe_encrypt_plaintext_sub_assign_decrypt_custom_mod);

fn glwe_encrypt_opposite_assign_decrypt_custom_mod<Scalar: UnsignedTorus>(
params: ClassicTestParams<Scalar>,
Expand Down Expand Up @@ -564,7 +564,7 @@ fn glwe_encrypt_opposite_assign_decrypt_custom_mod<Scalar: UnsignedTorus>(
}
}

create_parametrized_test!(glwe_encrypt_opposite_assign_decrypt_custom_mod);
create_parameterized_test!(glwe_encrypt_opposite_assign_decrypt_custom_mod);

fn glwe_encrypt_cleartext_mul_assign_decrypt_custom_mod<Scalar: UnsignedTorus>(
params: ClassicTestParams<Scalar>,
Expand Down Expand Up @@ -646,7 +646,7 @@ fn glwe_encrypt_cleartext_mul_assign_decrypt_custom_mod<Scalar: UnsignedTorus>(
}
}

create_parametrized_test!(glwe_encrypt_cleartext_mul_assign_decrypt_custom_mod);
create_parameterized_test!(glwe_encrypt_cleartext_mul_assign_decrypt_custom_mod);

fn glwe_encrypt_cleartext_mul_decrypt_custom_mod<Scalar: UnsignedTorus>(
params: ClassicTestParams<Scalar>,
Expand Down Expand Up @@ -730,7 +730,7 @@ fn glwe_encrypt_cleartext_mul_decrypt_custom_mod<Scalar: UnsignedTorus>(
}
}

create_parametrized_test!(glwe_encrypt_cleartext_mul_decrypt_custom_mod);
create_parameterized_test!(glwe_encrypt_cleartext_mul_decrypt_custom_mod);

fn glwe_encrypt_sub_assign_decrypt_custom_mod<Scalar: UnsignedTorus>(
params: ClassicTestParams<Scalar>,
Expand Down Expand Up @@ -811,7 +811,7 @@ fn glwe_encrypt_sub_assign_decrypt_custom_mod<Scalar: UnsignedTorus>(
}
}

create_parametrized_test!(glwe_encrypt_sub_assign_decrypt_custom_mod);
create_parameterized_test!(glwe_encrypt_sub_assign_decrypt_custom_mod);

fn glwe_encrypt_sub_decrypt_custom_mod<Scalar: UnsignedTorus>(params: ClassicTestParams<Scalar>) {
let glwe_dimension = params.glwe_dimension;
Expand Down Expand Up @@ -892,4 +892,4 @@ fn glwe_encrypt_sub_decrypt_custom_mod<Scalar: UnsignedTorus>(params: ClassicTes
}
}

create_parametrized_test!(glwe_encrypt_sub_decrypt_custom_mod);
create_parameterized_test!(glwe_encrypt_sub_decrypt_custom_mod);
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,4 @@ fn glwe_encrypt_sample_extract_decrypt_custom_mod<Scalar: UnsignedTorus + Send +
}
}

create_parametrized_test!(glwe_encrypt_sample_extract_decrypt_custom_mod);
create_parameterized_test!(glwe_encrypt_sample_extract_decrypt_custom_mod);
28 changes: 14 additions & 14 deletions tfhe/src/core_crypto/algorithms/test/lwe_encryption.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ fn parallel_and_seeded_lwe_list_encryption_equivalence<Scalar: UnsignedTorus + S
}
}

create_parametrized_test!(parallel_and_seeded_lwe_list_encryption_equivalence {
create_parameterized_test!(parallel_and_seeded_lwe_list_encryption_equivalence {
TEST_PARAMS_4_BITS_NATIVE_U64,
TEST_PARAMS_3_BITS_63_U64,
DUMMY_NATIVE_U32,
Expand Down Expand Up @@ -204,7 +204,7 @@ fn lwe_encrypt_decrypt_custom_mod<Scalar: UnsignedTorus>(params: ClassicTestPara
}
}

create_parametrized_test_with_non_native_parameters!(lwe_encrypt_decrypt_custom_mod);
create_parameterized_test_with_non_native_parameters!(lwe_encrypt_decrypt_custom_mod);

fn lwe_allocate_encrypt_decrypt_custom_mod<Scalar: UnsignedTorus>(
params: ClassicTestParams<Scalar>,
Expand Down Expand Up @@ -258,7 +258,7 @@ fn lwe_allocate_encrypt_decrypt_custom_mod<Scalar: UnsignedTorus>(
}
}

create_parametrized_test_with_non_native_parameters!(lwe_allocate_encrypt_decrypt_custom_mod);
create_parameterized_test_with_non_native_parameters!(lwe_allocate_encrypt_decrypt_custom_mod);

fn lwe_trivial_encrypt_decrypt_custom_mod<Scalar: UnsignedTorus>(
params: ClassicTestParams<Scalar>,
Expand Down Expand Up @@ -310,7 +310,7 @@ fn lwe_trivial_encrypt_decrypt_custom_mod<Scalar: UnsignedTorus>(
break;
}
}
create_parametrized_test_with_non_native_parameters!(lwe_trivial_encrypt_decrypt_custom_mod);
create_parameterized_test_with_non_native_parameters!(lwe_trivial_encrypt_decrypt_custom_mod);

fn lwe_allocate_trivial_encrypt_decrypt_custom_mod<Scalar: UnsignedTorus>(
params: ClassicTestParams<Scalar>,
Expand Down Expand Up @@ -361,7 +361,7 @@ fn lwe_allocate_trivial_encrypt_decrypt_custom_mod<Scalar: UnsignedTorus>(
}
}

create_parametrized_test_with_non_native_parameters!(
create_parameterized_test_with_non_native_parameters!(
lwe_allocate_trivial_encrypt_decrypt_custom_mod
);

Expand Down Expand Up @@ -432,7 +432,7 @@ fn lwe_list_encrypt_decrypt_custom_mod<Scalar: UnsignedTorus>(params: ClassicTes
}
}

create_parametrized_test_with_non_native_parameters!(lwe_list_encrypt_decrypt_custom_mod);
create_parameterized_test_with_non_native_parameters!(lwe_list_encrypt_decrypt_custom_mod);

fn lwe_list_par_encrypt_decrypt_custom_mod<Scalar: UnsignedTorus + Sync + Send>(
params: ClassicTestParams<Scalar>,
Expand Down Expand Up @@ -503,7 +503,7 @@ fn lwe_list_par_encrypt_decrypt_custom_mod<Scalar: UnsignedTorus + Sync + Send>(
}
}

create_parametrized_test_with_non_native_parameters!(lwe_list_par_encrypt_decrypt_custom_mod);
create_parameterized_test_with_non_native_parameters!(lwe_list_par_encrypt_decrypt_custom_mod);

fn lwe_public_encrypt_decrypt_custom_mod<Scalar: UnsignedTorus>(params: ClassicTestParams<Scalar>) {
let lwe_dimension = params.lwe_dimension;
Expand Down Expand Up @@ -569,7 +569,7 @@ fn lwe_public_encrypt_decrypt_custom_mod<Scalar: UnsignedTorus>(params: ClassicT
}
}

create_parametrized_test_with_non_native_parameters!(lwe_public_encrypt_decrypt_custom_mod);
create_parameterized_test_with_non_native_parameters!(lwe_public_encrypt_decrypt_custom_mod);

fn lwe_seeded_public_encrypt_decrypt_custom_mod<Scalar: UnsignedTorus>(
params: ClassicTestParams<Scalar>,
Expand Down Expand Up @@ -644,7 +644,7 @@ fn lwe_seeded_public_encrypt_decrypt_custom_mod<Scalar: UnsignedTorus>(
}
}

create_parametrized_test!(lwe_seeded_public_encrypt_decrypt_custom_mod);
create_parameterized_test!(lwe_seeded_public_encrypt_decrypt_custom_mod);

fn lwe_seeded_list_par_encrypt_decrypt_custom_mod<Scalar: UnsignedTorus + Sync + Send>(
params: ClassicTestParams<Scalar>,
Expand Down Expand Up @@ -727,7 +727,7 @@ fn lwe_seeded_list_par_encrypt_decrypt_custom_mod<Scalar: UnsignedTorus + Sync +
}
}

create_parametrized_test!(lwe_seeded_list_par_encrypt_decrypt_custom_mod);
create_parameterized_test!(lwe_seeded_list_par_encrypt_decrypt_custom_mod);

fn lwe_seeded_encrypt_decrypt_custom_mod<Scalar: UnsignedTorus>(params: ClassicTestParams<Scalar>) {
let lwe_dimension = params.lwe_dimension;
Expand Down Expand Up @@ -793,7 +793,7 @@ fn lwe_seeded_encrypt_decrypt_custom_mod<Scalar: UnsignedTorus>(params: ClassicT
}
}

create_parametrized_test_with_non_native_parameters!(lwe_seeded_encrypt_decrypt_custom_mod);
create_parameterized_test_with_non_native_parameters!(lwe_seeded_encrypt_decrypt_custom_mod);

fn lwe_seeded_allocate_encrypt_decrypt_custom_mod<Scalar: UnsignedTorus>(
params: ClassicTestParams<Scalar>,
Expand Down Expand Up @@ -854,7 +854,7 @@ fn lwe_seeded_allocate_encrypt_decrypt_custom_mod<Scalar: UnsignedTorus>(
}
}

create_parametrized_test_with_non_native_parameters!(
create_parameterized_test_with_non_native_parameters!(
lwe_seeded_allocate_encrypt_decrypt_custom_mod
);

Expand Down Expand Up @@ -992,7 +992,7 @@ fn lwe_compact_public_encrypt_decrypt_custom_mod<Scalar: UnsignedTorus>(
}
}

create_parametrized_test!(lwe_compact_public_encrypt_decrypt_custom_mod {
create_parameterized_test!(lwe_compact_public_encrypt_decrypt_custom_mod {
TEST_PARAMS_4_BITS_NATIVE_U64
});

Expand Down Expand Up @@ -1099,7 +1099,7 @@ fn lwe_compact_public_encrypt_prove_verify_decrypt_custom_mod<Scalar>(
}

#[cfg(feature = "zk-pok")]
create_parametrized_test!(lwe_compact_public_encrypt_prove_verify_decrypt_custom_mod {
create_parameterized_test!(lwe_compact_public_encrypt_prove_verify_decrypt_custom_mod {
TEST_PARAMS_4_BITS_NATIVE_U64
});

Expand Down
2 changes: 1 addition & 1 deletion tfhe/src/core_crypto/algorithms/test/lwe_keyswitch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ fn lwe_encrypt_ks_decrypt_custom_mod<Scalar: UnsignedTorus + Send + Sync>(
}
}

create_parametrized_test_with_non_native_parameters!(lwe_encrypt_ks_decrypt_custom_mod);
create_parameterized_test_with_non_native_parameters!(lwe_encrypt_ks_decrypt_custom_mod);

#[test]
fn test_lwe_encrypt_ks_switch_mod_decrypt_custom_mod() {
Expand Down
Loading

0 comments on commit 9584f57

Please sign in to comment.