PkmnLib_rs/tests/datatests/mod.rs

24 lines
617 B
Rust

// This file is generated by build.rs
use std::path::Path;
use std::fs::File;
use std::io::Read;
use super::common::TestCase;
use super::get_library;
fn integration_tests(input: &Path) {
let mut str: String = "".to_string();
let mut file = File::open(input).unwrap();
file.read_to_string(&mut str).unwrap();
let test_case = serde_yaml::from_str::<TestCase>(&str).unwrap();
println!(" Running integration test {}", test_case.name);
test_case.run_test(get_library());
}
#[test]
fn basic_single_turn() {
integration_tests(Path::new("tests/test_cases/basic_single_turn.yaml"));
}