Skip to content

Commit

Permalink
Add test with failing case
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastiencs committed Oct 14, 2024
1 parent d727c5f commit 3f8ed1f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions curves/src/pasta/wasm_friendly/backend9.rs
Original file line number Diff line number Diff line change
@@ -211,3 +211,18 @@ impl<FpC: FpConstants> FpBackend<9> for FpC {
res
}
}

#[cfg(test)]
mod tests {
use crate::pasta::wasm_friendly::pasta::Fp9Parameters;

#[test]
fn test_mul_assign() {
let mut x = [1, 0, 0, 0, 0, 0, 0, 0, 0];
let y = [
134535, 9823489, 13487345, 2349086, 238975, 97234, 893642, 723401, 8923689,
];
super::mul_assign::<Fp9Parameters>(&mut x, &y);
assert_ne!(x, [0; 9])
}
}

0 comments on commit 3f8ed1f

Please sign in to comment.