1
0
mirror of https://github.com/ellmau/adf-obdd.git synced 2025-12-19 09:29:36 +01:00
adf-obdd/tests/test_template
Stefan Ellmauthaler 07d15167fe
Implement Stable Models based on lazy evaluated iterators (#13)
Implements #12 

* Implement Stable Models based on lazy evaluated iterators
* Adjustment of the internal computation of the grounded interpretation
* Update build.rs to replace "@" in test-instance names with "at"
* Implement de-/serialization of the adf (in OBDD representation) in library
* Adjust tests
* Add more style-restrictions to compiler
2022-01-11 14:01:15 +01:00

21 lines
661 B
Plaintext

#[test]
fn {name}() {{
let resource = "{path}";
log::debug!("resource: {{}}", resource);
let grounded = "{grounded}";
log::debug!("Grounded: {{}}", grounded);
let parser = AdfParser::default();
let expected_result = std::fs::read_to_string(grounded);
assert!(expected_result.is_ok());
let input = std::fs::read_to_string(resource).unwrap();
parser.parse()(&input).unwrap();
parser.varsort_alphanum();
let mut adf = Adf::from_parser(&parser);
let grounded = adf.grounded();
assert_eq!(
format!("{{}}", adf.print_interpretation(&grounded)),
format!("{{}}\n",expected_result.unwrap())
);
}}