Skip to content

Commit

Permalink
768 test
Browse files Browse the repository at this point in the history
todo: 1024 test, look into compress/decompress error
  • Loading branch information
supinie committed Sep 13, 2023
1 parent 1aa5453 commit cfc11a7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/tests/buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,17 @@ mod buffer_tests {
#[test]
fn compress_decompress_test() {
let buf1 = Buffer::generate_random(Params::sec_level_512().poly_compressed_bytes());
let buf2 = Buffer::generate_random(Params::sec_level_1024().poly_compressed_bytes());
let buf2 = Buffer::generate_random(Params::sec_level_768().poly_compressed_bytes());
let mut buf_comp1 = Buffer::zero_initialise(Params::sec_level_512().poly_compressed_bytes());
let mut buf_comp2 = Buffer::zero_initialise(Params::sec_level_1024().poly_compressed_bytes());
let mut buf_comp2 = Buffer::zero_initialise(Params::sec_level_768().poly_compressed_bytes());

let mut poly1 = Poly::new();
let mut poly2 = Poly::new();

poly1.decompress(&buf1, Params::sec_level_512().poly_compressed_bytes());
poly2.decompress(&buf2, Params::sec_level_1024().poly_compressed_bytes());
poly2.decompress(&buf2, Params::sec_level_768().poly_compressed_bytes());
buf_comp1.compress(poly1, Params::sec_level_512().poly_compressed_bytes());
buf_comp2.compress(poly2, Params::sec_level_1024().poly_compressed_bytes());
buf_comp2.compress(poly2, Params::sec_level_768().poly_compressed_bytes());

assert_eq!(buf_comp1.data, buf1.data);
assert_eq!(buf_comp2.data, buf2.data);
Expand Down

0 comments on commit cfc11a7

Please sign in to comment.