diff --git a/cli/ballerina-cli/build.gradle b/cli/ballerina-cli/build.gradle index 90b35005a054..90d7a04f2c53 100644 --- a/cli/ballerina-cli/build.gradle +++ b/cli/ballerina-cli/build.gradle @@ -34,6 +34,7 @@ configurations { dependencies { + implementation project(':ballerina-parser') implementation project(':ballerina-lang') implementation project(':ballerina-runtime') implementation project(':ballerina-tools-api') diff --git a/cli/ballerina-cli/src/main/java/io/ballerina/cli/task/CompileTask.java b/cli/ballerina-cli/src/main/java/io/ballerina/cli/task/CompileTask.java index b05b681c99fa..09ad06c3ecb7 100644 --- a/cli/ballerina-cli/src/main/java/io/ballerina/cli/task/CompileTask.java +++ b/cli/ballerina-cli/src/main/java/io/ballerina/cli/task/CompileTask.java @@ -18,11 +18,15 @@ package io.ballerina.cli.task; +import io.ballerina.cli.utils.AnnotateDiagnostics; import io.ballerina.cli.utils.BuildTime; import io.ballerina.projects.CodeGeneratorResult; import io.ballerina.projects.CodeModifierResult; +import io.ballerina.projects.Document; import io.ballerina.projects.JBallerinaBackend; import io.ballerina.projects.JvmTarget; +import io.ballerina.projects.ModuleName; +import io.ballerina.projects.Package; import io.ballerina.projects.PackageCompilation; import io.ballerina.projects.PackageResolution; import io.ballerina.projects.Project; @@ -42,8 +46,12 @@ import org.wso2.ballerinalang.util.RepoUtils; import java.io.PrintStream; +import java.nio.file.Paths; import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; import java.util.List; +import java.util.Map; import java.util.Set; import static io.ballerina.cli.launcher.LauncherUtils.createLauncherException; @@ -56,6 +64,7 @@ * @since 2.0.0 */ public class CompileTask implements Task { + private final transient PrintStream out; private final transient PrintStream err; private final boolean compileForBalPack; @@ -208,14 +217,39 @@ public void execute(Project project) { if (project.buildOptions().dumpBuildTime()) { BuildTime.getInstance().codeGenDuration = System.currentTimeMillis() - start; } + // HashSet to keep track of the diagnostics to avoid duplicate diagnostics + Set diagnosticSet = new HashSet<>(); + // HashMap for documents based on filename + Map documentMap = new HashMap<>(); + int terminalWidth = AnnotateDiagnostics.getTerminalWidth(); + boolean colorEnabled = terminalWidth != 0; + Package currentPackage = project.currentPackage(); + currentPackage.moduleIds().forEach(moduleId -> { + currentPackage.module(moduleId).documentIds().forEach(documentId -> { + Document document = currentPackage.module(moduleId).document(documentId); + documentMap.put(getDocumentPath(document.module().moduleName(), document.name()), document); + }); + currentPackage.module(moduleId).testDocumentIds().forEach(documentId -> { + Document document = currentPackage.module(moduleId).document(documentId); + documentMap.put(getDocumentPath(document.module().moduleName(), document.name()), document); + }); + }); // Report package compilation and backend diagnostics diagnostics.addAll(jBallerinaBackend.diagnosticResult().diagnostics(false)); diagnostics.forEach(d -> { if (d.diagnosticInfo().code() == null || (!d.diagnosticInfo().code().equals( ProjectDiagnosticErrorCode.BUILT_WITH_OLDER_SL_UPDATE_DISTRIBUTION.diagnosticId()) && !d.diagnosticInfo().code().startsWith(TOOL_DIAGNOSTIC_CODE_PREFIX))) { - err.println(d); + if (diagnosticSet.add(d.toString())) { + Document document = documentMap.get(d.location().lineRange().fileName()); + if (document != null) { + err.println(AnnotateDiagnostics.renderDiagnostic(d, document, + terminalWidth == 0 ? 999 : terminalWidth, colorEnabled)); + } else { + err.println(AnnotateDiagnostics.renderDiagnostic(d, colorEnabled)); + } + } } }); // Report build tool execution diagnostics @@ -239,6 +273,13 @@ public void execute(Project project) { } } + private String getDocumentPath(ModuleName moduleName, String documentName) { + if (moduleName.isDefaultModuleName()) { + return documentName; + } + return Paths.get("modules", moduleName.moduleNamePart(), documentName).toString(); + } + private boolean isPackCmdForATemplatePkg(Project project) { return compileForBalPack && project.currentPackage().manifest().template(); } diff --git a/cli/ballerina-cli/src/main/java/io/ballerina/cli/utils/AnnotateDiagnostics.java b/cli/ballerina-cli/src/main/java/io/ballerina/cli/utils/AnnotateDiagnostics.java new file mode 100644 index 000000000000..8a8fa34f171d --- /dev/null +++ b/cli/ballerina-cli/src/main/java/io/ballerina/cli/utils/AnnotateDiagnostics.java @@ -0,0 +1,209 @@ +/* + * Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com). + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package io.ballerina.cli.utils; + +import io.ballerina.compiler.internal.diagnostics.StringDiagnosticProperty; +import io.ballerina.projects.Document; +import io.ballerina.projects.internal.PackageDiagnostic; +import io.ballerina.tools.diagnostics.Diagnostic; +import io.ballerina.tools.diagnostics.DiagnosticSeverity; +import io.ballerina.tools.diagnostics.Location; +import io.ballerina.tools.text.TextDocument; +import org.jline.jansi.Ansi; +import org.jline.terminal.TerminalBuilder; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import static io.ballerina.cli.utils.DiagnosticAnnotation.NEW_LINE; +import static io.ballerina.cli.utils.DiagnosticAnnotation.SEVERITY_COLORS; +import static io.ballerina.cli.utils.DiagnosticAnnotation.getColoredString; + +/** + * This class is used to generate diagnostic annotations from diagnostics. + * + * @since 2201.9.0 + */ +public class AnnotateDiagnostics { + + private static final String COMPILER_ERROR_PREFIX = "BCE"; + private static final int SYNTAX_ERROR_CODE_THRESHOLD = 1000; + private static final int MISSING_TOKEN_KEYWORD_CODE_THRESHOLD = 400; + private static final int INVALID_TOKEN_CODE = 600; + + public static Ansi renderDiagnostic(Diagnostic diagnostic, Document document, int terminalWidth, + boolean colorEnabled) { + + String diagnosticCode = diagnostic.diagnosticInfo().code(); + if (diagnostic instanceof PackageDiagnostic && diagnosticCode != null && + diagnosticCode.startsWith(COMPILER_ERROR_PREFIX)) { + int diagnosticCodeNumber = Integer.parseInt(diagnosticCode.substring(3)); + if (diagnosticCodeNumber < SYNTAX_ERROR_CODE_THRESHOLD) { + PackageDiagnostic packageDiagnostic = (PackageDiagnostic) diagnostic; + return Ansi.ansi() + .render(diagnosticToString(diagnostic, colorEnabled) + NEW_LINE + getSyntaxDiagnosticAnnotation( + document, packageDiagnostic, diagnosticCodeNumber, terminalWidth, colorEnabled)); + } + } + DiagnosticAnnotation diagnosticAnnotation = getDiagnosticLineFromSyntaxAPI( + document, diagnostic.location(), diagnostic.diagnosticInfo().severity(), terminalWidth, colorEnabled); + return Ansi.ansi().render(diagnosticToString(diagnostic, colorEnabled) + NEW_LINE + diagnosticAnnotation); + + } + + public static int getTerminalWidth() { + try { + return TerminalBuilder.builder().dumb(true).build().getWidth(); + } catch (IOException e) { + return 999; + } + } + + public static Ansi renderDiagnostic(Diagnostic diagnostic, boolean colorEnabled) { + return Ansi.ansi().render(diagnosticToString(diagnostic, colorEnabled)); + } + + private static String diagnosticToString(Diagnostic diagnostic, boolean colorEnabled) { + DiagnosticSeverity severity = diagnostic.diagnosticInfo().severity(); + String severityString = severity.toString(); + String color = SEVERITY_COLORS.get(severity); + String message = diagnostic.toString().substring(severityString.length()); + String code = diagnostic.diagnosticInfo().code(); + boolean isMultiline = diagnostic.message().contains(NEW_LINE); + String formatString = getColoredString("%s", color, colorEnabled) + "%s" + + (code != null ? (isMultiline ? NEW_LINE + "(%s)" : " (%s)") : ""); + + return String.format(formatString, severityString, message, code != null ? code : ""); + } + + private static DiagnosticAnnotation getDiagnosticLineFromSyntaxAPI(Document document, Location location, + DiagnosticSeverity severity, int terminalWidth, + boolean colorEnabled) { + TextDocument textDocument = document.textDocument(); + int startOffset = location.lineRange().startLine().offset(); + int endOffset = location.lineRange().endLine().offset(); + int startLine = location.lineRange().startLine().line(); + int endLine = location.lineRange().endLine().line(); + boolean isMultiline = startLine != endLine; + int length = isMultiline ? textDocument.line(startLine).length() - startOffset : endOffset - startOffset; + + return new DiagnosticAnnotation( + getLines(textDocument, startLine, endLine), + startOffset, + length == 0 ? 1 : length, + isMultiline, + endOffset, + startLine + 1, + severity, + DiagnosticAnnotation.DiagnosticAnnotationType.REGULAR, + terminalWidth, colorEnabled); + } + + private static DiagnosticAnnotation getSyntaxDiagnosticAnnotation(Document document, + PackageDiagnostic packageDiagnostic, + int diagnosticCode, int terminalWidth, + boolean colorEnabled) { + TextDocument textDocument = document.textDocument(); + Location location = packageDiagnostic.location(); + int startLine = location.lineRange().startLine().line(); + int startOffset = location.lineRange().startLine().offset(); + int padding = 0; + int endLine = location.lineRange().endLine().line(); + int endOffset = location.lineRange().endLine().offset(); + String color = SEVERITY_COLORS.get(DiagnosticSeverity.ERROR); + + if (diagnosticCode < MISSING_TOKEN_KEYWORD_CODE_THRESHOLD) { + StringDiagnosticProperty strProperty = (StringDiagnosticProperty) packageDiagnostic.properties().get(0); + String lineString = textDocument.line(startLine).text(); + String missingTokenString = getColoredString(strProperty.value(), color, colorEnabled); + if (startOffset < lineString.length() && lineString.charAt(startOffset) != ' ') { + missingTokenString = missingTokenString + " "; + } + if (startOffset > 0 && lineString.charAt(startOffset - 1) != ' ') { + missingTokenString = " " + missingTokenString; + padding++; + } + + String lineWithMissingToken = lineString.substring(0, startOffset) + missingTokenString + + lineString.substring(startOffset); + List lines = new ArrayList<>(); + lines.add(lineWithMissingToken); + return new DiagnosticAnnotation( + lines, + padding + startOffset, + strProperty.value().length(), + false, + 0, + startLine + 1, + DiagnosticSeverity.ERROR, + DiagnosticAnnotation.DiagnosticAnnotationType.MISSING, + terminalWidth, colorEnabled); + } + + if (diagnosticCode == INVALID_TOKEN_CODE) { + List lines = getLines(textDocument, startLine, endLine); + if (lines.size() > 1) { + String annotatedLine1 = lines.get(0).substring(0, startOffset) + + getColoredString(lines.get(0).substring(startOffset), color, colorEnabled); + String annotatedLine2 = + getColoredString(lines.get(lines.size() - 1).substring(0, endOffset), color, colorEnabled) + + lines.get(lines.size() - 1).substring(endOffset); + lines.set(0, annotatedLine1); + lines.set(lines.size() - 1, annotatedLine2); + return new DiagnosticAnnotation( + lines, + startOffset, + textDocument.line(startLine).length() - location.lineRange().startLine().offset(), + true, + endOffset, + startLine + 1, + DiagnosticSeverity.ERROR, + DiagnosticAnnotation.DiagnosticAnnotationType.INVALID, + terminalWidth, colorEnabled); + } + String line = lines.get(0); + String annotatedLine = line.substring(0, startOffset) + + getColoredString(line.substring(startOffset, endOffset), color, colorEnabled) + + line.substring(endOffset); + lines.set(0, annotatedLine); + return new DiagnosticAnnotation( + lines, + startOffset, + endOffset - startOffset, + false, + 0, + startLine + 1, + DiagnosticSeverity.ERROR, + DiagnosticAnnotation.DiagnosticAnnotationType.INVALID, + terminalWidth, colorEnabled); + } + return getDiagnosticLineFromSyntaxAPI(document, location, DiagnosticSeverity.ERROR, terminalWidth, + colorEnabled); + } + + private static List getLines(TextDocument textDocument, int start, int end) { + List lines = new ArrayList<>(); + for (int i = start; i <= end; i++) { + lines.add(textDocument.line(i).text()); + } + return lines; + } + +} diff --git a/cli/ballerina-cli/src/main/java/io/ballerina/cli/utils/DiagnosticAnnotation.java b/cli/ballerina-cli/src/main/java/io/ballerina/cli/utils/DiagnosticAnnotation.java new file mode 100644 index 000000000000..79d13702209a --- /dev/null +++ b/cli/ballerina-cli/src/main/java/io/ballerina/cli/utils/DiagnosticAnnotation.java @@ -0,0 +1,199 @@ +/* + * Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com). + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package io.ballerina.cli.utils; + +import io.ballerina.tools.diagnostics.DiagnosticSeverity; + +import java.util.List; +import java.util.Map; + +/** + * Represents a diagnostic annotation that is used to annotate the source code with diagnostics. + * + * @since 2201.9.0 + */ +public class DiagnosticAnnotation { + + public static final String NEW_LINE = System.lineSeparator(); + public static final String JANSI_ANNOTATOR = "@|"; + public static final String JANSI_RESET = "|@"; + public static final Map SEVERITY_COLORS; + + static { + SEVERITY_COLORS = + Map.of(DiagnosticSeverity.INTERNAL, "blue", DiagnosticSeverity.HINT, "blue", DiagnosticSeverity.INFO, + "blue", DiagnosticSeverity.WARNING, "yellow", DiagnosticSeverity.ERROR, "red"); + } + + public enum DiagnosticAnnotationType { + REGULAR, + MISSING, + INVALID + } + + private final List lines; + private final int start; + private final int length; + private final boolean isMultiline; + private final int endOffset; + private final int startLineNumber; + private final int terminalWidth; + private final DiagnosticSeverity severity; + private final DiagnosticAnnotationType type; + private final boolean colorEnabled; + + public DiagnosticAnnotation(List lines, int start, int length, boolean isMultiline, int endOffset, + int startLineNumber, DiagnosticSeverity severity, DiagnosticAnnotationType type, + int terminalWidth, boolean colorEnabled) { + this.start = start + 3 * countTabChars(lines.get(0), start); + lines.set(0, replaceTabs(lines.get(0), start)); + this.lines = lines; + this.length = length; + this.endOffset = endOffset; + this.isMultiline = isMultiline; + this.startLineNumber = startLineNumber; + this.severity = severity; + this.type = type; + this.terminalWidth = terminalWidth; + this.colorEnabled = colorEnabled; + } + + public String toString() { + if (!isMultiline) { + int digitsNum = (int) Math.log10(startLineNumber) + 1; + String padding = " ".repeat(digitsNum + 1); + int maxLength = terminalWidth - digitsNum - 3; + TruncateResult result = truncate(lines.get(0), maxLength, start, length); + return padding + "|" + NEW_LINE + + String.format("%" + digitsNum + "d ", startLineNumber) + "| " + result.line + NEW_LINE + + padding + "| " + + getUnderline(result.diagnosticStart, result.diagnosticLength, this.severity, this.type, + colorEnabled) + NEW_LINE; + + } + + int maxLineLength = Math.max(lines.get(0).length(), lines.get(lines.size() - 1).length()); + int endDigitsNum = (int) Math.log10(startLineNumber + lines.size() - 1) + 1; + String padding; + String paddingWithColon; + if (endDigitsNum == 1) { + padding = " ".repeat(endDigitsNum + 1); + paddingWithColon = ":" + " ".repeat(endDigitsNum); + } else { + padding = " ".repeat(endDigitsNum + 1); + paddingWithColon = " :" + " ".repeat(endDigitsNum - 1); + } + int tabsInLastLine = countTabChars(lines.get(lines.size() - 1), this.endOffset); + lines.set(lines.size() - 1, replaceTabs(lines.get(lines.size() - 1), this.endOffset)); + int maxLength = terminalWidth - endDigitsNum - 3; + TruncateResult result1 = truncate(lines.get(0), maxLength, start, length); + TruncateResult result2 = truncate(lines.get(lines.size() - 1), maxLength, 0, + endOffset + 3 * tabsInLastLine); + + if (lines.size() == 2) { + return padding + "|" + NEW_LINE + + String.format("%" + endDigitsNum + "d ", startLineNumber) + "| " + result1.line + NEW_LINE + + padding + "| " + + getUnderline(result1.diagnosticStart, result1.diagnosticLength, this.severity, this.type, + colorEnabled) + NEW_LINE + + String.format("%" + endDigitsNum + "d ", startLineNumber + 1) + "| " + result2.line + NEW_LINE + + padding + "| " + + getUnderline(0, result2.diagnosticLength, this.severity, this.type, colorEnabled) + NEW_LINE + + padding + "|" + NEW_LINE; + } + String padding2 = " ".repeat(Math.min(terminalWidth, maxLineLength) / 2); + return padding + "|" + NEW_LINE + + String.format("%" + endDigitsNum + "d ", startLineNumber) + "| " + result1.line + NEW_LINE + + paddingWithColon + "| " + + getUnderline(result1.diagnosticStart, result1.diagnosticLength, this.severity, this.type, + colorEnabled) + NEW_LINE + + paddingWithColon + "| " + padding2 + ":" + NEW_LINE + + paddingWithColon + "| " + padding2 + ":" + NEW_LINE + + String.format("%" + endDigitsNum + "d ", startLineNumber + lines.size() - 1) + "| " + + result2.line + NEW_LINE + + padding + "| " + getUnderline(0, result2.diagnosticLength, this.severity, this.type, colorEnabled) + + NEW_LINE + + padding + "|" + NEW_LINE; + + } + + public static String getColoredString(String message, String color, boolean colorEnabled) { + return colorEnabled ? JANSI_ANNOTATOR + color + " " + message + JANSI_RESET : message; + } + + private static String getUnderline(int offset, int length, DiagnosticSeverity severity, + DiagnosticAnnotationType type, boolean colorEnabled) { + String symbol = "^"; + if (type == DiagnosticAnnotationType.MISSING) { + symbol = "+"; + } + return " ".repeat(offset) + + getColoredString(symbol.repeat(length), SEVERITY_COLORS.get(severity), colorEnabled); + } + + private static int countTabChars(String line, int end) { + int count = 0; + for (int i = 0; i < end; i++) { + if (line.charAt(i) == '\t') { + count++; + } + } + return count; + } + + private static TruncateResult truncate(String line, int maxLength, int diagnosticStart, int diagnosticLength) { + if (line.length() < maxLength - 3) { + return new TruncateResult(line, diagnosticStart, diagnosticLength); + } + if (diagnosticStart + diagnosticLength < maxLength - 3) { + return new TruncateResult(line.substring(0, maxLength - 3) + "...", diagnosticStart, diagnosticLength); + } + int diagnosticMid = diagnosticStart + diagnosticLength / 2; + int stepsToMoveWindow = Math.max(0, diagnosticMid - maxLength / 2); + int border = Math.min(line.length() - 1, stepsToMoveWindow + maxLength - 6); + int newDiagnosticStart = Math.max(0, diagnosticStart - stepsToMoveWindow + 3); + int newDiagnosticLength = Math.min(diagnosticLength, maxLength - newDiagnosticStart - 3); + return new TruncateResult("..." + line.substring(stepsToMoveWindow, Math.max(stepsToMoveWindow, border)) + + "...", newDiagnosticStart, Math.max(0, newDiagnosticLength)); + + } + + private static String replaceTabs(String line, int end) { + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < end; i++) { + if (line.charAt(i) == '\t') { + sb.append(" "); + } else { + sb.append(line.charAt(i)); + } + } + return sb + line.substring(end); + } + + /** + * Represents a result of truncating a line. + * + * @param line The truncated line + * @param diagnosticStart The start of the diagnostic in the truncated line + * @param diagnosticLength The length of the diagnostic in the truncated line + */ + private record TruncateResult(String line, int diagnosticStart, int diagnosticLength) { + + } +} diff --git a/cli/ballerina-cli/src/main/java/module-info.java b/cli/ballerina-cli/src/main/java/module-info.java index 40fddd6af9aa..6ce536b96bde 100644 --- a/cli/ballerina-cli/src/main/java/module-info.java +++ b/cli/ballerina-cli/src/main/java/module-info.java @@ -7,6 +7,7 @@ requires io.ballerina.runtime; requires io.ballerina.lang; + requires io.ballerina.parser; requires io.ballerina.tools.api; requires io.ballerina.testerina.runtime; requires io.ballerina.testerina.core; diff --git a/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/unix/build-bal-with-absolute-jar-path.txt b/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/unix/build-bal-with-absolute-jar-path.txt index 10f97cb46a11..2c2de9e12b96 100644 --- a/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/unix/build-bal-with-absolute-jar-path.txt +++ b/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/unix/build-bal-with-absolute-jar-path.txt @@ -1,6 +1,6 @@ Compiling source hello_world.bal -WARNING [:(1:1,1:1)] Skipped adding the generated source file with prefix "dummyfunc". Source file generation is not supported with standalone bal files +WARNING [:(1:1,1:1)] Skipped adding the generated source file with prefix "dummyfunc". Source file generation is not supported with standalone bal files (BCE5401) Generating executable diff --git a/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/unix/build-bar-bal.txt b/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/unix/build-bar-bal.txt index 55fbccbf4a4a..4e90569f1e79 100644 --- a/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/unix/build-bar-bal.txt +++ b/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/unix/build-bar-bal.txt @@ -1,6 +1,6 @@ Compiling source hello_world.bal -WARNING [:(1:1,1:1)] Skipped adding the generated source file with prefix "dummyfunc". Source file generation is not supported with standalone bal files +WARNING [:(1:1,1:1)] Skipped adding the generated source file with prefix "dummyfunc". Source file generation is not supported with standalone bal files (BCE5401) Generating executable bar.jar diff --git a/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/unix/build-foo-bal.txt b/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/unix/build-foo-bal.txt index 076d9df06c38..243a73fc432e 100644 --- a/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/unix/build-foo-bal.txt +++ b/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/unix/build-foo-bal.txt @@ -1,6 +1,6 @@ Compiling source hello_world.bal -WARNING [:(1:1,1:1)] Skipped adding the generated source file with prefix "dummyfunc". Source file generation is not supported with standalone bal files +WARNING [:(1:1,1:1)] Skipped adding the generated source file with prefix "dummyfunc". Source file generation is not supported with standalone bal files (BCE5401) Generating executable foo.jar diff --git a/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/unix/build-hello-world-bal-with-build-options.txt b/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/unix/build-hello-world-bal-with-build-options.txt index bf62e658690d..99fdcb2cdb49 100644 --- a/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/unix/build-hello-world-bal-with-build-options.txt +++ b/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/unix/build-hello-world-bal-with-build-options.txt @@ -1,6 +1,6 @@ Compiling source hello_world.bal -WARNING [:(1:1,1:1)] Skipped adding the generated source file with prefix "dummyfunc". Source file generation is not supported with standalone bal files +WARNING [:(1:1,1:1)] Skipped adding the generated source file with prefix "dummyfunc". Source file generation is not supported with standalone bal files (BCE5401) Generating executable hello_world.jar diff --git a/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/unix/build-hello-world-bal.txt b/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/unix/build-hello-world-bal.txt index bf62e658690d..99fdcb2cdb49 100644 --- a/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/unix/build-hello-world-bal.txt +++ b/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/unix/build-hello-world-bal.txt @@ -1,6 +1,6 @@ Compiling source hello_world.bal -WARNING [:(1:1,1:1)] Skipped adding the generated source file with prefix "dummyfunc". Source file generation is not supported with standalone bal files +WARNING [:(1:1,1:1)] Skipped adding the generated source file with prefix "dummyfunc". Source file generation is not supported with standalone bal files (BCE5401) Generating executable hello_world.jar diff --git a/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/unix/build-project-with-empty-ballerina-toml.txt b/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/unix/build-project-with-empty-ballerina-toml.txt index ed846965f54f..b91445c7aa0b 100644 --- a/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/unix/build-project-with-empty-ballerina-toml.txt +++ b/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/unix/build-project-with-empty-ballerina-toml.txt @@ -5,6 +5,7 @@ WARNING [Ballerina.toml:(1:1,1:1)] missing table '[package]' in 'Ballerina.toml' org = "john" name = "validProjectWithEmptyBallerinaToml" version = "0.1.0" +(BCE5001) Generating executable target/bin/validProjectWithEmptyBallerinaToml.jar diff --git a/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/unix/build-syntax-err-bal.txt b/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/unix/build-syntax-err-bal.txt index 242b9d8033e4..f0098abf2f41 100644 --- a/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/unix/build-syntax-err-bal.txt +++ b/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/unix/build-syntax-err-bal.txt @@ -1,4 +1,8 @@ Compiling source hello_world.bal -WARNING [:(1:1,1:1)] Skipped adding the generated source file with prefix "dummyfunc". Source file generation is not supported with standalone bal files -ERROR [hello_world.bal:(2:3,2:4)] invalid token ';' +WARNING [:(1:1,1:1)] Skipped adding the generated source file with prefix "dummyfunc". Source file generation is not supported with standalone bal files (BCE5401) +ERROR [hello_world.bal:(2:3,2:4)] invalid token ';' (BCE0600) + | +2 | };; + | ^ + diff --git a/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/unix/build-syntax-err-package.txt b/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/unix/build-syntax-err-package.txt index 748e446c1e67..a69eff61ff8b 100644 --- a/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/unix/build-syntax-err-package.txt +++ b/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/unix/build-syntax-err-package.txt @@ -1,3 +1,7 @@ Compiling source foo/winery:0.1.0 -ERROR [hello_world.bal:(2:3,2:4)] invalid token ';' +ERROR [hello_world.bal:(2:3,2:4)] invalid token ';' (BCE0600) + | +2 | };; + | ^ + diff --git a/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/unix/dump-build-time-standalone.txt b/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/unix/dump-build-time-standalone.txt index 2c5b1c6c542c..8d71bbfcda15 100644 --- a/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/unix/dump-build-time-standalone.txt +++ b/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/unix/dump-build-time-standalone.txt @@ -1,6 +1,6 @@ Compiling source hello_world.bal -WARNING [:(1:1,1:1)] Skipped adding the generated source file with prefix "dummyfunc". Source file generation is not supported with standalone bal files +WARNING [:(1:1,1:1)] Skipped adding the generated source file with prefix "dummyfunc". Source file generation is not supported with standalone bal files (BCE5401) Generating executable hello_world.jar diff --git a/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/unix/run-bal.txt b/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/unix/run-bal.txt index 7418db727411..7298e53ca9ca 100644 --- a/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/unix/run-bal.txt +++ b/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/unix/run-bal.txt @@ -1,7 +1,11 @@ Compiling source file_create.bal -WARNING [:(1:1,1:1)] Skipped adding the generated source file with prefix "dummyfunc". Source file generation is not supported with standalone bal files -WARNING [file_create.bal:(6:4,6:58)] unused variable 'isSuccess' +WARNING [:(1:1,1:1)] Skipped adding the generated source file with prefix "dummyfunc". Source file generation is not supported with standalone bal files (BCE5401) +WARNING [file_create.bal:(6:4,6:58)] unused variable 'isSuccess' (BCE20403) + | +6 | boolean|error isSuccess = createNewFileInternal(file); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + Running executable diff --git a/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/windows/build-bal-with-absolute-jar-path.txt b/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/windows/build-bal-with-absolute-jar-path.txt index 10f97cb46a11..2c2de9e12b96 100644 --- a/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/windows/build-bal-with-absolute-jar-path.txt +++ b/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/windows/build-bal-with-absolute-jar-path.txt @@ -1,6 +1,6 @@ Compiling source hello_world.bal -WARNING [:(1:1,1:1)] Skipped adding the generated source file with prefix "dummyfunc". Source file generation is not supported with standalone bal files +WARNING [:(1:1,1:1)] Skipped adding the generated source file with prefix "dummyfunc". Source file generation is not supported with standalone bal files (BCE5401) Generating executable diff --git a/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/windows/build-bar-bal.txt b/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/windows/build-bar-bal.txt index 55fbccbf4a4a..4e90569f1e79 100644 --- a/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/windows/build-bar-bal.txt +++ b/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/windows/build-bar-bal.txt @@ -1,6 +1,6 @@ Compiling source hello_world.bal -WARNING [:(1:1,1:1)] Skipped adding the generated source file with prefix "dummyfunc". Source file generation is not supported with standalone bal files +WARNING [:(1:1,1:1)] Skipped adding the generated source file with prefix "dummyfunc". Source file generation is not supported with standalone bal files (BCE5401) Generating executable bar.jar diff --git a/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/windows/build-foo-bal.txt b/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/windows/build-foo-bal.txt index 076d9df06c38..243a73fc432e 100644 --- a/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/windows/build-foo-bal.txt +++ b/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/windows/build-foo-bal.txt @@ -1,6 +1,6 @@ Compiling source hello_world.bal -WARNING [:(1:1,1:1)] Skipped adding the generated source file with prefix "dummyfunc". Source file generation is not supported with standalone bal files +WARNING [:(1:1,1:1)] Skipped adding the generated source file with prefix "dummyfunc". Source file generation is not supported with standalone bal files (BCE5401) Generating executable foo.jar diff --git a/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/windows/build-hello-world-bal-with-build-options.txt b/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/windows/build-hello-world-bal-with-build-options.txt index bf62e658690d..99fdcb2cdb49 100644 --- a/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/windows/build-hello-world-bal-with-build-options.txt +++ b/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/windows/build-hello-world-bal-with-build-options.txt @@ -1,6 +1,6 @@ Compiling source hello_world.bal -WARNING [:(1:1,1:1)] Skipped adding the generated source file with prefix "dummyfunc". Source file generation is not supported with standalone bal files +WARNING [:(1:1,1:1)] Skipped adding the generated source file with prefix "dummyfunc". Source file generation is not supported with standalone bal files (BCE5401) Generating executable hello_world.jar diff --git a/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/windows/build-hello-world-bal.txt b/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/windows/build-hello-world-bal.txt index bf62e658690d..99fdcb2cdb49 100644 --- a/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/windows/build-hello-world-bal.txt +++ b/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/windows/build-hello-world-bal.txt @@ -1,6 +1,6 @@ Compiling source hello_world.bal -WARNING [:(1:1,1:1)] Skipped adding the generated source file with prefix "dummyfunc". Source file generation is not supported with standalone bal files +WARNING [:(1:1,1:1)] Skipped adding the generated source file with prefix "dummyfunc". Source file generation is not supported with standalone bal files (BCE5401) Generating executable hello_world.jar diff --git a/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/windows/build-project-with-empty-ballerina-toml.txt b/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/windows/build-project-with-empty-ballerina-toml.txt index 944bda503633..2eb7ac0fbc21 100644 --- a/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/windows/build-project-with-empty-ballerina-toml.txt +++ b/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/windows/build-project-with-empty-ballerina-toml.txt @@ -5,6 +5,7 @@ WARNING [Ballerina.toml:(1:1,1:1)] missing table '[package]' in 'Ballerina.toml' org = "john" name = "validProjectWithEmptyBallerinaToml" version = "0.1.0" +(BCE5001) Generating executable target\bin\validProjectWithEmptyBallerinaToml.jar diff --git a/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/windows/build-syntax-err-bal.txt b/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/windows/build-syntax-err-bal.txt index 242b9d8033e4..f0098abf2f41 100644 --- a/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/windows/build-syntax-err-bal.txt +++ b/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/windows/build-syntax-err-bal.txt @@ -1,4 +1,8 @@ Compiling source hello_world.bal -WARNING [:(1:1,1:1)] Skipped adding the generated source file with prefix "dummyfunc". Source file generation is not supported with standalone bal files -ERROR [hello_world.bal:(2:3,2:4)] invalid token ';' +WARNING [:(1:1,1:1)] Skipped adding the generated source file with prefix "dummyfunc". Source file generation is not supported with standalone bal files (BCE5401) +ERROR [hello_world.bal:(2:3,2:4)] invalid token ';' (BCE0600) + | +2 | };; + | ^ + diff --git a/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/windows/build-syntax-err-package.txt b/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/windows/build-syntax-err-package.txt index 748e446c1e67..a69eff61ff8b 100644 --- a/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/windows/build-syntax-err-package.txt +++ b/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/windows/build-syntax-err-package.txt @@ -1,3 +1,7 @@ Compiling source foo/winery:0.1.0 -ERROR [hello_world.bal:(2:3,2:4)] invalid token ';' +ERROR [hello_world.bal:(2:3,2:4)] invalid token ';' (BCE0600) + | +2 | };; + | ^ + diff --git a/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/windows/dump-build-time-standalone.txt b/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/windows/dump-build-time-standalone.txt index 2c5b1c6c542c..8d71bbfcda15 100644 --- a/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/windows/dump-build-time-standalone.txt +++ b/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/windows/dump-build-time-standalone.txt @@ -1,6 +1,6 @@ Compiling source hello_world.bal -WARNING [:(1:1,1:1)] Skipped adding the generated source file with prefix "dummyfunc". Source file generation is not supported with standalone bal files +WARNING [:(1:1,1:1)] Skipped adding the generated source file with prefix "dummyfunc". Source file generation is not supported with standalone bal files (BCE5401) Generating executable hello_world.jar diff --git a/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/windows/run-bal.txt b/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/windows/run-bal.txt index 7418db727411..7298e53ca9ca 100644 --- a/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/windows/run-bal.txt +++ b/cli/ballerina-cli/src/test/resources/test-resources/command-outputs/windows/run-bal.txt @@ -1,7 +1,11 @@ Compiling source file_create.bal -WARNING [:(1:1,1:1)] Skipped adding the generated source file with prefix "dummyfunc". Source file generation is not supported with standalone bal files -WARNING [file_create.bal:(6:4,6:58)] unused variable 'isSuccess' +WARNING [:(1:1,1:1)] Skipped adding the generated source file with prefix "dummyfunc". Source file generation is not supported with standalone bal files (BCE5401) +WARNING [file_create.bal:(6:4,6:58)] unused variable 'isSuccess' (BCE20403) + | +6 | boolean|error isSuccess = createNewFileInternal(file); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + Running executable diff --git a/compiler/ballerina-lang/src/main/java/module-info.java b/compiler/ballerina-lang/src/main/java/module-info.java index 632bc7fc09c7..aad3ecf0448e 100644 --- a/compiler/ballerina-lang/src/main/java/module-info.java +++ b/compiler/ballerina-lang/src/main/java/module-info.java @@ -76,7 +76,7 @@ exports io.ballerina.projects.plugins.codeaction; exports io.ballerina.projects.internal.model; // TODO Remove this exports exports io.ballerina.projects.internal.environment; // TODO Remove these exports - exports io.ballerina.projects.internal to io.ballerina.cli; + exports io.ballerina.projects.internal to io.ballerina.cli, io.ballerina.shell.cli; exports io.ballerina.projects.internal.bala; exports io.ballerina.projects.internal.configschema to org.ballerinalang.config.schema.generator, io.ballerina.language.server.core; diff --git a/compiler/ballerina-parser/src/main/java/io/ballerina/compiler/internal/diagnostics/StringDiagnosticProperty.java b/compiler/ballerina-parser/src/main/java/io/ballerina/compiler/internal/diagnostics/StringDiagnosticProperty.java new file mode 100644 index 000000000000..1ec0727a85b0 --- /dev/null +++ b/compiler/ballerina-parser/src/main/java/io/ballerina/compiler/internal/diagnostics/StringDiagnosticProperty.java @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com). + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package io.ballerina.compiler.internal.diagnostics; + +import io.ballerina.tools.diagnostics.DiagnosticProperty; +import io.ballerina.tools.diagnostics.DiagnosticPropertyKind; + +import java.util.Arrays; + +/** + * Represents a string diagnostic property. + * + * @since 2201.9.0 + */ +public class StringDiagnosticProperty implements DiagnosticProperty { + + private final DiagnosticPropertyKind kind; + private final String value; + + public StringDiagnosticProperty(String value) { + this.kind = DiagnosticPropertyKind.STRING; + this.value = value; + } + + @Override + public DiagnosticPropertyKind kind() { + return kind; + } + + @Override + public String value() { + return value; + } + + @Override + public int hashCode() { + return Arrays.hashCode(new int[]{kind.hashCode(), value.hashCode()}); + } + + @Override + public boolean equals(Object obj) { + if (obj instanceof StringDiagnosticProperty prop) { + return this.value.equals(prop.value) && this.kind.equals(prop.kind); + } + return false; + } +} diff --git a/compiler/ballerina-parser/src/main/java/io/ballerina/compiler/internal/diagnostics/SyntaxDiagnostic.java b/compiler/ballerina-parser/src/main/java/io/ballerina/compiler/internal/diagnostics/SyntaxDiagnostic.java index 1ae9489efe9b..ac75ed6bf8e8 100644 --- a/compiler/ballerina-parser/src/main/java/io/ballerina/compiler/internal/diagnostics/SyntaxDiagnostic.java +++ b/compiler/ballerina-parser/src/main/java/io/ballerina/compiler/internal/diagnostics/SyntaxDiagnostic.java @@ -24,6 +24,7 @@ import io.ballerina.tools.diagnostics.DiagnosticInfo; import io.ballerina.tools.diagnostics.DiagnosticProperty; +import java.util.ArrayList; import java.util.List; /** @@ -32,6 +33,7 @@ * @since 2.0.0 */ public class SyntaxDiagnostic extends Diagnostic { + private final STNodeDiagnostic nodeDiagnostic; private final NodeLocation location; private DiagnosticInfo diagnosticInfo; @@ -74,7 +76,13 @@ public String message() { @Override public List> properties() { - return null; + Object[] args = this.nodeDiagnostic.args(); + List> diagArgs = new ArrayList<>(); + for (Object arg : args) { + DiagnosticProperty dArg = new StringDiagnosticProperty((String) arg); + diagArgs.add(dArg); + } + return diagArgs; } @Override diff --git a/compiler/ballerina-parser/src/main/java/io/ballerina/compiler/internal/parser/SyntaxErrors.java b/compiler/ballerina-parser/src/main/java/io/ballerina/compiler/internal/parser/SyntaxErrors.java index 16bea2db962f..18d85fd1da15 100644 --- a/compiler/ballerina-parser/src/main/java/io/ballerina/compiler/internal/parser/SyntaxErrors.java +++ b/compiler/ballerina-parser/src/main/java/io/ballerina/compiler/internal/parser/SyntaxErrors.java @@ -93,7 +93,7 @@ public static STToken createMissingRegExpTokenWithDiagnostics(SyntaxKind expecte public static STToken createMissingTokenWithDiagnostics(SyntaxKind expectedKind, DiagnosticCode diagnosticCode) { List diagnosticList = new ArrayList<>(); - diagnosticList.add(createDiagnostic(diagnosticCode)); + diagnosticList.add(createDiagnostic(diagnosticCode, expectedKind.stringValue())); return STNodeFactory.createMissingToken(expectedKind, diagnosticList); } diff --git a/compiler/ballerina-parser/src/main/java/module-info.java b/compiler/ballerina-parser/src/main/java/module-info.java index 2d0455b39c5f..8b4751616496 100644 --- a/compiler/ballerina-parser/src/main/java/module-info.java +++ b/compiler/ballerina-parser/src/main/java/module-info.java @@ -2,4 +2,5 @@ requires io.ballerina.tools.api; exports io.ballerina.compiler.syntax.tree; exports io.ballerina.compiler.internal.parser.tree to io.ballerina.lang; + exports io.ballerina.compiler.internal.diagnostics; } diff --git a/gradle.properties b/gradle.properties index 07a9f86371d6..9c92e38e6cce 100644 --- a/gradle.properties +++ b/gradle.properties @@ -92,7 +92,7 @@ jetbrainsKotlinStdlibVersion=1.6.0 jetbrainsKotlinStdlibCommonVersion=1.6.0 junitVersion=4.13.2 jknackHandlebarsVersion=4.0.6 -jlineVersion=3.23.0 +jlineVersion=3.25.0 jvnetMimepullVersion=1.9.11 kaitaiGradlePluginVersion=0.1.1 kaitaiStructRuntimeVersion=0.9 diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/BasicCasesTest-testAnnotationAccess.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/BasicCasesTest-testAnnotationAccess.txt index 02c08213122d..4ef4fde9bff1 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/BasicCasesTest-testAnnotationAccess.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/BasicCasesTest-testAnnotationAccess.txt @@ -1,6 +1,10 @@ Compiling source intg_tests/annotation_access:0.0.0 -HINT [tests/main_test.bal:(73:5,73:5)] concurrent calls will not be made to this method since the service is not an 'isolated' service +HINT [tests/main_test.bal:(73:5,73:5)] concurrent calls will not be made to this method since the service is not an 'isolated' service (BCH2004) + | +73 | remote function xyz() { + | ^ + ballerina: Oh no, something really went wrong. Bad. Sad. We appreciate it if you can report the code that broke Ballerina in diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/BasicCasesTest-testAssertBehavioralTypes.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/BasicCasesTest-testAssertBehavioralTypes.txt index e73dcf8230f0..2f7bde684cd4 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/BasicCasesTest-testAssertBehavioralTypes.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/BasicCasesTest-testAssertBehavioralTypes.txt @@ -1,8 +1,20 @@ Compiling source intg_tests/assertions:0.0.0 -WARNING [tests/assert-test-behavioral-types.bal:(22:5,22:29)] undocumented field 'name' -WARNING [tests/assert-test-behavioral-types.bal:(23:5,23:24)] undocumented field 'age' -WARNING [tests/assert-test-behavioral-types.bal:(24:5,24:32)] undocumented field 'parent' +WARNING [tests/assert-test-behavioral-types.bal:(22:5,22:29)] undocumented field 'name' (BCE20004) + | +22 | public string name = ""; + | ^^^^^^^^^^^^^^^^^^^^^^^^ + +WARNING [tests/assert-test-behavioral-types.bal:(23:5,23:24)] undocumented field 'age' (BCE20004) + | +23 | public int age = 0; + | ^^^^^^^^^^^^^^^^^^^ + +WARNING [tests/assert-test-behavioral-types.bal:(24:5,24:32)] undocumented field 'parent' (BCE20004) + | +24 | public Person? parent = (); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + Running Tests with Coverage diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/BasicCasesTest-testAssertDiffError.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/BasicCasesTest-testAssertDiffError.txt index cf58c29748bb..a13c41944ed6 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/BasicCasesTest-testAssertDiffError.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/BasicCasesTest-testAssertDiffError.txt @@ -1,8 +1,20 @@ Compiling source intg_tests/assertions:0.0.0 -WARNING [tests/assertions-diff-error-messages.bal:(22:5,22:29)] undocumented field 'name' -WARNING [tests/assertions-diff-error-messages.bal:(23:5,23:24)] undocumented field 'age' -WARNING [tests/assertions-diff-error-messages.bal:(24:5,24:32)] undocumented field 'parent' +WARNING [tests/assertions-diff-error-messages.bal:(22:5,22:29)] undocumented field 'name' (BCE20004) + | +22 | public string name = ""; + | ^^^^^^^^^^^^^^^^^^^^^^^^ + +WARNING [tests/assertions-diff-error-messages.bal:(23:5,23:24)] undocumented field 'age' (BCE20004) + | +23 | public int age = 0; + | ^^^^^^^^^^^^^^^^^^^ + +WARNING [tests/assertions-diff-error-messages.bal:(24:5,24:32)] undocumented field 'parent' (BCE20004) + | +24 | public Person? parent = (); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + Running Tests with Coverage diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/BasicCasesTest-testAssertStructuralTypes.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/BasicCasesTest-testAssertStructuralTypes.txt index d9eba46174f4..9de8839a8f65 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/BasicCasesTest-testAssertStructuralTypes.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/BasicCasesTest-testAssertStructuralTypes.txt @@ -1,8 +1,20 @@ Compiling source intg_tests/assertions:0.0.0 -WARNING [tests/assert-test-structural-types.bal:(22:5,22:21)] undocumented field 'id' -WARNING [tests/assert-test-structural-types.bal:(23:5,23:17)] undocumented field 'name' -WARNING [tests/assert-test-structural-types.bal:(24:5,24:18)] undocumented field 'salary' +WARNING [tests/assert-test-structural-types.bal:(22:5,22:21)] undocumented field 'id' (BCE20004) + | +22 | readonly int id; + | ^^^^^^^^^^^^^^^^ + +WARNING [tests/assert-test-structural-types.bal:(23:5,23:17)] undocumented field 'name' (BCE20004) + | +23 | string name; + | ^^^^^^^^^^^^ + +WARNING [tests/assert-test-structural-types.bal:(24:5,24:18)] undocumented field 'salary' (BCE20004) + | +24 | float salary; + | ^^^^^^^^^^^^^ + Running Tests with Coverage diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/BasicCasesTest-testAssertionErrorMessage.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/BasicCasesTest-testAssertionErrorMessage.txt index 88f3c4f861b4..ef26ab2f9f30 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/BasicCasesTest-testAssertionErrorMessage.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/BasicCasesTest-testAssertionErrorMessage.txt @@ -1,8 +1,20 @@ Compiling source intg_tests/assertions:0.0.0 -WARNING [tests/assertions-error-messages.bal:(22:5,22:29)] undocumented field 'name' -WARNING [tests/assertions-error-messages.bal:(23:5,23:24)] undocumented field 'age' -WARNING [tests/assertions-error-messages.bal:(24:5,24:32)] undocumented field 'parent' +WARNING [tests/assertions-error-messages.bal:(22:5,22:29)] undocumented field 'name' (BCE20004) + | +22 | public string name = ""; + | ^^^^^^^^^^^^^^^^^^^^^^^^ + +WARNING [tests/assertions-error-messages.bal:(23:5,23:24)] undocumented field 'age' (BCE20004) + | +23 | public int age = 0; + | ^^^^^^^^^^^^^^^^^^^ + +WARNING [tests/assertions-error-messages.bal:(24:5,24:32)] undocumented field 'parent' (BCE20004) + | +24 | public Person? parent = (); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + Running Tests with Coverage diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testArrayDataProviderWithFail.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testArrayDataProviderWithFail.txt index dce31585e22f..5b81a09e5c7b 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testArrayDataProviderWithFail.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testArrayDataProviderWithFail.txt @@ -1,7 +1,15 @@ Compiling source intg_tests/dataproviders:0.0.0 -WARNING [tests/new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' -WARNING [tests/new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' +WARNING [tests/new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' (BCE20403) + | +121 | int a = 9/0; + | ^^^^^^^^^^^^ + +WARNING [tests/new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' (BCE20403) + | +153 | int a = 9/0; + | ^^^^^^^^^^^^ + Running Tests with Coverage diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testArrayDataRerunFailedTest.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testArrayDataRerunFailedTest.txt index c75c9294fb03..9a0c34447bb8 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testArrayDataRerunFailedTest.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testArrayDataRerunFailedTest.txt @@ -1,7 +1,15 @@ Compiling source intg_tests/dataproviders:0.0.0 -WARNING [tests/new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' -WARNING [tests/new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' +WARNING [tests/new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' (BCE20403) + | +121 | int a = 9/0; + | ^^^^^^^^^^^^ + +WARNING [tests/new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' (BCE20403) + | +153 | int a = 9/0; + | ^^^^^^^^^^^^ + Running Tests with Coverage diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testCodeFragmentKeys0.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testCodeFragmentKeys0.txt index 1a13e31ed4de..451e6e5e8df2 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testCodeFragmentKeys0.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testCodeFragmentKeys0.txt @@ -1,7 +1,15 @@ Compiling source intg_tests/dataproviders:0.0.0 -WARNING [tests/new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' -WARNING [tests/new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' +WARNING [tests/new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' (BCE20403) + | +121 | int a = 9/0; + | ^^^^^^^^^^^^ + +WARNING [tests/new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' (BCE20403) + | +153 | int a = 9/0; + | ^^^^^^^^^^^^ + Running Tests with Coverage diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testCodeFragmentKeys1.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testCodeFragmentKeys1.txt index 9cd385a52bde..1b2aec78ceda 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testCodeFragmentKeys1.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testCodeFragmentKeys1.txt @@ -1,7 +1,15 @@ Compiling source intg_tests/dataproviders:0.0.0 -WARNING [tests/new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' -WARNING [tests/new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' +WARNING [tests/new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' (BCE20403) + | +121 | int a = 9/0; + | ^^^^^^^^^^^^ + +WARNING [tests/new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' (BCE20403) + | +153 | int a = 9/0; + | ^^^^^^^^^^^^ + Running Tests with Coverage diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testCodeFragmentKeys2.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testCodeFragmentKeys2.txt index 18e4e31d9fab..ded5415591b4 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testCodeFragmentKeys2.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testCodeFragmentKeys2.txt @@ -1,7 +1,15 @@ Compiling source intg_tests/dataproviders:0.0.0 -WARNING [tests/new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' -WARNING [tests/new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' +WARNING [tests/new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' (BCE20403) + | +121 | int a = 9/0; + | ^^^^^^^^^^^^ + +WARNING [tests/new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' (BCE20403) + | +153 | int a = 9/0; + | ^^^^^^^^^^^^ + Running Tests with Coverage diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testCodeFragmentKeys3.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testCodeFragmentKeys3.txt index df714964b2f7..0389ce7dc051 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testCodeFragmentKeys3.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testCodeFragmentKeys3.txt @@ -1,7 +1,15 @@ Compiling source intg_tests/dataproviders:0.0.0 -WARNING [tests/new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' -WARNING [tests/new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' +WARNING [tests/new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' (BCE20403) + | +121 | int a = 9/0; + | ^^^^^^^^^^^^ + +WARNING [tests/new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' (BCE20403) + | +153 | int a = 9/0; + | ^^^^^^^^^^^^ + Running Tests with Coverage diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testCodeFragmentKeys4.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testCodeFragmentKeys4.txt index 361c0e4c93f3..2ff4f6a6da09 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testCodeFragmentKeys4.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testCodeFragmentKeys4.txt @@ -1,7 +1,15 @@ Compiling source intg_tests/dataproviders:0.0.0 -WARNING [tests/new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' -WARNING [tests/new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' +WARNING [tests/new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' (BCE20403) + | +121 | int a = 9/0; + | ^^^^^^^^^^^^ + +WARNING [tests/new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' (BCE20403) + | +153 | int a = 9/0; + | ^^^^^^^^^^^^ + Running Tests with Coverage diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testCodeFragmentKeys5.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testCodeFragmentKeys5.txt index 7440c74f32d5..ca53427d55ec 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testCodeFragmentKeys5.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testCodeFragmentKeys5.txt @@ -1,7 +1,15 @@ Compiling source intg_tests/dataproviders:0.0.0 -WARNING [tests/new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' -WARNING [tests/new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' +WARNING [tests/new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' (BCE20403) + | +121 | int a = 9/0; + | ^^^^^^^^^^^^ + +WARNING [tests/new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' (BCE20403) + | +153 | int a = 9/0; + | ^^^^^^^^^^^^ + Running Tests with Coverage diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testCodeFragmentKeys6.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testCodeFragmentKeys6.txt index 3e1e46873468..061eea8ddd8f 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testCodeFragmentKeys6.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testCodeFragmentKeys6.txt @@ -1,7 +1,15 @@ Compiling source intg_tests/dataproviders:0.0.0 -WARNING [tests/new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' -WARNING [tests/new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' +WARNING [tests/new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' (BCE20403) + | +121 | int a = 9/0; + | ^^^^^^^^^^^^ + +WARNING [tests/new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' (BCE20403) + | +153 | int a = 9/0; + | ^^^^^^^^^^^^ + Running Tests with Coverage diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testCodeFragmentKeysWithWildCard0.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testCodeFragmentKeysWithWildCard0.txt index 1a13e31ed4de..451e6e5e8df2 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testCodeFragmentKeysWithWildCard0.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testCodeFragmentKeysWithWildCard0.txt @@ -1,7 +1,15 @@ Compiling source intg_tests/dataproviders:0.0.0 -WARNING [tests/new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' -WARNING [tests/new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' +WARNING [tests/new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' (BCE20403) + | +121 | int a = 9/0; + | ^^^^^^^^^^^^ + +WARNING [tests/new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' (BCE20403) + | +153 | int a = 9/0; + | ^^^^^^^^^^^^ + Running Tests with Coverage diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testCodeFragmentKeysWithWildCard1.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testCodeFragmentKeysWithWildCard1.txt index 9cd385a52bde..1b2aec78ceda 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testCodeFragmentKeysWithWildCard1.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testCodeFragmentKeysWithWildCard1.txt @@ -1,7 +1,15 @@ Compiling source intg_tests/dataproviders:0.0.0 -WARNING [tests/new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' -WARNING [tests/new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' +WARNING [tests/new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' (BCE20403) + | +121 | int a = 9/0; + | ^^^^^^^^^^^^ + +WARNING [tests/new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' (BCE20403) + | +153 | int a = 9/0; + | ^^^^^^^^^^^^ + Running Tests with Coverage diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testCodeFragmentKeysWithWildCard2.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testCodeFragmentKeysWithWildCard2.txt index 18e4e31d9fab..ded5415591b4 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testCodeFragmentKeysWithWildCard2.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testCodeFragmentKeysWithWildCard2.txt @@ -1,7 +1,15 @@ Compiling source intg_tests/dataproviders:0.0.0 -WARNING [tests/new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' -WARNING [tests/new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' +WARNING [tests/new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' (BCE20403) + | +121 | int a = 9/0; + | ^^^^^^^^^^^^ + +WARNING [tests/new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' (BCE20403) + | +153 | int a = 9/0; + | ^^^^^^^^^^^^ + Running Tests with Coverage diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testCodeFragmentKeysWithWildCard3.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testCodeFragmentKeysWithWildCard3.txt index df714964b2f7..0389ce7dc051 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testCodeFragmentKeysWithWildCard3.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testCodeFragmentKeysWithWildCard3.txt @@ -1,7 +1,15 @@ Compiling source intg_tests/dataproviders:0.0.0 -WARNING [tests/new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' -WARNING [tests/new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' +WARNING [tests/new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' (BCE20403) + | +121 | int a = 9/0; + | ^^^^^^^^^^^^ + +WARNING [tests/new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' (BCE20403) + | +153 | int a = 9/0; + | ^^^^^^^^^^^^ + Running Tests with Coverage diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testCodeFragmentKeysWithWildCard4.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testCodeFragmentKeysWithWildCard4.txt index 361c0e4c93f3..2ff4f6a6da09 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testCodeFragmentKeysWithWildCard4.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testCodeFragmentKeysWithWildCard4.txt @@ -1,7 +1,15 @@ Compiling source intg_tests/dataproviders:0.0.0 -WARNING [tests/new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' -WARNING [tests/new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' +WARNING [tests/new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' (BCE20403) + | +121 | int a = 9/0; + | ^^^^^^^^^^^^ + +WARNING [tests/new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' (BCE20403) + | +153 | int a = 9/0; + | ^^^^^^^^^^^^ + Running Tests with Coverage diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testCodeFragmentKeysWithWildCard5.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testCodeFragmentKeysWithWildCard5.txt index 7440c74f32d5..ca53427d55ec 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testCodeFragmentKeysWithWildCard5.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testCodeFragmentKeysWithWildCard5.txt @@ -1,7 +1,15 @@ Compiling source intg_tests/dataproviders:0.0.0 -WARNING [tests/new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' -WARNING [tests/new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' +WARNING [tests/new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' (BCE20403) + | +121 | int a = 9/0; + | ^^^^^^^^^^^^ + +WARNING [tests/new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' (BCE20403) + | +153 | int a = 9/0; + | ^^^^^^^^^^^^ + Running Tests with Coverage diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testCodeFragmentKeysWithWildCard6.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testCodeFragmentKeysWithWildCard6.txt index 3e1e46873468..061eea8ddd8f 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testCodeFragmentKeysWithWildCard6.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testCodeFragmentKeysWithWildCard6.txt @@ -1,7 +1,15 @@ Compiling source intg_tests/dataproviders:0.0.0 -WARNING [tests/new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' -WARNING [tests/new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' +WARNING [tests/new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' (BCE20403) + | +121 | int a = 9/0; + | ^^^^^^^^^^^^ + +WARNING [tests/new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' (BCE20403) + | +153 | int a = 9/0; + | ^^^^^^^^^^^^ + Running Tests with Coverage diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testDataProviderSingleFailure.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testDataProviderSingleFailure.txt index 463fafcb6bee..68efc151efcb 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testDataProviderSingleFailure.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testDataProviderSingleFailure.txt @@ -1,7 +1,15 @@ Compiling source intg_tests/dataproviders:0.0.0 -WARNING [tests/new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' -WARNING [tests/new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' +WARNING [tests/new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' (BCE20403) + | +121 | int a = 9/0; + | ^^^^^^^^^^^^ + +WARNING [tests/new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' (BCE20403) + | +153 | int a = 9/0; + | ^^^^^^^^^^^^ + Running Tests with Coverage diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testDataProviderWithMixedType.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testDataProviderWithMixedType.txt index d5ecda443430..ba5566539db1 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testDataProviderWithMixedType.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testDataProviderWithMixedType.txt @@ -1,7 +1,15 @@ Compiling source intg_tests/dataproviders:0.0.0 -WARNING [tests/new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' -WARNING [tests/new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' +WARNING [tests/new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' (BCE20403) + | +121 | int a = 9/0; + | ^^^^^^^^^^^^ + +WARNING [tests/new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' (BCE20403) + | +153 | int a = 9/0; + | ^^^^^^^^^^^^ + Running Tests with Coverage diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testMapValueDataProvider.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testMapValueDataProvider.txt index b97306f40b2a..84c1be6889ac 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testMapValueDataProvider.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testMapValueDataProvider.txt @@ -1,7 +1,15 @@ Compiling source intg_tests/dataproviders:0.0.0 -WARNING [tests/new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' -WARNING [tests/new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' +WARNING [tests/new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' (BCE20403) + | +121 | int a = 9/0; + | ^^^^^^^^^^^^ + +WARNING [tests/new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' (BCE20403) + | +153 | int a = 9/0; + | ^^^^^^^^^^^^ + Running Tests with Coverage diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testMultiModuleSingleTestExec.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testMultiModuleSingleTestExec.txt index 8a406dd6afc1..e65119de06e5 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testMultiModuleSingleTestExec.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testMultiModuleSingleTestExec.txt @@ -1,7 +1,15 @@ Compiling source intg_tests/dataproviders:0.0.0 -WARNING [tests/new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' -WARNING [tests/new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' +WARNING [tests/new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' (BCE20403) + | +121 | int a = 9/0; + | ^^^^^^^^^^^^ + +WARNING [tests/new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' (BCE20403) + | +153 | int a = 9/0; + | ^^^^^^^^^^^^ + Running Tests with Coverage diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testRerunFailedTest.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testRerunFailedTest.txt index 9aeafa7c6abd..66180e479a6b 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testRerunFailedTest.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testRerunFailedTest.txt @@ -1,7 +1,15 @@ Compiling source intg_tests/dataproviders:0.0.0 -WARNING [tests/new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' -WARNING [tests/new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' +WARNING [tests/new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' (BCE20403) + | +121 | int a = 9/0; + | ^^^^^^^^^^^^ + +WARNING [tests/new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' (BCE20403) + | +153 | int a = 9/0; + | ^^^^^^^^^^^^ + Running Tests with Coverage diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testValidDataProvider.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testValidDataProvider.txt index 1b52641d6a2d..838007e41aeb 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testValidDataProvider.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testValidDataProvider.txt @@ -1,7 +1,15 @@ Compiling source intg_tests/dataproviders:0.0.0 -WARNING [tests/new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' -WARNING [tests/new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' +WARNING [tests/new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' (BCE20403) + | +121 | int a = 9/0; + | ^^^^^^^^^^^^ + +WARNING [tests/new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' (BCE20403) + | +153 | int a = 9/0; + | ^^^^^^^^^^^^ + Running Tests with Coverage diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testValidDataProviderCase.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testValidDataProviderCase.txt index f4df9532f26d..103f08f196c5 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testValidDataProviderCase.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testValidDataProviderCase.txt @@ -1,7 +1,15 @@ Compiling source intg_tests/dataproviders:0.0.0 -WARNING [tests/new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' -WARNING [tests/new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' +WARNING [tests/new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' (BCE20403) + | +121 | int a = 9/0; + | ^^^^^^^^^^^^ + +WARNING [tests/new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' (BCE20403) + | +153 | int a = 9/0; + | ^^^^^^^^^^^^ + Running Tests with Coverage diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testValidDataProviderWithAfterFailing.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testValidDataProviderWithAfterFailing.txt index ad1050cea3ea..2550de7888d3 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testValidDataProviderWithAfterFailing.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testValidDataProviderWithAfterFailing.txt @@ -1,7 +1,15 @@ Compiling source intg_tests/dataproviders:0.0.0 -WARNING [tests/new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' -WARNING [tests/new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' +WARNING [tests/new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' (BCE20403) + | +121 | int a = 9/0; + | ^^^^^^^^^^^^ + +WARNING [tests/new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' (BCE20403) + | +153 | int a = 9/0; + | ^^^^^^^^^^^^ + Running Tests with Coverage diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testValidDataProviderWithBeforeAfterFunctions.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testValidDataProviderWithBeforeAfterFunctions.txt index 77c327f83721..bf06c0071069 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testValidDataProviderWithBeforeAfterFunctions.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testValidDataProviderWithBeforeAfterFunctions.txt @@ -1,7 +1,15 @@ Compiling source intg_tests/dataproviders:0.0.0 -WARNING [tests/new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' -WARNING [tests/new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' +WARNING [tests/new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' (BCE20403) + | +121 | int a = 9/0; + | ^^^^^^^^^^^^ + +WARNING [tests/new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' (BCE20403) + | +153 | int a = 9/0; + | ^^^^^^^^^^^^ + Running Tests with Coverage diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testValidDataProviderWithBeforeFailing.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testValidDataProviderWithBeforeFailing.txt index b45267d98a5d..2b695c4a0747 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testValidDataProviderWithBeforeFailing.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testValidDataProviderWithBeforeFailing.txt @@ -1,7 +1,15 @@ Compiling source intg_tests/dataproviders:0.0.0 -WARNING [tests/new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' -WARNING [tests/new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' +WARNING [tests/new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' (BCE20403) + | +121 | int a = 9/0; + | ^^^^^^^^^^^^ + +WARNING [tests/new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' (BCE20403) + | +153 | int a = 9/0; + | ^^^^^^^^^^^^ + Running Tests with Coverage diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testValidDataProviderWithFail.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testValidDataProviderWithFail.txt index cf3fb86269d0..60647cac4270 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testValidDataProviderWithFail.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testValidDataProviderWithFail.txt @@ -1,7 +1,15 @@ Compiling source intg_tests/dataproviders:0.0.0 -WARNING [tests/new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' -WARNING [tests/new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' +WARNING [tests/new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' (BCE20403) + | +121 | int a = 9/0; + | ^^^^^^^^^^^^ + +WARNING [tests/new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' (BCE20403) + | +153 | int a = 9/0; + | ^^^^^^^^^^^^ + Running Tests with Coverage diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testWithSpecialKeys.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testWithSpecialKeys.txt index d5f8fefd43b0..963523295e7c 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testWithSpecialKeys.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/DataProviderTest-testWithSpecialKeys.txt @@ -1,7 +1,15 @@ Compiling source intg_tests/dataproviders:0.0.0 -WARNING [tests/new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' -WARNING [tests/new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' +WARNING [tests/new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' (BCE20403) + | +121 | int a = 9/0; + | ^^^^^^^^^^^^ + +WARNING [tests/new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' (BCE20403) + | +153 | int a = 9/0; + | ^^^^^^^^^^^^ + Running Tests with Coverage diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/GroupingTest-testWhenAfterGroupsFails.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/GroupingTest-testWhenAfterGroupsFails.txt index db9d435851c0..ce120f16072d 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/GroupingTest-testWhenAfterGroupsFails.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/GroupingTest-testWhenAfterGroupsFails.txt @@ -2,7 +2,11 @@ Code coverage is not yet supported with single bal files. Ignoring the flag and warning: ignoring --includes flag since code coverage is not enabled Compiling source failed-after-groups-test.bal -WARNING [failed-after-groups-test.bal:(37:5,37:17)] unused variable 'b' +WARNING [failed-after-groups-test.bal:(37:5,37:17)] unused variable 'b' (BCE20403) + | +37 | int b = 2/0; + | ^^^^^^^^^^^^ + Running Tests diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/InvalidDataProviderTestCase-testEmptyDataProvider.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/InvalidDataProviderTestCase-testEmptyDataProvider.txt index 0c0ac9e5321a..906ce0a1098d 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/InvalidDataProviderTestCase-testEmptyDataProvider.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/InvalidDataProviderTestCase-testEmptyDataProvider.txt @@ -2,5 +2,9 @@ Code coverage is not yet supported with single bal files. Ignoring the flag and warning: ignoring --includes flag since code coverage is not enabled Compiling source empty-data-provider-test.bal -ERROR [empty-data-provider-test.bal:(14:19,14:28)] incompatible types: expected 'function () returns (ballerina/test:0.0.0:DataProviderReturnType)?', found 'function () returns (int[])' +ERROR [empty-data-provider-test.bal:(14:19,14:28)] incompatible types: expected 'function () returns (ballerina/test:0.0.0:DataProviderReturnType)?', found 'function () returns (int[])' (BCE2066) + | +14 | dataProvider: provider2 + | ^^^^^^^^^ + error: compilation contains errors \ No newline at end of file diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/InvalidDataProviderTestCase-testInvalidDataProvider.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/InvalidDataProviderTestCase-testInvalidDataProvider.txt index c6d54b15e1de..4dbb422bdc54 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/InvalidDataProviderTestCase-testInvalidDataProvider.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/InvalidDataProviderTestCase-testInvalidDataProvider.txt @@ -2,7 +2,11 @@ Code coverage is not yet supported with single bal files. Ignoring the flag and warning: ignoring --includes flag since code coverage is not enabled Compiling source invalid-data-provider-test.bal -WARNING [invalid-data-provider-test.bal:(25:5,25:58)] unused variable 'resultErr' +WARNING [invalid-data-provider-test.bal:(25:5,25:58)] unused variable 'resultErr' (BCE20403) + | +25 | int|error resultErr = trap result.cloneWithType(int); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + Running Tests diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/InvalidDataProviderTestCase-testInvalidDataProvider2.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/InvalidDataProviderTestCase-testInvalidDataProvider2.txt index 32d49ce76d56..e2fa4bbc7998 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/InvalidDataProviderTestCase-testInvalidDataProvider2.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/InvalidDataProviderTestCase-testInvalidDataProvider2.txt @@ -2,9 +2,21 @@ Code coverage is not yet supported with single bal files. Ignoring the flag and warning: ignoring --includes flag since code coverage is not enabled Compiling source invalid-data-provider-test2.bal -WARNING [invalid-data-provider-test2.bal:(25:5,25:53)] unused variable 'fErr' -WARNING [invalid-data-provider-test2.bal:(26:5,26:53)] unused variable 'sErr' -WARNING [invalid-data-provider-test2.bal:(27:5,27:58)] unused variable 'resultErr' +WARNING [invalid-data-provider-test2.bal:(25:5,25:53)] unused variable 'fErr' (BCE20403) + | +25 | int|error fErr = trap fValue.cloneWithType(int); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +WARNING [invalid-data-provider-test2.bal:(26:5,26:53)] unused variable 'sErr' (BCE20403) + | +26 | int|error sErr = trap sValue.cloneWithType(int); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +WARNING [invalid-data-provider-test2.bal:(27:5,27:58)] unused variable 'resultErr' (BCE20403) + | +27 | int|error resultErr = trap result.cloneWithType(int); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + Running Tests diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/InvalidFunctionMockingTestCase-testLegacyMockingFunctionInNonExistingModule.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/InvalidFunctionMockingTestCase-testLegacyMockingFunctionInNonExistingModule.txt index a3c34b85eb58..082cdf2424b1 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/InvalidFunctionMockingTestCase-testLegacyMockingFunctionInNonExistingModule.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/InvalidFunctionMockingTestCase-testLegacyMockingFunctionInNonExistingModule.txt @@ -1,4 +1,13 @@ Compiling source intg_tests/non_existent_module_mock:0.1.0 ERROR [tests/test.bal:(3:1,6:2)] could not find specified module 'intg_tests/module1:0.1.0' + | +3 | @test:Mock { +: | ^^^^^^^^^^^^ +: | : +: | : +6 | } + | ^ + | + error: compilation contains errors \ No newline at end of file diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/InvalidFunctionMockingTestCase-testLegacyMockingFunctionInSingleFileProject.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/InvalidFunctionMockingTestCase-testLegacyMockingFunctionInSingleFileProject.txt index 00aa19d721a0..c69f652d5818 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/InvalidFunctionMockingTestCase-testLegacyMockingFunctionInSingleFileProject.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/InvalidFunctionMockingTestCase-testLegacyMockingFunctionInSingleFileProject.txt @@ -3,4 +3,8 @@ warning: ignoring --includes flag since code coverage is not enabled Compiling source function-legacy-mock.bal ERROR [function-legacy-mock.bal:(8:1,8:38)] function mocking is not supported with standalone Ballerina files + | +8 | @test:Mock { functionName: "intAdd" } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + error: compilation contains errors \ No newline at end of file diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/InvalidFunctionMockingTestCase-testLegacyMockingFunctionWithIncompatibleTypes.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/InvalidFunctionMockingTestCase-testLegacyMockingFunctionWithIncompatibleTypes.txt index f4a01e5ecba0..5483cdd45e13 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/InvalidFunctionMockingTestCase-testLegacyMockingFunctionWithIncompatibleTypes.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/InvalidFunctionMockingTestCase-testLegacyMockingFunctionWithIncompatibleTypes.txt @@ -1,4 +1,13 @@ Compiling source intg_tests/incompatible_type_mock:0.1.0 ERROR [tests/test.bal:(6:1,8:2)] incompatible types: expected isolated function () returns (string) but found isolated function () returns (int) + | +6 | function getMockClient() returns int { +: | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +: | : +: | : +8 | } + | ^ + | + error: compilation contains errors \ No newline at end of file diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/InvalidFunctionMockingTestCase-testLegacyMockingNonExistingFunction.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/InvalidFunctionMockingTestCase-testLegacyMockingNonExistingFunction.txt index 327839ef5180..56b54aca5336 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/InvalidFunctionMockingTestCase-testLegacyMockingNonExistingFunction.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/InvalidFunctionMockingTestCase-testLegacyMockingNonExistingFunction.txt @@ -1,4 +1,13 @@ Compiling source intg_tests/non_existent_function_mock:0.1.0 ERROR [tests/test.bal:(3:1,5:2)] could not find function 'createJdbcClient' in module 'intg_tests/non_existent_function_mock:0.1.0' + | +3 | @test:Mock { +: | ^^^^^^^^^^^^ +: | : +: | : +5 | } + | ^ + | + error: compilation contains errors \ No newline at end of file diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/InvalidFunctionMockingTestCase-testLegacyMockingWithEmptyAnnotationRecord.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/InvalidFunctionMockingTestCase-testLegacyMockingWithEmptyAnnotationRecord.txt index 100d89c93610..a2196d1c87ac 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/InvalidFunctionMockingTestCase-testLegacyMockingWithEmptyAnnotationRecord.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/InvalidFunctionMockingTestCase-testLegacyMockingWithEmptyAnnotationRecord.txt @@ -1,4 +1,8 @@ Compiling source intg_tests/empty_annot_rec_function_mock:0.1.0 ERROR [tests/test.bal:(3:1,3:14)] function name cannot be empty + | +3 | @test:Mock {} + | ^^^^^^^^^^^^^ + error: compilation contains errors \ No newline at end of file diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/InvalidFunctionMockingTestCase-testLegacyMockingWithoutAnnotationRecord.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/InvalidFunctionMockingTestCase-testLegacyMockingWithoutAnnotationRecord.txt index 3afce0b0f7d5..dc5115c7699d 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/InvalidFunctionMockingTestCase-testLegacyMockingWithoutAnnotationRecord.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/InvalidFunctionMockingTestCase-testLegacyMockingWithoutAnnotationRecord.txt @@ -1,4 +1,8 @@ Compiling source intg_tests/recordless_annot_function_mock:0.1.0 ERROR [tests/test.bal:(3:1,3:11)] missing required 'functionName' field + | +3 | @test:Mock + | ^^^^^^^^^^ + error: compilation contains errors \ No newline at end of file diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/InvalidFunctionMockingTestCase-testMockingFunctionInNonExistingModule.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/InvalidFunctionMockingTestCase-testMockingFunctionInNonExistingModule.txt index a3c34b85eb58..082cdf2424b1 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/InvalidFunctionMockingTestCase-testMockingFunctionInNonExistingModule.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/InvalidFunctionMockingTestCase-testMockingFunctionInNonExistingModule.txt @@ -1,4 +1,13 @@ Compiling source intg_tests/non_existent_module_mock:0.1.0 ERROR [tests/test.bal:(3:1,6:2)] could not find specified module 'intg_tests/module1:0.1.0' + | +3 | @test:Mock { +: | ^^^^^^^^^^^^ +: | : +: | : +6 | } + | ^ + | + error: compilation contains errors \ No newline at end of file diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/InvalidFunctionMockingTestCase-testMockingFunctionInSingleFileProject.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/InvalidFunctionMockingTestCase-testMockingFunctionInSingleFileProject.txt index b07583365de3..ead4c3aaa0b4 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/InvalidFunctionMockingTestCase-testMockingFunctionInSingleFileProject.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/InvalidFunctionMockingTestCase-testMockingFunctionInSingleFileProject.txt @@ -3,4 +3,8 @@ warning: ignoring --includes flag since code coverage is not enabled Compiling source function-mock.bal ERROR [function-mock.bal:(12:1,12:38)] function mocking is not supported with standalone Ballerina files + | +12 | @test:Mock { functionName: "intAdd" } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + error: compilation contains errors \ No newline at end of file diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/InvalidFunctionMockingTestCase-testMockingNonExistingFunction.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/InvalidFunctionMockingTestCase-testMockingNonExistingFunction.txt index 6e8c9fa30bf2..7a7bddbfefee 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/InvalidFunctionMockingTestCase-testMockingNonExistingFunction.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/InvalidFunctionMockingTestCase-testMockingNonExistingFunction.txt @@ -1,4 +1,8 @@ Compiling source intg_tests/non_existent_function_mock:0.1.0 ERROR [tests/test.bal:(3:1,3:38)] could not find function 'intAdd' in module 'intg_tests/non_existent_function_mock:0.1.0' + | +3 | @test:Mock { functionName: "intAdd" } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + error: compilation contains errors \ No newline at end of file diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/InvalidFunctionMockingTestCase-testMockingWithEmptyAnnotationRecord.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/InvalidFunctionMockingTestCase-testMockingWithEmptyAnnotationRecord.txt index 100d89c93610..a2196d1c87ac 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/InvalidFunctionMockingTestCase-testMockingWithEmptyAnnotationRecord.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/InvalidFunctionMockingTestCase-testMockingWithEmptyAnnotationRecord.txt @@ -1,4 +1,8 @@ Compiling source intg_tests/empty_annot_rec_function_mock:0.1.0 ERROR [tests/test.bal:(3:1,3:14)] function name cannot be empty + | +3 | @test:Mock {} + | ^^^^^^^^^^^^^ + error: compilation contains errors \ No newline at end of file diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/InvalidFunctionMockingTestCase-testMockingWithoutAnnotationRecord.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/InvalidFunctionMockingTestCase-testMockingWithoutAnnotationRecord.txt index 3afce0b0f7d5..dc5115c7699d 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/InvalidFunctionMockingTestCase-testMockingWithoutAnnotationRecord.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/InvalidFunctionMockingTestCase-testMockingWithoutAnnotationRecord.txt @@ -1,4 +1,8 @@ Compiling source intg_tests/recordless_annot_function_mock:0.1.0 ERROR [tests/test.bal:(3:1,3:11)] missing required 'functionName' field + | +3 | @test:Mock + | ^^^^^^^^^^ + error: compilation contains errors \ No newline at end of file diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/MissingFunctionsTestCase-testMissingAfterFunction.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/MissingFunctionsTestCase-testMissingAfterFunction.txt index 464421053c58..a6f0eddbd0bb 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/MissingFunctionsTestCase-testMissingAfterFunction.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/MissingFunctionsTestCase-testMissingAfterFunction.txt @@ -2,5 +2,9 @@ Code coverage is not yet supported with single bal files. Ignoring the flag and warning: ignoring --includes flag since code coverage is not enabled Compiling source after-func-negative.bal -ERROR [after-func-negative.bal:(22:12,22:29)] undefined symbol 'afterFuncNonExist' +ERROR [after-func-negative.bal:(22:12,22:29)] undefined symbol 'afterFuncNonExist' (BCE2010) + | +22 | after: afterFuncNonExist + | ^^^^^^^^^^^^^^^^^ + error: compilation contains errors \ No newline at end of file diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/MissingFunctionsTestCase-testMissingBeforeFunction.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/MissingFunctionsTestCase-testMissingBeforeFunction.txt index fb6158642878..cc3992ab5eff 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/MissingFunctionsTestCase-testMissingBeforeFunction.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/MissingFunctionsTestCase-testMissingBeforeFunction.txt @@ -2,5 +2,9 @@ Code coverage is not yet supported with single bal files. Ignoring the flag and warning: ignoring --includes flag since code coverage is not enabled Compiling source before-func-negative.bal -ERROR [before-func-negative.bal:(22:13,22:31)] undefined symbol 'beforeFuncNonExist' +ERROR [before-func-negative.bal:(22:13,22:31)] undefined symbol 'beforeFuncNonExist' (BCE2010) + | +22 | before: beforeFuncNonExist + | ^^^^^^^^^^^^^^^^^^ + error: compilation contains errors \ No newline at end of file diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/MissingFunctionsTestCase-testMissingDependsOnFunction.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/MissingFunctionsTestCase-testMissingDependsOnFunction.txt index 3f4da62dcc4c..0ea72c1ffb68 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/MissingFunctionsTestCase-testMissingDependsOnFunction.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/MissingFunctionsTestCase-testMissingDependsOnFunction.txt @@ -2,5 +2,9 @@ Code coverage is not yet supported with single bal files. Ignoring the flag and warning: ignoring --includes flag since code coverage is not enabled Compiling source depends-on-negative.bal -ERROR [depends-on-negative.bal:(22:17,22:28)] undefined symbol 'nonExisting' +ERROR [depends-on-negative.bal:(22:17,22:28)] undefined symbol 'nonExisting' (BCE2010) + | +22 | dependsOn: [nonExisting] + | ^^^^^^^^^^^ + error: compilation contains errors \ No newline at end of file diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/MockTest-testObjectMocking.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/MockTest-testObjectMocking.txt index a12aa0625b95..b0de16a3ccad 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/MockTest-testObjectMocking.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/MockTest-testObjectMocking.txt @@ -1,7 +1,15 @@ Compiling source intg_tests/object_mocking:0.0.0 -WARNING [modules/TestHttpClient/main.bal:(54:45,54:82)] this function should explicitly return a value -WARNING [main.bal:(47:5,47:47)] unused variable 'closeErr' +WARNING [modules/TestHttpClient/main.bal:(54:45,54:82)] this function should explicitly return a value (BCE20350) + | +54 | public isolated function next() returns record {|AttributeDAO value;|}|Error? { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +WARNING [main.bal:(47:5,47:47)] unused variable 'closeErr' (BCE20403) + | +47 | error? closeErr = attributeStream.close(); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + Running Tests with Coverage diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/MockTest-testObjectMocking_NegativeCases1.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/MockTest-testObjectMocking_NegativeCases1.txt index a52a84bec84d..0cb47837739b 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/MockTest-testObjectMocking_NegativeCases1.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/MockTest-testObjectMocking_NegativeCases1.txt @@ -1,7 +1,15 @@ Compiling source intg_tests/object_mocking:0.0.0 -WARNING [modules/TestHttpClient/main.bal:(54:45,54:82)] this function should explicitly return a value -WARNING [main.bal:(47:5,47:47)] unused variable 'closeErr' +WARNING [modules/TestHttpClient/main.bal:(54:45,54:82)] this function should explicitly return a value (BCE20350) + | +54 | public isolated function next() returns record {|AttributeDAO value;|}|Error? { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +WARNING [main.bal:(47:5,47:47)] unused variable 'closeErr' (BCE20403) + | +47 | error? closeErr = attributeStream.close(); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + Running Tests with Coverage diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/MockTest-testObjectMocking_NegativeCases2.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/MockTest-testObjectMocking_NegativeCases2.txt index 353b191dbd44..5d543a5ca74f 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/MockTest-testObjectMocking_NegativeCases2.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/MockTest-testObjectMocking_NegativeCases2.txt @@ -1,7 +1,15 @@ Compiling source intg_tests/object_mocking:0.0.0 -WARNING [modules/TestHttpClient/main.bal:(54:45,54:82)] this function should explicitly return a value -WARNING [main.bal:(47:5,47:47)] unused variable 'closeErr' +WARNING [modules/TestHttpClient/main.bal:(54:45,54:82)] this function should explicitly return a value (BCE20350) + | +54 | public isolated function next() returns record {|AttributeDAO value;|}|Error? { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +WARNING [main.bal:(47:5,47:47)] unused variable 'closeErr' (BCE20403) + | +47 | error? closeErr = attributeStream.close(); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + Running Tests with Coverage diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/MockTest-testObjectMocking_NegativeCases3.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/MockTest-testObjectMocking_NegativeCases3.txt index bebd37d27c0c..f1a404a524ed 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/MockTest-testObjectMocking_NegativeCases3.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/MockTest-testObjectMocking_NegativeCases3.txt @@ -1,7 +1,15 @@ Compiling source intg_tests/object_mocking:0.0.0 -WARNING [modules/TestHttpClient/main.bal:(54:45,54:82)] this function should explicitly return a value -WARNING [main.bal:(47:5,47:47)] unused variable 'closeErr' +WARNING [modules/TestHttpClient/main.bal:(54:45,54:82)] this function should explicitly return a value (BCE20350) + | +54 | public isolated function next() returns record {|AttributeDAO value;|}|Error? { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +WARNING [main.bal:(47:5,47:47)] unused variable 'closeErr' (BCE20403) + | +47 | error? closeErr = attributeStream.close(); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + Running Tests with Coverage diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/MockTest-testObjectMocking_NegativeCases4.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/MockTest-testObjectMocking_NegativeCases4.txt index 5e9f49f614c5..e64f46e308ec 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/MockTest-testObjectMocking_NegativeCases4.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/MockTest-testObjectMocking_NegativeCases4.txt @@ -1,7 +1,15 @@ Compiling source intg_tests/object_mocking:0.0.0 -WARNING [modules/TestHttpClient/main.bal:(54:45,54:82)] this function should explicitly return a value -WARNING [main.bal:(47:5,47:47)] unused variable 'closeErr' +WARNING [modules/TestHttpClient/main.bal:(54:45,54:82)] this function should explicitly return a value (BCE20350) + | +54 | public isolated function next() returns record {|AttributeDAO value;|}|Error? { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +WARNING [main.bal:(47:5,47:47)] unused variable 'closeErr' (BCE20403) + | +47 | error? closeErr = attributeStream.close(); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + Running Tests with Coverage diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/MockTest-testObjectMocking_NegativeCases5.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/MockTest-testObjectMocking_NegativeCases5.txt index 233770726cdd..2328faabd5bd 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/MockTest-testObjectMocking_NegativeCases5.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/MockTest-testObjectMocking_NegativeCases5.txt @@ -1,7 +1,15 @@ Compiling source intg_tests/object_mocking:0.0.0 -WARNING [modules/TestHttpClient/main.bal:(54:45,54:82)] this function should explicitly return a value -WARNING [main.bal:(47:5,47:47)] unused variable 'closeErr' +WARNING [modules/TestHttpClient/main.bal:(54:45,54:82)] this function should explicitly return a value (BCE20350) + | +54 | public isolated function next() returns record {|AttributeDAO value;|}|Error? { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +WARNING [main.bal:(47:5,47:47)] unused variable 'closeErr' (BCE20403) + | +47 | error? closeErr = attributeStream.close(); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + Running Tests with Coverage diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/MockTest-testObjectMocking_NegativeCases6.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/MockTest-testObjectMocking_NegativeCases6.txt index ca891932d4ea..b912b5117535 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/MockTest-testObjectMocking_NegativeCases6.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/MockTest-testObjectMocking_NegativeCases6.txt @@ -1,7 +1,15 @@ Compiling source intg_tests/object_mocking:0.0.0 -WARNING [modules/TestHttpClient/main.bal:(54:45,54:82)] this function should explicitly return a value -WARNING [main.bal:(47:5,47:47)] unused variable 'closeErr' +WARNING [modules/TestHttpClient/main.bal:(54:45,54:82)] this function should explicitly return a value (BCE20350) + | +54 | public isolated function next() returns record {|AttributeDAO value;|}|Error? { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +WARNING [main.bal:(47:5,47:47)] unused variable 'closeErr' (BCE20403) + | +47 | error? closeErr = attributeStream.close(); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + Running Tests with Coverage diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/MockTest-testObjectMocking_NegativeCases7.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/MockTest-testObjectMocking_NegativeCases7.txt index 8020f4903cfe..abbb24162e9c 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/MockTest-testObjectMocking_NegativeCases7.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/MockTest-testObjectMocking_NegativeCases7.txt @@ -1,7 +1,15 @@ Compiling source intg_tests/object_mocking:0.0.0 -WARNING [modules/TestHttpClient/main.bal:(54:45,54:82)] this function should explicitly return a value -WARNING [main.bal:(47:5,47:47)] unused variable 'closeErr' +WARNING [modules/TestHttpClient/main.bal:(54:45,54:82)] this function should explicitly return a value (BCE20350) + | +54 | public isolated function next() returns record {|AttributeDAO value;|}|Error? { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +WARNING [main.bal:(47:5,47:47)] unused variable 'closeErr' (BCE20403) + | +47 | error? closeErr = attributeStream.close(); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + Running Tests with Coverage diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/SkipTestsTestCase-testSkipWhenAfterEachFails.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/SkipTestsTestCase-testSkipWhenAfterEachFails.txt index aca909e90334..e69498d30c9a 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/SkipTestsTestCase-testSkipWhenAfterEachFails.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/SkipTestsTestCase-testSkipWhenAfterEachFails.txt @@ -2,7 +2,11 @@ Code coverage is not yet supported with single bal files. Ignoring the flag and warning: ignoring --includes flag since code coverage is not enabled Compiling source skip-when-afterEach-fails.bal -WARNING [skip-when-afterEach-fails.bal:(30:5,30:18)] unused variable 'i' +WARNING [skip-when-afterEach-fails.bal:(30:5,30:18)] unused variable 'i' (BCE20403) + | +30 | int i = 12/0; + | ^^^^^^^^^^^^^ + Running Tests diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/SkipTestsTestCase-testSkipWhenAfterFails.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/SkipTestsTestCase-testSkipWhenAfterFails.txt index cb173cadb38d..c890630d303e 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/SkipTestsTestCase-testSkipWhenAfterFails.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/SkipTestsTestCase-testSkipWhenAfterFails.txt @@ -2,7 +2,11 @@ Code coverage is not yet supported with single bal files. Ignoring the flag and warning: ignoring --includes flag since code coverage is not enabled Compiling source skip-when-after-fails.bal -WARNING [skip-when-after-fails.bal:(30:5,30:18)] unused variable 'i' +WARNING [skip-when-after-fails.bal:(30:5,30:18)] unused variable 'i' (BCE20403) + | +30 | int i = 12/0; + | ^^^^^^^^^^^^^ + Running Tests diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/SkipTestsTestCase-testSkipWhenBeforeEachFails.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/SkipTestsTestCase-testSkipWhenBeforeEachFails.txt index 7dd06cde5e81..a9d38f7329ec 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/SkipTestsTestCase-testSkipWhenBeforeEachFails.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/SkipTestsTestCase-testSkipWhenBeforeEachFails.txt @@ -2,7 +2,11 @@ Code coverage is not yet supported with single bal files. Ignoring the flag and warning: ignoring --includes flag since code coverage is not enabled Compiling source skip-when-beforeEach-fails.bal -WARNING [skip-when-beforeEach-fails.bal:(25:5,25:18)] unused variable 'i' +WARNING [skip-when-beforeEach-fails.bal:(25:5,25:18)] unused variable 'i' (BCE20403) + | +25 | int i = 12/0; + | ^^^^^^^^^^^^^ + Running Tests diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/SkipTestsTestCase-testSkipWhenBeforeFails.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/SkipTestsTestCase-testSkipWhenBeforeFails.txt index 1f36fc38fc65..d76a70091bc5 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/SkipTestsTestCase-testSkipWhenBeforeFails.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/SkipTestsTestCase-testSkipWhenBeforeFails.txt @@ -2,7 +2,11 @@ Code coverage is not yet supported with single bal files. Ignoring the flag and warning: ignoring --includes flag since code coverage is not enabled Compiling source skip-when-before-fails.bal -WARNING [skip-when-before-fails.bal:(28:5,28:18)] unused variable 'i' +WARNING [skip-when-before-fails.bal:(28:5,28:18)] unused variable 'i' (BCE20403) + | +28 | int i = 12/0; + | ^^^^^^^^^^^^^ + Running Tests diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/SkipTestsTestCase-testSkipWhenBeforeGroupsFails.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/SkipTestsTestCase-testSkipWhenBeforeGroupsFails.txt index b84349129fad..a0e206025e77 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/SkipTestsTestCase-testSkipWhenBeforeGroupsFails.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/SkipTestsTestCase-testSkipWhenBeforeGroupsFails.txt @@ -2,7 +2,11 @@ Code coverage is not yet supported with single bal files. Ignoring the flag and warning: ignoring --includes flag since code coverage is not enabled Compiling source skip-when-beforeGroups-fails.bal -WARNING [skip-when-beforeGroups-fails.bal:(32:5,32:17)] unused variable 'b' +WARNING [skip-when-beforeGroups-fails.bal:(32:5,32:17)] unused variable 'b' (BCE20403) + | +32 | int b = 2/0; + | ^^^^^^^^^^^^ + Running Tests diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/SkipTestsTestCase-testSkipWhenBeforeSuiteFails.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/SkipTestsTestCase-testSkipWhenBeforeSuiteFails.txt index 81cc1e5b714f..e29dcffe9f79 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/SkipTestsTestCase-testSkipWhenBeforeSuiteFails.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/SkipTestsTestCase-testSkipWhenBeforeSuiteFails.txt @@ -2,7 +2,11 @@ Code coverage is not yet supported with single bal files. Ignoring the flag and warning: ignoring --includes flag since code coverage is not enabled Compiling source skip-when-beforeSuite-fails.bal -WARNING [skip-when-beforeSuite-fails.bal:(24:5,24:18)] unused variable 'i' +WARNING [skip-when-beforeSuite-fails.bal:(24:5,24:18)] unused variable 'i' (BCE20403) + | +24 | int i = 12/0; // This will throw an exception and fail the function + | ^^^^^^^^^^^^^ + Running Tests diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/SkipTestsTestCase-testSkipWhenDependsOnFunctionFails.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/SkipTestsTestCase-testSkipWhenDependsOnFunctionFails.txt index 21009a89fed6..c490a1f95cc0 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/SkipTestsTestCase-testSkipWhenDependsOnFunctionFails.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/SkipTestsTestCase-testSkipWhenDependsOnFunctionFails.txt @@ -2,7 +2,11 @@ Code coverage is not yet supported with single bal files. Ignoring the flag and warning: ignoring --includes flag since code coverage is not enabled Compiling source dependson-skip-test.bal -WARNING [dependson-skip-test.bal:(34:5,34:18)] unused variable 'i' +WARNING [dependson-skip-test.bal:(34:5,34:18)] unused variable 'i' (BCE20403) + | +34 | int i = 12/0; + | ^^^^^^^^^^^^^ + Running Tests diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/TestReportTest-testWarningForCoverageFormatFlag.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/TestReportTest-testWarningForCoverageFormatFlag.txt index 2e5eeb8b2de5..effd1ed1e2d7 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/TestReportTest-testWarningForCoverageFormatFlag.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/TestReportTest-testWarningForCoverageFormatFlag.txt @@ -1,7 +1,11 @@ warning: ignoring --coverage-format flag since code coverage is not enabled Compiling source testerina_report/foo:0.0.0 -WARNING [main.bal:(36:5,36:19)] unused variable 'b' +WARNING [main.bal:(36:5,36:19)] unused variable 'b' (BCE20403) + | +36 | int b = a + 1; + | ^^^^^^^^^^^^^^ + Running Tests diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/TestReportTest-testWarningForReportTools.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/TestReportTest-testWarningForReportTools.txt index 4db780f73348..b98f2adb06a0 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/unix/TestReportTest-testWarningForReportTools.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/unix/TestReportTest-testWarningForReportTools.txt @@ -1,6 +1,10 @@ Compiling source testerina_report/foo:0.0.0 -WARNING [main.bal:(36:5,36:19)] unused variable 'b' +WARNING [main.bal:(36:5,36:19)] unused variable 'b' (BCE20403) + | +36 | int b = a + 1; + | ^^^^^^^^^^^^^^ + Running Tests with Coverage diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/BasicCasesTest-testAnnotationAccess.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/BasicCasesTest-testAnnotationAccess.txt index 8d4059d02d49..0fcfb1c25cf6 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/BasicCasesTest-testAnnotationAccess.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/BasicCasesTest-testAnnotationAccess.txt @@ -1,6 +1,10 @@ Compiling source intg_tests/annotation_access:0.0.0 -HINT [tests\main_test.bal:(73:5,73:5)] concurrent calls will not be made to this method since the service is not an 'isolated' service +HINT [tests\main_test.bal:(73:5,73:5)] concurrent calls will not be made to this method since the service is not an 'isolated' service (BCH2004) + | +73 | remote function xyz() { + | ^ + ballerina: Oh no, something really went wrong. Bad. Sad. We appreciate it if you can report the code that broke Ballerina in diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/BasicCasesTest-testAssertBehavioralTypes.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/BasicCasesTest-testAssertBehavioralTypes.txt index 94b26bc33ac2..d44da9b3bfe5 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/BasicCasesTest-testAssertBehavioralTypes.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/BasicCasesTest-testAssertBehavioralTypes.txt @@ -1,8 +1,20 @@ Compiling source intg_tests/assertions:0.0.0 -WARNING [tests\assert-test-behavioral-types.bal:(22:5,22:29)] undocumented field 'name' -WARNING [tests\assert-test-behavioral-types.bal:(23:5,23:24)] undocumented field 'age' -WARNING [tests\assert-test-behavioral-types.bal:(24:5,24:32)] undocumented field 'parent' +WARNING [tests\assert-test-behavioral-types.bal:(22:5,22:29)] undocumented field 'name' (BCE20004) + | +22 | public string name = ""; + | ^^^^^^^^^^^^^^^^^^^^^^^^ + +WARNING [tests\assert-test-behavioral-types.bal:(23:5,23:24)] undocumented field 'age' (BCE20004) + | +23 | public int age = 0; + | ^^^^^^^^^^^^^^^^^^^ + +WARNING [tests\assert-test-behavioral-types.bal:(24:5,24:32)] undocumented field 'parent' (BCE20004) + | +24 | public Person? parent = (); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + Running Tests with Coverage @@ -30,4 +42,4 @@ Running Tests with Coverage Generating Test Report assertions-behavioral-types\target\report\test_results.json - \ No newline at end of file + diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/BasicCasesTest-testAssertDiffError.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/BasicCasesTest-testAssertDiffError.txt index fcdb605c5a5f..4cb2aaf80da7 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/BasicCasesTest-testAssertDiffError.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/BasicCasesTest-testAssertDiffError.txt @@ -1,8 +1,20 @@ Compiling source intg_tests/assertions:0.0.0 -WARNING [tests\assertions-diff-error-messages.bal:(22:5,22:29)] undocumented field 'name' -WARNING [tests\assertions-diff-error-messages.bal:(23:5,23:24)] undocumented field 'age' -WARNING [tests\assertions-diff-error-messages.bal:(24:5,24:32)] undocumented field 'parent' +WARNING [tests\assertions-diff-error-messages.bal:(22:5,22:29)] undocumented field 'name' (BCE20004) + | +22 | public string name = ""; + | ^^^^^^^^^^^^^^^^^^^^^^^^ + +WARNING [tests\assertions-diff-error-messages.bal:(23:5,23:24)] undocumented field 'age' (BCE20004) + | +23 | public int age = 0; + | ^^^^^^^^^^^^^^^^^^^ + +WARNING [tests\assertions-diff-error-messages.bal:(24:5,24:32)] undocumented field 'parent' (BCE20004) + | +24 | public Person? parent = (); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + Running Tests with Coverage @@ -32,4 +44,4 @@ Running Tests with Coverage Generating Test Report assertions-diff-error\target\report\test_results.json - \ No newline at end of file + diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/BasicCasesTest-testAssertStructuralTypes.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/BasicCasesTest-testAssertStructuralTypes.txt index 126797d7cdff..158c3723c17b 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/BasicCasesTest-testAssertStructuralTypes.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/BasicCasesTest-testAssertStructuralTypes.txt @@ -1,8 +1,20 @@ Compiling source intg_tests/assertions:0.0.0 -WARNING [tests\assert-test-structural-types.bal:(22:5,22:21)] undocumented field 'id' -WARNING [tests\assert-test-structural-types.bal:(23:5,23:17)] undocumented field 'name' -WARNING [tests\assert-test-structural-types.bal:(24:5,24:18)] undocumented field 'salary' +WARNING [tests\assert-test-structural-types.bal:(22:5,22:21)] undocumented field 'id' (BCE20004) + | +22 | readonly int id; + | ^^^^^^^^^^^^^^^^ + +WARNING [tests\assert-test-structural-types.bal:(23:5,23:17)] undocumented field 'name' (BCE20004) + | +23 | string name; + | ^^^^^^^^^^^^ + +WARNING [tests\assert-test-structural-types.bal:(24:5,24:18)] undocumented field 'salary' (BCE20004) + | +24 | float salary; + | ^^^^^^^^^^^^^ + Running Tests with Coverage @@ -50,4 +62,4 @@ Running Tests with Coverage Generating Test Report assertions-structural-types\target\report\test_results.json - \ No newline at end of file + diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/BasicCasesTest-testAssertionErrorMessage.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/BasicCasesTest-testAssertionErrorMessage.txt index 30c837278d7b..753cac026608 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/BasicCasesTest-testAssertionErrorMessage.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/BasicCasesTest-testAssertionErrorMessage.txt @@ -1,8 +1,20 @@ Compiling source intg_tests/assertions:0.0.0 -WARNING [tests\assertions-error-messages.bal:(22:5,22:29)] undocumented field 'name' -WARNING [tests\assertions-error-messages.bal:(23:5,23:24)] undocumented field 'age' -WARNING [tests\assertions-error-messages.bal:(24:5,24:32)] undocumented field 'parent' +WARNING [tests\assertions-error-messages.bal:(22:5,22:29)] undocumented field 'name' (BCE20004) + | +22 | public string name = ""; + | ^^^^^^^^^^^^^^^^^^^^^^^^ + +WARNING [tests\assertions-error-messages.bal:(23:5,23:24)] undocumented field 'age' (BCE20004) + | +23 | public int age = 0; + | ^^^^^^^^^^^^^^^^^^^ + +WARNING [tests\assertions-error-messages.bal:(24:5,24:32)] undocumented field 'parent' (BCE20004) + | +24 | public Person? parent = (); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + Running Tests with Coverage @@ -27,4 +39,4 @@ Running Tests with Coverage Generating Test Report assertions-error-messages\target\report\test_results.json - \ No newline at end of file + diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testArrayDataProviderWithFail.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testArrayDataProviderWithFail.txt index c513557e1170..170a1343c5dc 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testArrayDataProviderWithFail.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testArrayDataProviderWithFail.txt @@ -1,7 +1,15 @@ Compiling source intg_tests/dataproviders:0.0.0 -WARNING [tests\new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' -WARNING [tests\new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' +WARNING [tests\new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' (BCE20403) + | +121 | int a = 9/0; + | ^^^^^^^^^^^^ + +WARNING [tests\new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' (BCE20403) + | +153 | int a = 9/0; + | ^^^^^^^^^^^^ + Running Tests with Coverage diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testArrayDataRerunFailedTest.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testArrayDataRerunFailedTest.txt index 775cf11480b3..ea3f7ce5bf04 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testArrayDataRerunFailedTest.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testArrayDataRerunFailedTest.txt @@ -1,7 +1,15 @@ Compiling source intg_tests/dataproviders:0.0.0 -WARNING [tests\new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' -WARNING [tests\new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' +WARNING [tests\new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' (BCE20403) + | +121 | int a = 9/0; + | ^^^^^^^^^^^^ + +WARNING [tests\new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' (BCE20403) + | +153 | int a = 9/0; + | ^^^^^^^^^^^^ + Running Tests with Coverage diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testCodeFragmentKeys2.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testCodeFragmentKeys2.txt index 54a5cd7903e8..0bacb20bdd15 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testCodeFragmentKeys2.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testCodeFragmentKeys2.txt @@ -1,7 +1,15 @@ Compiling source intg_tests/dataproviders:0.0.0 -WARNING [tests\new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' -WARNING [tests\new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' +WARNING [tests\new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' (BCE20403) + | +121 | int a = 9/0; + | ^^^^^^^^^^^^ + +WARNING [tests\new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' (BCE20403) + | +153 | int a = 9/0; + | ^^^^^^^^^^^^ + Running Tests with Coverage @@ -28,4 +36,4 @@ Running Tests with Coverage Generating Test Report data-providers\target\report\test_results.json - \ No newline at end of file + diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testCodeFragmentKeys3.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testCodeFragmentKeys3.txt index ffb5a94c4084..9471cf1449f5 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testCodeFragmentKeys3.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testCodeFragmentKeys3.txt @@ -1,7 +1,15 @@ Compiling source intg_tests/dataproviders:0.0.0 -WARNING [tests\new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' -WARNING [tests\new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' +WARNING [tests\new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' (BCE20403) + | +121 | int a = 9/0; + | ^^^^^^^^^^^^ + +WARNING [tests\new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' (BCE20403) + | +153 | int a = 9/0; + | ^^^^^^^^^^^^ + Running Tests with Coverage @@ -26,4 +34,4 @@ Running Tests with Coverage Generating Test Report data-providers\target\report\test_results.json - \ No newline at end of file + diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testCodeFragmentKeys5.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testCodeFragmentKeys5.txt index 0a3332f49d67..83814999c913 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testCodeFragmentKeys5.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testCodeFragmentKeys5.txt @@ -1,7 +1,14 @@ Compiling source intg_tests/dataproviders:0.0.0 -WARNING [tests\new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' -WARNING [tests\new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' +WARNING [tests\new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' (BCE20403) + | +121 | int a = 9/0; + | ^^^^^^^^^^^^ + +WARNING [tests\new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' (BCE20403) + | +153 | int a = 9/0; + | ^^^^^^^^^^^^ Running Tests with Coverage @@ -26,4 +33,4 @@ Running Tests with Coverage Generating Test Report data-providers\target\report\test_results.json - \ No newline at end of file + diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testCodeFragmentKeysWithWildCard0.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testCodeFragmentKeysWithWildCard0.txt index 6f8651238e31..64b507f1c084 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testCodeFragmentKeysWithWildCard0.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testCodeFragmentKeysWithWildCard0.txt @@ -1,7 +1,14 @@ Compiling source intg_tests/dataproviders:0.0.0 -WARNING [tests\new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' -WARNING [tests\new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' +WARNING [tests\new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' (BCE20403) + | +121 | int a = 9/0; + | ^^^^^^^^^^^^ + +WARNING [tests\new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' (BCE20403) + | +153 | int a = 9/0; + | ^^^^^^^^^^^^ Running Tests with Coverage @@ -26,4 +33,4 @@ Running Tests with Coverage Generating Test Report data-providers\target\report\test_results.json - \ No newline at end of file + diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testCodeFragmentKeysWithWildCard1.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testCodeFragmentKeysWithWildCard1.txt index 60e0d69cfaba..90f78cd6aaa2 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testCodeFragmentKeysWithWildCard1.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testCodeFragmentKeysWithWildCard1.txt @@ -1,7 +1,14 @@ Compiling source intg_tests/dataproviders:0.0.0 -WARNING [tests\new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' -WARNING [tests\new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' +WARNING [tests\new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' (BCE20403) + | +121 | int a = 9/0; + | ^^^^^^^^^^^^ + +WARNING [tests\new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' (BCE20403) + | +153 | int a = 9/0; + | ^^^^^^^^^^^^ Running Tests with Coverage @@ -26,4 +33,4 @@ Running Tests with Coverage Generating Test Report data-providers\target\report\test_results.json - \ No newline at end of file + diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testCodeFragmentKeysWithWildCard2.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testCodeFragmentKeysWithWildCard2.txt index 54a5cd7903e8..67b9efbbb726 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testCodeFragmentKeysWithWildCard2.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testCodeFragmentKeysWithWildCard2.txt @@ -1,7 +1,14 @@ Compiling source intg_tests/dataproviders:0.0.0 -WARNING [tests\new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' -WARNING [tests\new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' +WARNING [tests\new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' (BCE20403) + | +121 | int a = 9/0; + | ^^^^^^^^^^^^ + +WARNING [tests\new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' (BCE20403) + | +153 | int a = 9/0; + | ^^^^^^^^^^^^ Running Tests with Coverage @@ -28,4 +35,4 @@ Running Tests with Coverage Generating Test Report data-providers\target\report\test_results.json - \ No newline at end of file + diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testCodeFragmentKeysWithWildCard3.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testCodeFragmentKeysWithWildCard3.txt index ffb5a94c4084..9a5e57a85ca1 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testCodeFragmentKeysWithWildCard3.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testCodeFragmentKeysWithWildCard3.txt @@ -1,7 +1,14 @@ Compiling source intg_tests/dataproviders:0.0.0 -WARNING [tests\new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' -WARNING [tests\new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' +WARNING [tests\new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' (BCE20403) + | +121 | int a = 9/0; + | ^^^^^^^^^^^^ + +WARNING [tests\new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' (BCE20403) + | +153 | int a = 9/0; + | ^^^^^^^^^^^^ Running Tests with Coverage @@ -26,4 +33,4 @@ Running Tests with Coverage Generating Test Report data-providers\target\report\test_results.json - \ No newline at end of file + diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testCodeFragmentKeysWithWildCard4.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testCodeFragmentKeysWithWildCard4.txt index 6d463567502d..fa294f565630 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testCodeFragmentKeysWithWildCard4.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testCodeFragmentKeysWithWildCard4.txt @@ -1,7 +1,15 @@ Compiling source intg_tests/dataproviders:0.0.0 -WARNING [tests\new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' -WARNING [tests\new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' +WARNING [tests\new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' (BCE20403) + | +121 | int a = 9/0; + | ^^^^^^^^^^^^ + +WARNING [tests\new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' (BCE20403) + | +153 | int a = 9/0; + | ^^^^^^^^^^^^ + Running Tests with Coverage @@ -26,4 +34,4 @@ Running Tests with Coverage Generating Test Report data-providers\target\report\test_results.json - \ No newline at end of file + diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testCodeFragmentKeysWithWildCard5.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testCodeFragmentKeysWithWildCard5.txt index 0a3332f49d67..660a92aeb97e 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testCodeFragmentKeysWithWildCard5.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testCodeFragmentKeysWithWildCard5.txt @@ -1,7 +1,15 @@ Compiling source intg_tests/dataproviders:0.0.0 -WARNING [tests\new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' -WARNING [tests\new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' +WARNING [tests\new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' (BCE20403) + | +121 | int a = 9/0; + | ^^^^^^^^^^^^ + +WARNING [tests\new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' (BCE20403) + | +153 | int a = 9/0; + | ^^^^^^^^^^^^ + Running Tests with Coverage @@ -26,4 +34,4 @@ Running Tests with Coverage Generating Test Report data-providers\target\report\test_results.json - \ No newline at end of file + diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testCodeFragmentKeysWithWildCard6.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testCodeFragmentKeysWithWildCard6.txt index 120b17a81a66..ddee9d95a61b 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testCodeFragmentKeysWithWildCard6.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testCodeFragmentKeysWithWildCard6.txt @@ -1,7 +1,15 @@ Compiling source intg_tests/dataproviders:0.0.0 -WARNING [tests\new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' -WARNING [tests\new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' +WARNING [tests\new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' (BCE20403) + | +121 | int a = 9/0; + | ^^^^^^^^^^^^ + +WARNING [tests\new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' (BCE20403) + | +153 | int a = 9/0; + | ^^^^^^^^^^^^ + Running Tests with Coverage @@ -26,4 +34,4 @@ Running Tests with Coverage Generating Test Report data-providers\target\report\test_results.json - \ No newline at end of file + diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testDataProviderSingleFailure.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testDataProviderSingleFailure.txt index 950cecbca3f0..fc3c95e348d9 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testDataProviderSingleFailure.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testDataProviderSingleFailure.txt @@ -1,7 +1,15 @@ Compiling source intg_tests/dataproviders:0.0.0 -WARNING [tests\new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' -WARNING [tests\new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' +WARNING [tests\new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' (BCE20403) + | +121 | int a = 9/0; + | ^^^^^^^^^^^^ + +WARNING [tests\new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' (BCE20403) + | +153 | int a = 9/0; + | ^^^^^^^^^^^^ + Running Tests with Coverage diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testDataProviderWithMixedType.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testDataProviderWithMixedType.txt index 11170c2436ff..19ba20626367 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testDataProviderWithMixedType.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testDataProviderWithMixedType.txt @@ -1,7 +1,15 @@ Compiling source intg_tests/dataproviders:0.0.0 -WARNING [tests\new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' -WARNING [tests\new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' +WARNING [tests\new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' (BCE20403) + | +121 | int a = 9/0; + | ^^^^^^^^^^^^ + +WARNING [tests\new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' (BCE20403) + | +153 | int a = 9/0; + | ^^^^^^^^^^^^ + Running Tests with Coverage @@ -27,4 +35,4 @@ Running Tests with Coverage Generating Test Report data-providers\target\report\test_results.json - \ No newline at end of file + diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testMapValueDataProvider.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testMapValueDataProvider.txt index 509b141ac651..f8bb2f575d86 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testMapValueDataProvider.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testMapValueDataProvider.txt @@ -1,7 +1,15 @@ Compiling source intg_tests/dataproviders:0.0.0 -WARNING [tests\new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' -WARNING [tests\new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' +WARNING [tests\new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' (BCE20403) + | +121 | int a = 9/0; + | ^^^^^^^^^^^^ + +WARNING [tests\new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' (BCE20403) + | +153 | int a = 9/0; + | ^^^^^^^^^^^^ + Running Tests with Coverage diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testMultiModuleSingleTestExec.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testMultiModuleSingleTestExec.txt index 8956b08c2f63..176249225e37 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testMultiModuleSingleTestExec.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testMultiModuleSingleTestExec.txt @@ -1,7 +1,15 @@ Compiling source intg_tests/dataproviders:0.0.0 -WARNING [tests\new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' -WARNING [tests\new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' +WARNING [tests\new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' (BCE20403) + | +121 | int a = 9/0; + | ^^^^^^^^^^^^ + +WARNING [tests\new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' (BCE20403) + | +153 | int a = 9/0; + | ^^^^^^^^^^^^ + Running Tests with Coverage @@ -26,4 +34,4 @@ Running Tests with Coverage Generating Test Report data-providers\target\report\test_results.json - \ No newline at end of file + diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testRerunFailedTest.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testRerunFailedTest.txt index 09441fb7c431..168599b1da4d 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testRerunFailedTest.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testRerunFailedTest.txt @@ -1,7 +1,15 @@ Compiling source intg_tests/dataproviders:0.0.0 -WARNING [tests\new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' -WARNING [tests\new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' +WARNING [tests\new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' (BCE20403) + | +121 | int a = 9/0; + | ^^^^^^^^^^^^ + +WARNING [tests\new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' (BCE20403) + | +153 | int a = 9/0; + | ^^^^^^^^^^^^ + Running Tests with Coverage diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testValidDataProvider.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testValidDataProvider.txt index d5fe21c129c6..1a078d77419b 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testValidDataProvider.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testValidDataProvider.txt @@ -1,7 +1,15 @@ Compiling source intg_tests/dataproviders:0.0.0 -WARNING [tests\new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' -WARNING [tests\new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' +WARNING [tests\new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' (BCE20403) + | +121 | int a = 9/0; + | ^^^^^^^^^^^^ + +WARNING [tests\new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' (BCE20403) + | +153 | int a = 9/0; + | ^^^^^^^^^^^^ + Running Tests with Coverage @@ -27,4 +35,4 @@ Running Tests with Coverage Generating Test Report data-providers\target\report\test_results.json - \ No newline at end of file + diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testValidDataProviderCase.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testValidDataProviderCase.txt index 24a5a066f383..c99c17aa9e68 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testValidDataProviderCase.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testValidDataProviderCase.txt @@ -1,7 +1,15 @@ Compiling source intg_tests/dataproviders:0.0.0 -WARNING [tests\new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' -WARNING [tests\new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' +WARNING [tests\new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' (BCE20403) + | +121 | int a = 9/0; + | ^^^^^^^^^^^^ + +WARNING [tests\new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' (BCE20403) + | +153 | int a = 9/0; + | ^^^^^^^^^^^^ + Running Tests with Coverage @@ -26,4 +34,4 @@ Running Tests with Coverage Generating Test Report data-providers\target\report\test_results.json - \ No newline at end of file + diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testValidDataProviderWithAfterFailing.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testValidDataProviderWithAfterFailing.txt index cedf1f5fc98c..f7164c2d64e2 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testValidDataProviderWithAfterFailing.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testValidDataProviderWithAfterFailing.txt @@ -1,7 +1,15 @@ Compiling source intg_tests/dataproviders:0.0.0 -WARNING [tests\new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' -WARNING [tests\new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' +WARNING [tests\new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' (BCE20403) + | +121 | int a = 9/0; + | ^^^^^^^^^^^^ + +WARNING [tests\new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' (BCE20403) + | +153 | int a = 9/0; + | ^^^^^^^^^^^^ + Running Tests with Coverage diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testValidDataProviderWithBeforeAfterFunctions.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testValidDataProviderWithBeforeAfterFunctions.txt index 90ed5e32ab0a..a185524b7b39 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testValidDataProviderWithBeforeAfterFunctions.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testValidDataProviderWithBeforeAfterFunctions.txt @@ -1,7 +1,15 @@ Compiling source intg_tests/dataproviders:0.0.0 -WARNING [tests\new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' -WARNING [tests\new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' +WARNING [tests\new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' (BCE20403) + | +121 | int a = 9/0; + | ^^^^^^^^^^^^ + +WARNING [tests\new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' (BCE20403) + | +153 | int a = 9/0; + | ^^^^^^^^^^^^ + Running Tests with Coverage @@ -31,4 +39,4 @@ Running Tests with Coverage Generating Test Report data-providers\target\report\test_results.json - \ No newline at end of file + diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testValidDataProviderWithBeforeFailing.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testValidDataProviderWithBeforeFailing.txt index cbf847fa465c..7001c9d1eb11 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testValidDataProviderWithBeforeFailing.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testValidDataProviderWithBeforeFailing.txt @@ -1,7 +1,15 @@ Compiling source intg_tests/dataproviders:0.0.0 -WARNING [tests\new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' -WARNING [tests\new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' +WARNING [tests\new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' (BCE20403) + | +121 | int a = 9/0; + | ^^^^^^^^^^^^ + +WARNING [tests\new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' (BCE20403) + | +153 | int a = 9/0; + | ^^^^^^^^^^^^ + Running Tests with Coverage diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testValidDataProviderWithFail.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testValidDataProviderWithFail.txt index 1b157e8c41d4..01a43678fafe 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testValidDataProviderWithFail.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testValidDataProviderWithFail.txt @@ -1,7 +1,15 @@ Compiling source intg_tests/dataproviders:0.0.0 -WARNING [tests\new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' -WARNING [tests\new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' +WARNING [tests\new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' (BCE20403) + | +121 | int a = 9/0; + | ^^^^^^^^^^^^ + +WARNING [tests\new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' (BCE20403) + | +153 | int a = 9/0; + | ^^^^^^^^^^^^ + Running Tests with Coverage diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testWithSpecialKeys.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testWithSpecialKeys.txt index 02b6b8de7b95..71d68f6174cb 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testWithSpecialKeys.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/DataProviderTest-testWithSpecialKeys.txt @@ -1,7 +1,15 @@ Compiling source intg_tests/dataproviders:0.0.0 -WARNING [tests\new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' -WARNING [tests\new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' +WARNING [tests\new-data-provider-tests.bal:(121:9,121:21)] unused variable 'a' (BCE20403) + | +121 | int a = 9/0; + | ^^^^^^^^^^^^ + +WARNING [tests\new-data-provider-tests.bal:(153:9,153:21)] unused variable 'a' (BCE20403) + | +153 | int a = 9/0; + | ^^^^^^^^^^^^ + Running Tests with Coverage @@ -28,4 +36,4 @@ Running Tests with Coverage Generating Test Report data-providers\target\report\test_results.json - \ No newline at end of file + diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/GroupingTest-testWhenAfterGroupsFails.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/GroupingTest-testWhenAfterGroupsFails.txt index e2c83a31876e..ba7f0d457456 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/GroupingTest-testWhenAfterGroupsFails.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/GroupingTest-testWhenAfterGroupsFails.txt @@ -2,7 +2,11 @@ Code coverage is not yet supported with single bal files. Ignoring the flag and warning: ignoring --includes flag since code coverage is not enabled Compiling source failed-after-groups-test.bal -WARNING [failed-after-groups-test.bal:(37:5,37:17)] unused variable 'b' +WARNING [failed-after-groups-test.bal:(37:5,37:17)] unused variable 'b' (BCE20403) + | +37 | int b = 2/0; + | ^^^^^^^^^^^^ + Running Tests @@ -25,4 +29,4 @@ Running Tests 5 passing 0 failing 0 skipped -error: there are test failures \ No newline at end of file +error: there are test failures diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/InvalidDataProviderTestCase-testEmptyDataProvider.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/InvalidDataProviderTestCase-testEmptyDataProvider.txt index 56612731e9f7..c0b77ef50351 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/InvalidDataProviderTestCase-testEmptyDataProvider.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/InvalidDataProviderTestCase-testEmptyDataProvider.txt @@ -2,5 +2,9 @@ Code coverage is not yet supported with single bal files. Ignoring the flag and warning: ignoring --includes flag since code coverage is not enabled Compiling source empty-data-provider-test.bal -ERROR [empty-data-provider-test.bal:(14:19,14:28)] incompatible types: expected 'function () returns (ballerina/test:0.0.0:DataProviderReturnType)?', found 'function () returns (int[])' -error: compilation contains errors \ No newline at end of file +ERROR [empty-data-provider-test.bal:(14:19,14:28)] incompatible types: expected 'function () returns (ballerina/test:0.0.0:DataProviderReturnType)?', found 'function () returns (int[])' (BCE2066) + | +14 | dataProvider: provider2 + | ^^^^^^^^^ + +error: compilation contains errors diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/InvalidDataProviderTestCase-testInvalidDataProvider.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/InvalidDataProviderTestCase-testInvalidDataProvider.txt index 73bac8d8aaa4..15a8c09f0084 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/InvalidDataProviderTestCase-testInvalidDataProvider.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/InvalidDataProviderTestCase-testInvalidDataProvider.txt @@ -2,7 +2,11 @@ Code coverage is not yet supported with single bal files. Ignoring the flag and warning: ignoring --includes flag since code coverage is not enabled Compiling source invalid-data-provider-test.bal -WARNING [invalid-data-provider-test.bal:(25:5,25:58)] unused variable 'resultErr' +WARNING [invalid-data-provider-test.bal:(25:5,25:58)] unused variable 'resultErr' (BCE20403) + | +25 | int|error resultErr = trap result.cloneWithType(int); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + Running Tests diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/InvalidDataProviderTestCase-testInvalidDataProvider2.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/InvalidDataProviderTestCase-testInvalidDataProvider2.txt index 17c85728d424..68ffc1024785 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/InvalidDataProviderTestCase-testInvalidDataProvider2.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/InvalidDataProviderTestCase-testInvalidDataProvider2.txt @@ -2,9 +2,21 @@ Code coverage is not yet supported with single bal files. Ignoring the flag and warning: ignoring --includes flag since code coverage is not enabled Compiling source invalid-data-provider-test2.bal -WARNING [invalid-data-provider-test2.bal:(25:5,25:53)] unused variable 'fErr' -WARNING [invalid-data-provider-test2.bal:(26:5,26:53)] unused variable 'sErr' -WARNING [invalid-data-provider-test2.bal:(27:5,27:58)] unused variable 'resultErr' +WARNING [invalid-data-provider-test2.bal:(25:5,25:53)] unused variable 'fErr' (BCE20403) + | +25 | int|error fErr = trap fValue.cloneWithType(int); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +WARNING [invalid-data-provider-test2.bal:(26:5,26:53)] unused variable 'sErr' (BCE20403) + | +26 | int|error sErr = trap sValue.cloneWithType(int); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +WARNING [invalid-data-provider-test2.bal:(27:5,27:58)] unused variable 'resultErr' (BCE20403) + | +27 | int|error resultErr = trap result.cloneWithType(int); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + Running Tests @@ -45,4 +57,4 @@ testInvalidDataProvider2:0 has failed. 0 passing 1 failing 0 skipped -error: there are test failures \ No newline at end of file +error: there are test failures diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/InvalidFunctionMockingTestCase-testLegacyMockingFunctionInNonExistingModule.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/InvalidFunctionMockingTestCase-testLegacyMockingFunctionInNonExistingModule.txt index c037b79b9f0d..47311091ea75 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/InvalidFunctionMockingTestCase-testLegacyMockingFunctionInNonExistingModule.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/InvalidFunctionMockingTestCase-testLegacyMockingFunctionInNonExistingModule.txt @@ -1,4 +1,13 @@ Compiling source intg_tests/non_existent_module_mock:0.1.0 ERROR [tests\test.bal:(3:1,6:2)] could not find specified module 'intg_tests/module1:0.1.0' + | +3 | @test:Mock { +: | ^^^^^^^^^^^^ +: | : +: | : +6 | } + | ^ + | + error: compilation contains errors diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/InvalidFunctionMockingTestCase-testLegacyMockingFunctionInSingleFileProject.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/InvalidFunctionMockingTestCase-testLegacyMockingFunctionInSingleFileProject.txt index e9b3b3bd2ccc..fbbae2d0ee8c 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/InvalidFunctionMockingTestCase-testLegacyMockingFunctionInSingleFileProject.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/InvalidFunctionMockingTestCase-testLegacyMockingFunctionInSingleFileProject.txt @@ -3,4 +3,8 @@ warning: ignoring --includes flag since code coverage is not enabled Compiling source function-legacy-mock.bal ERROR [function-legacy-mock.bal:(8:1,8:38)] function mocking is not supported with standalone Ballerina files + | +8 | @test:Mock { functionName: "intAdd" } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + error: compilation contains errors diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/InvalidFunctionMockingTestCase-testLegacyMockingFunctionWithIncompatibleTypes.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/InvalidFunctionMockingTestCase-testLegacyMockingFunctionWithIncompatibleTypes.txt index 537c1fa15bfe..48ead55f1150 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/InvalidFunctionMockingTestCase-testLegacyMockingFunctionWithIncompatibleTypes.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/InvalidFunctionMockingTestCase-testLegacyMockingFunctionWithIncompatibleTypes.txt @@ -1,4 +1,13 @@ Compiling source intg_tests/incompatible_type_mock:0.1.0 ERROR [tests\test.bal:(6:1,8:2)] incompatible types: expected isolated function () returns (string) but found isolated function () returns (int) + | +6 | function getMockClient() returns int { +: | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +: | : +: | : +8 | } + | ^ + | + error: compilation contains errors diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/InvalidFunctionMockingTestCase-testLegacyMockingNonExistingFunction.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/InvalidFunctionMockingTestCase-testLegacyMockingNonExistingFunction.txt index 1b90b3e50c80..fc8aa1226ab8 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/InvalidFunctionMockingTestCase-testLegacyMockingNonExistingFunction.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/InvalidFunctionMockingTestCase-testLegacyMockingNonExistingFunction.txt @@ -1,4 +1,13 @@ Compiling source intg_tests/non_existent_function_mock:0.1.0 ERROR [tests\test.bal:(3:1,5:2)] could not find function 'createJdbcClient' in module 'intg_tests/non_existent_function_mock:0.1.0' + | +3 | @test:Mock { +: | ^^^^^^^^^^^^ +: | : +: | : +5 | } + | ^ + | + error: compilation contains errors diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/InvalidFunctionMockingTestCase-testLegacyMockingWithEmptyAnnotationRecord.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/InvalidFunctionMockingTestCase-testLegacyMockingWithEmptyAnnotationRecord.txt index 498299af288d..15dee64e1dc7 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/InvalidFunctionMockingTestCase-testLegacyMockingWithEmptyAnnotationRecord.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/InvalidFunctionMockingTestCase-testLegacyMockingWithEmptyAnnotationRecord.txt @@ -1,4 +1,8 @@ Compiling source intg_tests/empty_annot_rec_function_mock:0.1.0 ERROR [tests\test.bal:(3:1,3:14)] function name cannot be empty + | +3 | @test:Mock {} + | ^^^^^^^^^^^^^ + error: compilation contains errors diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/InvalidFunctionMockingTestCase-testLegacyMockingWithoutAnnotationRecord.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/InvalidFunctionMockingTestCase-testLegacyMockingWithoutAnnotationRecord.txt index 17ad4fff2996..2609ed9c4440 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/InvalidFunctionMockingTestCase-testLegacyMockingWithoutAnnotationRecord.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/InvalidFunctionMockingTestCase-testLegacyMockingWithoutAnnotationRecord.txt @@ -1,4 +1,8 @@ Compiling source intg_tests/recordless_annot_function_mock:0.1.0 ERROR [tests\test.bal:(3:1,3:11)] missing required 'functionName' field + | +3 | @test:Mock + | ^^^^^^^^^^ + error: compilation contains errors diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/InvalidFunctionMockingTestCase-testMockingFunctionInNonExistingModule.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/InvalidFunctionMockingTestCase-testMockingFunctionInNonExistingModule.txt index c037b79b9f0d..47311091ea75 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/InvalidFunctionMockingTestCase-testMockingFunctionInNonExistingModule.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/InvalidFunctionMockingTestCase-testMockingFunctionInNonExistingModule.txt @@ -1,4 +1,13 @@ Compiling source intg_tests/non_existent_module_mock:0.1.0 ERROR [tests\test.bal:(3:1,6:2)] could not find specified module 'intg_tests/module1:0.1.0' + | +3 | @test:Mock { +: | ^^^^^^^^^^^^ +: | : +: | : +6 | } + | ^ + | + error: compilation contains errors diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/InvalidFunctionMockingTestCase-testMockingFunctionInSingleFileProject.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/InvalidFunctionMockingTestCase-testMockingFunctionInSingleFileProject.txt index 5f65b32f2d6f..54a818f73c5a 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/InvalidFunctionMockingTestCase-testMockingFunctionInSingleFileProject.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/InvalidFunctionMockingTestCase-testMockingFunctionInSingleFileProject.txt @@ -3,4 +3,8 @@ warning: ignoring --includes flag since code coverage is not enabled Compiling source function-mock.bal ERROR [function-mock.bal:(12:1,12:38)] function mocking is not supported with standalone Ballerina files + | +12 | @test:Mock { functionName: "intAdd" } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + error: compilation contains errors diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/InvalidFunctionMockingTestCase-testMockingNonExistingFunction.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/InvalidFunctionMockingTestCase-testMockingNonExistingFunction.txt index 3bb26045a8a0..60d6a53d74b4 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/InvalidFunctionMockingTestCase-testMockingNonExistingFunction.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/InvalidFunctionMockingTestCase-testMockingNonExistingFunction.txt @@ -1,4 +1,8 @@ Compiling source intg_tests/non_existent_function_mock:0.1.0 ERROR [tests\test.bal:(3:1,3:38)] could not find function 'intAdd' in module 'intg_tests/non_existent_function_mock:0.1.0' + | +3 | @test:Mock { functionName: "intAdd" } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + error: compilation contains errors diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/InvalidFunctionMockingTestCase-testMockingWithEmptyAnnotationRecord.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/InvalidFunctionMockingTestCase-testMockingWithEmptyAnnotationRecord.txt index 498299af288d..15dee64e1dc7 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/InvalidFunctionMockingTestCase-testMockingWithEmptyAnnotationRecord.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/InvalidFunctionMockingTestCase-testMockingWithEmptyAnnotationRecord.txt @@ -1,4 +1,8 @@ Compiling source intg_tests/empty_annot_rec_function_mock:0.1.0 ERROR [tests\test.bal:(3:1,3:14)] function name cannot be empty + | +3 | @test:Mock {} + | ^^^^^^^^^^^^^ + error: compilation contains errors diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/InvalidFunctionMockingTestCase-testMockingWithoutAnnotationRecord.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/InvalidFunctionMockingTestCase-testMockingWithoutAnnotationRecord.txt index 17ad4fff2996..2609ed9c4440 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/InvalidFunctionMockingTestCase-testMockingWithoutAnnotationRecord.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/InvalidFunctionMockingTestCase-testMockingWithoutAnnotationRecord.txt @@ -1,4 +1,8 @@ Compiling source intg_tests/recordless_annot_function_mock:0.1.0 ERROR [tests\test.bal:(3:1,3:11)] missing required 'functionName' field + | +3 | @test:Mock + | ^^^^^^^^^^ + error: compilation contains errors diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/MissingFunctionsTestCase-testMissingAfterFunction.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/MissingFunctionsTestCase-testMissingAfterFunction.txt index 0d82ae4f677f..45f400b55340 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/MissingFunctionsTestCase-testMissingAfterFunction.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/MissingFunctionsTestCase-testMissingAfterFunction.txt @@ -2,5 +2,9 @@ Code coverage is not yet supported with single bal files. Ignoring the flag and warning: ignoring --includes flag since code coverage is not enabled Compiling source after-func-negative.bal -ERROR [after-func-negative.bal:(22:12,22:29)] undefined symbol 'afterFuncNonExist' -error: compilation contains errors \ No newline at end of file +ERROR [after-func-negative.bal:(22:12,22:29)] undefined symbol 'afterFuncNonExist' (BCE2010) + | +22 | after: afterFuncNonExist + | ^^^^^^^^^^^^^^^^^ + +error: compilation contains errors diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/MissingFunctionsTestCase-testMissingBeforeFunction.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/MissingFunctionsTestCase-testMissingBeforeFunction.txt index d357e7acaa57..5466561952cb 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/MissingFunctionsTestCase-testMissingBeforeFunction.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/MissingFunctionsTestCase-testMissingBeforeFunction.txt @@ -2,5 +2,9 @@ Code coverage is not yet supported with single bal files. Ignoring the flag and warning: ignoring --includes flag since code coverage is not enabled Compiling source before-func-negative.bal -ERROR [before-func-negative.bal:(22:13,22:31)] undefined symbol 'beforeFuncNonExist' -error: compilation contains errors \ No newline at end of file +ERROR [before-func-negative.bal:(22:13,22:31)] undefined symbol 'beforeFuncNonExist' (BCE2010) + | +22 | before: beforeFuncNonExist + | ^^^^^^^^^^^^^^^^^^ + +error: compilation contains errors diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/MissingFunctionsTestCase-testMissingDependsOnFunction.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/MissingFunctionsTestCase-testMissingDependsOnFunction.txt index af5514ab7a62..e5f0e38616ac 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/MissingFunctionsTestCase-testMissingDependsOnFunction.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/MissingFunctionsTestCase-testMissingDependsOnFunction.txt @@ -2,5 +2,9 @@ Code coverage is not yet supported with single bal files. Ignoring the flag and warning: ignoring --includes flag since code coverage is not enabled Compiling source depends-on-negative.bal -ERROR [depends-on-negative.bal:(22:17,22:28)] undefined symbol 'nonExisting' -error: compilation contains errors \ No newline at end of file +ERROR [depends-on-negative.bal:(22:17,22:28)] undefined symbol 'nonExisting' (BCE2010) + | +22 | dependsOn: [nonExisting] + | ^^^^^^^^^^^ + +error: compilation contains errors diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/MockTest-testObjectMocking.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/MockTest-testObjectMocking.txt index 57e57935403a..54ef72a4310c 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/MockTest-testObjectMocking.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/MockTest-testObjectMocking.txt @@ -1,7 +1,15 @@ Compiling source intg_tests/object_mocking:0.0.0 -WARNING [modules\TestHttpClient\main.bal:(54:45,54:82)] this function should explicitly return a value -WARNING [main.bal:(47:5,47:47)] unused variable 'closeErr' +WARNING [modules\TestHttpClient\main.bal:(54:45,54:82)] this function should explicitly return a value (BCE20350) + | +54 | public isolated function next() returns record {|AttributeDAO value;|}|Error? { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +WARNING [main.bal:(47:5,47:47)] unused variable 'closeErr' (BCE20403) + | +47 | error? closeErr = attributeStream.close(); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + Running Tests with Coverage diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/MockTest-testObjectMocking_NegativeCases1.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/MockTest-testObjectMocking_NegativeCases1.txt index cc1bb608ced5..a308e95169e2 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/MockTest-testObjectMocking_NegativeCases1.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/MockTest-testObjectMocking_NegativeCases1.txt @@ -1,7 +1,15 @@ Compiling source intg_tests/object_mocking:0.0.0 -WARNING [modules\TestHttpClient\main.bal:(54:45,54:82)] this function should explicitly return a value -WARNING [main.bal:(47:5,47:47)] unused variable 'closeErr' +WARNING [modules\TestHttpClient\main.bal:(54:45,54:82)] this function should explicitly return a value (BCE20350) + | +54 | public isolated function next() returns record {|AttributeDAO value;|}|Error? { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +WARNING [main.bal:(47:5,47:47)] unused variable 'closeErr' (BCE20403) + | +47 | error? closeErr = attributeStream.close(); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + Running Tests with Coverage @@ -29,4 +37,4 @@ testDefaultIncompatibleArgs has failed. Generating Test Report*****project-based-tests\object-mocking-tests\target\report\test_results.json -error: there are test failures \ No newline at end of file +error: there are test failures diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/MockTest-testObjectMocking_NegativeCases2.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/MockTest-testObjectMocking_NegativeCases2.txt index 3109f412b758..093073126aa5 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/MockTest-testObjectMocking_NegativeCases2.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/MockTest-testObjectMocking_NegativeCases2.txt @@ -1,7 +1,15 @@ Compiling source intg_tests/object_mocking:0.0.0 -WARNING [modules\TestHttpClient\main.bal:(54:45,54:82)] this function should explicitly return a value -WARNING [main.bal:(47:5,47:47)] unused variable 'closeErr' +WARNING [modules\TestHttpClient\main.bal:(54:45,54:82)] this function should explicitly return a value (BCE20350) + | +54 | public isolated function next() returns record {|AttributeDAO value;|}|Error? { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +WARNING [main.bal:(47:5,47:47)] unused variable 'closeErr' (BCE20403) + | +47 | error? closeErr = attributeStream.close(); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + Running Tests with Coverage @@ -29,4 +37,4 @@ testDefaultInvalidMemberReturnValue has failed. Generating Test Report*****project-based-tests\object-mocking-tests\target\report\test_results.json -error: there are test failures \ No newline at end of file +error: there are test failures diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/MockTest-testObjectMocking_NegativeCases3.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/MockTest-testObjectMocking_NegativeCases3.txt index e5e7042e4e56..e2630319ed4a 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/MockTest-testObjectMocking_NegativeCases3.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/MockTest-testObjectMocking_NegativeCases3.txt @@ -1,7 +1,15 @@ Compiling source intg_tests/object_mocking:0.0.0 -WARNING [modules\TestHttpClient\main.bal:(54:45,54:82)] this function should explicitly return a value -WARNING [main.bal:(47:5,47:47)] unused variable 'closeErr' +WARNING [modules\TestHttpClient\main.bal:(54:45,54:82)] this function should explicitly return a value (BCE20350) + | +54 | public isolated function next() returns record {|AttributeDAO value;|}|Error? { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +WARNING [main.bal:(47:5,47:47)] unused variable 'closeErr' (BCE20403) + | +47 | error? closeErr = attributeStream.close(); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + Running Tests with Coverage @@ -29,4 +37,4 @@ testDefaultMockInvalidFieldName has failed. Generating Test Report*****project-based-tests\object-mocking-tests\target\report\test_results.json -error: there are test failures \ No newline at end of file +error: there are test failures diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/MockTest-testObjectMocking_NegativeCases4.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/MockTest-testObjectMocking_NegativeCases4.txt index b32d9661cbaf..602829063e6c 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/MockTest-testObjectMocking_NegativeCases4.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/MockTest-testObjectMocking_NegativeCases4.txt @@ -1,7 +1,15 @@ Compiling source intg_tests/object_mocking:0.0.0 -WARNING [modules\TestHttpClient\main.bal:(54:45,54:82)] this function should explicitly return a value -WARNING [main.bal:(47:5,47:47)] unused variable 'closeErr' +WARNING [modules\TestHttpClient\main.bal:(54:45,54:82)] this function should explicitly return a value (BCE20350) + | +54 | public isolated function next() returns record {|AttributeDAO value;|}|Error? { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +WARNING [main.bal:(47:5,47:47)] unused variable 'closeErr' (BCE20403) + | +47 | error? closeErr = attributeStream.close(); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + Running Tests with Coverage @@ -29,4 +37,4 @@ testDefaultMockInvalidReturnValue has failed. Generating Test Report*****project-based-tests\object-mocking-tests\target\report\test_results.json -error: there are test failures \ No newline at end of file +error: there are test failures diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/MockTest-testObjectMocking_NegativeCases5.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/MockTest-testObjectMocking_NegativeCases5.txt index e6c1ba886705..21211de65d58 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/MockTest-testObjectMocking_NegativeCases5.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/MockTest-testObjectMocking_NegativeCases5.txt @@ -1,7 +1,15 @@ Compiling source intg_tests/object_mocking:0.0.0 -WARNING [modules\TestHttpClient\main.bal:(54:45,54:82)] this function should explicitly return a value -WARNING [main.bal:(47:5,47:47)] unused variable 'closeErr' +WARNING [modules\TestHttpClient\main.bal:(54:45,54:82)] this function should explicitly return a value (BCE20350) + | +54 | public isolated function next() returns record {|AttributeDAO value;|}|Error? { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +WARNING [main.bal:(47:5,47:47)] unused variable 'closeErr' (BCE20403) + | +47 | error? closeErr = attributeStream.close(); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + Running Tests with Coverage @@ -29,4 +37,4 @@ testDefaultMockWrongAction has failed. Generating Test Report*****project-based-tests\object-mocking-tests\target\report\test_results.json -error: there are test failures \ No newline at end of file +error: there are test failures diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/MockTest-testObjectMocking_NegativeCases6.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/MockTest-testObjectMocking_NegativeCases6.txt index ef30fc128ac9..64fb63c290aa 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/MockTest-testObjectMocking_NegativeCases6.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/MockTest-testObjectMocking_NegativeCases6.txt @@ -1,7 +1,15 @@ Compiling source intg_tests/object_mocking:0.0.0 -WARNING [modules\TestHttpClient\main.bal:(54:45,54:82)] this function should explicitly return a value -WARNING [main.bal:(47:5,47:47)] unused variable 'closeErr' +WARNING [modules\TestHttpClient\main.bal:(54:45,54:82)] this function should explicitly return a value (BCE20350) + | +54 | public isolated function next() returns record {|AttributeDAO value;|}|Error? { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +WARNING [main.bal:(47:5,47:47)] unused variable 'closeErr' (BCE20403) + | +47 | error? closeErr = attributeStream.close(); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + Running Tests with Coverage @@ -29,4 +37,4 @@ testDefaultTooManyArgs has failed. Generating Test Report*****project-based-tests\object-mocking-tests\target\report\test_results.json -error: there are test failures \ No newline at end of file +error: there are test failures diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/MockTest-testObjectMocking_NegativeCases7.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/MockTest-testObjectMocking_NegativeCases7.txt index 9d25a830fd9c..9b3786b8882a 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/MockTest-testObjectMocking_NegativeCases7.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/MockTest-testObjectMocking_NegativeCases7.txt @@ -1,7 +1,15 @@ Compiling source intg_tests/object_mocking:0.0.0 -WARNING [modules\TestHttpClient\main.bal:(54:45,54:82)] this function should explicitly return a value -WARNING [main.bal:(47:5,47:47)] unused variable 'closeErr' +WARNING [modules\TestHttpClient\main.bal:(54:45,54:82)] this function should explicitly return a value (BCE20350) + | +54 | public isolated function next() returns record {|AttributeDAO value;|}|Error? { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +WARNING [main.bal:(47:5,47:47)] unused variable 'closeErr' (BCE20403) + | +47 | error? closeErr = attributeStream.close(); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + Running Tests with Coverage @@ -29,4 +37,4 @@ testMockInvalidStream has failed. Generating Test Report*****project-based-tests\object-mocking-tests\target\report\test_results.json -error: there are test failures \ No newline at end of file +error: there are test failures diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/SkipTestsTestCase-testSkipWhenAfterEachFails.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/SkipTestsTestCase-testSkipWhenAfterEachFails.txt index af7992316543..47711d98e207 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/SkipTestsTestCase-testSkipWhenAfterEachFails.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/SkipTestsTestCase-testSkipWhenAfterEachFails.txt @@ -2,7 +2,11 @@ Code coverage is not yet supported with single bal files. Ignoring the flag and warning: ignoring --includes flag since code coverage is not enabled Compiling source skip-when-afterEach-fails.bal -WARNING [skip-when-afterEach-fails.bal:(30:5,30:18)] unused variable 'i' +WARNING [skip-when-afterEach-fails.bal:(30:5,30:18)] unused variable 'i' (BCE20403) + | +30 | int i = 12/0; + | ^^^^^^^^^^^^^ + Running Tests @@ -21,4 +25,4 @@ Running Tests 1 passing 0 failing 2 skipped -error: there are test failures \ No newline at end of file +error: there are test failures diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/SkipTestsTestCase-testSkipWhenAfterFails.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/SkipTestsTestCase-testSkipWhenAfterFails.txt index ad2fed3e7124..8e322c9d0256 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/SkipTestsTestCase-testSkipWhenAfterFails.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/SkipTestsTestCase-testSkipWhenAfterFails.txt @@ -2,7 +2,11 @@ Code coverage is not yet supported with single bal files. Ignoring the flag and warning: ignoring --includes flag since code coverage is not enabled Compiling source skip-when-after-fails.bal -WARNING [skip-when-after-fails.bal:(30:5,30:18)] unused variable 'i' +WARNING [skip-when-after-fails.bal:(30:5,30:18)] unused variable 'i' (BCE20403) + | +30 | int i = 12/0; + | ^^^^^^^^^^^^^ + Running Tests diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/SkipTestsTestCase-testSkipWhenBeforeEachFails.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/SkipTestsTestCase-testSkipWhenBeforeEachFails.txt index ed9a844e3a99..05845a6cccac 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/SkipTestsTestCase-testSkipWhenBeforeEachFails.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/SkipTestsTestCase-testSkipWhenBeforeEachFails.txt @@ -2,7 +2,11 @@ Code coverage is not yet supported with single bal files. Ignoring the flag and warning: ignoring --includes flag since code coverage is not enabled Compiling source skip-when-beforeEach-fails.bal -WARNING [skip-when-beforeEach-fails.bal:(25:5,25:18)] unused variable 'i' +WARNING [skip-when-beforeEach-fails.bal:(25:5,25:18)] unused variable 'i' (BCE20403) + | +25 | int i = 12/0; + | ^^^^^^^^^^^^^ + Running Tests @@ -20,4 +24,4 @@ Running Tests 0 passing 0 failing 3 skipped -error: there are test failures \ No newline at end of file +error: there are test failures diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/SkipTestsTestCase-testSkipWhenBeforeFails.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/SkipTestsTestCase-testSkipWhenBeforeFails.txt index 1bbdf4d8fb9f..e302417188bf 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/SkipTestsTestCase-testSkipWhenBeforeFails.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/SkipTestsTestCase-testSkipWhenBeforeFails.txt @@ -2,7 +2,11 @@ Code coverage is not yet supported with single bal files. Ignoring the flag and warning: ignoring --includes flag since code coverage is not enabled Compiling source skip-when-before-fails.bal -WARNING [skip-when-before-fails.bal:(28:5,28:18)] unused variable 'i' +WARNING [skip-when-before-fails.bal:(28:5,28:18)] unused variable 'i' (BCE20403) + | +28 | int i = 12/0; + | ^^^^^^^^^^^^^ + Running Tests diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/SkipTestsTestCase-testSkipWhenBeforeGroupsFails.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/SkipTestsTestCase-testSkipWhenBeforeGroupsFails.txt index 333ed93d8be7..9fc6be71039a 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/SkipTestsTestCase-testSkipWhenBeforeGroupsFails.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/SkipTestsTestCase-testSkipWhenBeforeGroupsFails.txt @@ -2,7 +2,11 @@ Code coverage is not yet supported with single bal files. Ignoring the flag and warning: ignoring --includes flag since code coverage is not enabled Compiling source skip-when-beforeGroups-fails.bal -WARNING [skip-when-beforeGroups-fails.bal:(32:5,32:17)] unused variable 'b' +WARNING [skip-when-beforeGroups-fails.bal:(32:5,32:17)] unused variable 'b' (BCE20403) + | +32 | int b = 2/0; + | ^^^^^^^^^^^^ + Running Tests diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/SkipTestsTestCase-testSkipWhenBeforeSuiteFails.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/SkipTestsTestCase-testSkipWhenBeforeSuiteFails.txt index c966c747064b..d74dde357899 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/SkipTestsTestCase-testSkipWhenBeforeSuiteFails.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/SkipTestsTestCase-testSkipWhenBeforeSuiteFails.txt @@ -2,7 +2,11 @@ Code coverage is not yet supported with single bal files. Ignoring the flag and warning: ignoring --includes flag since code coverage is not enabled Compiling source skip-when-beforeSuite-fails.bal -WARNING [skip-when-beforeSuite-fails.bal:(24:5,24:18)] unused variable 'i' +WARNING [skip-when-beforeSuite-fails.bal:(24:5,24:18)] unused variable 'i' (BCE20403) + | +24 | int i = 12/0; // This will throw an exception and fail the function + | ^^^^^^^^^^^^^ + Running Tests @@ -20,4 +24,4 @@ Running Tests 0 passing 0 failing 3 skipped -error: there are test failures \ No newline at end of file +error: there are test failures diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/SkipTestsTestCase-testSkipWhenDependsOnFunctionFails.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/SkipTestsTestCase-testSkipWhenDependsOnFunctionFails.txt index eb480d0b4625..3c3b9aaca3b0 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/SkipTestsTestCase-testSkipWhenDependsOnFunctionFails.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/SkipTestsTestCase-testSkipWhenDependsOnFunctionFails.txt @@ -2,7 +2,11 @@ Code coverage is not yet supported with single bal files. Ignoring the flag and warning: ignoring --includes flag since code coverage is not enabled Compiling source dependson-skip-test.bal -WARNING [dependson-skip-test.bal:(34:5,34:18)] unused variable 'i' +WARNING [dependson-skip-test.bal:(34:5,34:18)] unused variable 'i' (BCE20403) + | +34 | int i = 12/0; + | ^^^^^^^^^^^^^ + Running Tests @@ -27,4 +31,4 @@ test2 has failed. 2 passing 1 failing 2 skipped -error: there are test failures \ No newline at end of file +error: there are test failures diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/TestReportTest-testWarningForCoverageFormatFlag.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/TestReportTest-testWarningForCoverageFormatFlag.txt index 71bb5b5629d2..32400a3bb3a3 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/TestReportTest-testWarningForCoverageFormatFlag.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/TestReportTest-testWarningForCoverageFormatFlag.txt @@ -1,7 +1,11 @@ warning: ignoring --coverage-format flag since code coverage is not enabled Compiling source testerina_report/foo:0.0.0 -WARNING [main.bal:(36:5,36:19)] unused variable 'b' +WARNING [main.bal:(36:5,36:19)] unused variable 'b' (BCE20403) + | +36 | int b = a + 1; + | ^^^^^^^^^^^^^^ + Running Tests diff --git a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/TestReportTest-testWarningForReportTools.txt b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/TestReportTest-testWarningForReportTools.txt index d7e5939484ed..7a121fa8e972 100644 --- a/tests/testerina-integration-test/src/test/resources/command-outputs/windows/TestReportTest-testWarningForReportTools.txt +++ b/tests/testerina-integration-test/src/test/resources/command-outputs/windows/TestReportTest-testWarningForReportTools.txt @@ -1,6 +1,10 @@ Compiling source testerina_report/foo:0.0.0 -WARNING [main.bal:(36:5,36:19)] unused variable 'b' +WARNING [main.bal:(36:5,36:19)] unused variable 'b' (BCE20403) + | +36 | int b = a + 1; + | ^^^^^^^^^^^^^^ + Running Tests with Coverage