pub struct TestResult {
pub scheme_name: String,
pub scheme_version: String,
pub parties: u32,
pub threshold: u32,
pub outcome: Outcome,
pub output: Vec<u8>,
pub messages_exchanged: u64,
pub bytes_exchanged: u64,
pub rounds: u8,
pub elapsed: Duration,
pub note: Option<String>,
}Expand description
Result of executing one TestVector against one scheme.
Fields§
§scheme_name: String§scheme_version: String§parties: u32§threshold: u32§outcome: Outcome§output: Vec<u8>Bytes the protocol produced (signature, DKG output, …). Empty for aborted runs.
messages_exchanged: u64Total messages exchanged across all rounds, all parties.
bytes_exchanged: u64Total bytes carried by those messages.
rounds: u8Number of rounds the protocol ran before completing or aborting.
elapsed: DurationWall time of the run, captured by the runner.
note: Option<String>Human-readable note — e.g. mismatch detail, abort reason.
Implementations§
Source§impl TestResult
impl TestResult
Sourcepub fn from_run(
vector: &TestVector,
output: Vec<u8>,
messages_exchanged: u64,
bytes_exchanged: u64,
rounds: u8,
elapsed: Duration,
) -> Self
pub fn from_run( vector: &TestVector, output: Vec<u8>, messages_exchanged: u64, bytes_exchanged: u64, rounds: u8, elapsed: Duration, ) -> Self
Build a result from a vector + the runtime observations. The
caller supplies the produced output and the observed round
count; this constructor decides Pass / Fail / Warn by
comparing against the vector’s expected bytes and conformance
level:
- Output matches (or no expected bytes) and round count matches
(or no
expected_round_countset) →Pass. - Output mismatches on a
must_passvector →Fail. - Output mismatches on a
should_passvector →Warn. - Output mismatches on an
informationalvector →Pass(the mismatch is recorded innotebut never gates the candidate). - Round count differs from
expected_round_count→Warneven on amust_passvector (the implementation produced a valid signature; it just took a different number of rounds). The mismatch is appended to the note.
Trait Implementations§
Source§impl Clone for TestResult
impl Clone for TestResult
Source§fn clone(&self) -> TestResult
fn clone(&self) -> TestResult
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TestResult
impl Debug for TestResult
Source§impl From<&TestResult> for ReportEntry
impl From<&TestResult> for ReportEntry
Source§fn from(r: &TestResult) -> Self
fn from(r: &TestResult) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for TestResult
impl RefUnwindSafe for TestResult
impl Send for TestResult
impl Sync for TestResult
impl Unpin for TestResult
impl UnsafeUnpin for TestResult
impl UnwindSafe for TestResult
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more