diff --git a/examples/random-generation-protocol/src/lib.rs b/examples/random-generation-protocol/src/lib.rs index 3e6a3b5..694bd2c 100644 --- a/examples/random-generation-protocol/src/lib.rs +++ b/examples/random-generation-protocol/src/lib.rs @@ -189,8 +189,8 @@ mod tests { |i, party, rng| protocol_of_random_generation(party, i, n, rng), ) .await - .expect_success() - .expect_same(); + .expect_ok() + .expect_eq(); std::println!("Output randomness: {}", hex::encode(randomness)); } @@ -204,8 +204,8 @@ mod tests { }) .run() .unwrap() - .expect_success() - .expect_same(); + .expect_ok() + .expect_eq(); } // Emulate the protocol using the state machine interface diff --git a/round-based/src/simulation/mod.rs b/round-based/src/simulation/mod.rs index fa41932..b67841e 100644 --- a/round-based/src/simulation/mod.rs +++ b/round-based/src/simulation/mod.rs @@ -43,9 +43,9 @@ //! ) //! .await //! // unwrap `Result`s -//! .expect_success() +//! .expect_ok() //! // check that all parties produced the same response -//! .expect_same(); +//! .expect_eq(); //! //! println!("Output randomness: {}", hex::encode(output)); //! # } @@ -71,7 +71,7 @@ where /// Panics if at least one of the parties returned `Err(_)`. In this case, /// a verbose error message will shown specifying which of the parties returned /// an error. - pub fn expect_success(self) -> SimResult { + pub fn expect_ok(self) -> SimResult { let mut oks = alloc::vec::Vec::with_capacity(self.0.len()); let mut errs = alloc::vec::Vec::with_capacity(self.0.len()); @@ -113,7 +113,7 @@ where /// panics with a verbose error message. /// /// Panics if simulation contained zero parties. - pub fn expect_same(mut self) -> T { + pub fn expect_eq(mut self) -> T { let Some(first) = self.0.first() else { panic!("simulation contained zero parties"); }; diff --git a/round-based/src/simulation/sim_async.rs b/round-based/src/simulation/sim_async.rs index b5ca781..bcc6ed6 100644 --- a/round-based/src/simulation/sim_async.rs +++ b/round-based/src/simulation/sim_async.rs @@ -216,9 +216,9 @@ impl NextMessageId { /// ) /// .await /// // unwrap `Result`s -/// .expect_success() +/// .expect_ok() /// // check that all parties produced the same response -/// .expect_same(); +/// .expect_eq(); /// /// println!("Output randomness: {}", hex::encode(output)); /// # } @@ -275,9 +275,9 @@ where /// ) /// .await /// // unwrap `Result`s -/// .expect_success() +/// .expect_ok() /// // check that all parties produced the same response -/// .expect_same(); +/// .expect_eq(); /// /// println!("Output randomness: {}", hex::encode(output)); /// # }