Added more serialization tests + generalize methods to any n

This commit is contained in:
Pro7ech
2025-08-13 15:28:52 +02:00
parent 068470783e
commit 940742ce6c
117 changed files with 3658 additions and 2577 deletions

View File

@@ -0,0 +1,15 @@
use backend::hal::tests::serialization::test_reader_writer_interface;
use crate::{LWECiphertext, LWECiphertextCompressed};
#[test]
fn lwe_serialization() {
let original: LWECiphertext<Vec<u8>> = LWECiphertext::alloc(771, 12, 54);
test_reader_writer_interface(original);
}
#[test]
fn lwe_serialization_compressed() {
let original: LWECiphertextCompressed<Vec<u8>> = LWECiphertextCompressed::alloc(12, 54);
test_reader_writer_interface(original);
}