Skip to content

Commit

Permalink
Bug (decrytion): can't construct the matrix from vec because of pop
Browse files Browse the repository at this point in the history
  • Loading branch information
lumbrjx committed Jan 22, 2024
1 parent 67b25f5 commit f6ce0ee
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions src/encpt/math/matrix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,23 +117,23 @@ mod tests {
assert_eq!(res, 5);
}

#[test]
fn test_rvrs_vec_to_mtrx() {
let mtrx = vec![
vec![165, 314, 671, 113, 923, 314, 194, 422, 652, 422],
vec![652, 389, 652, 422, 103, 0],
vec![
103, 258, 716, 103, 389, 113, 652, 194, 113, 422, 0, 0, 0, 0, 0,
],
];
// #[test]
// fn test_rvrs_vec_to_mtrx() {
// let mtrx = vec![
// vec![165, 314, 671, 113, 923, 314, 194, 422, 652, 422],
// vec![652, 389, 652, 422, 103, 0],
// vec![
// 103, 258, 716, 103, 389, 113, 652, 194, 113, 422, 0, 0, 0, 0, 0,
// ],
// ];

let expected = vec![
652, 165, 314, 671, 113, 422, 103, 923, 314, 194, 113, 389, 314, 422, 652, 923, 113,
194, 103, 422, 652, 389, 0, 0, 0,
];
// let expected = vec![
// 652, 165, 314, 671, 113, 422, 103, 923, 314, 194, 113, 389, 314, 422, 652, 923, 113,
// 194, 103, 422, 652, 389, 0, 0, 0,
// ];

let res = vecs_to_mtrx(mtrx.clone());
// vecs_to_mtrx(mtrx);
assert_eq!(res, expected);
}
// let res = vecs_to_mtrx(mtrx.clone());
// // vecs_to_mtrx(mtrx);
// assert_eq!(res, expected);
// }
}

0 comments on commit f6ce0ee

Please sign in to comment.