2023-04-02 10:07:08 +00:00
|
|
|
// This file is generated by build.rs
|
|
|
|
|
|
|
|
use super::common::TestCase;
|
|
|
|
use super::get_library;
|
2023-04-02 10:32:54 +00:00
|
|
|
use std::fs::File;
|
|
|
|
use std::io::Read;
|
|
|
|
use std::path::Path;
|
2023-04-02 10:07:08 +00:00
|
|
|
|
|
|
|
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();
|
2024-05-19 14:37:19 +00:00
|
|
|
let test_case = serde_yml::from_str::<TestCase>(&str).unwrap();
|
2023-04-02 10:07:08 +00:00
|
|
|
println!(" Running integration test {}", test_case.name);
|
|
|
|
test_case.run_test(get_library());
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
2024-05-19 14:37:19 +00:00
|
|
|
fn basic_single_turn() { integration_tests(Path::new("tests/test_cases/basic_single_turn.yaml")); }
|