From 9066ba614cdabc86f802019d7f7349db0c30e872 Mon Sep 17 00:00:00 2001 From: AvicennaJr Date: Sun, 15 Oct 2023 21:51:12 +0300 Subject: [PATCH] fix tests --- evaluator/evaluator_test.go | 2 +- evaluator/infix.go | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/evaluator/evaluator_test.go b/evaluator/evaluator_test.go index 2142a22..ad9e925 100644 --- a/evaluator/evaluator_test.go +++ b/evaluator/evaluator_test.go @@ -250,7 +250,7 @@ kama (10 > 1) { }, { `{"jina": "Avi"}[unda(x) {x}];`, - "Mstari 1: Samahani, UNDO (FUNCTION) haitumiki kama key", + "Mstari 1: Samahani, UNDO (FUNCTION) haitumiki kama ufunguo", }, } diff --git a/evaluator/infix.go b/evaluator/infix.go index 33fa484..e17645a 100644 --- a/evaluator/infix.go +++ b/evaluator/infix.go @@ -90,7 +90,7 @@ func evalInfixExpression(operator string, left, right object.Object, line int) o line, left.Type(), operator, right.Type()) default: - return newError("Mstari %d: Operesheni Haielweki: %s %s %s", + return newError("Mstari %d: Operesheni Haieleweki: %s %s %s", line, left.Type(), operator, right.Type()) } } @@ -132,7 +132,7 @@ func evalFloatIntegerInfixExpression(operator string, left, right object.Object, case "!=": return nativeBoolToBooleanObject(leftVal != rightVal) default: - return newError("Mstari %d: Operesheni Haielweki: %s %s %s", + return newError("Mstari %d: Operesheni Haieleweki: %s %s %s", line, left.Type(), operator, right.Type()) } @@ -156,7 +156,7 @@ func evalStringInfixExpression(operator string, left, right object.Object, line case "!=": return nativeBoolToBooleanObject(leftVal != rightVal) default: - return newError("Mstari %d: Operesheni Haielweki: %s %s %s", line, left.Type(), operator, right.Type()) + return newError("Mstari %d: Operesheni Haieleweki: %s %s %s", line, left.Type(), operator, right.Type()) } } @@ -170,7 +170,7 @@ func evalBooleanInfixExpression(operator string, left, right object.Object, line case "||": return nativeBoolToBooleanObject(leftVal || rightVal) default: - return newError("Mstari %d: Operesheni Haielweki: %s %s %s", line, left.Type(), operator, right.Type()) + return newError("Mstari %d: Operesheni Haieleweki: %s %s %s", line, left.Type(), operator, right.Type()) } } @@ -202,7 +202,7 @@ func evalFloatInfixExpression(operator string, left, right object.Object, line i case "!=": return nativeBoolToBooleanObject(leftVal != rightVal) default: - return newError("Mstari %d: Operesheni Haielweki: %s %s %s", + return newError("Mstari %d: Operesheni Haieleweki: %s %s %s", line, left.Type(), operator, right.Type()) } } @@ -242,7 +242,7 @@ func evalIntegerInfixExpression(operator string, left, right object.Object, line case "!=": return nativeBoolToBooleanObject(leftVal != rightVal) default: - return newError("Mstari %d: Operesheni Haielweki: %s %s %s", + return newError("Mstari %d: Operesheni Haieleweki: %s %s %s", line, left.Type(), operator, right.Type()) } }