SSZ generic tests for big uints

This commit is contained in:
Michael Sproul
2019-09-04 13:03:44 +10:00
parent f47eaf5730
commit d511c939eb
23 changed files with 185 additions and 165 deletions

View File

@@ -1,5 +1,6 @@
use super::*;
use crate::case_result::compare_result;
use crate::cases::common::BlsCase;
use bls::hash_on_g2;
use serde_derive::Deserialize;
@@ -9,18 +10,14 @@ pub struct BlsG2UncompressedInput {
pub domain: String,
}
impl BlsCase for BlsG2UncompressedInput {}
#[derive(Debug, Clone, Deserialize)]
pub struct BlsG2Uncompressed {
pub input: BlsG2UncompressedInput,
pub output: Vec<Vec<String>>,
}
impl YamlDecode for BlsG2Uncompressed {
fn yaml_decode(yaml: &str) -> Result<Self, Error> {
Ok(serde_yaml::from_str(yaml).unwrap())
}
}
impl Case for BlsG2Uncompressed {
fn result(&self, _case_index: usize) -> Result<(), Error> {
// Convert message and domain to required types