mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-20 21:34:46 +00:00
Directory Restructure (#1163)
* Move tests -> testing * Directory restructure * Update Cargo.toml during restructure * Update Makefile during restructure * Fix arbitrary path
This commit is contained in:
15
consensus/proto_array_fork_choice/src/bin.rs
Normal file
15
consensus/proto_array_fork_choice/src/bin.rs
Normal file
@@ -0,0 +1,15 @@
|
||||
use proto_array_fork_choice::fork_choice_test_definition::*;
|
||||
use serde_yaml;
|
||||
use std::fs::File;
|
||||
|
||||
fn main() {
|
||||
write_test_def_to_yaml("votes.yaml", get_votes_test_definition());
|
||||
write_test_def_to_yaml("no_votes.yaml", get_no_votes_test_definition());
|
||||
write_test_def_to_yaml("ffg_01.yaml", get_ffg_case_01_test_definition());
|
||||
write_test_def_to_yaml("ffg_02.yaml", get_ffg_case_02_test_definition());
|
||||
}
|
||||
|
||||
fn write_test_def_to_yaml(filename: &str, def: ForkChoiceTestDefinition) {
|
||||
let file = File::create(filename).expect("Should be able to open file");
|
||||
serde_yaml::to_writer(file, &def).expect("Should be able to write YAML to file");
|
||||
}
|
||||
Reference in New Issue
Block a user