2023-06-22 06:15:38 +00:00
|
|
|
mod fuzz;
|
|
|
|
|
|
|
|
use std::panic;
|
2023-06-21 13:35:32 +00:00
|
|
|
|
|
|
|
use proptest::prelude::*;
|
|
|
|
use proptest::test_runner::Config;
|
|
|
|
use proptest_state_machine::{prop_state_machine, ReferenceStateMachine, StateMachineTest};
|
2023-06-22 06:15:38 +00:00
|
|
|
|
|
|
|
use fuzz::sut::ConsensusEngineTest;
|
2023-06-21 13:35:32 +00:00
|
|
|
|
|
|
|
prop_state_machine! {
|
|
|
|
#![proptest_config(Config {
|
2023-06-26 14:46:24 +00:00
|
|
|
// Only run 10 cases by default to avoid running out of system resources
|
2023-06-21 13:35:32 +00:00
|
|
|
// and taking too long to finish.
|
2023-06-26 14:46:24 +00:00
|
|
|
cases: 10,
|
2023-06-21 13:35:32 +00:00
|
|
|
.. Config::default()
|
|
|
|
})]
|
|
|
|
|
|
|
|
#[test]
|
2023-06-26 14:46:24 +00:00
|
|
|
// run 100 state transitions per test case
|
2023-06-28 14:37:27 +00:00
|
|
|
fn consensus_engine_test(sequential 1..30 => ConsensusEngineTest);
|
2023-06-21 13:35:32 +00:00
|
|
|
}
|