diff options
| author | Gustav Sörnäs <gustav@sornas.net> | 2021-01-10 14:06:57 +0100 |
|---|---|---|
| committer | Gustav Sörnäs <gustav@sornas.net> | 2021-01-10 14:06:57 +0100 |
| commit | d42c86f010abf52e3853760bbbadb888517d7afe (patch) | |
| tree | 941c5c92e3e1425988d7c09e47c32317ed7e2530 /src | |
| parent | 78749296776b2d9b7cb1d03b93c97ceb32c8c0b3 (diff) | |
| download | sylt-d42c86f010abf52e3853760bbbadb888517d7afe.tar.gz | |
add test ooo
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.rs | 10 |
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()); } } |
