From 1d609d2fd55654ba8e55c5575cb759251cfa2953 Mon Sep 17 00:00:00 2001 From: Pieter Olivier Date: Mon, 14 Oct 2024 10:51:37 +0200 Subject: [PATCH] Replaced findBestError with findBestErrors --- .../concrete/recovery/ToyRascalRecoveryTests.rsc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/org/rascalmpl/library/lang/rascal/tests/concrete/recovery/ToyRascalRecoveryTests.rsc b/src/org/rascalmpl/library/lang/rascal/tests/concrete/recovery/ToyRascalRecoveryTests.rsc index ce291c5d819..fe213811137 100644 --- a/src/org/rascalmpl/library/lang/rascal/tests/concrete/recovery/ToyRascalRecoveryTests.rsc +++ b/src/org/rascalmpl/library/lang/rascal/tests/concrete/recovery/ToyRascalRecoveryTests.rsc @@ -32,7 +32,7 @@ Tree parseToyRascal(str input, bool visualize=false) { println("- "); } - println("Best error: "); + println("Best error: "); } return result; @@ -44,16 +44,16 @@ test bool toyRascalOk() { } test bool toyRascalMissingOpenParen() { - Tree t = parseToyRascal("f){}", visualize=true); - return hasErrors(t) && getErrorText(findBestError(t).val) == ")"; + Tree t = parseToyRascal("f){}", visualize=false); + return hasErrors(t) && getErrorText(findBestErrors(t)[0]) == ")"; } test bool toyRascalMissingCloseParen() { - Tree t = parseToyRascal("f({}", visualize=true); - return hasErrors(t) && getErrorText(findBestError(t).val) == "("; + Tree t = parseToyRascal("f({}", visualize=false); + return hasErrors(t) && getErrorText(findBestErrors(t)[0]) == "("; } test bool toyRascalMissingIfBody() { - Tree t = parseToyRascal("f(){if(1){}}", visualize=true); - return hasErrors(t) && getErrorText(findBestError(t).val) == "}"; + Tree t = parseToyRascal("f(){if(1){}}", visualize=false); + return hasErrors(t) && getErrorText(findBestErrors(t)[0]) == "}"; } \ No newline at end of file