Improve ef_tests

This commit is contained in:
Paul Hauner 2019-05-13 18:09:19 +10:00
parent 31d960011f
commit beb5537904
No known key found for this signature in database
GPG Key ID: D362883A9218FCC6
2 changed files with 18 additions and 4 deletions

View File

@ -21,6 +21,23 @@ pub struct SszGenericCase {
pub ssz: Option<String>,
}
pub trait Test {
fn test(&self);
}
impl Test for TestDoc<SszGenericCase> {
fn test(&self) {
for case in &self.test_cases {
// Cases that do not have SSZ are ignored.
if let Some(ssz) = &case.ssz {
dbg!(case);
}
}
assert!(false);
}
}
#[cfg(test)]
mod tests {
#[test]

View File

@ -20,8 +20,5 @@ fn load_test_case<T: DeserializeOwned>(test_name: &str) -> TestDoc<T> {
#[test]
fn ssz() {
let doc: TestDoc<SszGenericCase> = load_test_case("ssz_generic/uint/uint_bounds.yaml");
dbg!(doc);
assert!(false);
doc.test();
}