From f5836b66dc5c886f287fd061617eb7593bf45a48 Mon Sep 17 00:00:00 2001 From: Jeff Date: Sun, 11 Aug 2024 16:57:52 -0400 Subject: [PATCH] Clean up --- dust-lang/src/analyzer.rs | 25 ------------------------- dust-lang/src/vm.rs | 2 +- 2 files changed, 1 insertion(+), 26 deletions(-) diff --git a/dust-lang/src/analyzer.rs b/dust-lang/src/analyzer.rs index 9a4c73c..c0d767c 100644 --- a/dust-lang/src/analyzer.rs +++ b/dust-lang/src/analyzer.rs @@ -448,31 +448,6 @@ mod tests { use super::*; - #[test] - fn math_requires_same_types() { - let abstract_tree = AbstractSyntaxTree { - nodes: [Node::new( - Statement::BinaryOperation { - left: Box::new(Node::new(Statement::Constant(Value::integer(1)), (0, 1))), - operator: Node::new(BinaryOperator::Add, (1, 2)), - right: Box::new(Node::new(Statement::Constant(Value::float(1.0)), (3, 4))), - }, - (0, 2), - )] - .into(), - }; - let mut context = Context::new(); - let mut analyzer = Analyzer::new(&abstract_tree, &mut context); - - assert_eq!( - analyzer.analyze(), - Err(AnalyzerError::ExpectedInteger { - actual: Node::new(Statement::Constant(Value::float(1.0)), (3, 4)), - position: (3, 4) - }) - ) - } - #[test] fn float_plus_integer() { let abstract_tree = AbstractSyntaxTree { diff --git a/dust-lang/src/vm.rs b/dust-lang/src/vm.rs index a4ff40e..3bb3882 100644 --- a/dust-lang/src/vm.rs +++ b/dust-lang/src/vm.rs @@ -724,7 +724,7 @@ mod tests { #[test] fn map_equal() { - let input = "{ y = 'foo', } == { y = 'foo', }"; + let input = "{ y = 'foo' } == { y = 'foo' }"; assert_eq!( run(input, &mut Context::new()),