use std::collections::BTreeMap;
use serde::Deserialize;
#[derive(Debug, PartialEq, Deserialize)]
pub struct SkipTests {
pub block: Vec<SkipBlockchainTest>,
pub state: Vec<SkipStateTest>,
}
#[derive(Debug, PartialEq, Deserialize)]
pub struct SkipBlockchainTest {
pub reference: String,
pub failing: String,
pub subtests: Vec<String>,
}
#[derive(Debug, PartialEq, Deserialize)]
pub struct SkipStateTest {
pub reference: String,
pub failing: String,
pub subtests: BTreeMap<String, StateSkipSubStates>
}
#[derive(Debug, PartialEq, Deserialize)]
pub struct StateSkipSubStates {
pub subnumbers: Vec<String>,
pub chain: String,
}
impl SkipTests {
pub fn empty() -> Self {
SkipTests {
block: Vec::new(),
state: Vec::new(),
}
}
pub fn load<R>(reader: R) -> Result<Self, serde_json::Error> where R: std::io::Read {
serde_json::from_reader(reader)
}
}