bitbelay_suites/
lib.rs

1//! Test suites for `bitbelay`.
2//!
3//! This crate is comprised of three different entities:
4//!
5//! * **Suites** are collections of tests related to a particular topic—they are
6//!   instantiated with a particular hasher and have methods to run different
7//!   tests within the context of the suite. Last they keep track of all of the
8//!   tests run and generate a report.
9//! * **Tests** are specific exercises within the context of a suite. A suite
10//!   may have many supported tests and can run any combination of tests (e.g.,
11//!   all available tests of the same type of input data or the same test on
12//!   multiple types of input data).
13//! * **Modules** are the discrete components of each test that are pass/fail.
14//!
15//! For example, the Chi-squared **suite** supports running a goodness of fit
16//! **test** for a particular input. Underneath the goodness of fit test, the
17//! failure to reject the null hypothesis is a **module** that can be passed or
18//! failed.
19//!
20//! We considerd this structure a balance between allowing flexibility within
21//! the provided facilities of this crate while also making the concepts clear
22//! to implement.
23
24pub mod avalanche;
25pub mod chi_squared;
26pub mod correlation;
27pub mod performance;
28
29/// Traits for `bitbelay` test suites.
30pub mod r#trait {
31    use bitbelay_report::Report;
32
33    /// A suite of curated tests designed for a particular purpose.
34    pub trait Suite {
35        /// Gets the name of the test suite.
36        fn title(&self) -> &'static str;
37
38        /// Gets the report from the test suite.
39        fn report(&self) -> Report;
40    }
41}