From 67e9dc6cdc05b340821fc8669eaaff0797356466 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edvard=20Th=C3=B6rnros?= Date: Wed, 17 Feb 2021 22:24:53 +0100 Subject: fix test errors --- src/vm.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/vm.rs') diff --git a/src/vm.rs b/src/vm.rs index fca2757..6e52fc3 100644 --- a/src/vm.rs +++ b/src/vm.rs @@ -811,20 +811,20 @@ impl VM { mod tests { mod typing { use crate::error::ErrorKind; - use crate::test_string; + use crate::{test_string, Op, Type}; test_string!(uncallable_type, " f := fn i: int { i() }", - [ErrorKind::TypeError(_, _)]); + [ErrorKind::ValueError(Op::Call(0), _)]); test_string!(wrong_params, " f : fn -> int = fn a: int -> int {}", - [ErrorKind::TypeError(_, _), ErrorKind::TypeError(_, _)]); + [ErrorKind::TypeMismatch(_, _), ErrorKind::TypeMismatch(Type::Void, Type::Int)]); test_string!(wrong_ret, " f : fn -> int = fn {}", - [ErrorKind::TypeError(_, _)]); + [ErrorKind::TypeMismatch(_, _)]); } } -- cgit v1.2.1