mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-19 13:58:28 +00:00
Rename Test trait to EfTest
This commit is contained in:
@@ -1,16 +1,15 @@
|
||||
use super::*;
|
||||
use types::EthSpec;
|
||||
|
||||
#[derive(Debug, PartialEq, Clone)]
|
||||
pub struct TestCaseResult {
|
||||
pub struct CaseResult {
|
||||
pub case_index: usize,
|
||||
pub desc: String,
|
||||
pub result: Result<(), Error>,
|
||||
}
|
||||
|
||||
impl TestCaseResult {
|
||||
impl CaseResult {
|
||||
pub fn new<T: Debug>(case_index: usize, case: &T, result: Result<(), Error>) -> Self {
|
||||
TestCaseResult {
|
||||
CaseResult {
|
||||
case_index,
|
||||
desc: format!("{:?}", case),
|
||||
result,
|
||||
@@ -18,10 +17,6 @@ impl TestCaseResult {
|
||||
}
|
||||
}
|
||||
|
||||
pub trait Test {
|
||||
fn test<E: EthSpec>(&self) -> Vec<TestCaseResult>;
|
||||
}
|
||||
|
||||
/// Compares `result` with `expected`.
|
||||
///
|
||||
/// If `expected.is_none()` then `result` is expected to be `Err`. Otherwise, `T` in `result` and
|
||||
|
||||
Reference in New Issue
Block a user