aboutsummaryrefslogtreecommitdiffstats
path: root/src/vm.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/vm.rs')
-rw-r--r--src/vm.rs26
1 files changed, 0 insertions, 26 deletions
diff --git a/src/vm.rs b/src/vm.rs
index f5e5c58..d056ded 100644
--- a/src/vm.rs
+++ b/src/vm.rs
@@ -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(_, _)]);
- }
-}