diff --git a/src/protocol/tests/utils.rs b/src/protocol/tests/utils.rs index 479a6cc52847075f06be1c25988721c14c95ea39..753c1f10d5a66b3962e03d16b9b9eee460627c7f 100644 --- a/src/protocol/tests/utils.rs +++ b/src/protocol/tests/utils.rs @@ -569,7 +569,7 @@ impl<'a> FunctionTester<'a> { // Use the inner match index to find the expression let expr_id = seek_expr_in_stmt( &self.ctx.heap, self.def.body.upcast(), - &|expr| expr.span().begin.offset as usize == inner_match_idx + &|expr| expr.operation_span().begin.offset as usize == inner_match_idx ); assert!( expr_id.is_some(), @@ -814,26 +814,6 @@ impl<'a> ErrorTester<'a> { self } - // TODO: @tokenizer This should really be removed, as compilation should be - // deterministic, but we're currently using rather inefficient hashsets for - // the type inference, so remove once compiler architecture has changed. - pub(crate) fn assert_any_msg_has(self, msg: &str) -> Self { - let mut is_present = false; - for statement in &self.error.statements { - if statement.message.contains(msg) { - is_present = true; - break; - } - } - - assert!( - is_present, "[{}] Expected an error statement to contain '{}' for {}", - self.test_name, msg, self.assert_postfix() - ); - - self - } - /// Seeks the index of the pattern in the context message, then checks if /// the input position corresponds to that index. pub (crate) fn assert_occurs_at(self, idx: usize, pattern: &str) -> Self {