aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs10
1 files changed, 10 insertions, 0 deletions
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());
}
}