diff --git a/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/bala/record/RecordInBalaTest.java b/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/bala/record/RecordInBalaTest.java index 3c8cd5924223..9c0e2b67af6b 100644 --- a/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/bala/record/RecordInBalaTest.java +++ b/tests/jballerina-unit-test/src/test/java/org/ballerinalang/test/bala/record/RecordInBalaTest.java @@ -76,7 +76,8 @@ public void testComplexCyclicRecordTypeResolution() { public void testIntersectionOfReadonlyAndRecordTypeWithDefaults() { CompileResult result = BCompileUtil.compile("test-src/bala/test_projects/test_project_records_negative"); int count = 0; - BAssertUtil.validateError(result, count, "missing non-defaultable required record field 'initialValues'", + BAssertUtil.validateError(result, count++, "missing non-defaultable required record field 'initialValues'", 22, 25); + Assert.assertEquals(result.getErrorCount(), count); } } diff --git a/tests/jballerina-unit-test/src/test/resources/test-src/bala/test_projects/test_project_records_negative/records.bal b/tests/jballerina-unit-test/src/test/resources/test-src/bala/test_projects/test_project_records_negative/records.bal index 3aa02a895eed..8567320b761c 100644 --- a/tests/jballerina-unit-test/src/test/resources/test-src/bala/test_projects/test_project_records_negative/records.bal +++ b/tests/jballerina-unit-test/src/test/resources/test-src/bala/test_projects/test_project_records_negative/records.bal @@ -1,6 +1,6 @@ -// Copyright (c) 2024 WSO2 Inc. (http://www.wso2.org) All Rights Reserved. +// Copyright (c) 2024 WSO2 LLC. (http://www.wso2.com). // -// WSO2 Inc. licenses this file to you under the Apache License, +// 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