From d42c86f010abf52e3853760bbbadb888517d7afe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20S=C3=B6rn=C3=A4s?= Date: Sun, 10 Jan 2021 14:06:57 +0100 Subject: add test ooo --- src/main.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index e6265f8..f599011 100644 --- a/src/main.rs +++ b/src/main.rs @@ -20,5 +20,15 @@ fn run_file(path: &Path) -> Result<(), vm::VMError> { let block = compiler::compile("main", path, tokens); // path -> str might fail vm::run_block(block) } + +#[cfg(test)] +mod tests { + use super::run_file; + use std::path::Path; + + #[test] + fn order_of_operations() { + let file = Path::new("tests/order-of-operations.tdy"); + assert!(run_file(&file).is_ok()); } } -- cgit v1.2.1