From ace31bb030916a09e6d12949c6a4cb06594179de Mon Sep 17 00:00:00 2001 From: poorna2152 Date: Fri, 22 Mar 2024 11:53:12 +0530 Subject: [PATCH] Add navigation separately to list --- .../types/xml/xml-navigation-access.bal | 23 +++++++++++++++---- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/tests/jballerina-unit-test/src/test/resources/test-src/types/xml/xml-navigation-access.bal b/tests/jballerina-unit-test/src/test/resources/test-src/types/xml/xml-navigation-access.bal index 6917e1fd2e1b..2cab7db17072 100644 --- a/tests/jballerina-unit-test/src/test/resources/test-src/types/xml/xml-navigation-access.bal +++ b/tests/jballerina-unit-test/src/test/resources/test-src/types/xml/xml-navigation-access.bal @@ -218,28 +218,41 @@ function testXmlNavigationWithUnionType() { function testXmlNavigationWithDefaultNamespaceDefinedAfter() { xml[] results = []; xml x1 = xml `abcd`; - results.push(x1., (x1/*), (x1/), (x1/<*>), (x1/**/)); + results[0] = x1.; + results[1] = x1/*; + results[2] = x1/; + results[3] = x1/<*>; + results[4] = x1/**/; xmlns "http://example2.com/" as p1; xml x2 = xml `lmnq1q2`; { xmlns "http://example2.com/"; } - results.push(x2., (x2/), (x2/), (x2/**/)); + results[5] = x2.; + results[6] = x2/; + results[7] = x2/; + results[8] = x2/**/; { xmlns "http://example2.com/"; { - results.push(x2., (x2/)); + results[9] = x2.; + results[10] = x2/; } } xmlns "http://example.com/" as p2; xml x3 = xml `no-nswith-ns`; - results.push(x3.); + results[11] = x3.; xml x4 = xml `efh`; xmlns "http://example.com/"; - results.push(x3., x4., (x4/*), (x4/), (x4/<*>), (x4/**/)); + results[12] = x3.; + results[13] = x4.; + results[14] = x4/*; + results[15] = x4/; + results[16] = x4/<*>; + results[17] = x4/**/; assertXmlNavigationWithDefaultNamespaceDefinedAfter(results); }