Rename Test trait to EfTest

This commit is contained in:
Paul Hauner
2019-05-15 11:27:22 +10:00
parent 57040efc2a
commit 4cb23dd342
5 changed files with 22 additions and 19 deletions

View File

@@ -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