Skip to content

Commit

Permalink
Improve coverage a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
akoshelev committed Oct 26, 2024
1 parent 8e61bee commit ce1afea
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
17 changes: 17 additions & 0 deletions ipa-core/src/helpers/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -713,6 +713,23 @@ mod tests {
}
}

mod helper_identity_tests {
use ipa_metrics::LabelValue;

use crate::helpers::HelperIdentity;

#[test]
fn label_value() {
for (id, hash) in [
(HelperIdentity::ONE, 1),
(HelperIdentity::TWO, 2),
(HelperIdentity::THREE, 3),
] {
assert_eq!(id.boxed().hash(), hash);
}
}
}

mod role_assignment_tests {
use crate::{
ff::Fp31,
Expand Down
2 changes: 2 additions & 0 deletions ipa-core/src/protocol/context/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -744,6 +744,8 @@ mod tests {

let input_size = input.len();
let snapshot = world.metrics_snapshot();
// this will print all metrics if test fails
snapshot.print(&mut std::io::stdout()).unwrap();

// for semi-honest protocols, amplification factor per helper is 1.
// that is, for every communication, there is exactly one send and receive of the same data
Expand Down

0 comments on commit ce1afea

Please sign in to comment.