diff options
| author | Gustav Sörnäs <gustav@sornas.net> | 2021-03-05 19:07:13 +0100 |
|---|---|---|
| committer | Gustav Sörnäs <gustav@sornas.net> | 2021-03-05 19:07:13 +0100 |
| commit | 2570830850c6dadadc2c86bf9d6f3203c9aba488 (patch) | |
| tree | f6d00459337da26261c16e39cb4241be6441bfb4 /src/vm.rs | |
| parent | 9d0a930d811b825b39ee16614e645b6934130cc1 (diff) | |
| download | sylt-2570830850c6dadadc2c86bf9d6f3203c9aba488.tar.gz | |
convert tests to files
Diffstat (limited to 'src/vm.rs')
| -rw-r--r-- | src/vm.rs | 26 |
1 files changed, 0 insertions, 26 deletions
@@ -824,29 +824,3 @@ impl VM { } } } - -#[cfg(test)] -mod tests { - mod typing { - use crate::error::ErrorKind; - use crate::{test_string, Type}; - - test_string!(uncallable_type, " - f := fn i: int { - i() - } - f", - [ErrorKind::InvalidProgram]); - - test_string!(invalid_assign, "a := 1\na = 0.1\na", - [ErrorKind::TypeMismatch(Type::Int, Type::Float)]); - - test_string!(wrong_params, " - f : fn -> int = fn a: int -> int {}\nf", - [ErrorKind::TypeMismatch(_, _), ErrorKind::TypeMismatch(Type::Void, Type::Int)]); - - test_string!(wrong_ret, " - f : fn -> int = fn {}\nf", - [ErrorKind::TypeMismatch(_, _)]); - } -} |
