2020-11-24 07:21:14 +00:00
|
|
|
use slashing_protection::interchange_test::MultiTestCase;
|
2020-10-02 01:42:27 +00:00
|
|
|
use std::fs::File;
|
|
|
|
use std::path::PathBuf;
|
|
|
|
|
|
|
|
fn test_root_dir() -> PathBuf {
|
|
|
|
PathBuf::from(env!("CARGO_MANIFEST_DIR"))
|
|
|
|
.join("interchange-tests")
|
|
|
|
.join("tests")
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn generated() {
|
|
|
|
for entry in test_root_dir()
|
|
|
|
.join("generated")
|
|
|
|
.read_dir()
|
|
|
|
.unwrap()
|
|
|
|
.map(Result::unwrap)
|
|
|
|
{
|
|
|
|
let file = File::open(entry.path()).unwrap();
|
2020-11-24 07:21:14 +00:00
|
|
|
let test_case: MultiTestCase = serde_json::from_reader(&file).unwrap();
|
2020-10-02 01:42:27 +00:00
|
|
|
test_case.run();
|
|
|
|
}
|
|
|
|
}
|