diff --git a/.github/workflows/build-with-bal-test-graalvm.yml b/.github/workflows/build-with-bal-test-graalvm.yml
index 291054d..77a583e 100644
--- a/.github/workflows/build-with-bal-test-graalvm.yml
+++ b/.github/workflows/build-with-bal-test-graalvm.yml
@@ -35,3 +35,5 @@ jobs:
lang_tag: ${{ inputs.lang_tag }}
lang_version: ${{ inputs.lang_version }}
native_image_options: '-J-Xmx7G ${{ inputs.native_image_options }}'
+ # TODO : Enable after fixing this issue : https://github.com/ballerina-platform/ballerina-lang/issues/38882
+ additional_windows_build_flags: '-x test'
diff --git a/.github/workflows/stale_check.yml b/.github/workflows/stale_check.yml
new file mode 100644
index 0000000..8763360
--- /dev/null
+++ b/.github/workflows/stale_check.yml
@@ -0,0 +1,19 @@
+name: 'Close stale pull requests'
+
+on:
+ schedule:
+ - cron: '30 19 * * *'
+ workflow_dispatch:
+
+jobs:
+ stale:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/stale@v3
+ with:
+ stale-pr-message: 'This PR has been open for more than 15 days with no activity. This will be closed in 3 days unless the `stale` label is removed or commented.'
+ close-pr-message: 'Closed PR due to inactivity for more than 18 days.'
+ days-before-pr-stale: 15
+ days-before-pr-close: 3
+ days-before-issue-stale: -1
+ days-before-issue-close: -1
diff --git a/.vscode/launch.json b/.vscode/launch.json
new file mode 100644
index 0000000..85f0dfd
--- /dev/null
+++ b/.vscode/launch.json
@@ -0,0 +1,28 @@
+{
+ "configurations": [
+ {
+ "name": "Ballerina Debug",
+ "type": "ballerina",
+ "request": "launch",
+ "programArgs": [],
+ "commandOptions": [],
+ "env": {}
+ },
+ {
+ "name": "Ballerina Test",
+ "type": "ballerina",
+ "request": "launch",
+ "debugTests": true,
+ "programArgs": [],
+ "commandOptions": [],
+ "env": {}
+ },
+ {
+ "name": "Ballerina Remote",
+ "type": "ballerina",
+ "request": "attach",
+ "debuggeeHost": "127.0.0.1",
+ "debuggeePort": "5005"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/README.md b/README.md
index ba9bc60..4021c40 100644
--- a/README.md
+++ b/README.md
@@ -1,455 +1 @@
# Ballerina CSV Data Library
-
-The Ballerina CSV Data Library is a comprehensive toolkit designed to facilitate the handling and manipulation of CSV data within Ballerina applications. It streamlines the process of converting CSV data to native Ballerina data types, enabling developers to work with CSV content seamlessly and efficiently.
-
-This library is the refined successor of the `ballerina/csvdata` module, incorporating enhanced functionalities and improved performance.
-
-## Features
-
-- **Versatile CSV Data Input**: Accept CSV data as a csv, a string, byte array, or a stream and convert it into a Record value.
-- **CSV to Record Value Conversion**: Transform CSV data into Ballerina records with ease in compliance with OpenAPI 3 standards.
-- **Projection Support**: Perform selective conversion of CSV data subsets into Record values through projection.
-
-## Usage
-
-### Converting an CSV value to a Record value
-
-To convert an CSV value to a Record value, you can utilize the `fromCsvWithType` function provided by the library. The example below showcases the transformation of an CSV value into a Record value.
-
-```ballerina
-import ballerina/data.csv;
-import ballerina/io;
-
-public function main() returns error? {
- csv data = csv `
- 0
- string
- string
- `;
-
- Book book = check csvdata:fromCsvWithType(data);
- io:println(book);
-}
-
-type Book record {|
- int id;
- string title;
- string author;
-|};
-```
-
-### Converting an external CSV document to a Record value
-
-For transforming CSV content from an external source into a Record value, the `fromCsvStringWithType` function can be used. This external source can be in the form of a string or a byte array/byte stream that houses the CSV data. This is commonly extracted from files or network sockets. The example below demonstrates the conversion of an CSV value from an external source into a Record value.
-
-```ballerina
-import ballerina/data.csv;
-import ballerina/io;
-
-public function main() returns error? {
- string csvContent = check io:fileReadString("path/to/file.csv");
- Book book = check csvdata:fromCsvStringWithType(csvContent);
- io:println(book);
-}
-
-type Book record {|
- int id;
- string title;
- string author;
-|};
-```
-
-Make sure to handle possible errors that may arise during the file reading or CSV to record conversion process. The `check` keyword is utilized to handle these errors, but more sophisticated error handling can be implemented as per your requirements.
-
-## CSV to Record Canonical Representation
-
-The translation of CSV to a Record representation is a fundamental feature of the library. It facilitates a structured and type-safe approach to handling CSV data within Ballerina applications.
-
-Take for instance the following CSV snippet:
-
-```csv
-
- 0
- string
- string
-
-```
-
-CSV data is inherently hierarchical, forming a tree structure. In the given example, the root element is `book`, which encompasses three child elements: `id`, `title`, and `author`. The `id` element harbors a numeric value `0`, whereas both the `title` and `author` elements contain string values.
-
-A straightforward record representation of the above CSV data is:
-
-```ballerina
-type Book record {|
- int id;
- string title;
- string author;
-|};
-```
-
-In this representation, the CSV data is efficiently translated into a record value. The `book` element is mapped to a record of type `Book`, and the child elements `id`, `title`, and `author` are converted into record fields of types `int` and `string` correspondingly.
-
-This record type definition can be further refined through annotations. Moreover, utilizing open and closed records grants control over the translation process, which is elaborated in subsequent sections.
-
-### CSV Element Names
-
-The name of the CSV element serves as the name of the record field, altered to fit a valid Ballerina identifier. Notably, the record field name corresponds to the local name of the CSV element, with any namespace prefixes being disregarded.
-
-Consider the CSV snippet:
-
-```csv
-
- 0
- string
- string
-
-```
-
-The canonical representation of the above CSV as a Ballerina record is:
-
-```ballerina
-type Book record {|
- int id;
- string 'title\-name';
- string 'author\-name';
-|};
-```
-
-Observe how the CSV element names `title-name` and `author-name` are represented using delimited identifiers in Ballerina; the `-` characters in the CSV element names are escaped using the `\` character.
-
-Moreover, the `@Name` annotation can be utilized to explicitly specify the name of the record field, providing control over the translation process:
-
-```ballerina
-import ballerina/data.csv;
-
-type Book record {|
- int id;
- @csvdata:Name { value: "title-name" }
- string title;
- @csvdata:Name { value: "author-name" }
- string author;
-|};
-```
-
-### CSV Attributes
-
-Similarly to CSV elements, CSV attributes are also represented into record fields within the corresponding parent Record type. The name of the CSV attribute is converted into the name of the record field, ensuring it is a valid Ballerina identifier. It is crucial to emphasize that the record field name aligns with the local name of the CSV attribute, and any namespace prefixes are ignored.
-
-Consider the following CSV snippet:
-
-```csv
-
- 0
- string
- string
-
-```
-
-The canonical representation of the above CSV as a Ballerina record is:
-
-```ballerina
-type Book record {|
- string lang;
- decimal price;
- int id;
- string title;
- string author;
-|};
-```
-
-Additionally the `@Attribute` annotation can be utilized to explicitly specify the name of the record field, providing control over the translation process.
-
-### Child Elements
-
-Child elements are mapped to record fields, with the type reflecting that of the corresponding child element.
-
-Examine the CSV snippet below:
-
-```csv
-
- 0
- string
-
- string
- string
-
-
-```
-
-The canonical representation of the above CSV as a Ballerina record is:
-
-```ballerina
-type Book record {|
- int id;
- string title;
- Author author;
-|};
-
-type Author record {|
- string name;
- string country;
-|};
-```
-
-In this transformation, child elements, like the `author` element containing its own sub-elements, are converted into nested records. This maintains the hierarchical structure of the CSV data within the Ballerina type system, enabling intuitive and type-safe data manipulation.
-
-Alternatively, inline type definitions offer a compact method for representing child elements as records within their parent record. This approach is particularly beneficial when the child record does not require reuse elsewhere and is unique to its parent record.
-
-Consider the subsequent Ballerina record definition, which employs inline type definition for the `author` field:
-
-```ballerina
-type Book record {|
- int id;
- string title;
- record {|
- string name;
- string country;
- |} author;
-|};
-```
-
-### CSV Text Content
-
-The transformation of CSV text content into record fields typically involves types like `string`, `boolean`, `int`, `float`, or `decimal`, depending on the textual content. For numeric values where type information is not explicitly defined, the default conversion type is `decimal`. Conversely, for non-numeric content, the default type is `string`.
-
-Consider the CSV snippet below:
-
-```csv
-
- 0
- string
- string
- true
- 10.5
-
-```
-
-The translation into a Ballerina record would be as follows:
-
-```ballerina
-type Book record {|
- int id;
- string title;
- string author;
- boolean available;
- decimal price;
-|};
-```
-
-In scenarios where the parent CSV element of text content also includes attributes, the CSV text content can be represented by a `string` type field named `#content` within a record type, with the attributes being mapped to their respective fields.
-
-For instance, examine this CSV:
-
-```csv
-
- 0
- string
- 10.5
-
-```
-
-The canonical translation of CSV to a Ballerina record is as such:
-
-```ballerina
-type Book record {|
- int id;
- Title title;
- decimal price;
-|};
-
-type Title record {|
- string \#content;
- string lang;
-|};
-```
-
-Modifications to the default behavior for converting numerical values can be achieved by providing `Options` mappings to the respective functions. This enables developers to choose specific data types and exert finer control over the conversion process.
-
-### CSV Namespaces
-
-CSV namespaces are accommodated by the library, supporting the translation of CSV data that contains namespace prefixes. However, the presence of CSV namespaces is not mandatory, and the library is capable of processing CSV data without namespaces. Should namespaces be present, they will be utilized to resolve the names of CSV elements and attributes.
-
-It's important to note that, unlike in the `csvdata` module, the namespace prefixes do not reflect in the record field names, as the record field names align with the local names of the CSV elements.
-
-Examine the CSV snippet below with default namespaces:
-
-```csv
-
- 0
- string
- string
-
-```
-
-The translation into a Ballerina record would be:
-
-```ballerina
-type Book record {|
- int id;
- string title;
- string author;
-|};
-```
-
-Incorporating namespace validation yields:
-
-```ballerina
-import ballerina/data.csv;
-
-@csvdata:Namespace {
- uri: "http://example.com/book"
-}
-type Book record {|
- int id;
- string title;
- string author;
-|};
-```
-
-Here is the same CSV snippet with a namespace prefix:
-
-```csv
-
- 0
- string
- string
-
-```
-
-The translation into a Ballerina record would be:
-
-```ballerina
-import ballerina/data.csv;
-
-@csvdata:Namespace {
- uri: "http://example.com/book",
- prefix: "bk"
-}
-type Book record {|
- int id;
- string title;
- string author;
-|};
-```
-
-In these examples, the CSV namespaces are appropriately acknowledged, ensuring the integrity of the CSV structure within the Ballerina records.
-
-### Working with Arrays
-
-The library is equipped to handle the transformation of CSV data containing arrays into Ballerina records.
-
-Take the following CSV snippet as an example:
-
-```csv
-
- 0
- string
- string
- string
- string
-
-```
-
-The canonical representation of this CSV as a Ballerina record is:
-
-```ballerina
-type Book record {|
- int id;
- string title;
- string[] author;
-|};
-```
-
-### Controlling Which Elements to Convert
-
-The library allows for selective conversion of CSV elements into records through the use of rest fields. This is beneficial when the CSV data contains elements that are not necessary to be transformed into record fields.
-
-Take this CSV snippet as an example:
-
-```csv
-
- 0
- string
- string
- 10.5
-
-```
-
-Suppose that only the book `id`, and `title` elements are needed for conversion into record fields. This can be achieved by defining only the required fields in the record type and omitting the rest field:
-
-```ballerina
-type Book record {|
- int id;
- string title;
-|};
-```
-
-However, if the rest field is utilized (or if the record type is defined as an open record), all elements in the CSV data will be transformed into record fields:
-
-```ballerina
-type Book record {|
- int id;
- string title;
-|};
-```
-
-In this instance, all other elements in the CSV data, such as `author` and `price` along with their attributes, will be transformed into `string` type fields with the corresponding element name as the key.
-
-This behavior extends to arrays as well.
-
-The process of projecting CSV data into a record supports various use cases, including the filtering out of unnecessary elements. This functionality is anticipated to be enhanced in the future to accommodate more complex scenarios, such as filtering values based on regular expressions, among others.
-
-## Issues and projects
-
-Issues and Projects tabs are disabled for this repository as this is part of the Ballerina standard library. To report bugs, request new features, start new discussions, view project boards, etc. please visit Ballerina standard library [parent repository](https://github.com/ballerina-platform/ballerina-standard-library).
-
-This repository only contains the source code for the package.
-
-## Building from the source
-
-### Set up the prerequisites
-
-1. Download and install Java SE Development Kit (JDK) version 17 (from one of the following locations).
- * [Oracle](https://www.oracle.com/java/technologies/downloads/)
- * [OpenJDK](https://adoptium.net/)
-
-2. Export your GitHub personal access token with the read package permissions as follows.
-
- export packageUser=
- export packagePAT=
-
-### Building the source
-
-Execute the commands below to build from source.
-
-1. To build the library:
-
- ./gradlew clean build
-
-2. Publish ZIP artifact to the local `.m2` repository:
-
- ./gradlew clean build publishToMavenLocal
-
-3. Publish the generated artifacts to the local Ballerina central repository:
-
- ./gradlew clean build -PpublishToLocalCentral=true
-
-4. Publish the generated artifacts to the Ballerina central repository:
-
- ./gradlew clean build -PpublishToCentral=true
-
-## Contributing to Ballerina
-
-As an open source project, Ballerina welcomes contributions from the community.
-
-For more information, go to the [contribution guidelines](https://github.com/ballerina-platform/ballerina-lang/blob/master/CONTRIBUTING.md).
-
-## Code of conduct
-
-All contributors are encouraged to read the [Ballerina code of conduct](https://ballerina.io/code-of-conduct).
-
-## Useful links
-
-[//]: # (* For more information go to the [`csvdata` library](https://lib.ballerina.io/ballerina/data.csv/latest).)
-* Chat live with us via our [Discord server](https://discord.gg/ballerinalang).
-* Post all technical questions on Stack Overflow with the [#ballerina](https://stackoverflow.com/questions/tagged/ballerina) tag.
\ No newline at end of file
diff --git a/ballerina-tests/build.gradle b/ballerina-tests/build.gradle
new file mode 100644
index 0000000..2f401db
--- /dev/null
+++ b/ballerina-tests/build.gradle
@@ -0,0 +1,224 @@
+/*
+ * Copyright (c) 2024, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+ *
+ * Licensed 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.
+ *
+ */
+plugins {
+ id 'jacoco'
+}
+
+//apply plugin: 'java'
+
+import org.apache.tools.ant.taskdefs.condition.Os
+
+description = 'Ballerina - HTTP/WS Ballerina Tests'
+
+def packageName = "data.csv"
+def packageOrg = "ballerina"
+def tomlVersion = stripBallerinaExtensionVersion("${project.version}")
+def ballerinaTomlFilePlaceHolder = new File("${project.rootDir}/build-config/resources/BallerinaTest.toml")
+def testCommonTomlFilePlaceHolder = new File("${project.rootDir}/build-config/resources/CsvTestCommon.toml")
+def ballerinaDist = "${project.rootDir}/target/ballerina-runtime"
+def distributionBinPath = "${ballerinaDist}/bin"
+def testCoverageParam = "--code-coverage --coverage-format=xml --includes=io.ballerina.stdlib.data.*:ballerina.*"
+def testPackages = ["parse-string-array-types-tests", "user-config-tests", "type-compatible-tests", "unicode-tests", "constraint-validation-tests",
+ "parse-list-types-tests", "parse-record-types-tests", "parse-string-record-types-tests", "union-type-tests"]
+def testCommonPackage = "csv-commons"
+
+def stripBallerinaExtensionVersion(String extVersion) {
+ if (extVersion.matches(project.ext.timestampedVersionRegex)) {
+ def splitVersion = extVersion.split('-');
+ if (splitVersion.length > 3) {
+ def strippedValues = splitVersion[0..-4]
+ return strippedValues.join('-')
+ } else {
+ return extVersion
+ }
+ } else {
+ return extVersion.replace("${project.ext.snapshotVersion}", "")
+ }
+}
+
+task clean {
+ delete "${project.projectDir}/${testCommonPackage}/target"
+
+ testPackages.each { testPackage ->
+ delete "${project.projectDir}/${testPackage}/target"
+ }
+}
+
+task updateTomlVersions {
+ doLast {
+ testPackages.each { testPackage ->
+ def ballerinaTomlFile = new File("${project.projectDir}/${testPackage}/Ballerina.toml")
+ def newBallerinaToml = ballerinaTomlFilePlaceHolder.text.replace("@project.version@", project.version)
+ newBallerinaToml = newBallerinaToml.replace("@toml.version@", tomlVersion)
+ newBallerinaToml = newBallerinaToml.replace("@test.common@", testCommonPackage.replaceAll("-", "_"))
+ newBallerinaToml = newBallerinaToml.replace("@package.name@", testPackage.replaceAll("-", "_"))
+ ballerinaTomlFile.text = newBallerinaToml
+ }
+
+ def ballerinaTomlFile = new File("${project.projectDir}/${testCommonPackage}/Ballerina.toml")
+ def newBallerinaToml = testCommonTomlFilePlaceHolder.text.replace("@project.version@", project.version)
+ newBallerinaToml = newBallerinaToml.replace("@toml.version@", tomlVersion)
+ newBallerinaToml = newBallerinaToml.replace("@package.name@", testCommonPackage.replaceAll("-", "_"))
+ ballerinaTomlFile.text = newBallerinaToml
+ }
+}
+
+def groupParams = ""
+def disableGroups = ""
+def windowsDisableGroups = "--disable-groups disabledOnWindows"
+def debugParams = ""
+def balJavaDebugParam = ""
+def testParams = ""
+def graalvmFlag = ""
+def parallelTestFlag = ""
+def skipTests = false
+
+task deleteDependencyTomlFile {
+ if (project.hasProperty("deleteDependencies")) {
+ delete "${project.projectDir}/${testCommonPackage}/Dependencies.toml"
+
+ testPackages.each { testPackage ->
+ delete "${project.projectDir}/${testPackage}/Dependencies.toml"
+ }
+ }
+}
+
+task initializeVariables {
+ if (project.hasProperty("groups")) {
+ groupParams = "--groups ${project.findProperty("groups")}"
+ }
+ if (project.hasProperty("disable")) {
+ disableGroups = "--disable-groups ${project.findProperty("disable")}"
+ }
+ if (project.hasProperty("debug")) {
+ debugParams = "--debug ${project.findProperty("debug")}"
+ }
+ if (project.hasProperty("balJavaDebug")) {
+ balJavaDebugParam = "BAL_JAVA_DEBUG=${project.findProperty("balJavaDebug")}"
+ }
+ if (project.hasProperty('balGraalVMTest')) {
+ graalvmFlag = '--graalvm'
+ }
+ if (project.hasProperty('balParallelTest')) {
+ parallelTestFlag = '--parallel'
+ }
+ if (project.hasProperty('balTests')) {
+ testPackages = project.findProperty('balTests').toString().split(",")
+ }
+ if (project.hasProperty('skipBalTests')) {
+ project.findProperty('skipBalTests').toString().split(",").each {testPackage ->
+ testPackages.remove(testPackage)
+ }
+ }
+
+
+ gradle.taskGraph.whenReady { graph ->
+ if (graph.hasTask(":${packageName}-ballerina-tests:test")) {
+ if (!project.hasProperty('balGraalVMTest')) {
+ testParams = "${testCoverageParam}"
+ }
+ } else {
+ skipTests = true
+ }
+ }
+}
+
+task publishTestCommonPackageToLocal {
+ dependsOn(":${packageName}-${packageOrg}:build")
+ dependsOn(updateTomlVersions)
+ doLast {
+ if (!skipTests) {
+ exec {
+ workingDir "${project.projectDir}/${testCommonPackage}"
+ if (Os.isFamily(Os.FAMILY_WINDOWS)) {
+ commandLine 'cmd', '/c', "${distributionBinPath}/bal.bat pack && exit %%ERRORLEVEL%%"
+ } else {
+ commandLine 'sh', '-c', "${distributionBinPath}/bal pack"
+ }
+ }
+ exec {
+ workingDir "${project.projectDir}/${testCommonPackage}"
+ if (Os.isFamily(Os.FAMILY_WINDOWS)) {
+ commandLine 'cmd', '/c', "${distributionBinPath}/bal.bat push --repository=local" +
+ " && exit %%ERRORLEVEL%%"
+ } else {
+ commandLine 'sh', '-c', "${distributionBinPath}/bal push --repository=local"
+ }
+ }
+ }
+ }
+}
+
+task ballerinaTest {
+ inputs.dir file(project.projectDir)
+ dependsOn(":${packageName}-${packageOrg}:build")
+ dependsOn(updateTomlVersions)
+ dependsOn(initializeVariables)
+ dependsOn(publishTestCommonPackageToLocal)
+ dependsOn(deleteDependencyTomlFile)
+
+ doLast {
+ testPackages.each { testPackage ->
+ if (!skipTests) {
+ exec {
+ workingDir "${project.projectDir}/${testPackage}"
+ environment "JAVA_OPTS", "-DBALLERINA_DEV_COMPILE_BALLERINA_ORG=true"
+ if (Os.isFamily(Os.FAMILY_WINDOWS)) {
+ commandLine 'cmd', '/c', "${balJavaDebugParam} ${distributionBinPath}/bal.bat test ${graalvmFlag}" +
+ " ${parallelTestFlag} ${testParams} ${groupParams} ${disableGroups} ${windowsDisableGroups}" +
+ " ${debugParams} && exit %%ERRORLEVEL%%"
+ } else {
+ commandLine 'sh', '-c', "${distributionBinPath}/bal test ${graalvmFlag} ${parallelTestFlag} ${testParams}" +
+ " ${groupParams} ${disableGroups} ${debugParams}"
+ }
+ }
+ if (project.hasProperty('balGraalVMTest')) {
+ exec {
+ workingDir "${project.projectDir}/${testPackage}"
+ environment "JAVA_OPTS", "-DBALLERINA_DEV_COMPILE_BALLERINA_ORG=true"
+ if (Os.isFamily(Os.FAMILY_WINDOWS)) {
+ commandLine 'cmd', '/c', "${distributionBinPath}/bal.bat clean"
+ } else {
+ commandLine 'sh', '-c', "${distributionBinPath}/bal clean"
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+publishing {
+ repositories {
+ maven {
+ name = "GitHubPackages"
+ url = uri("https://maven.pkg.github.com/ballerina-platform/module-${packageOrg}-${packageName}")
+ credentials {
+ username = System.getenv("packageUser")
+ password = System.getenv("packagePAT")
+ }
+ }
+ }
+}
+
+task test {
+ dependsOn(ballerinaTest)
+}
+
+task build {
+ dependsOn(test)
+}
diff --git a/ballerina-tests/constraint-validation-tests/.gitignore b/ballerina-tests/constraint-validation-tests/.gitignore
new file mode 100644
index 0000000..d5fc29a
--- /dev/null
+++ b/ballerina-tests/constraint-validation-tests/.gitignore
@@ -0,0 +1,11 @@
+# Ballerina generates this directory during the compilation of a package.
+# It contains compiler-generated artifacts and the final executable if this is an application package.
+target/
+
+# Ballerina maintains the compiler-generated source code here.
+# Remove this if you want to commit generated sources.
+generated/
+
+# Contains configuration values used during development time.
+# See https://ballerina.io/learn/provide-values-to-configurable-variables/ for more details.
+Config.toml
diff --git a/ballerina-tests/constraint-validation-tests/Ballerina.toml b/ballerina-tests/constraint-validation-tests/Ballerina.toml
new file mode 100644
index 0000000..c0b0817
--- /dev/null
+++ b/ballerina-tests/constraint-validation-tests/Ballerina.toml
@@ -0,0 +1,13 @@
+[package]
+org = "ballerina"
+name = "constraint_validation_tests"
+version = "0.1.0"
+
+[[dependency]]
+org = "ballerina"
+name = "csv_commons"
+repository = "local"
+version = "0.1.0"
+
+[platform.java17]
+graalvmCompatible = true
diff --git a/ballerina-tests/constraint-validation-tests/Dependencies.toml b/ballerina-tests/constraint-validation-tests/Dependencies.toml
new file mode 100644
index 0000000..7f54d3a
--- /dev/null
+++ b/ballerina-tests/constraint-validation-tests/Dependencies.toml
@@ -0,0 +1,101 @@
+# AUTO-GENERATED FILE. DO NOT MODIFY.
+
+# This file is auto-generated by Ballerina for managing dependency versions.
+# It should not be modified by hand.
+
+[ballerina]
+dependencies-toml-version = "2"
+distribution-version = "2201.9.0"
+
+[[package]]
+org = "ballerina"
+name = "constraint"
+version = "1.5.0"
+scope = "testOnly"
+dependencies = [
+ {org = "ballerina", name = "jballerina.java"}
+]
+modules = [
+ {org = "ballerina", packageName = "constraint", moduleName = "constraint"}
+]
+
+[[package]]
+org = "ballerina"
+name = "constraint_validation_tests"
+version = "0.1.0"
+dependencies = [
+ {org = "ballerina", name = "constraint"},
+ {org = "ballerina", name = "data.csv"},
+ {org = "ballerina", name = "test"}
+]
+modules = [
+ {org = "ballerina", packageName = "constraint_validation_tests", moduleName = "constraint_validation_tests"}
+]
+
+[[package]]
+org = "ballerina"
+name = "data.csv"
+version = "0.1.0"
+scope = "testOnly"
+dependencies = [
+ {org = "ballerina", name = "jballerina.java"}
+]
+modules = [
+ {org = "ballerina", packageName = "data.csv", moduleName = "data.csv"}
+]
+
+[[package]]
+org = "ballerina"
+name = "jballerina.java"
+version = "0.0.0"
+scope = "testOnly"
+
+[[package]]
+org = "ballerina"
+name = "lang.__internal"
+version = "0.0.0"
+scope = "testOnly"
+dependencies = [
+ {org = "ballerina", name = "jballerina.java"},
+ {org = "ballerina", name = "lang.object"}
+]
+
+[[package]]
+org = "ballerina"
+name = "lang.array"
+version = "0.0.0"
+scope = "testOnly"
+dependencies = [
+ {org = "ballerina", name = "jballerina.java"},
+ {org = "ballerina", name = "lang.__internal"}
+]
+
+[[package]]
+org = "ballerina"
+name = "lang.error"
+version = "0.0.0"
+scope = "testOnly"
+dependencies = [
+ {org = "ballerina", name = "jballerina.java"}
+]
+
+[[package]]
+org = "ballerina"
+name = "lang.object"
+version = "0.0.0"
+scope = "testOnly"
+
+[[package]]
+org = "ballerina"
+name = "test"
+version = "0.0.0"
+scope = "testOnly"
+dependencies = [
+ {org = "ballerina", name = "jballerina.java"},
+ {org = "ballerina", name = "lang.array"},
+ {org = "ballerina", name = "lang.error"}
+]
+modules = [
+ {org = "ballerina", packageName = "test", moduleName = "test"}
+]
+
diff --git a/ballerina-tests/constraint-validation-tests/tests/constraint_validation_test.bal b/ballerina-tests/constraint-validation-tests/tests/constraint_validation_test.bal
new file mode 100644
index 0000000..3710770
--- /dev/null
+++ b/ballerina-tests/constraint-validation-tests/tests/constraint_validation_test.bal
@@ -0,0 +1,63 @@
+import ballerina/constraint;
+import ballerina/data.csv as csv;
+import ballerina/test;
+
+type ConstrainedRec record {
+ @constraint:Int {
+ minValue: 3,
+ maxValue: 10
+ }
+ int a?;
+ @constraint:String {
+ minLength: 2
+ }
+ string b;
+};
+
+@test:Config
+function testConstraintWithRecords() returns error? {
+ ConstrainedRec[]|csv:Error cRec1 = csv:parseStringToRecord(string `a,b
+ 4,abc
+ 3, cde`);
+ test:assertEquals(cRec1, [{a: 4, b: "abc"}, {a: 3, b: "cde"}]);
+
+ cRec1 = csv:parseStringToRecord(string `a,b
+ 4,abc
+ 11, cde`);
+ test:assertTrue(cRec1 is csv:Error);
+ test:assertTrue((cRec1).message().startsWith("Validation failed")
+ && (cRec1).message().includes("maxValue"));
+
+ cRec1 = csv:parseStringToRecord(string `a,b
+ 4,abc
+ 5, "b"`, {});
+ test:assertTrue(cRec1 is csv:Error);
+ test:assertTrue((cRec1).message().startsWith("Validation failed")
+ && (cRec1).message().includes("minLength"));
+
+ cRec1 = csv:parseRecordAsRecordType([{"a": 4, "b": "abc"}, {"a": 3, "b": "cde"}], {});
+ test:assertEquals(cRec1, [{a: 4, b: "abc"}, {a: 3, b: "cde"}]);
+
+ cRec1 = csv:parseRecordAsRecordType([{"a": 4, "b": "abc"}, {"a": 11, "b": "cde"}], {});
+ test:assertTrue(cRec1 is csv:Error);
+ test:assertTrue((cRec1).message().startsWith("Validation failed")
+ && (cRec1).message().includes("maxValue"));
+
+ cRec1 = csv:parseRecordAsRecordType([{"a": 4, "b": "abc"}, {"a": 5, "b": "b"}], {});
+ test:assertTrue(cRec1 is csv:Error);
+ test:assertTrue((cRec1).message().startsWith("Validation failed")
+ && (cRec1).message().includes("minLength"));
+
+ cRec1 = csv:parseListAsRecordType([["4", "abc"], ["3", "cde"]], ["a", "b"]);
+ test:assertEquals(cRec1, [{a: 4, b: "abc"}, {a: 3, b: "cde"}]);
+
+ cRec1 = csv:parseListAsRecordType([["4", "abc"], ["11", "cde"]], ["a", "b"]);
+ test:assertTrue(cRec1 is csv:Error);
+ test:assertTrue((cRec1).message().startsWith("Validation failed")
+ && (cRec1).message().includes("maxValue"));
+
+ cRec1 = csv:parseListAsRecordType([["4", "abc"], ["5", "b"]], ["a", "b"]);
+ test:assertTrue(cRec1 is csv:Error);
+ test:assertTrue((cRec1).message().startsWith("Validation failed")
+ && (cRec1).message().includes("minLength"));
+}
diff --git a/ballerina-tests/csv-commons/.gitignore b/ballerina-tests/csv-commons/.gitignore
new file mode 100644
index 0000000..d5fc29a
--- /dev/null
+++ b/ballerina-tests/csv-commons/.gitignore
@@ -0,0 +1,11 @@
+# Ballerina generates this directory during the compilation of a package.
+# It contains compiler-generated artifacts and the final executable if this is an application package.
+target/
+
+# Ballerina maintains the compiler-generated source code here.
+# Remove this if you want to commit generated sources.
+generated/
+
+# Contains configuration values used during development time.
+# See https://ballerina.io/learn/provide-values-to-configurable-variables/ for more details.
+Config.toml
diff --git a/ballerina-tests/csv-commons/Ballerina.toml b/ballerina-tests/csv-commons/Ballerina.toml
new file mode 100644
index 0000000..0b77a15
--- /dev/null
+++ b/ballerina-tests/csv-commons/Ballerina.toml
@@ -0,0 +1,4 @@
+[package]
+org = "ballerina"
+name = "csv_commons"
+version = "0.1.0"
diff --git a/ballerina-tests/csv-commons/Dependencies.toml b/ballerina-tests/csv-commons/Dependencies.toml
new file mode 100644
index 0000000..88bd281
--- /dev/null
+++ b/ballerina-tests/csv-commons/Dependencies.toml
@@ -0,0 +1,17 @@
+# AUTO-GENERATED FILE. DO NOT MODIFY.
+
+# This file is auto-generated by Ballerina for managing dependency versions.
+# It should not be modified by hand.
+
+[ballerina]
+dependencies-toml-version = "2"
+distribution-version = "2201.9.0"
+
+[[package]]
+org = "ballerina"
+name = "csv_commons"
+version = "0.1.0"
+modules = [
+ {org = "ballerina", packageName = "csv_commons", moduleName = "csv_commons"}
+]
+
diff --git a/ballerina-tests/csv-commons/Package.md b/ballerina-tests/csv-commons/Package.md
new file mode 100644
index 0000000..8a7ecb6
--- /dev/null
+++ b/ballerina-tests/csv-commons/Package.md
@@ -0,0 +1,3 @@
+## Package overview
+
+This package provides APIs for testing ballerina CSV data module.
diff --git a/ballerina-tests/csv-commons/test_utils.bal b/ballerina-tests/csv-commons/test_utils.bal
new file mode 100644
index 0000000..64123d1
--- /dev/null
+++ b/ballerina-tests/csv-commons/test_utils.bal
@@ -0,0 +1,23 @@
+public function generateErrorMessageForMissingRequiredField(string 'field) returns string {
+ return string `no matching header value is found for the required field '${'field}'`;
+}
+
+public function generateErrorMessageForInvalidCast(string value, string 'type) returns string {
+ return string `value '${value}' cannot be cast into '${'type}'`;
+}
+
+public function generateErrorMessageForInvalidFieldType(string value, string 'key) returns string {
+ return string `no mapping type found for value '${value}' in key '${'key}'`;
+}
+
+public function generateErrorMessageForInvalidValueForArrayType(string value, string index, string arrayType) returns string {
+ return string `value '${value}' in index '${index}' is not compatible with array type '${arrayType}'`;
+}
+
+public function generateErrorMessageForInvalidHeaders(string value, string 'type) returns string{
+ return string `value '${value}' cannot be cast into '${'type}', because fields in '${'type}' or the provided expected headers are not matching with the '${value}'`;
+}
+
+public function generateErrorMessageForInvalidCustomHeader(string header) returns string{
+ return string `Invalid header value: '${header}'`;
+}
diff --git a/ballerina-tests/parse-list-types-tests/.gitignore b/ballerina-tests/parse-list-types-tests/.gitignore
new file mode 100644
index 0000000..d5fc29a
--- /dev/null
+++ b/ballerina-tests/parse-list-types-tests/.gitignore
@@ -0,0 +1,11 @@
+# Ballerina generates this directory during the compilation of a package.
+# It contains compiler-generated artifacts and the final executable if this is an application package.
+target/
+
+# Ballerina maintains the compiler-generated source code here.
+# Remove this if you want to commit generated sources.
+generated/
+
+# Contains configuration values used during development time.
+# See https://ballerina.io/learn/provide-values-to-configurable-variables/ for more details.
+Config.toml
diff --git a/ballerina-tests/parse-list-types-tests/Ballerina.toml b/ballerina-tests/parse-list-types-tests/Ballerina.toml
new file mode 100644
index 0000000..6374fc7
--- /dev/null
+++ b/ballerina-tests/parse-list-types-tests/Ballerina.toml
@@ -0,0 +1,13 @@
+[package]
+org = "ballerina"
+name = "parse_list_types_tests"
+version = "0.1.0"
+
+[[dependency]]
+org = "ballerina"
+name = "csv_commons"
+repository = "local"
+version = "0.1.0"
+
+[platform.java17]
+graalvmCompatible = true
diff --git a/ballerina-tests/parse-list-types-tests/Dependencies.toml b/ballerina-tests/parse-list-types-tests/Dependencies.toml
new file mode 100644
index 0000000..279d0c7
--- /dev/null
+++ b/ballerina-tests/parse-list-types-tests/Dependencies.toml
@@ -0,0 +1,98 @@
+# AUTO-GENERATED FILE. DO NOT MODIFY.
+
+# This file is auto-generated by Ballerina for managing dependency versions.
+# It should not be modified by hand.
+
+[ballerina]
+dependencies-toml-version = "2"
+distribution-version = "2201.9.0"
+
+[[package]]
+org = "ballerina"
+name = "csv_commons"
+version = "0.1.0"
+scope = "testOnly"
+modules = [
+ {org = "ballerina", packageName = "csv_commons", moduleName = "csv_commons"}
+]
+
+[[package]]
+org = "ballerina"
+name = "data.csv"
+version = "0.1.0"
+scope = "testOnly"
+dependencies = [
+ {org = "ballerina", name = "jballerina.java"}
+]
+modules = [
+ {org = "ballerina", packageName = "data.csv", moduleName = "data.csv"}
+]
+
+[[package]]
+org = "ballerina"
+name = "jballerina.java"
+version = "0.0.0"
+scope = "testOnly"
+
+[[package]]
+org = "ballerina"
+name = "lang.__internal"
+version = "0.0.0"
+scope = "testOnly"
+dependencies = [
+ {org = "ballerina", name = "jballerina.java"},
+ {org = "ballerina", name = "lang.object"}
+]
+
+[[package]]
+org = "ballerina"
+name = "lang.array"
+version = "0.0.0"
+scope = "testOnly"
+dependencies = [
+ {org = "ballerina", name = "jballerina.java"},
+ {org = "ballerina", name = "lang.__internal"}
+]
+
+[[package]]
+org = "ballerina"
+name = "lang.error"
+version = "0.0.0"
+scope = "testOnly"
+dependencies = [
+ {org = "ballerina", name = "jballerina.java"}
+]
+
+[[package]]
+org = "ballerina"
+name = "lang.object"
+version = "0.0.0"
+scope = "testOnly"
+
+[[package]]
+org = "ballerina"
+name = "parse_list_types_tests"
+version = "0.1.0"
+dependencies = [
+ {org = "ballerina", name = "csv_commons"},
+ {org = "ballerina", name = "data.csv"},
+ {org = "ballerina", name = "test"}
+]
+modules = [
+ {org = "ballerina", packageName = "parse_list_types_tests", moduleName = "parse_list_types_tests"}
+]
+
+[[package]]
+org = "ballerina"
+name = "test"
+version = "0.0.0"
+scope = "testOnly"
+dependencies = [
+ {org = "ballerina", name = "jballerina.java"},
+ {org = "ballerina", name = "lang.array"},
+ {org = "ballerina", name = "lang.error"}
+]
+modules = [
+ {org = "ballerina", packageName = "test", moduleName = "test"}
+]
+
diff --git a/ballerina-tests/parse-list-types-tests/tests/parse_list_type_as_list_test.bal b/ballerina-tests/parse-list-types-tests/tests/parse_list_type_as_list_test.bal
new file mode 100644
index 0000000..f3ef889
--- /dev/null
+++ b/ballerina-tests/parse-list-types-tests/tests/parse_list_type_as_list_test.bal
@@ -0,0 +1,416 @@
+import ballerina/csv_commons as common;
+import ballerina/data.csv as csv;
+import ballerina/test;
+
+@test:Config
+function testFromCsvWithTypeForTupleAndTupleAsExpectedType() {
+ StringTuple1Array|csv:Error st1st1 = csv:parseListAsListType([st1, st1], {}, StringTuple1Array);
+ test:assertEquals(st1st1, [
+ [s1, s2, "", ""],
+ [s1, s2, "", ""]
+ ]);
+
+ StringTuple1Array|csv:Error st2st1 = csv:parseListAsListType([st2, st2], {}, StringTuple1Array);
+ test:assertEquals(st2st1, [
+ [s1, s2, s3, s2],
+ [s1, s2, s3, s2]
+ ]);
+
+ StringTuple1Array|csv:Error st3st1 = csv:parseListAsListType([st3, st3], {}, StringTuple1Array);
+ test:assertEquals(st3st1, [
+ [s1, s2, "", ""],
+ [s1, s2, "", ""]
+ ]);
+
+ StringTuple1Array|csv:Error st4st1 = csv:parseListAsListType([st4, st4], {}, StringTuple1Array);
+ test:assertEquals(st4st1, [
+ [s1, s2, s3, s2],
+ [s1, s2, s3, s2]
+ ]);
+
+ StringTuple2Array|csv:Error st1st2 = csv:parseListAsListType([st1, st1], {}, StringTuple2Array);
+ test:assertEquals(st1st2, [
+ [s1, s2],
+ [s1, s2]
+ ]);
+
+ StringTuple2Array|csv:Error st2st2 = csv:parseListAsListType([st2, st2], {}, StringTuple2Array);
+ test:assertEquals(st2st2, [
+ [s1, s2],
+ [s1, s2]
+ ]);
+
+ StringTuple2Array|csv:Error st3st2 = csv:parseListAsListType([st3, st3], {}, StringTuple2Array);
+ test:assertEquals(st3st2, [
+ [s1, s2],
+ [s1, s2]
+ ]);
+
+ StringTuple2Array|csv:Error st4st2 = csv:parseListAsListType([st4, st4], {}, StringTuple2Array);
+ test:assertEquals(st4st2, [
+ [s1, s2],
+ [s1, s2]
+ ]);
+
+ StringTuple3Array|csv:Error st1st3 = csv:parseListAsListType([st1, st1], {}, StringTuple3Array);
+ test:assertEquals(st1st3, [
+ [s1, s2],
+ [s1, s2]
+ ]);
+
+ StringTuple3Array|csv:Error st2st3 = csv:parseListAsListType([st2, st2], {}, StringTuple3Array);
+ test:assertEquals(st2st3, [
+ [s1, s2, s3, s2],
+ [s1, s2, s3, s2]
+ ]);
+
+ StringTuple3Array|csv:Error st3st3 = csv:parseListAsListType([st3, st3], {}, StringTuple3Array);
+ test:assertEquals(st3st3, [
+ [s1, s2],
+ [s1, s2]
+ ]);
+
+ StringTuple3Array|csv:Error st4st3 = csv:parseListAsListType([st4, st4], {}, StringTuple3Array);
+ test:assertEquals(st4st3, [
+ [s1, s2, s3, s2],
+ [s1, s2, s3, s2]
+ ]);
+}
+
+@test:Config
+function testFromCsvWithTypeForTupleAndTupleAsExpectedType2() {
+ StringTuple4Array|csv:Error st1st4 = csv:parseListAsListType([st1, st1], {}, StringTuple4Array);
+ test:assertEquals(st1st4, [
+ [s1, s2],
+ [s1, s2]
+ ]);
+
+ StringTuple4Array|csv:Error st2st4 = csv:parseListAsListType([st2, st2], {}, StringTuple4Array);
+ test:assertEquals(st2st4, [
+ [s1, s2, s3, s2],
+ [s1, s2, s3, s2]
+ ]);
+
+ StringTuple4Array|csv:Error st3st4 = csv:parseListAsListType([st3, st3], {}, StringTuple4Array);
+ test:assertEquals(st3st4, [
+ [s1, s2],
+ [s1, s2]
+ ]);
+
+ StringTuple4Array|csv:Error st4st4 = csv:parseListAsListType([st4, st4], {}, StringTuple4Array);
+ test:assertEquals(st4st4, [
+ [s1, s2, s3, s2],
+ [s1, s2, s3, s2]
+ ]);
+
+ AnydataTuple3Array|csv:Error st1anydt3 = csv:parseListAsListType([st1, st1], {}, AnydataTuple3Array);
+ test:assertEquals(st1anydt3, [
+ [s1, s2],
+ [s1, s2]
+ ]);
+
+ AnydataTuple3Array|csv:Error st2anydt3 = csv:parseListAsListType([st2, st2], {}, AnydataTuple3Array);
+ test:assertEquals(st2anydt3, [
+ [s1, s2, s3, s2],
+ [s1, s2, s3, s2]
+ ]);
+
+ AnydataTuple3Array|csv:Error st3anydt3 = csv:parseListAsListType([st3, st3], {}, AnydataTuple3Array);
+ test:assertEquals(st3anydt3, [
+ [s1, s2],
+ [s1, s2]
+ ]);
+
+ AnydataTuple3Array|csv:Error st4anydt3 = csv:parseListAsListType([st4, st4], {}, AnydataTuple3Array);
+ test:assertEquals(st4anydt3, [
+ [s1, s2, s3, s2],
+ [s1, s2, s3, s2]
+ ]);
+
+ JsonTuple3Array|csv:Error st1jt3 = csv:parseListAsListType([st1, st1], {}, JsonTuple3Array);
+ test:assertEquals(st1jt3, [
+ [s1, s2],
+ [s1, s2]
+ ]);
+
+ JsonTuple3Array|csv:Error st2jt3 = csv:parseListAsListType([st2, st2], {}, JsonTuple3Array);
+ test:assertEquals(st2jt3, [
+ [s1, s2, s3, s2],
+ [s1, s2, s3, s2]
+ ]);
+
+ JsonTuple3Array|csv:Error st3jt3 = csv:parseListAsListType([st3, st3], {}, JsonTuple3Array);
+ test:assertEquals(st3jt3, [
+ [s1, s2],
+ [s1, s2]
+ ]);
+
+ JsonTuple3Array|csv:Error st4jt3 = csv:parseListAsListType([st4, st4], {}, JsonTuple3Array);
+ test:assertEquals(st4jt3, [
+ [s1, s2, s3, s2],
+ [s1, s2, s3, s2]
+ ]);
+
+ DecimalTuple4Array|csv:Error st1dta = csv:parseListAsListType([st1, st1], {}, DecimalTuple4Array);
+ test:assertTrue(st1dta is csv:Error);
+ test:assertEquals((st1dta).message(), common:generateErrorMessageForInvalidValueForArrayType("string", "0", "decimal"));
+
+ IntegerTuple3Array|csv:Error st2bta = csv:parseListAsListType([st2, st2], {}, IntegerTuple3Array);
+ test:assertTrue(st2bta is csv:Error);
+ test:assertEquals((st2bta).message(), common:generateErrorMessageForInvalidValueForArrayType("string", "0", "int"));
+
+ NilTuple3Array|csv:Error st3nta = csv:parseListAsListType([st3, st3], {}, NilTuple3Array);
+ test:assertTrue(st3nta is csv:Error);
+ test:assertEquals((st3nta).message(), common:generateErrorMessageForInvalidValueForArrayType("string", "0", "()"));
+
+ BooleanTuple4Array|csv:Error st4bta = csv:parseListAsListType([st4, st4], {}, BooleanTuple4Array);
+ test:assertTrue(st4bta is csv:Error);
+ test:assertEquals((st4bta).message(), common:generateErrorMessageForInvalidValueForArrayType("string", "0", "boolean"));
+}
+
+@test:Config
+function testFromCsvWithTypeForTupleAndTupleAsExpectedType3() {
+ [string, boolean, int][]|csv:Error ct1bt4 = csv:parseListAsListType([["a", "true", "1"], ["a", "true", "1"]], {});
+ test:assertEquals(ct1bt4, [
+ ["a", true, 1],
+ ["a", true, 1]
+ ]);
+
+ [(), float, decimal, boolean, int, string][]|csv:Error ct1bt6 = csv:parseListAsListType(
+ [["null", "2.23", "0", "true", "1", "a"], ["null", "0", "2.23", "true", "1", "a"]]);
+ test:assertEquals(ct1bt6, [
+ [(), 2.23, 0, true, 1, "a"],
+ [(), 0, 2.23, true, 1, "a"]
+ ]);
+
+ [decimal, boolean, int, string][]|csv:Error ct1bt7 = csv:parseListAsListType(
+ [["0", "true", "1", "a"], ["2.23", "true", "1", "a"]]);
+ test:assertEquals(ct1bt7, [
+ [0, true, 1, "a"],
+ [2.23, true, 1, "a"]
+ ]);
+
+ [decimal, boolean, int, string, anydata...][]|csv:Error ct1bt8 = csv:parseListAsListType(
+ [["0", "true", "1", "a", "null", "2.23"], ["2.23", "true", "1", "a", "null", "0"]]);
+ test:assertEquals(ct1bt8, [
+ [0, true, 1, "a", (), 2.23],
+ [2.23, true, 1, "a", (), 0]
+ ]);
+
+ [(), float, decimal, boolean, int, string, string...][]|csv:Error ct1bt9 = csv:parseListAsListType(
+ [["null", "2.23", "0", "true", "1", "a"], ["null", "0", "2.23", "true", "1", "a"]]);
+ test:assertEquals(ct1bt9, [
+ [(), 2.23, 0, true, 1, "a"],
+ [(), 0, 2.23, true, 1, "a"]
+ ]);
+
+ [decimal, boolean, int, string, string...][]|csv:Error ct1bt10 = csv:parseListAsListType(
+ [["0", "true", "1", "a", "null", "2.23"], ["2.23", "true", "1", "a", "null", "0"]]);
+ test:assertEquals(ct1bt10, [
+ [0, true, 1, "a", "null", "2.23"],
+ [2.23, true, 1, "a", "null", "0"]
+ ]);
+
+ [decimal, boolean, int, string, ()...][]|csv:Error ct1bt11 = csv:parseListAsListType(
+ [["null", "2.23", "0", "true", "1", "a"], ["null", "0", "2.23", "true", "1", "a"]]);
+ test:assertTrue(ct1bt11 is csv:Error);
+ //TODO: Fix the message
+ test:assertEquals((ct1bt11).message(), common:generateErrorMessageForInvalidValueForArrayType("null", "0", "decimal"));
+
+ [(), decimal, float, boolean, ()...][]|csv:Error ct1bt11_2 = csv:parseListAsListType(
+ [["null", "2.23", "0", "true", "1", "a"], ["null", "0", "2.23", "true", "1", "a"]]);
+ test:assertTrue(ct1bt11_2 is csv:Error);
+ test:assertEquals((ct1bt11_2).message(), common:generateErrorMessageForInvalidValueForArrayType("1", "4", "()"));
+
+ [()...][]|csv:Error ct1bt12 = csv:parseListAsListType(
+ [["null", "2.23", "0", "true", "1", "a"], ["null", "0", "2.23", "true", "1", "a"]]);
+ test:assertTrue(ct1bt12 is csv:Error);
+ test:assertEquals((ct1bt12).message(), common:generateErrorMessageForInvalidValueForArrayType("2.23", "1", "()"));
+
+ [string...][]|csv:Error ct1bt13 = csv:parseListAsListType(
+ [["1", "a"], ["1", "a"]]);
+ test:assertEquals(ct1bt13, [
+ ["1", "a"],
+ ["1", "a"]
+ ]);
+
+ [boolean...][]|csv:Error ct1bt14 = csv:parseListAsListType(
+ [["2.23", "null"], ["7", "()"]]);
+ test:assertTrue(ct1bt14 is csv:Error);
+ test:assertEquals((ct1bt14).message(), common:generateErrorMessageForInvalidValueForArrayType("2.23", "0", "boolean"));
+
+ int?[][]|csv:Error ct1bt15 = csv:parseListAsListType(
+ [["1", "()"], ["1", "2"]]);
+ test:assertEquals(ct1bt15, [
+ [1, ()],
+ [1, 2]
+ ]);
+
+ int[][]|csv:Error ct1bt16 = csv:parseListAsListType(
+ [["1", "2"], ["1", "()"]]);
+ test:assertTrue(ct1bt16 is csv:Error);
+ test:assertEquals((ct1bt16).message(), common:generateErrorMessageForInvalidValueForArrayType("()", "1", "int"));
+
+ int[][]|csv:Error ct1bt17 = csv:parseListAsListType(
+ [["a", "b"], ["a", "b"]]);
+ test:assertTrue(ct1bt17 is csv:Error);
+ test:assertEquals((ct1bt17).message(), common:generateErrorMessageForInvalidValueForArrayType("a", "0", "int"));
+}
+
+@test:Config
+function testFromCsvWithTypeForTupleAndArrayAsExpectedType() {
+ StringArrayArray|csv:Error st1saa = csv:parseListAsListType([st1, st1], {}, StringArrayArray);
+ test:assertEquals(st1saa, [
+ [s1, s2],
+ [s1, s2]
+ ]);
+
+ StringArrayArray|csv:Error st2saa = csv:parseListAsListType([st2, st2], {}, StringArrayArray);
+ test:assertEquals(st2saa, [
+ [s1, s2, s3, s2],
+ [s1, s2, s3, s2]
+ ]);
+
+ StringArrayArray|csv:Error st3saa = csv:parseListAsListType([st3, st3], {}, StringArrayArray);
+ test:assertEquals(st3saa, [
+ [s1, s2],
+ [s1, s2]
+ ]);
+
+ StringArrayArray|csv:Error st4saa = csv:parseListAsListType([st4, st4], {}, StringArrayArray);
+ test:assertEquals(st4saa, [
+ [s1, s2, s3, s2],
+ [s1, s2, s3, s2]
+ ]);
+
+ NillableStringArrayArray|csv:Error st1nsaa = csv:parseListAsListType([st1, st1], {}, NillableStringArrayArray);
+ test:assertEquals(st1nsaa, [
+ [s1, s2],
+ [s1, s2]
+ ]);
+
+ NillableStringArrayArray|csv:Error st2nsaa = csv:parseListAsListType([st2, st2], {}, NillableStringArrayArray);
+ test:assertEquals(st2nsaa, [
+ [s1, s2, s3, s2],
+ [s1, s2, s3, s2]
+ ]);
+
+ NillableStringArrayArray|csv:Error st3nsaa = csv:parseListAsListType([st3, st3], {}, NillableStringArrayArray);
+ test:assertEquals(st3nsaa, [
+ [s1, s2],
+ [s1, s2]
+ ]);
+
+ NillableStringArrayArray|csv:Error st4nsaa = csv:parseListAsListType([st4, st4], {}, NillableStringArrayArray);
+ test:assertEquals(st4nsaa, [
+ [s1, s2, s3, s2],
+ [s1, s2, s3, s2]
+ ]);
+
+ NillableIntOrUnionStringArrayArray|csv:Error st1nsuiaa = csv:parseListAsListType([st1, st1], {}, NillableIntOrUnionStringArrayArray);
+ test:assertEquals(st1nsuiaa, [
+ [s1, s2],
+ [s1, s2]
+ ]);
+}
+
+@test:Config
+function testFromCsvWithTypeForTupleAndTupleAsExpectedType4() {
+ NillableIntOrUnionStringArrayArray|csv:Error st2nsuiaa = csv:parseListAsListType([st2, st2], {}, NillableIntOrUnionStringArrayArray);
+ test:assertEquals(st2nsuiaa, [
+ [s1, s2, s3, s2],
+ [s1, s2, s3, s2]
+ ]);
+
+ NillableIntOrUnionStringArrayArray|csv:Error st3nsuiaa = csv:parseListAsListType([st3, st3], {}, NillableIntOrUnionStringArrayArray);
+ test:assertEquals(st3nsuiaa, [
+ [s1, s2],
+ [s1, s2]
+ ]);
+
+ NillableIntOrUnionStringArrayArray|csv:Error st4nsuiaa = csv:parseListAsListType([st4, st4], {}, NillableIntOrUnionStringArrayArray);
+ test:assertEquals(st4nsuiaa, [
+ [s1, s2, s3, s2],
+ [s1, s2, s3, s2]
+ ]);
+
+ StringArray2Array|csv:Error st1saa2 = csv:parseListAsListType([st1, st1], {}, StringArray2Array);
+ test:assertEquals(st1saa2, [
+ [s1, s2],
+ [s1, s2]
+ ]);
+
+ StringArray2Array|csv:Error st2saa2 = csv:parseListAsListType([st2, st2], {}, StringArray2Array);
+ test:assertEquals(st2saa2, [
+ [s1, s2],
+ [s1, s2]
+ ]);
+
+ StringArray2Array|csv:Error st3saa2 = csv:parseListAsListType([st3, st3], {}, StringArray2Array);
+ test:assertEquals(st3saa2, [
+ [s1, s2],
+ [s1, s2]
+ ]);
+
+ StringArray2Array|csv:Error st4saa2 = csv:parseListAsListType([st4, st4], {}, StringArray2Array);
+ test:assertEquals(st4saa2, [
+ [s1, s2],
+ [s1, s2]
+ ]);
+
+ JsonArray1Array|csv:Error st1jaa = csv:parseListAsListType([st1, st1], {}, JsonArray1Array);
+ test:assertEquals(st1jaa, [
+ [s1, s2],
+ [s1, s2]
+ ]);
+
+ JsonArray1Array|csv:Error st2jaa = csv:parseListAsListType([st2, st2], {}, JsonArray1Array);
+ test:assertEquals(st2jaa, [
+ [s1, s2, s3, s2],
+ [s1, s2, s3, s2]
+ ]);
+
+ JsonArray1Array|csv:Error st3jaa = csv:parseListAsListType([st3, st3], {}, JsonArray1Array);
+ test:assertEquals(st3jaa, [
+ [s1, s2],
+ [s1, s2]
+ ]);
+
+ JsonArray1Array|csv:Error st4jaa = csv:parseListAsListType([st4, st4], {}, JsonArray1Array);
+ test:assertEquals(st4jaa, [
+ [s1, s2, s3, s2],
+ [s1, s2, s3, s2]
+ ]);
+
+ AnydataArray1Array|csv:Error st1anyda = csv:parseListAsListType([st1, st1], {}, AnydataArray1Array);
+ test:assertEquals(st1anyda, [
+ [s1, s2],
+ [s1, s2]
+ ]);
+
+ AnydataArray1Array|csv:Error st2anyda = csv:parseListAsListType([st2, st2], {}, AnydataArray1Array);
+ test:assertEquals(st2anyda, [
+ [s1, s2, s3, s2],
+ [s1, s2, s3, s2]
+ ]);
+
+ AnydataArray1Array|csv:Error st3anyda = csv:parseListAsListType([st3, st3], {}, AnydataArray1Array);
+ test:assertEquals(st3anyda, [
+ [s1, s2],
+ [s1, s2]
+ ]);
+
+ AnydataArray1Array|csv:Error st4anyda = csv:parseListAsListType([st4, st4], {}, AnydataArray1Array);
+ test:assertEquals(st4anyda, [
+ [s1, s2, s3, s2],
+ [s1, s2, s3, s2]
+ ]);
+
+ DecimalArray1Array|csv:Error st1dda = csv:parseListAsListType([st1, st1], {}, DecimalArray1Array);
+ test:assertTrue(st1dda is csv:Error);
+ test:assertEquals((st1dda).message(), common:generateErrorMessageForInvalidValueForArrayType("string", "0", "decimal"));
+
+ DecimalArray1Array|csv:Error st3dda = csv:parseListAsListType([st3, st3], {}, DecimalArray1Array);
+ test:assertTrue(st3dda is csv:Error);
+ test:assertEquals((st3dda).message(), common:generateErrorMessageForInvalidValueForArrayType("string", "0", "decimal"));
+}
diff --git a/ballerina-tests/parse-list-types-tests/tests/parse_list_type_as_record_test.bal b/ballerina-tests/parse-list-types-tests/tests/parse_list_type_as_record_test.bal
new file mode 100644
index 0000000..751e756
--- /dev/null
+++ b/ballerina-tests/parse-list-types-tests/tests/parse_list_type_as_record_test.bal
@@ -0,0 +1,768 @@
+import ballerina/csv_commons as common;
+import ballerina/data.csv as csv;
+import ballerina/test;
+
+@test:Config
+function testFromCsvWithTypeForTupleAndRecordAsExpectedType() {
+ StringRecord1Array|csv:Error st1sr1 = csv:parseListAsRecordType([st1, st1], (), {}, StringRecord1Array);
+ test:assertTrue(st1sr1 is csv:Error);
+ test:assertEquals((st1sr1).message(), common:generateErrorMessageForMissingRequiredField("s3"));
+
+ StringRecord1Array|csv:Error st2sr1 = csv:parseListAsRecordType([st2, st2], (), {}, StringRecord1Array);
+ test:assertTrue(st2sr1 is csv:Error);
+ test:assertEquals((st2sr1).message(), common:generateErrorMessageForMissingRequiredField("s3"));
+
+ StringRecord2Array|csv:Error st1sr2 = csv:parseListAsRecordType([st1, st1], (), {}, StringRecord2Array);
+ test:assertTrue(st1sr2 is csv:Error);
+ test:assertEquals((st1sr2).message(), common:generateErrorMessageForInvalidHeaders("[\"string\",\"\"]", "parse_list_types_tests:StringRecord2"));
+
+ StringRecord2Array|csv:Error st2sr2 = csv:parseListAsRecordType([st2, st2], (), {}, StringRecord2Array);
+ test:assertTrue(st2sr2 is csv:Error);
+ test:assertEquals((st2sr2).message(), common:generateErrorMessageForInvalidHeaders("[\"string\",\"\",\"a\",\"\"]","parse_list_types_tests:StringRecord2"));
+
+ StringRecord9Array|csv:Error st1sr9 = csv:parseListAsRecordType([st1, st1], (), {}, StringRecord9Array);
+ test:assertTrue(st1sr9 is csv:Error);
+ test:assertEquals((st1sr9).message(), common:generateErrorMessageForInvalidHeaders("[\"string\",\"\"]", "parse_list_types_tests:StringRecord9"));
+
+ StringRecord9Array|csv:Error st2sr9 = csv:parseListAsRecordType([st2, st2], (), {}, StringRecord9Array);
+ test:assertTrue(st2sr9 is csv:Error);
+ test:assertEquals((st2sr9).message(), common:generateErrorMessageForInvalidHeaders("[\"string\",\"\",\"a\",\"\"]","parse_list_types_tests:StringRecord9"));
+
+ StringRecord10Array|csv:Error st1sr10 = csv:parseListAsRecordType([st1, st1], (), {}, StringRecord10Array);
+ test:assertEquals(st1sr10, [
+ {'1: "string", '2: ""},
+ {'1: "string", '2: ""}
+ ]);
+
+ StringRecord10Array|csv:Error st2sr10 = csv:parseListAsRecordType([st2, st2], (), {}, StringRecord10Array);
+ test:assertEquals(st2sr10, [
+ {'1: "string", '2: "", '3: "a", '4: ""},
+ {'1: "string", '2: "", '3: "a", '4: ""}
+ ]);
+
+ StringRecord19Array|csv:Error st1sr19 = csv:parseListAsRecordType([st1, st1], (), {}, StringRecord19Array);
+ test:assertEquals(st1sr19, [
+ {s1: "", s2: "", "1": s1, "2": s2},
+ {s1: "", s2: "", "1": s1, "2": s2}
+ ]);
+
+ StringRecord19Array|csv:Error st2sr19 = csv:parseListAsRecordType([st2, st2], (), {}, StringRecord19Array);
+ test:assertEquals(st2sr19, [
+ {s1: "", s2: "", '1: s1, '2: s2, '3: s3, '4: s2},
+ {s1: "", s2: "", '1: s1, '2: s2, '3: s3, '4: s2}
+ ]);
+
+ StringRecord20Array|csv:Error st1sr20 = csv:parseListAsRecordType([st1, st1], (), {}, StringRecord20Array);
+ test:assertEquals(st1sr20, [
+ {s1: "", s2: ""},
+ {s1: "", s2: ""}
+ ]);
+}
+
+@test:Config
+function testFromCsvWithTypeForTupleAndRecordAsExpectedType2() {
+ StringRecord20Array|csv:Error st2sr20 = csv:parseListAsRecordType([st2, st2], (), {}, StringRecord20Array);
+ test:assertEquals(st2sr20, [
+ {s1: "", s2: ""},
+ {s1: "", s2: ""}
+ ]);
+
+ StringRecord21Array|csv:Error st1sr21 = csv:parseListAsRecordType([st1, st1], (), {}, StringRecord21Array);
+ test:assertEquals(st1sr21, [
+ {"1": s1, "2": s2},
+ {"1": s1, "2": s2}
+ ]);
+
+ StringRecord21Array|csv:Error st2sr21 = csv:parseListAsRecordType([st2, st2], (), {}, StringRecord21Array);
+ test:assertEquals(st2sr21, [
+ {'1: s1, '2: s2, '3: s3, '4: s2},
+ {'1: s1, '2: s2, '3: s3, '4: s2}
+ ]);
+
+ StringRecord22Array|csv:Error st1sr22 = csv:parseListAsRecordType([st1, st1], (), {}, StringRecord22Array);
+ test:assertEquals(st1sr22, [
+ {s1: "", s2: "", "1": s1, "2": s2},
+ {s1: "", s2: "", "1": s1, "2": s2}
+ ]);
+
+ StringRecord22Array|csv:Error st2sr22 = csv:parseListAsRecordType([st2, st2], (), {}, StringRecord22Array);
+ test:assertEquals(st2sr22, [
+ {s1: "", s2: "", '1: s1, '2: s2, '3: s3, '4: s2},
+ {s1: "", s2: "", '1: s1, '2: s2, '3: s3, '4: s2}
+ ]);
+
+ StringRecord23Array|csv:Error st1sr23 = csv:parseListAsRecordType([st1, st1], (), {}, StringRecord23Array);
+ test:assertEquals(st1sr23, [
+ {"1": s1, "2": s2},
+ {"1": s1, "2": s2}
+ ]);
+
+ StringRecord23Array|csv:Error st2sr23 = csv:parseListAsRecordType([st2, st2], (), {}, StringRecord23Array);
+ test:assertEquals(st2sr23, [
+ {'1: s1, '2: s2, '3: s3, '4: s2},
+ {'1: s1, '2: s2, '3: s3, '4: s2}
+ ]);
+
+ CustomRecord15Array|csv:Error st1cr15 = csv:parseListAsRecordType([st1, st1], (), {}, CustomRecord15Array);
+ test:assertEquals(st1cr15, [
+ {"1": s1, "2": s2},
+ {"1": s1, "2": s2}
+ ]);
+
+ CustomRecord15Array|csv:Error st2cr15 = csv:parseListAsRecordType([st2, st2], (), {}, CustomRecord15Array);
+ test:assertEquals(st2cr15, [
+ {"1": s1, "2": s2},
+ {"1": s1, "2": s2}
+ ]);
+
+ CustomRecord16Array|csv:Error st1cr16 = csv:parseListAsRecordType([st1, st1], (), {}, CustomRecord16Array);
+ test:assertTrue(st1cr16 is csv:Error);
+ test:assertEquals((st1cr16).message(), common:generateErrorMessageForMissingRequiredField("3"));
+
+ CustomRecord16Array|csv:Error st2cr16 = csv:parseListAsRecordType([st2, st2], (), {}, CustomRecord16Array);
+ test:assertEquals(st2cr16, [
+ {'1: s1, '2: s2, '3: s3, '4: s2},
+ {'1: s1, '2: s2, '3: s3, '4: s2}
+ ]);
+
+ CustomRecord17Array|csv:Error st1cr17 = csv:parseListAsRecordType([st1, st1], (), {}, CustomRecord17Array);
+ test:assertEquals(st1cr17, [
+ {"1": s1, "2": s2},
+ {"1": s1, "2": s2}
+ ]);
+}
+
+@test:Config
+function testFromCsvWithTypeForTupleAndRecordAsExpectedType3() {
+ CustomRecord17Array|csv:Error st2cr17 = csv:parseListAsRecordType([st2, st2], (), {}, CustomRecord17Array);
+ test:assertEquals(st2cr17, [
+ {'1: s1, '2: s2, '3: s3, '4: s2},
+ {'1: s1, '2: s2, '3: s3, '4: s2}
+ ]);
+
+ CustomRecord18Array|csv:Error st1cr18 = csv:parseListAsRecordType([st1, st1], (), {}, CustomRecord18Array);
+ test:assertTrue(st1cr18 is csv:Error);
+ test:assertEquals((st1cr18).message(), common:generateErrorMessageForMissingRequiredField("3"));
+
+ CustomRecord18Array|csv:Error st2cr18 = csv:parseListAsRecordType([st2, st2], (), {}, CustomRecord18Array);
+ test:assertEquals(st2cr18, [
+ {'1: s1, '2: s2, '3: s3, '4: s2},
+ {'1: s1, '2: s2, '3: s3, '4: s2}
+ ]);
+
+ CustomRecord19Array|csv:Error st1cr19 = csv:parseListAsRecordType([st1, st1], (), {}, CustomRecord19Array);
+ test:assertEquals(st1cr19, [
+ {'1: s1, '2: s2, '3: "", '4: ""},
+ {'1: s1, '2: s2, '3: "", '4: ""}
+ ]);
+
+ CustomRecord19Array|csv:Error st2cr19 = csv:parseListAsRecordType([st2, st2], (), {}, CustomRecord19Array);
+ test:assertEquals(st2cr19, [
+ {'1: s1, '2: s2, '3: s3, '4: s2},
+ {'1: s1, '2: s2, '3: s3, '4: s2}
+ ]);
+
+ CustomRecord20Array|csv:Error st1cr20 = csv:parseListAsRecordType([st1, st1], (), {}, CustomRecord20Array);
+ test:assertEquals(st1cr20, [
+ {"1": s1, "2": s2},
+ {"1": s1, "2": s2}
+ ]);
+
+ CustomRecord20Array|csv:Error st2cr20 = csv:parseListAsRecordType([st2, st2], (), {}, CustomRecord20Array);
+ test:assertEquals(st2cr20, [
+ {'1: s1, '2: s2, '3: s3, '4: s2},
+ {'1: s1, '2: s2, '3: s3, '4: s2}
+ ]);
+
+ CustomRecord21Array|csv:Error st1cr21 = csv:parseListAsRecordType([st1, st1], (), {}, CustomRecord21Array);
+ test:assertEquals(st1cr21, [
+ {"1": s1, "2": s2},
+ {"1": s1, "2": s2}
+ ]);
+
+ CustomRecord21Array|csv:Error st2cr21 = csv:parseListAsRecordType([st2, st2], (), {}, CustomRecord21Array);
+ test:assertEquals(st2cr21, [
+ {'1: s1, '2: s2, '3: s3, '4: s2},
+ {'1: s1, '2: s2, '3: s3, '4: s2}
+ ]);
+
+ CustomRecord22Array|csv:Error st1cr22 = csv:parseListAsRecordType([st1, st1], (), {}, CustomRecord22Array);
+ test:assertEquals(st1cr22, [
+ {"1": s1, "2": s2},
+ {"1": s1, "2": s2}
+ ]);
+}
+
+@test:Config
+function testFromCsvWithTypeForTupleAndRecordAsExpectedType4() {
+ CustomRecord22Array|csv:Error st2cr22 = csv:parseListAsRecordType([st2, st2], (), {}, CustomRecord22Array);
+ test:assertEquals(st2cr22, [
+ {'1: s1, '2: s2, '3: s3, '4: s2},
+ {'1: s1, '2: s2, '3: s3, '4: s2}
+ ]);
+
+ CustomRecord23Array|csv:Error st1cr23 = csv:parseListAsRecordType([st1, st1], (), {}, CustomRecord23Array);
+ test:assertEquals(st1cr23, [
+ {"1": s1, "2": s2, a: ""},
+ {"1": s1, "2": s2, a: ""}
+ ]);
+
+ CustomRecord23Array|csv:Error st2cr23 = csv:parseListAsRecordType([st2, st2], (), {}, CustomRecord23Array);
+ test:assertEquals(st2cr23, [
+ {'1: s1, '2: s2, '3: s3, '4: s2, a: ""},
+ {'1: s1, '2: s2, '3: s3, '4: s2, a: ""}
+ ]);
+
+ CustomRecord24Array|csv:Error st1cr24 = csv:parseListAsRecordType([st1, st1], (), {}, CustomRecord24Array);
+ test:assertEquals(st1cr24, [
+ {"1": s1, "2": s2},
+ {"1": s1, "2": s2}
+ ]);
+
+ CustomRecord24Array|csv:Error st2cr24 = csv:parseListAsRecordType([st2, st2], (), {}, CustomRecord24Array);
+ test:assertEquals(st2cr24, [
+ {'1: s1, '2: s2, '3: s3, '4: s2},
+ {'1: s1, '2: s2, '3: s3, '4: s2}
+ ]);
+
+ CustomRecord25Array|csv:Error st1cr25 = csv:parseListAsRecordType([st1, st1], (), {}, CustomRecord25Array);
+ test:assertTrue(st1cr25 is csv:Error);
+ test:assertEquals((st1cr25).message(), common:generateErrorMessageForInvalidFieldType("string", "1"));
+
+ CustomRecord25Array|csv:Error st2cr25 = csv:parseListAsRecordType([st2, st2], (), {}, CustomRecord25Array);
+ test:assertTrue(st2cr25 is csv:Error);
+ test:assertEquals((st2cr25).message(), common:generateErrorMessageForInvalidFieldType("string", "1"));
+
+ CustomRecord25Array|csv:Error st3cr25 = csv:parseListAsRecordType([st3, st3], (), {}, CustomRecord25Array);
+ test:assertTrue(st3cr25 is csv:Error);
+ test:assertEquals((st3cr25).message(), common:generateErrorMessageForInvalidFieldType("string", "1"));
+
+ CustomRecord25Array|csv:Error st4cr25 = csv:parseListAsRecordType([st4, st4], (), {}, CustomRecord25Array);
+ test:assertTrue(st4cr25 is csv:Error);
+ test:assertEquals((st4cr25).message(), common:generateErrorMessageForInvalidFieldType("string", "1"));
+
+ CustomRecord26Array|csv:Error st1cr26 = csv:parseListAsRecordType([st1, st1], (), {}, CustomRecord26Array);
+ test:assertEquals(st1cr26 , [
+ {'1: s1},
+ {'1: s1}
+ ]);
+
+ CustomRecord26Array|csv:Error st2cr26 = csv:parseListAsRecordType([st2, st2], (), {}, CustomRecord26Array);
+ test:assertEquals(st2cr26 , [
+ {'1: s1},
+ {'1: s1}
+ ]);
+
+ CustomRecord26Array|csv:Error st3cr26 = csv:parseListAsRecordType([st3, st3], (), {}, CustomRecord26Array);
+ test:assertEquals(st3cr26 , [
+ {'1: s1},
+ {'1: s1}
+ ]);
+
+ CustomRecord26Array|csv:Error st4cr26 = csv:parseListAsRecordType([st4, st4], (), {}, CustomRecord26Array);
+ test:assertEquals(st4cr26 , [
+ {'1: s1},
+ {'1: s1}
+ ]);
+}
+
+@test:Config
+function testFromCsvWithTypeForTupleAndRecordAsExpectedType5() {
+ StringRecord1Array|csv:Error st3sr1 = csv:parseListAsRecordType([st3, st3], (), {}, StringRecord1Array);
+ test:assertTrue(st3sr1 is csv:Error);
+ test:assertEquals((st3sr1).message(), common:generateErrorMessageForMissingRequiredField("s3"));
+
+ StringRecord1Array|csv:Error st4sr1 = csv:parseListAsRecordType([st4, st4], (), {}, StringRecord1Array);
+ test:assertTrue(st4sr1 is csv:Error);
+ test:assertEquals((st4sr1).message(), common:generateErrorMessageForMissingRequiredField("s3"));
+
+ StringRecord2Array|csv:Error st3sr2 = csv:parseListAsRecordType([st3, st3], (), {}, StringRecord2Array);
+ test:assertTrue(st3sr2 is csv:Error);
+ test:assertEquals((st3sr2).message(), common:generateErrorMessageForInvalidHeaders("[\"string\",\"\"]", "parse_list_types_tests:StringRecord2"));
+
+ StringRecord2Array|csv:Error st4sr2 = csv:parseListAsRecordType([st4, st4], (), {}, StringRecord2Array);
+ test:assertTrue(st4sr2 is csv:Error);
+ test:assertEquals((st4sr2).message(), common:generateErrorMessageForInvalidHeaders("[\"string\",\"\",\"a\",\"\"]","parse_list_types_tests:StringRecord2"));
+
+ StringRecord9Array|csv:Error st3sr9 = csv:parseListAsRecordType([st3, st3], (), {}, StringRecord9Array);
+ test:assertTrue(st3sr9 is csv:Error);
+ test:assertEquals((st3sr9).message(), common:generateErrorMessageForMissingRequiredField("s1"));
+
+ StringRecord9Array|csv:Error st4sr9 = csv:parseListAsRecordType([st4, st4], (), {}, StringRecord9Array);
+ test:assertTrue(st4sr9 is csv:Error);
+ test:assertEquals((st4sr9).message(), common:generateErrorMessageForMissingRequiredField("s1"));
+
+ StringRecord10Array|csv:Error st3sr10 = csv:parseListAsRecordType([st3, st3], (), {}, StringRecord10Array);
+ test:assertEquals(st3sr10, [
+ {'1: "string", '2: ""},
+ {'1: "string", '2: ""}
+ ]);
+
+ StringRecord10Array|csv:Error st4sr10 = csv:parseListAsRecordType([st4, st4], (), {}, StringRecord10Array);
+ test:assertEquals(st4sr10, [
+ {'1: "string", '2: "", '3: "a", '4: ""},
+ {'1: "string", '2: "", '3: "a", '4: ""}
+ ]);
+
+ StringRecord19Array|csv:Error st3sr19 = csv:parseListAsRecordType([st3, st3], (), {}, StringRecord19Array);
+ test:assertEquals(st3sr19, [
+ {s1: "", s2: "", "1": s1, "2": s2},
+ {s1: "", s2: "", "1": s1, "2": s2}
+ ]);
+
+ StringRecord19Array|csv:Error st4sr19 = csv:parseListAsRecordType([st4, st4], (), {}, StringRecord19Array);
+ test:assertEquals(st4sr19, [
+ {s1: "", s2: "", '1: s1, '2: s2, '3: s3, '4: s2},
+ {s1: "", s2: "", '1: s1, '2: s2, '3: s3, '4: s2}
+ ]);
+
+ StringRecord20Array|csv:Error st3sr20 = csv:parseListAsRecordType([st3, st3], (), {}, StringRecord20Array);
+ test:assertEquals(st3sr20, [
+ {s1: "", s2: ""},
+ {s1: "", s2: ""}
+ ]);
+
+ StringRecord20Array|csv:Error st4sr20 = csv:parseListAsRecordType([st4, st4], (), {}, StringRecord20Array);
+ test:assertEquals(st4sr20, [
+ {s1: "", s2: ""},
+ {s1: "", s2: ""}
+ ]);
+
+ StringRecord21Array|csv:Error st3sr21 = csv:parseListAsRecordType([st3, st3], (), {}, StringRecord21Array);
+ test:assertEquals(st3sr21, [
+ {"1": s1, "2": s2},
+ {"1": s1, "2": s2}
+ ]);
+
+ StringRecord21Array|csv:Error st4sr21 = csv:parseListAsRecordType([st4, st4], (), {}, StringRecord21Array);
+ test:assertEquals(st4sr21, [
+ {'1: s1, '2: s2, '3: s3, '4: s2},
+ {'1: s1, '2: s2, '3: s3, '4: s2}
+ ]);
+
+ StringRecord22Array|csv:Error st3sr22 = csv:parseListAsRecordType([st3, st3], (), {}, StringRecord22Array);
+ test:assertEquals(st3sr22, [
+ {s1: "", s2: "", "1": s1, "2": s2},
+ {s1: "", s2: "", "1": s1, "2": s2}
+ ]);
+
+ StringRecord22Array|csv:Error st4sr22 = csv:parseListAsRecordType([st4, st4], (), {}, StringRecord22Array);
+ test:assertEquals(st4sr22, [
+ {s1: "", s2: "", '1: s1, '2: s2, '3: s3, '4: s2},
+ {s1: "", s2: "", '1: s1, '2: s2, '3: s3, '4: s2}
+ ]);
+
+ StringRecord23Array|csv:Error st3sr23 = csv:parseListAsRecordType([st3, st3], (), {}, StringRecord23Array);
+ test:assertEquals(st3sr23, [
+ {"1": s1, "2": s2},
+ {"1": s1, "2": s2}
+ ]);
+
+ StringRecord23Array|csv:Error st4sr23 = csv:parseListAsRecordType([st4, st4], (), {}, StringRecord23Array);
+ test:assertEquals(st4sr23, [
+ {'1: s1, '2: s2, '3: s3, '4: s2},
+ {'1: s1, '2: s2, '3: s3, '4: s2}
+ ]);
+
+ CustomRecord15Array|csv:Error st3cr15 = csv:parseListAsRecordType([st3, st3], (), {}, CustomRecord15Array);
+ test:assertEquals(st3cr15, [
+ {"1": s1, "2": s2},
+ {"1": s1, "2": s2}
+ ]);
+}
+
+@test:Config
+function testFromCsvWithTypeForTupleAndRecordAsExpectedType6() {
+ CustomRecord15Array|csv:Error st4cr15 = csv:parseListAsRecordType([st4, st4], (), {}, CustomRecord15Array);
+ test:assertEquals(st4cr15, [
+ {"1": s1, "2": s2},
+ {"1": s1, "2": s2}
+ ]);
+
+ CustomRecord16Array|csv:Error st3cr16 = csv:parseListAsRecordType([st3, st3], (), {}, CustomRecord16Array);
+ test:assertTrue(st3cr16 is csv:Error);
+ test:assertEquals((st3cr16).message(), common:generateErrorMessageForMissingRequiredField("3"));
+
+ CustomRecord16Array|csv:Error st4cr16 = csv:parseListAsRecordType([st4, st4], (), {}, CustomRecord16Array);
+ test:assertEquals(st4cr16, [
+ {'1: s1, '2: s2, '3: s3, '4: s2},
+ {'1: s1, '2: s2, '3: s3, '4: s2}
+ ]);
+
+ CustomRecord17Array|csv:Error st3cr17 = csv:parseListAsRecordType([st3, st3], (), {}, CustomRecord17Array);
+ test:assertEquals(st3cr17, [
+ {"1": s1, "2": s2},
+ {"1": s1, "2": s2}
+ ]);
+
+ CustomRecord17Array|csv:Error st4cr17 = csv:parseListAsRecordType([st4, st4], (), {}, CustomRecord17Array);
+ test:assertEquals(st4cr17, [
+ {'1: s1, '2: s2, '3: s3, '4: s2},
+ {'1: s1, '2: s2, '3: s3, '4: s2}
+ ]);
+
+ CustomRecord18Array|csv:Error st3cr18 = csv:parseListAsRecordType([st3, st3], (), {}, CustomRecord18Array);
+ test:assertTrue(st3cr18 is csv:Error);
+ test:assertEquals((st3cr18).message(), common:generateErrorMessageForMissingRequiredField("3"));
+
+ CustomRecord18Array|csv:Error st4cr18 = csv:parseListAsRecordType([st4, st4], (), {}, CustomRecord18Array);
+ test:assertEquals(st4cr18, [
+ {'1: s1, '2: s2, '3: s3, '4: s2},
+ {'1: s1, '2: s2, '3: s3, '4: s2}
+ ]);
+
+ CustomRecord19Array|csv:Error st3cr19 = csv:parseListAsRecordType([st3, st3], (), {}, CustomRecord19Array);
+ test:assertEquals(st3cr19, [
+ {'1: s1, '2: s2, '3: "", '4: ""},
+ {'1: s1, '2: s2, '3: "", '4: ""}
+ ]);
+
+ CustomRecord19Array|csv:Error st4cr19 = csv:parseListAsRecordType([st4, st4], (), {}, CustomRecord19Array);
+ test:assertEquals(st4cr19, [
+ {'1: s1, '2: s2, '3: s3, '4: s2},
+ {'1: s1, '2: s2, '3: s3, '4: s2}
+ ]);
+
+ CustomRecord20Array|csv:Error st3cr20 = csv:parseListAsRecordType([st3, st3], (), {}, CustomRecord20Array);
+ test:assertEquals(st3cr20, [
+ {"1": s1, "2": s2},
+ {"1": s1, "2": s2}
+ ]);
+
+ CustomRecord20Array|csv:Error st4cr20 = csv:parseListAsRecordType([st4, st4], (), {}, CustomRecord20Array);
+ test:assertEquals(st4cr20, [
+ {'1: s1, '2: s2, '3: s3, '4: s2},
+ {'1: s1, '2: s2, '3: s3, '4: s2}
+ ]);
+
+ CustomRecord21Array|csv:Error st3cr21 = csv:parseListAsRecordType([st3, st3], (), {}, CustomRecord21Array);
+ test:assertEquals(st3cr21, [
+ {"1": s1, "2": s2},
+ {"1": s1, "2": s2}
+ ]);
+
+ CustomRecord21Array|csv:Error st4cr21 = csv:parseListAsRecordType([st4, st4], (), {}, CustomRecord21Array);
+ test:assertEquals(st4cr21, [
+ {'1: s1, '2: s2, '3: s3, '4: s2},
+ {'1: s1, '2: s2, '3: s3, '4: s2}
+ ]);
+
+ CustomRecord22Array|csv:Error st3cr22 = csv:parseListAsRecordType([st3, st3], (), {}, CustomRecord22Array);
+ test:assertEquals(st3cr22, [
+ {"1": s1, "2": s2},
+ {"1": s1, "2": s2}
+ ]);
+
+ CustomRecord22Array|csv:Error st4cr22 = csv:parseListAsRecordType([st4, st4], (), {}, CustomRecord22Array);
+ test:assertEquals(st4cr22, [
+ {'1: s1, '2: s2, '3: s3, '4: s2},
+ {'1: s1, '2: s2, '3: s3, '4: s2}
+ ]);
+
+ CustomRecord23Array|csv:Error st3cr23 = csv:parseListAsRecordType([st3, st3], (), {}, CustomRecord23Array);
+ test:assertEquals(st3cr23, [
+ {"1": s1, "2": s2, a: ""},
+ {"1": s1, "2": s2, a: ""}
+ ]);
+
+ CustomRecord23Array|csv:Error st4cr23 = csv:parseListAsRecordType([st4, st4], (), {}, CustomRecord23Array);
+ test:assertEquals(st4cr23, [
+ {'1: s1, '2: s2, '3: s3, '4: s2, a: ""},
+ {'1: s1, '2: s2, '3: s3, '4: s2, a: ""}
+ ]);
+
+ CustomRecord24Array|csv:Error st3cr24 = csv:parseListAsRecordType([st3, st3], (), {}, CustomRecord24Array);
+ test:assertEquals(st3cr24, [
+ {"1": s1, "2": s2},
+ {"1": s1, "2": s2}
+ ]);
+
+ CustomRecord24Array|csv:Error st4cr24 = csv:parseListAsRecordType([st4, st4], (), {}, CustomRecord24Array);
+ test:assertEquals(st4cr24, [
+ {'1: s1, '2: s2, '3: s3, '4: s2},
+ {'1: s1, '2: s2, '3: s3, '4: s2}
+ ]);
+}
+
+@test:Config
+function testFromCsvWithTypeForTupleAndRecordAsExpectedType7() {
+ record{string a; boolean b; int c;}[]|csv:Error ct1br4 = csv:parseListAsRecordType([["a", "1", "true"], ["a", "1", "true"]], ["a", "c", "b"], {});
+ test:assertEquals(ct1br4, [
+ {a: "a", b: true, c: 1},
+ {a: "a", b: true, c: 1}
+ ]);
+
+ record{() a; float b; decimal c; boolean d; int e; string f;}[]|csv:Error ct1br6 = csv:parseListAsRecordType(
+ [["a", "1", "true", "0", "2.23", "null"], ["a", "1", "true", "2.23", "0", "()"]],
+ ["f", "e", "d", "c", "b", "a"]);
+ test:assertEquals(ct1br6, [
+ {a: (), b: 2.23, c: 0, d: true, e: 1, f: "a"},
+ {a: (), b: 0, c: 2.23, d: true, e: 1, f: "a"}
+ ]);
+
+ record{|decimal c; boolean d; int e; string f;|}[]|csv:Error ct1br7 = csv:parseListAsRecordType(
+ [["a", "1", "true", "0", "2.23", "null"], ["a", "1", "true", "2.23", "0", "()"]],
+ ["f", "e", "d", "c", "b", "a"]);
+ test:assertEquals(ct1br7, [
+ {c: 0, d: true, e: 1, f: "a"},
+ {c: 2.23, d: true, e: 1, f: "a"}
+ ]);
+
+ record{decimal c; boolean d; int e; string f;}[]|csv:Error ct1br8 = csv:parseListAsRecordType(
+ [["a", "1", "true", "0", "2.23", "null"], ["a", "1", "true", "2.23", "0", "()"]],
+ ["f", "e", "d", "c", "b", "a"]);
+ test:assertEquals(ct1br8, [
+ {a: (), b: 2.23, c: 0, d: true, e: 1, f: "a"},
+ {a: (), b: 0, c: 2.23, d: true, e: 1, f: "a"}
+ ]);
+
+ record{|int|() a; float b; decimal? c; boolean d; int e; string f; string...;|}[]|csv:Error ct1br9 = csv:parseListAsRecordType(
+ [["a", "1", "true", "0", "2.23", "null"], ["a", "1", "true", "2.23", "0", "()"]],
+ ["f", "e", "d", "c", "b", "a"]);
+ test:assertEquals(ct1br9, [
+ {a: (), b: 2.23, c: 0, d: true, e: 1, f: "a"},
+ {a: (), b: 0, c: 2.23, d: true, e: 1, f: "a"}
+ ]);
+
+ record{|int|() a; float b; decimal? c; string|boolean d; int|string e; string f; string...;|}[]|csv:Error ct1br9_2 = csv:parseListAsRecordType(
+ [["a", "1", "true", "0", "2.23", "null"], ["a", "1", "true", "2.23", "0", "()"]],
+ ["f", "e", "d", "c", "b", "a"]);
+ test:assertEquals(ct1br9_2, [
+ {a: (), b: 2.23, c: 0, d: true, e: 1, f: "a"},
+ {a: (), b: 0, c: 2.23, d: true, e: 1, f: "a"}
+ ]);
+}
+
+@test:Config
+function testFromCsvWithTypeForTupleAndRecordAsExpectedType8() {
+ record{|decimal c; boolean|string d; int e; string f; string...;|}[]|csv:Error ct1br10 = csv:parseListAsRecordType(
+ [["a", "1", "true", "0", "2.23", "null"], ["a", "1", "true", "2.23", "0", "()"]],
+ ["f", "e", "d", "c", "b", "a"]);
+ test:assertEquals(ct1br10, [
+ {a: "null", b: "2.23", c: 0, d: true, e: 1, f: "a"},
+ {a: "()", b: "0", c: 2.23, d: true, e: 1, f: "a"}
+ ]);
+
+ record{|decimal? c; boolean d; int? e; string f; ()...;|}[]|csv:Error ct1br11 = csv:parseListAsRecordType(
+ [["a", "1", "true", "0", "2.23", "null"], ["a", "1", "true", "2.23", "0", "()"]],
+ ["f", "e", "d", "c", "b", "a"]);
+ test:assertEquals(ct1br11, [
+ {a: (), c: 0, d: true, e: 1, f: "a"},
+ {a: (), c: 2.23, d: true, e: 1, f: "a"}
+ ]);
+
+ record{|()...;|}[]|csv:Error ct1br12 = csv:parseListAsRecordType(
+ [["a", "1", "true", "0", "2.23", "null"], ["a", "1", "true", "2.23", "0", "()"]],
+ ["f", "e", "d", "c", "b", "a"]);
+ test:assertEquals(ct1br12, [
+ {a: ()},
+ {a: ()}
+ ]);
+
+ record{|string?...;|}[]|csv:Error ct1br13 = csv:parseListAsRecordType(
+ [["a", "1"], ["a", "1"]],
+ ["f", "e"]);
+ test:assertEquals(ct1br13, [
+ {e: "1", f: "a"},
+ {e: "1", f: "a"}
+ ]);
+
+ record{|boolean...;|}[]|csv:Error ct1br14 = csv:parseListAsRecordType(
+ [["2.23", "null"], ["7", "()"]],
+ ["b", "a"]);
+ test:assertEquals(ct1br14, [
+ {},
+ {}
+ ]);
+
+ map[]|csv:Error ct1br15 = csv:parseListAsRecordType(
+ [["2", "()"], ["2", "1"], ["()", "2"]],
+ ["f", "e"]);
+ test:assertEquals(ct1br15, [
+ {e: (), f: 2},
+ {e: 1, f: 2},
+ {e: 2, f: ()}
+ ]);
+
+ record{|boolean...;|}[]|csv:Error ct1br16 = csv:parseListAsRecordType(
+ [["2.23", "null"], ["7", "()"]],
+ ["b", "a"]);
+ test:assertEquals(ct1br16, [
+ {},
+ {}
+ ]);
+}
+
+@test:Config
+function testFromCsvWithTypeForTupleAndMapAsExpectedType() {
+ StringMapArray|csv:Error st1sma = csv:parseListAsRecordType([st1, st1], (), {}, StringMapArray);
+ test:assertEquals(st1sma , [
+ {'1: s1, '2: s2},
+ {'1: s1, '2: s2}
+ ]);
+
+ StringMapArray|csv:Error st2sma = csv:parseListAsRecordType([st2, st2], (), {}, StringMapArray);
+ test:assertEquals(st2sma , [
+ {'1: s1, '2: s2, '3: s3, '4: s2},
+ {'1: s1, '2: s2, '3: s3, '4: s2}
+ ]);
+
+ StringMapArray|csv:Error st3sma = csv:parseListAsRecordType([st3, st3], (), {}, StringMapArray);
+ test:assertEquals(st3sma , [
+ {'1: s1, '2: s2},
+ {'1: s1, '2: s2}
+ ]);
+
+ StringMapArray|csv:Error st4sma = csv:parseListAsRecordType([st4, st4], (), {}, StringMapArray);
+ test:assertEquals(st4sma , [
+ {'1: s1, '2: s2, '3: s3, '4: s2},
+ {'1: s1, '2: s2, '3: s3, '4: s2}
+ ]);
+
+ NillableIntUnionStringMapArray|csv:Error st1niusma = csv:parseListAsRecordType([st1, st1], (), {}, NillableIntUnionStringMapArray);
+ test:assertEquals(st1niusma , [
+ {'1: s1, '2: s2},
+ {'1: s1, '2: s2}
+ ]);
+
+ NillableIntUnionStringMapArray|csv:Error st2niusma = csv:parseListAsRecordType([st2, st2], (), {}, NillableIntUnionStringMapArray);
+ test:assertEquals(st2niusma , [
+ {'1: s1, '2: s2, '3: s3, '4: s2},
+ {'1: s1, '2: s2, '3: s3, '4: s2}
+ ]);
+
+ NillableIntUnionStringMapArray|csv:Error st3niusma = csv:parseListAsRecordType([st3, st3], (), {}, NillableIntUnionStringMapArray);
+ test:assertEquals(st3niusma , [
+ {'1: s1, '2: s2},
+ {'1: s1, '2: s2}
+ ]);
+
+ NillableIntUnionStringMapArray|csv:Error st4niusma = csv:parseListAsRecordType([st4, st4], (), {}, NillableIntUnionStringMapArray);
+ test:assertEquals(st4niusma , [
+ {'1: s1, '2: s2, '3: s3, '4: s2},
+ {'1: s1, '2: s2, '3: s3, '4: s2}
+ ]);
+
+ IntUnionStringMapArray|csv:Error st1iusma = csv:parseListAsRecordType([st1, st1], (), {}, IntUnionStringMapArray);
+ test:assertEquals(st1iusma , [
+ {'1: s1, '2: s2},
+ {'1: s1, '2: s2}
+ ]);
+
+ IntUnionStringMapArray|csv:Error st2iusma = csv:parseListAsRecordType([st2, st2], (), {}, IntUnionStringMapArray);
+ test:assertEquals(st2iusma , [
+ {'1: s1, '2: s2, '3: s3, '4: s2},
+ {'1: s1, '2: s2, '3: s3, '4: s2}
+ ]);
+
+ IntUnionStringMapArray|csv:Error st3iusma = csv:parseListAsRecordType([st3, st3], (), {}, IntUnionStringMapArray);
+ test:assertEquals(st3iusma , [
+ {'1: s1, '2: s2},
+ {'1: s1, '2: s2}
+ ]);
+
+ IntUnionStringMapArray|csv:Error st4iusma = csv:parseListAsRecordType([st4, st4], (), {}, IntUnionStringMapArray);
+ test:assertEquals(st4iusma , [
+ {'1: s1, '2: s2, '3: s3, '4: s2},
+ {'1: s1, '2: s2, '3: s3, '4: s2}
+ ]);
+
+ JsonMapArray|csv:Error st1jma = csv:parseListAsRecordType([st1, st1], (), {}, JsonMapArray);
+ test:assertEquals(st1jma , [
+ {'1: s1, '2: s2},
+ {'1: s1, '2: s2}
+ ]);
+}
+
+@test:Config
+function testFromCsvWithTypeForTupleAndMapAsExpectedType2() {
+ JsonMapArray|csv:Error st2jma = csv:parseListAsRecordType([st2, st2], (), {}, JsonMapArray);
+ test:assertEquals(st2jma , [
+ {'1: s1, '2: s2, '3: s3, '4: s2},
+ {'1: s1, '2: s2, '3: s3, '4: s2}
+ ]);
+
+ JsonMapArray|csv:Error st3jma = csv:parseListAsRecordType([st3, st3], (), {}, JsonMapArray);
+ test:assertEquals(st3jma , [
+ {'1: s1, '2: s2},
+ {'1: s1, '2: s2}
+ ]);
+
+ JsonMapArray|csv:Error st4jma = csv:parseListAsRecordType([st4, st4], (), {}, JsonMapArray);
+ test:assertEquals(st4jma , [
+ {'1: s1, '2: s2, '3: s3, '4: s2},
+ {'1: s1, '2: s2, '3: s3, '4: s2}
+ ]);
+
+ AnydataMapArray|csv:Error st1anydma = csv:parseListAsRecordType([st1, st1], (), {}, AnydataMapArray);
+ test:assertEquals(st1anydma , [
+ {'1: s1, '2: s2},
+ {'1: s1, '2: s2}
+ ]);
+
+ AnydataMapArray|csv:Error st2anydma = csv:parseListAsRecordType([st2, st2], (), {}, AnydataMapArray);
+ test:assertEquals(st2anydma , [
+ {'1: s1, '2: s2, '3: s3, '4: s2},
+ {'1: s1, '2: s2, '3: s3, '4: s2}
+ ]);
+
+ AnydataMapArray|csv:Error st3anydma = csv:parseListAsRecordType([st3, st3], (), {}, AnydataMapArray);
+ test:assertEquals(st3anydma , [
+ {'1: s1, '2: s2},
+ {'1: s1, '2: s2}
+ ]);
+
+ AnydataMapArray|csv:Error st4anydma = csv:parseListAsRecordType([st4, st4], (), {}, AnydataMapArray);
+ test:assertEquals(st4anydma , [
+ {'1: s1, '2: s2, '3: s3, '4: s2},
+ {'1: s1, '2: s2, '3: s3, '4: s2}
+ ]);
+
+ CustomMapArray|csv:Error st1cma = csv:parseListAsRecordType([st1, st1], (), {}, CustomMapArray);
+ test:assertEquals(st1cma , [
+ {'1: s1, '2: s2},
+ {'1: s1, '2: s2}
+ ]);
+
+ CustomMapArray|csv:Error st2cma = csv:parseListAsRecordType([st2, st2], (), {}, CustomMapArray);
+ test:assertEquals(st2cma , [
+ {'1: s1, '2: s2, '3: s3, '4: s2},
+ {'1: s1, '2: s2, '3: s3, '4: s2}
+ ]);
+
+ CustomMapArray|csv:Error st3cma = csv:parseListAsRecordType([st3, st3], (), {}, CustomMapArray);
+ test:assertEquals(st3cma , [
+ {'1: s1, '2: s2},
+ {'1: s1, '2: s2}
+ ]);
+
+ CustomMapArray|csv:Error st4cma = csv:parseListAsRecordType([st4, st4], (), {}, CustomMapArray);
+ test:assertEquals(st4cma , [
+ {'1: s1, '2: s2, '3: s3, '4: s2},
+ {'1: s1, '2: s2, '3: s3, '4: s2}
+ ]);
+
+ NilMapArray|csv:Error st1nma = csv:parseListAsRecordType([st1, st1], (), {}, NilMapArray);
+ test:assertEquals(st1nma, ([
+ {},
+ {}
+ ]));
+
+ IntegerMapArray|csv:Error st2ima = csv:parseListAsRecordType([st2, st2], (), {}, IntegerMapArray);
+ test:assertEquals(st2ima, ([
+ {},
+ {}
+ ]));
+
+ DecimalMapArray|csv:Error st3dma = csv:parseListAsRecordType([st3, st3], (), {}, DecimalMapArray);
+ test:assertEquals(st3dma, ([
+ {},
+ {}
+ ]));
+
+ BooleanMapArray|csv:Error st4bma = csv:parseListAsRecordType([st4, st4], (), {}, BooleanMapArray);
+ test:assertEquals(st4bma, ([
+ {},
+ {}
+ ]));
+}
diff --git a/ballerina-tests/parse-list-types-tests/tests/test_data_values.bal b/ballerina-tests/parse-list-types-tests/tests/test_data_values.bal
new file mode 100644
index 0000000..360a493
--- /dev/null
+++ b/ballerina-tests/parse-list-types-tests/tests/test_data_values.bal
@@ -0,0 +1,256 @@
+boolean b1 = true;
+false b2 = false;
+boolean? b3 = ();
+boolean|int b4 = false;
+
+() n1 = ();
+int? n2 = ();
+() n3 = null;
+
+int i1 = 1;
+int i2 = -2;
+int i3 = int:MAX_VALUE;
+int i4 = int:MIN_VALUE;
+int i5 = 0;
+2 i6 = 2;
+int? i7 = ();
+int|string i8 = 100;
+
+float f1 = 2.234;
+float f2 = -3.21f;
+float f3 = 0;
+float f4 = float:Infinity;
+float f5 = -float:Infinity;
+float f6 = float:NaN;
+2.3f f7 = 2.3;
+float? f8 = ();
+float|decimal f9 = 1.21;
+
+decimal d1 = 2.234;
+decimal d2 = -3.21d;
+decimal d3 = 0;
+2.3d d4 = 2.3;
+decimal? d5 = ();
+decimal|int d6 = 1.21;
+
+string s1 = "string";
+string s2 = "";
+string:Char s3 = "a";
+
+map bm1 = {b1, b2};
+map bm2 = {b1, b2, b3, n1, n3};
+map bm3 = {b1, b2, b3, b4, i1};
+map<()> bm4 = {n1, n3};
+map bm5 = {b1, b2, b3, b4:true};
+
+map m5 = {i1, i2, i3, i4, i5, i6};
+map m6 = {f1, f2, f3, f4, f5, f6, f7};
+map m7 = {d1, d2, d3, d4};
+map m8 = {d1, f1, f9, f10: 1.23};
+map m9 = {s1, s2, s3};
+map m10 = {b1, b2, b3, b4, n1, n2, n3, i1, i2, i3, i4, i5, i6, i7, i8, f1, f2, f3, f4, f5, f6, f7, f8};
+map m11 = {b1, b2, b3, b4, n1, n2, n3, i1, i2, i3, i4, i5, i6, i7, i8, f1, f2, f3, f4, f5, f6, f7, f8};
+
+boolean[] arr1 = [b1, b2];
+boolean?[] arr2 = [b1, b2, b3, n1, n3];
+(boolean|int?)[] arr3 = [b1, b2, b3, b4, i1];
+()[] arr4 = [n1, n3];
+int[] arr5 = [i1, i2, i3, i4, i5, i6];
+float[] arr6 = [f1, f2, f3, f4, f5, f6, f7];
+decimal[] arr7 = [d1, d2, d3, d4];
+(decimal|float)[] arr8 = [d1, f1, f9, 1.23];
+string[] arr9 = [s1, s2, s3];
+anydata[] arr10 = [b1, b2, b3, b4, n1, n2, n3, i1, i2, i3, i4, i5, i6, i7, i8, f1, f2, f3, f4, f5, f6, f7, f8];
+json[] arr11 = [b1, b2, b3, b4, n1, n2, n3, i1, i2, i3, i4, i5, i6, i7, i8, f1, f2, f3, f4, f5, f6, f7, f8];
+
+[boolean, boolean] bt1 = [b1, b2];
+[boolean, boolean, boolean, boolean] bt2 = [b1, b2, b1, b2];
+[boolean?, boolean?, boolean?, boolean?, boolean?] bt3 = [b1, b2, b3, n1, n3];
+[boolean|int?, boolean|int?, boolean|int?, boolean|int?, boolean|int?] bt4 = [b1, b2, b3, b4, i1];
+[boolean...] bt5 = [b1, b2];
+
+[string, string] st1 = [s1, s2];
+[string, string, string, string] st2 = [s1, s2, s3, s2];
+[string...] st3 = [s1, s2];
+[string, string, string...] st4 = [s1, s2, s3, s2];
+
+[string?, string?, string?, string?, string?] st5 = [s1, s2, s3, n1, n3];
+[string|int?, string|int?, string|int?, string|int?, string|int?] st6 = [s1, s2, s3, n1, i1];
+[string?...] st7 = [s1, s2];
+[string...] st8 = [];
+[string, string, string] st9 = [s1, s2, s3];
+
+[(), ()] tup4 = [n1, n3];
+[int, int, int, int, int, int] tup5 = [i1, i2, i3, i4, i5, i6];
+[float, float, float, float, float, float, float] tup6 = [f1, f2, f3, f4, f5, f6, f7];
+[decimal, decimal, decimal, decimal] tup7 = [d1, d2, d3, d4];
+[decimal|float, decimal|float, decimal|float, decimal|float] tup8 = [d1, f1, f9, 1.23];
+[string, string, string] tup9 = [s1, s2, s3];
+[anydata, anydata, anydata, anydata, anydata, anydata, anydata, anydata,
+ anydata, anydata, anydata, anydata, anydata, anydata, anydata, anydata,
+ anydata, anydata, anydata, anydata, anydata, anydata, anydata] tup10 = [b1, b2, b3, b4,
+ n1, n2, n3, i1, i2, i3, i4, i5, i6, i7, i8, f1, f2, f3, f4, f5, f6, f7, f8];
+[json, json, json, json, json, json, json, json, json, json, json, json,
+ json, json, json, json, json, json, json, json, json, json, json] tup11 =
+ [b1, b2, b3, b4, n1, n2, n3, i1, i2, i3, i4, i5, i6, i7, i8, f1,
+ f2, f3, f4, f5, f6, f7, f8];
+[string, string, int, int, boolean, boolean, (), (), decimal, decimal, float, float] tup12 = [
+ s1, s2, i1, i2, b1, b2, n1, n3, d1, d2, f1, f2
+];
+
+[boolean, boolean...] restTup1 = [b1, b2];
+[boolean?, boolean?, boolean?...] restTup2 = [b1, b2, b3, n1, n3];
+[boolean|int?...] restTup3 = [b1, b2, b3, b4, i1];
+[(), ()...] restTup4 = [n1, n3];
+[int...] restTup5 = [i1, i2, i3, i4, i5, i6];
+[float...] restTup6 = [f1, f2, f3, f4, f5, f6, f7];
+[decimal...] restTup7 = [d1, d2, d3, d4];
+[decimal|float, decimal|float...] restTup8 = [d1, f1, f9, 1.23];
+[string...] restTup9 = [s1, s2, s3];
+[anydata...] restTup10 = [b1, b2, b3, b4, n1, n2, n3, i1, i2, i3, i4, i5, i6, i7, i8, f1, f2, f3, f4, f5, f6, f7, f8];
+[json, json, json...] restTup11 = [b1, b2, b3, b4, n1, n2, n3, i1, i2, i3, i4, i5, i6, i7, i8, f1, f2, f3, f4, f5, f6, f7, f8];
+[string, string, int, int, boolean, boolean, (), (), decimal, decimal, float, float...] restTup12 = [
+ s1, s2, i1, i2, b1, b2, n1, n3, d1, d2, f1, f2, f2, f2
+];
+
+var booleanRecordArray = [
+ {b1, b2, b3, b4}, {b1, b2, b3, b4}
+];
+
+var booleanRecordArray2 = [
+ {},{}
+];
+
+string csvStringWithBooleanValues1 = string `b1,b2,b3,b4
+true,false,true,false
+true,false, true,false
+true,false,true,false
+`;
+
+string csvStringWithBooleanValues2 = string `b1,b2,b3,b4,b5
+true,false, true,false,true
+true,false, true,false,true`;
+
+string csvStringWithBooleanValues3 = string `b1,b2,b3
+${" "}${"\t"}
+true, false,true
+${" "}
+ TRUE, FALSE,()
+${" "}
+
+true, true,FALSE
+
+`;
+
+string csvStringWithBooleanValues4 = string `b1,b2,b3,b4
+ true,(), (),false
+ true,(), null,false
+
+`;
+
+string csvStringWithBooleanValues5 = string `b1,b2,b3,b4
+
+true,false,true,2
+
+true,false,true,3
+`;
+
+string csvStringWithBooleanValues6 = string `b2,b3
+(),()
+
+`;
+
+string csvStringWithBooleanValues7 = string `b1,b2,b3,b4
+${b1},${b2},(),${b4}
+`;
+
+string csvStringData1 = string `
+ a, b, c, d, e, f
+ 1, string1, true, 2.234, 2.234, ()
+ 2, string2, false, 0, 0, null
+ 3, string3, false, 1.23, 1.23, ()
+ 4, string4, true, -6.51, -6.51, ()
+ 5, string5, true, 3, 3, ()`;
+
+string csvStringData2 = string `
+ hello, hello, (), 12, true, 12.34
+ // comment
+
+ a, b, c, d, e, f
+
+
+ 1, string1, true, 2.234, 2.234, ()
+ 2, string2, false, 0, 0, null
+ 3, string3, false, 1.23, 1.23, ()
+ 4, string4, true, -6.51, -6.51, ()
+ 5, string5, true, 3, 3, ()`;
+
+string csvStringData3 = string `
+ a, b, c, d, e, f
+
+
+
+ 1, string1, true, 2.234, 2.234, ()
+ 2, string2, false, 0, 0, null
+ 3, string3, false, 1.23, 1.23, ()
+
+ 4, string4, true, -6.51, -6.51, ()
+ 5, string5, true, 3, 3, ()`;
+
+string csvStringData4 = string `
+ 1, string1, true, 2.234, 2.234, ()
+ 2, string2, false, 0, 0, null
+ 3, string3, false, 1.23, 1.23, ()
+ 4, string4, true, -6.51, -6.51, ()
+ 5, string5, true, 3, 3, ()`;
+
+string csvStringData5 = string `
+
+
+
+ 1, string1, true, 2.234, 2.234, ()
+ 2, string2, false, 0, 0, null
+
+ 3, string3, false, 1.23, 1.23, ()
+ 4, string4, true, -6.51, -6.51, ()
+
+ 5, string5, true, 3, 3, ()`;
+
+string csvStringData6 = string `
+
+ 1, string1, true, 2.234, 2.234, ()
+ 2, string2, false, 0, 0, null
+
+ 3, string3, false, 1.23, 1.23, ()
+ 4, string4, true, -6.51, -6.51, ()
+
+ 5, string5, true, 3, 3, ()`;
+
+string csvStringData7 = string `
+ a@ b@ c@ d@ e@ f
+ 1@ string@ true@ 2.234@ -3.21@ ()
+ 2@ s,tring@ true@ 2.234@ -3.21@ null
+ 3@ stri,ng@ true@ 2.234@ -3.21@ ()
+ 4@ string@ true@ 2.234@ -3.21@ ()
+ 5@ string@ true@ 2.234@ -3.21@ ()`;
+string csvStringData8 = string `
+ a@ b@ c@ d@ e@ f
+
+
+
+ 1@ stri,ng@ true@ 2.234@ -3.21@ ()
+ 2@ string@ true@ 2.234@ ()@-3.21
+ 3@ string@ true@ 2.234@ -3.21@ null
+
+ 4@ s,tring@ true@ 2.234@ -3.21@ ()
+ 5@ string@ true@ 2.234@ -3.21@ ()`;
+
+string csvStringData9 = string `
+
+ 1@ string@ true@ 2.234@ -3.21@ ()
+ 2@ string@ true@ 2.234@ -3.21@ null
+
+ 3@ string@ true@ 2.234@ -3.21@ ()
+ 4@ string@ true@ 2.234@ ()@-3.21
+
+ 5@ string@ true@ 2.234@ -3.21@ null`;
diff --git a/ballerina-tests/parse-list-types-tests/tests/types.bal b/ballerina-tests/parse-list-types-tests/tests/types.bal
new file mode 100644
index 0000000..62f8f98
--- /dev/null
+++ b/ballerina-tests/parse-list-types-tests/tests/types.bal
@@ -0,0 +1,2535 @@
+type BooleanRecord1 record {
+ boolean b1;
+ boolean|string b2;
+ boolean|string? b3;
+ boolean b4;
+};
+
+type BooleanRecord2 record {|
+ boolean b1;
+ boolean|string b2;
+ boolean|string? b3;
+ boolean b4;
+|};
+
+type BooleanRecord3 record {|
+ boolean b1;
+ boolean? b3;
+|};
+
+type BooleanRecord4 record {
+ boolean b1;
+ boolean? b3;
+};
+
+type BooleanRecord5 record {
+ boolean b1;
+ boolean? b3;
+ string defaultableField = "";
+ string? nillableField = ();
+};
+
+type BooleanRecord6 record {|
+ boolean b1;
+ boolean? b3;
+ string defaultableField = "";
+ string? nillableField = ();
+|};
+
+type BooleanRecord7 record {
+ boolean b1;
+ boolean? b3;
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+};
+
+type BooleanRecord8 record {|
+ boolean b1;
+ boolean? b3;
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+|};
+
+type BooleanRecord9 record {|
+ boolean b1;
+ boolean? b3;
+ boolean?...;
+|};
+
+type BooleanRecord10 record {|
+ boolean...;
+|};
+
+type BooleanRecord11 record {|
+ boolean b1;
+ string defaultableField = "";
+ string? nillableField = ();
+ boolean?|string...;
+|};
+
+type BooleanRecord12 record {|
+ boolean b1;
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+ boolean...;
+|};
+
+type BooleanRecord13 record {|
+ string defaultableField = "";
+ string? nillableField = ();
+ string|boolean...;
+|};
+
+type BooleanRecord14 record {|
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+ boolean...;
+|};
+
+type BooleanRecord15 record {|
+ int b1;
+ string defaultableField = "";
+ string? nillableField = ();
+ boolean?...;
+|};
+
+type BooleanRecord16 record {|
+ boolean?...;
+|};
+
+type BooleanRecord17 record {|
+ int...;
+|};
+
+type BooleanRecord18 record {|
+ boolean b2;
+ int?...;
+|};
+
+type NilRecord1 record {
+ () n1;
+ () n2;
+ () n3;
+};
+
+type NilRecord2 record {|
+ () n1;
+ () n2;
+ () n3;
+|};
+
+type NilRecord3 record {|
+ () n1;
+ () n4;
+|};
+
+type NilRecord4 record {
+ () n1;
+ () n4;
+};
+
+type NilRecord5 record {
+ () n1;
+ () n4;
+ string defaultableField = "";
+ string? nillableField = ();
+};
+
+type NilRecord6 record {|
+ () n1;
+ () n4;
+ string defaultableField = "";
+ string? nillableField = ();
+|};
+
+type NilRecord7 record {
+ () n1;
+ () n4;
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+};
+
+type NilRecord8 record {|
+ () n1;
+ () n4;
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+|};
+
+type NilRecord9 record {|
+ () n1;
+ () n2;
+ ()...;
+|};
+
+type NilRecord10 record {|
+ ()...;
+|};
+
+type NilRecord11 record {|
+ () n1;
+ string defaultableField = "";
+ string? nillableField = ();
+ ()...;
+|};
+
+type NilRecord12 record {|
+ () n1;
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+ ()...;
+|};
+
+type NilRecord13 record {|
+ string defaultableField = "";
+ string? nillableField = ();
+ ()...;
+|};
+
+type NilRecord14 record {|
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+ ()...;
+|};
+
+type IntegerRecord1 record {
+ int i1;
+ int i2;
+ int i3;
+ int? i4;
+ int? i5;
+ int i6;
+ int i7;
+ int? i8;
+};
+
+type IntegerRecord2 record {|
+ int i1;
+ int? i2;
+ int i3;
+ int i4;
+ int? i5;
+ int i6;
+ int i7;
+ int? i8;
+|};
+
+type IntegerRecord3 record {|
+ int i1;
+ int i4;
+ int i6;
+|};
+
+type IntegerRecord4 record {
+ int i1;
+ int i4;
+ int i6;
+};
+
+type IntegerRecord5 record {
+ int i1;
+ int i4;
+ int i6;
+ string defaultableField = "";
+ string? nillableField = ();
+};
+
+type IntegerRecord6 record {|
+ int i1;
+ int i4;
+ int i6;
+ string defaultableField = "";
+ string? nillableField = ();
+|};
+
+type IntegerRecord7 record {
+ int i1;
+ int i4;
+ int i6;
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+};
+
+type IntegerRecord8 record {|
+ int i1;
+ int i4;
+ int i6;
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+|};
+
+type IntegerRecord9 record {|
+ int i1;
+ int i2;
+ int...;
+|};
+
+type IntegerRecord10 record {|
+ int...;
+|};
+
+type IntegerRecord11 record {|
+ int i1;
+ string defaultableField = "";
+ string? nillableField = ();
+ int...;
+|};
+
+type IntegerRecord12 record {|
+ int i1;
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+ int...;
+|};
+
+type IntegerRecord13 record {|
+ string defaultableField = "";
+ string? nillableField = ();
+ int...;
+|};
+
+type IntegerRecord14 record {|
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+ int...;
+|};
+
+type FloatRecord1 record {
+ float f1;
+ float f2;
+ float f3;
+ float f4;
+ float f5;
+ float f6;
+ float f7;
+ float f8;
+};
+
+type FloatRecord2 record {|
+ float f1;
+ float f2;
+ float f3;
+ float f4;
+ float f5;
+ float f6;
+ float f7;
+ float f8;
+|};
+
+type FloatRecord3 record {|
+ float f1;
+ float f4;
+ float f7;
+|};
+
+type FloatRecord4 record {
+ float f1;
+ float f4;
+ float f7;
+};
+
+type FloatRecord5 record {
+ float f1;
+ float f4;
+ float f7;
+ string defaultableField = "";
+ string? nillableField = ();
+};
+
+type FloatRecord6 record {|
+ float f1;
+ float f4;
+ float f7;
+ string defaultableField = "";
+ string? nillableField = ();
+|};
+
+type FloatRecord7 record {
+ float f1;
+ float f4;
+ float f7;
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+};
+
+type FloatRecord8 record {|
+ float f1;
+ float f4;
+ float f7;
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+|};
+
+type FloatRecord9 record {|
+ float f1;
+ float f2;
+ float...;
+|};
+
+type FloatRecord10 record {|
+ float...;
+|};
+
+type FloatRecord11 record {|
+ float f1;
+ string defaultableField = "";
+ string? nillableField = ();
+ float...;
+|};
+
+type FloatRecord12 record {|
+ float f1;
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+ float...;
+|};
+
+type FloatRecord13 record {|
+ string defaultableField = "";
+ string? nillableField = ();
+ float...;
+|};
+
+type FloatRecord14 record {|
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+ float...;
+|};
+
+type DecimalRecord1 record {
+ decimal d1;
+ decimal d2;
+ decimal d3;
+ decimal d4;
+ decimal d5;
+ decimal d6;
+ decimal d7;
+ decimal d8;
+};
+
+type DecimalRecord2 record {|
+ decimal d1;
+ decimal d2;
+ decimal d3;
+ decimal d4;
+ decimal d5;
+ decimal d6;
+ decimal d7;
+ decimal d8;
+|};
+
+type DecimalRecord3 record {|
+ decimal d1;
+ decimal d4;
+ decimal d7;
+|};
+
+type DecimalRecord4 record {
+ decimal d1;
+ decimal d4;
+ decimal d7;
+};
+
+type DecimalRecord5 record {
+ decimal d1;
+ decimal d4;
+ decimal d7;
+ string defaultableField = "";
+ string? nillableField = ();
+};
+
+type DecimalRecord6 record {|
+ decimal d1;
+ decimal d4;
+ decimal d7;
+ string defaultableField = "";
+ string? nillableField = ();
+|};
+
+type DecimalRecord7 record {
+ decimal d1;
+ decimal d4;
+ decimal d7;
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+};
+
+type DecimalRecord8 record {|
+ decimal d1;
+ decimal d4;
+ decimal d7;
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+|};
+
+type DecimalRecord9 record {|
+ decimal d1;
+ decimal d2;
+ decimal...;
+|};
+
+type DecimalRecord10 record {|
+ decimal...;
+|};
+
+type DecimalRecord11 record {|
+ decimal d1;
+ string defaultableField = "";
+ string? nillableField = ();
+ decimal...;
+|};
+
+type DecimalRecord12 record {|
+ decimal d1;
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+ decimal...;
+|};
+
+type DecimalRecord13 record {|
+ string defaultableField = "";
+ string? nillableField = ();
+ decimal...;
+|};
+
+type DecimalRecord14 record {|
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+ decimal...;
+|};
+
+type StringRecord1 record {
+ string s1;
+ string s2;
+ string s3;
+};
+
+type StringRecord2 record {|
+ string s1;
+ string s2;
+ string s3;
+|};
+
+type StringRecord3 record {|
+ string s1;
+ string s4;
+|};
+
+type StringRecord4 record {
+ string s1;
+ string s4;
+};
+
+type StringRecord5 record {
+ string s1;
+ string s4;
+ string defaultableField = "";
+ string? nillableField = ();
+};
+
+type StringRecord6 record {|
+ string s1;
+ string s4;
+ string defaultableField = "";
+ string? nillableField = ();
+|};
+
+type StringRecord7 record {
+ string s1;
+ string s4;
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+};
+
+type StringRecord8 record {|
+ string s1;
+ string s4;
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+|};
+
+type StringRecord9 record {|
+ string s1;
+ string s2;
+ string...;
+|};
+
+type StringRecord10 record {|
+ string...;
+|};
+
+type StringRecord11 record {|
+ string s1;
+ string defaultableField = "";
+ string? nillableField = ();
+ string...;
+|};
+
+type StringRecord12 record {|
+ string d1;
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+ string...;
+|};
+
+type StringRecord13 record {|
+ string defaultableField = "";
+ string? nillableField = ();
+ string...;
+|};
+
+type StringRecord14 record {|
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+ string...;
+|};
+
+type StringRecord15 record {|
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+ string...;
+|};
+
+type StringRecord16 record {|
+ string?...;
+|};
+
+type StringRecord17 record {|
+ int...;
+|};
+
+type StringRecord18 record {|
+ string b2;
+ int?...;
+|};
+
+type StringRecord19 record {
+ string s1 = "";
+ string s2 = "";
+};
+
+type StringRecord20 record {|
+ string s1 = "";
+ string s2 = "";
+|};
+
+type StringRecord21 record {
+};
+
+type StringRecord22 record {|
+ string s1 = "";
+ string s2 = "";
+ json...;
+|};
+
+type StringRecord23 record {|
+ json...;
+|};
+
+type JsonRecord1 record {
+ json j1;
+ json j2;
+ json j3;
+};
+
+type JsonRecord2 record {|
+ json j1;
+ json j2;
+ json j3;
+|};
+
+type JsonRecord3 record {|
+ json j1;
+ json j4;
+|};
+
+type JsonRecord4 record {
+ json j1;
+ json j4;
+};
+
+type JsonRecord5 record {
+ json j1;
+ json j4;
+ json defaultableField = "";
+ json? nillableField = ();
+};
+
+type JsonRecord6 record {|
+ json j1;
+ json j4;
+ json defaultableField = "";
+ json? nillableField = ();
+|};
+
+type JsonRecord7 record {
+ json j1;
+ json j4;
+ json defaultableField = "";
+ json? nillableField = ();
+ json requiredField;
+};
+
+type JsonRecord8 record {|
+ json j1;
+ json j4;
+ json defaultableField = "";
+ json? nillableField = ();
+ json requiredField;
+|};
+
+type JsonRecord9 record {|
+ json j1;
+ json j2;
+ json...;
+|};
+
+type JsonRecord10 record {|
+ json...;
+|};
+
+type JsonRecord11 record {|
+ json j1;
+ json defaultableField = "";
+ json? nillableField = ();
+ json...;
+|};
+
+type JsonRecord12 record {|
+ json j1;
+ json defaultableField = "";
+ json? nillableField = ();
+ json requiredField;
+ json...;
+|};
+
+type JsonRecord13 record {|
+ json defaultableField = "";
+ json? nillableField = ();
+ json...;
+|};
+
+type JsonRecord14 record {|
+ json defaultableField = "";
+ json? nillableField = ();
+ json requiredField;
+ json...;
+|};
+
+type AnydataRecord1 record {
+ anydata anydata1;
+ anydata anydata2;
+ anydata anydata3;
+};
+
+type AnydataRecord2 record {|
+ anydata anydata1;
+ anydata anydata2;
+ anydata anydata3;
+|};
+
+type AnydataRecord3 record {|
+ anydata anydata1;
+ anydata anydata4;
+|};
+
+type AnydataRecord4 record {
+ anydata anydata1;
+ anydata anydata4;
+};
+
+type AnydataRecord5 record {
+ anydata anydata1;
+ anydata anydata4;
+ anydata defaultableField = "";
+ anydata? nillableField = ();
+};
+
+type AnydataRecord6 record {|
+ anydata anydata1;
+ anydata anydata4;
+ anydata defaultableField = "";
+ anydata? nillableField = ();
+|};
+
+type AnydataRecord7 record {
+ anydata anydata1;
+ anydata anydata4;
+ anydata defaultableField = "";
+ anydata? nillableField = ();
+ anydata requiredField;
+};
+
+type AnydataRecord8 record {|
+ anydata anydata1;
+ anydata anydata4;
+ anydata defaultableField = "";
+ anydata? nillableField = ();
+ anydata requiredField;
+|};
+
+type AnydataRecord9 record {|
+ anydata anydata1;
+ anydata anydata2;
+ anydata...;
+|};
+
+type AnydataRecord10 record {|
+ anydata...;
+|};
+
+type AnydataRecord11 record {|
+ anydata anydata1;
+ anydata defaultableField = "";
+ anydata? nillableField = ();
+ anydata...;
+|};
+
+type AnydataRecord12 record {|
+ anydata anydata1;
+ anydata defaultableField = "";
+ anydata? nillableField = ();
+ anydata requiredField;
+ anydata...;
+|};
+
+type AnydataRecord13 record {|
+ anydata defaultableField = "";
+ anydata? nillableField = ();
+ anydata...;
+|};
+
+type AnydataRecord14 record {|
+ anydata defaultableField = "";
+ anydata? nillableField = ();
+ anydata requiredField;
+ anydata...;
+|};
+
+type CustomRecord1 record {
+ int i1;
+ int i2;
+ string s1;
+ string s2;
+ boolean b1;
+ boolean b2;
+ () n1;
+ () n2;
+ float f1;
+ float f2;
+ decimal d1;
+ decimal d2;
+};
+
+type CustomRecord2 record {|
+ int i1;
+ int i2;
+ string s1;
+ string s2;
+ boolean b1;
+ boolean b2;
+ () n1;
+ () n2;
+ float f1;
+ float f2;
+ decimal d1;
+ decimal d2;
+|};
+
+type CustomRecord3 record {|
+ int i1;
+ string s1;
+ boolean b1;
+ () n1;
+ float f1;
+ decimal d1;
+|};
+
+type CustomRecord4 record {
+ int i1;
+ string s1;
+ boolean b1;
+ () n1;
+ float f1;
+ decimal d1;
+};
+
+type CustomRecord5 record {
+ int i1;
+ string s1;
+ boolean b1;
+ () n1;
+ float f1;
+ decimal d1;
+ string defaultableField = "";
+ string? nillableField = ();
+};
+
+type CustomRecord6 record {|
+ int i1;
+ string s1;
+ boolean b1;
+ () n1;
+ float f1;
+ decimal d1;
+ anydata defaultableField = "";
+ anydata? nillableField = ();
+|};
+
+type CustomRecord7 record {
+ int i1;
+ string s1;
+ boolean b1;
+ () n1;
+ float f1;
+ decimal d1;
+ anydata defaultableField = "";
+ anydata? nillableField = ();
+ anydata requiredField;
+};
+
+type CustomRecord8 record {|
+ int i1;
+ string s1;
+ boolean b1;
+ () n1;
+ float f1;
+ decimal d1;
+ anydata defaultableField = "";
+ anydata? nillableField = ();
+ anydata requiredField;
+|};
+
+type CustomRecord9 record {|
+ int i1;
+ string s1;
+ boolean b1;
+ () n1;
+ float f1;
+ decimal d1;
+ string...;
+|};
+
+type CustomRecord10 record {|
+ string...;
+|};
+
+type CustomRecord11 record {|
+ int i1;
+ string s1;
+ boolean b1;
+ () n1;
+ float f1;
+ decimal d1;
+ anydata defaultableField = "";
+ anydata? nillableField = ();
+ string...;
+|};
+
+type CustomRecord12 record {|
+ int i1;
+ string s1;
+ boolean b1;
+ () n1;
+ float f1;
+ decimal d1;
+ anydata defaultableField = "";
+ anydata? nillableField = ();
+ anydata requiredField;
+ string...;
+|};
+
+type CustomRecord13 record {|
+ anydata defaultableField = "";
+ anydata? nillableField = ();
+ string...;
+|};
+
+type CustomRecord14 record {|
+ anydata defaultableField = "";
+ anydata? nillableField = ();
+ anydata requiredField;
+ string...;
+|};
+
+type CustomRecord15 record {|
+ string '1;
+ string '2;
+|};
+
+type CustomRecord16 record {|
+ string '1;
+ string '2;
+ string '3;
+ string '4;
+|};
+
+type CustomRecord17 record {
+ string '1;
+ string '2;
+};
+
+type CustomRecord18 record {
+ string '1;
+ string '2;
+ string '3;
+ string '4;
+};
+
+type CustomRecord19 record {
+ string '1;
+ string '2;
+ string '3 = "";
+ string '4 = "";
+};
+
+type CustomRecord20 record {
+ string '1;
+};
+
+type CustomRecord21 record {|
+ string '1;
+ json...;
+|};
+
+type CustomRecord22 record {|
+ string '1;
+ string...;
+|};
+
+type CustomRecord23 record {|
+ string '1;
+ string a = "";
+ string...;
+|};
+
+type CustomRecord24 record {|
+ string '1;
+ string '2 = "";
+ string...;
+|};
+
+type CustomRecord25 record {|
+ int '1;
+ string...;
+|};
+
+type CustomRecord26 record {|
+ string '1;
+ int...;
+|};
+
+type CustomRecord27 record {|
+ int i1;
+ string s1;
+ boolean b1;
+ () n1;
+ float f1;
+ decimal d1;
+ anydata a1;
+ json j1;
+ anydata defaultableField = "";
+ anydata? nillableField = ();
+ string...;
+|};
+
+type CustomRecord28 record {
+ string '1;
+};
+
+type CustomRecord29 record {
+ int '1;
+};
+
+type CustomRecord30 record {|
+ string '1;
+ string '2;
+ string '3;
+ string '4;
+ string '5;
+ string '6;
+|};
+
+type CustomRecord31 record {|
+ string '1;
+ string '6;
+|};
+
+type CustomRecord32 record {|
+ int '1;
+|};
+
+type CustomRecord33 record {|
+ string '1;
+ string '2;
+ string '3;
+ string '4;
+ string '5;
+ string '6;
+|};
+
+type CustomRecord34 record {
+ string '1;
+ string '6;
+ string '5 = "";
+};
+
+type CustomRecord35 record {
+ string '1;
+ string '6;
+ string '9 = "";
+};
+
+type CustomRecord36 record {|
+ string '1;
+ string '6;
+ string '9 = "";
+|};
+
+type CustomRecord37 record {|
+ string '1;
+ string '6;
+ string '5 = "";
+|};
+
+type CustomRecord38 record {|
+ string '1;
+ string '2;
+ string '3;
+ string '4;
+ string '5;
+ string '6;
+ string ...;
+|};
+
+type CustomRecord39 record {|
+ string '1;
+ string '2;
+ string '3;
+ string '4;
+ string '5;
+ string '6;
+ json ...;
+|};
+
+type CustomRecord40 record {|
+ string '5;
+ string '6;
+ json ...;
+|};
+
+type CustomRecord41 record {|
+ json ...;
+|};
+
+type CustomRecord42 record {|
+ int '1;
+ string '2;
+ boolean '3;
+ decimal '4;
+ float '5;
+ () '6;
+|};
+
+type CustomRecord43 record {
+ int '1;
+ string '2;
+ boolean '3;
+ decimal '4;
+ float '5;
+ () '6;
+};
+
+type CustomRecord44 record {|
+ int '1;
+ string '2;
+ boolean '3;
+ decimal '4;
+ float '5;
+ () '6;
+ string ...;
+|};
+
+type CustomRecord45 record {|
+ int H1;
+ string H2;
+ boolean H3;
+ decimal H4;
+ float H5;
+ () H6;
+|};
+
+type CustomRecord46 record {
+ int H1;
+ string H2;
+ boolean H3;
+ decimal H4;
+ float H5;
+ () H6;
+};
+
+type CustomRecord47 record {|
+ int H1;
+ string H2;
+ boolean H3;
+ decimal H4;
+ float H5;
+ () H6;
+ string ...;
+|};
+
+type CustomRecord48 record {
+ string H1;
+ string H2;
+ string H3;
+ string H4;
+ string H5;
+ string H6;
+};
+
+type CustomRecord49 record {|
+ string H1;
+ string H2;
+ string H3;
+ string H4;
+ string H5;
+ string H6;
+|};
+
+type CustomRecord50 record {
+ int H1;
+ float H4;
+};
+
+type CustomRecord51 record {|
+ int H1;
+ float H4;
+|};
+
+type CustomRecord52 record {|
+ string H1;
+ string H4;
+ string ...;
+|};
+
+type CustomRecord53 record {|
+ int H1;
+ float H4;
+ decimal ...;
+|};
+
+type CustomRecord54 record {|
+ string H1 = "";
+ string H4;
+ string '1;
+|};
+
+type CustomRecord55 record {|
+ string H1 = "";
+ string H4 = "";
+ int '1 = 10;
+|};
+
+type CustomRecord56 record {
+ string H1 = "";
+ string H4 = "";
+ anydata '1 = 10;
+};
+
+type BooleanTuple1 [boolean, boolean, boolean, boolean];
+
+type BooleanTuple2 [boolean, boolean];
+
+type BooleanTuple3 [boolean, boolean...];
+
+type BooleanTuple4 [boolean...];
+
+type NillableBooleanTuple5 [boolean?, boolean?, boolean?, boolean?, boolean?];
+
+type NillableBooleanTuple6 [boolean?, boolean?];
+
+type NillableBooleanTuple7 [boolean?, boolean?, boolean?...];
+
+type NillableBooleanTuple8 [boolean?...];
+
+type NillableIntBooleanTuple9 [int|boolean?, int|boolean?...];
+
+type NilTuple1 [(), (), ()];
+
+type NilTuple2 [(), ()];
+
+type NilTuple3 [(), ()...];
+
+type NilTuple4 [()...];
+
+type IntegerTuple1 [int, int, int, int, int, int];
+
+type IntegerTuple2 [int, int];
+
+type IntegerTuple3 [int, int...];
+
+type IntegerTuple4 [int...];
+
+type FloatTuple1 [float, float, float, float, float, float, float];
+
+type FloatTuple2 [float, float];
+
+type FloatTuple3 [float, float...];
+
+type FloatTuple4 [float...];
+
+type DecimalTuple1 [decimal, decimal, decimal, decimal];
+
+type DecimalTuple2 [decimal, decimal];
+
+type DecimalTuple3 [decimal, decimal...];
+
+type DecimalTuple4 [decimal...];
+
+type StringTuple1 [string, string, string, string];
+
+type StringTuple2 [string, string];
+
+type StringTuple3 [string, string...];
+
+type StringTuple4 [string...];
+
+type AnydataTuple1 [anydata, anydata, anydata, anydata, anydata,
+ anydata, anydata, anydata, anydata, anydata, anydata, anydata,
+ anydata, anydata, anydata, anydata, anydata, anydata, anydata,
+ anydata, anydata, anydata, anydata];
+
+type AnydataTuple2 [anydata, anydata];
+
+type AnydataTuple3 [anydata, anydata...];
+
+type AnydataTuple4 [anydata...];
+
+type JsonTuple1 [json, json, json, json, json, json, json, json,
+ json, json, json, json, json, json, json, json, json, json,
+ json, json, json, json, json];
+
+type JsonTuple2 [json, json];
+
+type JsonTuple3 [json, json...];
+
+type JsonTuple4 [json...];
+
+type CustomTuple1 [string, int, decimal, float, (), boolean, anydata, json, string, int, decimal, float, (), boolean, anydata, json];
+
+type CustomTuple2 [string, int, decimal, float, (), boolean, anydata, json];
+
+type CustomTuple3 [string, int, decimal, float, (), boolean, anydata, json, string...];
+
+type CustomTuple4 [string...];
+
+type CustomTuple5 [string, int, decimal, float, (), boolean, anydata, json, anydata...];
+
+type CustomTuple6 [anydata...];
+
+type CustomTuple7 [int, string, boolean, (), float, decimal, json, anydata, string...];
+
+type CustomTuple8 [int, string, boolean, (), float, decimal, json, anydata, int...];
+
+type IntegerArray1 int[];
+
+type IntegerArray2 int[2];
+
+type IntegerArray3 int[];
+
+type IntegerArray4 int[2];
+
+type IntegerArray5 int[3];
+
+type IntegerArray6 int[4];
+
+type StringArray string[];
+
+type NillableStringArray string?[];
+
+type NillableIntOrUnionStringArray (int|string?)[];
+
+type StringArray1 string[];
+
+type StringArray2 string[2];
+
+type StringArray3 string[];
+
+type StringArray4 string[2];
+
+type StringArray5 string[3];
+
+type StringArray6 string[4];
+
+type FloatArray1 float[];
+
+type FloatArray2 float[2];
+
+type FloatArray3 float[];
+
+type FloatArray4 float[2];
+
+type FloatArray5 float[3];
+
+type FloatArray6 float[4];
+
+type DecimalArray1 decimal[];
+
+type DecimalArray2 decimal[2];
+
+type DecimalArray3 decimal[];
+
+type DecimalArray4 decimal[2];
+
+type DecimalArray5 decimal[3];
+
+type DecimalArray6 decimal[4];
+
+type BooleanArray boolean[];
+
+type NillableBooleanArray boolean?[];
+
+type NillableIntOrUnionBooleanArray (int|boolean?)[];
+
+type BooleanArray2 boolean[2];
+
+type BooleanArray3 boolean[3];
+
+type BooleanArray4 boolean[];
+
+type BooleanArray5 boolean[2];
+
+type BooleanArray6 boolean[4];
+
+type NilArray1 ()[];
+
+type NilArray2 ()[2];
+
+type NilArray3 ()[];
+
+type NilArray4 ()[2];
+
+type NilArray5 ()[3];
+
+type NilArray6 ()[4];
+
+type JsonArray1 json[];
+
+type JsonArray2 json[2];
+
+type JsonArray3 json[];
+
+type JsonArray4 json[2];
+
+type JsonArray5 json[3];
+
+type JsonArray6 json[4];
+
+type AnydataArray1 anydata[];
+
+type AnydataArray2 anydata[2];
+
+type AnydataArray3 anydata[];
+
+type AnydataArray4 anydata[2];
+
+type AnydataArray5 anydata[3];
+
+type AnydataArray6 anydata[4];
+
+type CustomArray1 CustomTuple2[];
+
+type CustomArray2 CustomTuple2[2];
+
+type CustomArray3 CustomTuple2[];
+
+type CustomArray4 CustomTuple2[2];
+
+type CustomArray5 CustomTuple2[3];
+
+type CustomArray6 CustomTuple2[4];
+
+type IntegerMap map;
+
+type StringMap map;
+
+type NillableIntUnionStringMap map;
+
+type IntUnionStringMap map;
+
+type DecimalMap map;
+
+type FloatMap map;
+
+type BooleanMap map;
+
+type NillableBooleanMap map;
+
+type NillableIntUnionBooleanMap map;
+
+type IntUnionBooleanMap map;
+
+type NilMap map<()>;
+
+type JsonMap map;
+
+type AnydataMap map;
+
+type CustomMap map;
+
+type BooleanRecord1Array BooleanRecord1[];
+
+type ClosedBooleanRecord1Array BooleanRecord1[3];
+
+type BooleanRecord2Array BooleanRecord2[];
+
+type ClosedBooleanRecord2Array BooleanRecord2[3];
+
+type BooleanRecord3Array BooleanRecord3[];
+
+type ClosedBooleanRecord3Array BooleanRecord3[3];
+
+type BooleanRecord4Array BooleanRecord4[];
+
+type ClosedBooleanRecord4Array BooleanRecord4[3];
+
+type BooleanRecord5Array BooleanRecord5[];
+
+type ClosedBooleanRecord5Array BooleanRecord5[3];
+
+type BooleanRecord6Array BooleanRecord6[];
+
+type ClosedBooleanRecord6Array BooleanRecord6[3];
+
+type BooleanRecord7Array BooleanRecord7[];
+
+type ClosedBooleanRecord7Array BooleanRecord7[3];
+
+type BooleanRecord8Array BooleanRecord8[];
+
+type ClosedBooleanRecord8Array BooleanRecord8[3];
+
+type BooleanRecord9Array BooleanRecord9[];
+
+type ClosedBooleanRecord9Array BooleanRecord9[3];
+
+type BooleanRecord10Array BooleanRecord10[];
+
+type ClosedBooleanRecord10Array BooleanRecord10[3];
+
+type BooleanRecord11Array BooleanRecord11[];
+
+type ClosedBooleanRecord11Array BooleanRecord11[3];
+
+type BooleanRecord12Array BooleanRecord12[];
+
+type ClosedBooleanRecord12Array BooleanRecord12[3];
+
+type BooleanRecord13Array BooleanRecord13[];
+
+type ClosedBooleanRecord13Array BooleanRecord13[3];
+
+type BooleanRecord14Array BooleanRecord14[];
+
+type ClosedBooleanRecord14Array BooleanRecord14[3];
+
+type BooleanRecord15Array BooleanRecord15[];
+
+type ClosedBooleanRecord15Array BooleanRecord15[3];
+
+type BooleanRecord16Array BooleanRecord16[];
+
+type ClosedBooleanRecord16Array BooleanRecord16[3];
+
+type BooleanRecord17Array BooleanRecord17[];
+
+type ClosedBooleanRecord17Array BooleanRecord17[3];
+
+type BooleanRecord18Array BooleanRecord18[];
+
+type ClosedBooleanRecord18Array BooleanRecord18[3];
+
+type NilRecord1Array NilRecord1[];
+
+type ClosedNilRecord1Array NilRecord1[3];
+
+type NilRecord2Array NilRecord2[];
+
+type ClosedNilRecord2Array NilRecord2[3];
+
+type NilRecord3Array NilRecord3[];
+
+type ClosedNilRecord3Array NilRecord3[3];
+
+type NilRecord4Array NilRecord4[];
+
+type ClosedNilRecord4Array NilRecord4[3];
+
+type NilRecord5Array NilRecord5[];
+
+type ClosedNilRecord5Array NilRecord5[3];
+
+type NilRecord6Array NilRecord6[];
+
+type ClosedNilRecord6Array NilRecord6[3];
+
+type NilRecord7Array NilRecord7[];
+
+type ClosedNilRecord7Array NilRecord7[3];
+
+type NilRecord8Array NilRecord8[];
+
+type ClosedNilRecord8Array NilRecord8[3];
+
+type NilRecord9Array NilRecord9[];
+
+type ClosedNilRecord9Array NilRecord9[3];
+
+type NilRecord10Array NilRecord10[];
+
+type ClosedNilRecord10Array NilRecord10[3];
+
+type NilRecord11Array NilRecord11[];
+
+type ClosedNilRecord11Array NilRecord11[3];
+
+type NilRecord12Array NilRecord12[];
+
+type ClosedNilRecord12Array NilRecord12[3];
+
+type NilRecord13Array NilRecord13[];
+
+type ClosedNilRecord13Array NilRecord13[3];
+
+type NilRecord14Array NilRecord14[];
+
+type ClosedNilRecord14Array NilRecord14[3];
+
+type IntegerRecord1Array IntegerRecord1[];
+
+type ClosedIntegerRecord1Array IntegerRecord1[3];
+
+type IntegerRecord2Array IntegerRecord2[];
+
+type ClosedIntegerRecord2Array IntegerRecord2[3];
+
+type IntegerRecord3Array IntegerRecord3[];
+
+type ClosedIntegerRecord3Array IntegerRecord3[3];
+
+type IntegerRecord4Array IntegerRecord4[];
+
+type ClosedIntegerRecord4Array IntegerRecord4[3];
+
+type IntegerRecord5Array IntegerRecord5[];
+
+type ClosedIntegerRecord5Array IntegerRecord5[3];
+
+type IntegerRecord6Array IntegerRecord6[];
+
+type ClosedIntegerRecord6Array IntegerRecord6[3];
+
+type IntegerRecord7Array IntegerRecord7[];
+
+type ClosedIntegerRecord7Array IntegerRecord7[3];
+
+type IntegerRecord8Array IntegerRecord8[];
+
+type ClosedIntegerRecord8Array IntegerRecord8[3];
+
+type IntegerRecord9Array IntegerRecord9[];
+
+type ClosedIntegerRecord9Array IntegerRecord9[3];
+
+type IntegerRecord10Array IntegerRecord10[];
+
+type ClosedIntegerRecord10Array IntegerRecord10[3];
+
+type IntegerRecord11Array IntegerRecord11[];
+
+type ClosedIntegerRecord11Array IntegerRecord11[3];
+
+type IntegerRecord12Array IntegerRecord12[];
+
+type ClosedIntegerRecord12Array IntegerRecord12[3];
+
+type IntegerRecord13Array IntegerRecord13[];
+
+type ClosedIntegerRecord13Array IntegerRecord13[3];
+
+type IntegerRecord14Array IntegerRecord14[];
+
+type ClosedIntegerRecord14Array IntegerRecord14[3];
+
+type FloatRecord1Array FloatRecord1[];
+
+type ClosedFloatRecord1Array FloatRecord1[3];
+
+type FloatRecord2Array FloatRecord2[];
+
+type ClosedFloatRecord2Array FloatRecord2[3];
+
+type FloatRecord3Array FloatRecord3[];
+
+type ClosedFloatRecord3Array FloatRecord3[3];
+
+type FloatRecord4Array FloatRecord4[];
+
+type ClosedFloatRecord4Array FloatRecord4[3];
+
+type FloatRecord5Array FloatRecord5[];
+
+type ClosedFloatRecord5Array FloatRecord5[3];
+
+type FloatRecord6Array FloatRecord6[];
+
+type ClosedFloatRecord6Array FloatRecord6[3];
+
+type FloatRecord7Array FloatRecord7[];
+
+type ClosedFloatRecord7Array FloatRecord7[3];
+
+type FloatRecord8Array FloatRecord8[];
+
+type ClosedFloatRecord8Array FloatRecord8[3];
+
+type FloatRecord9Array FloatRecord9[];
+
+type ClosedFloatRecord9Array FloatRecord9[3];
+
+type FloatRecord10Array FloatRecord10[];
+
+type ClosedFloatRecord10Array FloatRecord10[3];
+
+type FloatRecord11Array FloatRecord11[];
+
+type ClosedFloatRecord11Array FloatRecord11[3];
+
+type FloatRecord12Array FloatRecord12[];
+
+type ClosedFloatRecord12Array FloatRecord12[3];
+
+type FloatRecord13Array FloatRecord13[];
+
+type ClosedFloatRecord13Array FloatRecord13[3];
+
+type FloatRecord14Array FloatRecord14[];
+
+type ClosedFloatRecord14Array FloatRecord14[3];
+
+type DecimalRecord1Array DecimalRecord1[];
+
+type ClosedDecimalRecord1Array DecimalRecord1[3];
+
+type DecimalRecord2Array DecimalRecord2[];
+
+type ClosedDecimalRecord2Array DecimalRecord2[3];
+
+type DecimalRecord3Array DecimalRecord3[];
+
+type ClosedDecimalRecord3Array DecimalRecord3[3];
+
+type DecimalRecord4Array DecimalRecord4[];
+
+type ClosedDecimalRecord4Array DecimalRecord4[3];
+
+type DecimalRecord5Array DecimalRecord5[];
+
+type ClosedDecimalRecord5Array DecimalRecord5[3];
+
+type DecimalRecord6Array DecimalRecord6[];
+
+type ClosedDecimalRecord6Array DecimalRecord6[3];
+
+type DecimalRecord7Array DecimalRecord7[];
+
+type ClosedDecimalRecord7Array DecimalRecord7[3];
+
+type DecimalRecord8Array DecimalRecord8[];
+
+type ClosedDecimalRecord8Array DecimalRecord8[3];
+
+type DecimalRecord9Array DecimalRecord9[];
+
+type ClosedDecimalRecord9Array DecimalRecord9[3];
+
+type DecimalRecord10Array DecimalRecord10[];
+
+type ClosedDecimalRecord10Array DecimalRecord10[3];
+
+type DecimalRecord11Array DecimalRecord11[];
+
+type ClosedDecimalRecord11Array DecimalRecord11[3];
+
+type DecimalRecord12Array DecimalRecord12[];
+
+type ClosedDecimalRecord12Array DecimalRecord12[3];
+
+type DecimalRecord13Array DecimalRecord13[];
+
+type ClosedDecimalRecord13Array DecimalRecord13[3];
+
+type DecimalRecord14Array DecimalRecord14[];
+
+type ClosedDecimalRecord14Array DecimalRecord14[3];
+
+type StringRecord1Array StringRecord1[];
+
+type ClosedStringRecord1Array StringRecord1[3];
+
+type StringRecord2Array StringRecord2[];
+
+type ClosedStringRecord2Array StringRecord2[3];
+
+type StringRecord3Array StringRecord3[];
+
+type ClosedStringRecord3Array StringRecord3[3];
+
+type StringRecord4Array StringRecord4[];
+
+type ClosedStringRecord4Array StringRecord4[3];
+
+type StringRecord5Array StringRecord5[];
+
+type ClosedStringRecord5Array StringRecord5[3];
+
+type StringRecord6Array StringRecord6[];
+
+type ClosedStringRecord6Array StringRecord6[3];
+
+type StringRecord7Array StringRecord7[];
+
+type ClosedStringRecord7Array StringRecord7[3];
+
+type StringRecord8Array StringRecord8[];
+
+type ClosedStringRecord8Array StringRecord8[3];
+
+type StringRecord9Array StringRecord9[];
+
+type ClosedStringRecord9Array StringRecord9[3];
+
+type StringRecord10Array StringRecord10[];
+
+type ClosedStringRecord10Array StringRecord10[3];
+
+type StringRecord11Array StringRecord11[];
+
+type ClosedStringRecord11Array StringRecord11[3];
+
+type StringRecord12Array StringRecord12[];
+
+type ClosedStringRecord12Array StringRecord12[3];
+
+type StringRecord13Array StringRecord13[];
+
+type ClosedStringRecord13Array StringRecord13[3];
+
+type StringRecord14Array StringRecord14[];
+
+type ClosedStringRecord14Array StringRecord14[3];
+
+type StringRecord15Array StringRecord15[];
+
+type StringRecord16Array StringRecord16[];
+
+type StringRecord17Array StringRecord17[];
+
+type StringRecord18Array StringRecord18[];
+
+type StringRecord19Array StringRecord19[];
+
+type StringRecord20Array StringRecord20[];
+
+type StringRecord21Array StringRecord21[];
+
+type StringRecord22Array StringRecord22[];
+
+type StringRecord23Array StringRecord23[];
+
+type JsonRecord1Array JsonRecord1[];
+
+type ClosedJsonRecord1Array JsonRecord1[3];
+
+type JsonRecord2Array JsonRecord2[];
+
+type ClosedJsonRecord2Array JsonRecord2[3];
+
+type JsonRecord3Array JsonRecord3[];
+
+type ClosedJsonRecord3Array JsonRecord3[3];
+
+type JsonRecord4Array JsonRecord4[];
+
+type ClosedJsonRecord4Array JsonRecord4[3];
+
+type JsonRecord5Array JsonRecord5[];
+
+type ClosedJsonRecord5Array JsonRecord5[3];
+
+type JsonRecord6Array JsonRecord6[];
+
+type ClosedJsonRecord6Array JsonRecord6[3];
+
+type JsonRecord7Array JsonRecord7[];
+
+type ClosedJsonRecord7Array JsonRecord7[3];
+
+type JsonRecord8Array JsonRecord8[];
+
+type ClosedJsonRecord8Array JsonRecord8[3];
+
+type JsonRecord9Array JsonRecord9[];
+
+type ClosedJsonRecord9Array JsonRecord9[3];
+
+type JsonRecord10Array JsonRecord10[];
+
+type ClosedJsonRecord10Array JsonRecord10[3];
+
+type JsonRecord11Array JsonRecord11[];
+
+type ClosedJsonRecord11Array JsonRecord11[3];
+
+type JsonRecord12Array JsonRecord12[];
+
+type ClosedJsonRecord12Array JsonRecord12[3];
+
+type JsonRecord13Array JsonRecord13[];
+
+type ClosedJsonRecord13Array JsonRecord13[3];
+
+type JsonRecord14Array JsonRecord14[];
+
+type ClosedJsonRecord14Array JsonRecord14[3];
+
+type AnydataRecord1Array AnydataRecord1[];
+
+type ClosedAnydataRecord1Array AnydataRecord1[3];
+
+type AnydataRecord2Array AnydataRecord2[];
+
+type ClosedAnydataRecord2Array AnydataRecord2[3];
+
+type AnydataRecord3Array AnydataRecord3[];
+
+type ClosedAnydataRecord3Array AnydataRecord3[3];
+
+type AnydataRecord4Array AnydataRecord4[];
+
+type ClosedAnydataRecord4Array AnydataRecord4[3];
+
+type AnydataRecord5Array AnydataRecord5[];
+
+type ClosedAnydataRecord5Array AnydataRecord5[3];
+
+type AnydataRecord6Array AnydataRecord6[];
+
+type ClosedAnydataRecord6Array AnydataRecord6[3];
+
+type AnydataRecord7Array AnydataRecord7[];
+
+type ClosedAnydataRecord7Array AnydataRecord7[3];
+
+type AnydataRecord8Array AnydataRecord8[];
+
+type ClosedAnydataRecord8Array AnydataRecord8[3];
+
+type AnydataRecord9Array AnydataRecord9[];
+
+type ClosedAnydataRecord9Array AnydataRecord9[3];
+
+type AnydataRecord10Array AnydataRecord10[];
+
+type ClosedAnydataRecord10Array AnydataRecord10[3];
+
+type AnydataRecord11Array AnydataRecord11[];
+
+type ClosedAnydataRecord11Array AnydataRecord11[3];
+
+type AnydataRecord12Array AnydataRecord12[];
+
+type ClosedAnydataRecord12Array AnydataRecord12[3];
+
+type AnydataRecord13Array AnydataRecord13[];
+
+type ClosedAnydataRecord13Array AnydataRecord13[3];
+
+type AnydataRecord14Array AnydataRecord14[];
+
+type ClosedAnydataRecord14Array AnydataRecord14[3];
+
+type CustomRecord1Array CustomRecord1[];
+
+type ClosedCustomRecord1Array CustomRecord1[3];
+
+type CustomRecord2Array CustomRecord2[];
+
+type ClosedCustomRecord2Array CustomRecord2[3];
+
+type CustomRecord3Array CustomRecord3[];
+
+type ClosedCustomRecord3Array CustomRecord3[3];
+
+type CustomRecord4Array CustomRecord4[];
+
+type ClosedCustomRecord4Array CustomRecord4[3];
+
+type CustomRecord5Array CustomRecord5[];
+
+type ClosedCustomRecord5Array CustomRecord5[3];
+
+type CustomRecord6Array CustomRecord6[];
+
+type ClosedCustomRecord6Array CustomRecord6[3];
+
+type CustomRecord7Array CustomRecord7[];
+
+type ClosedCustomRecord7Array CustomRecord7[3];
+
+type CustomRecord8Array CustomRecord8[];
+
+type ClosedCustomRecord8Array CustomRecord8[3];
+
+type CustomRecord9Array CustomRecord9[];
+
+type ClosedCustomRecord9Array CustomRecord9[3];
+
+type CustomRecord10Array CustomRecord10[];
+
+type ClosedCustomRecord10Array CustomRecord10[3];
+
+type CustomRecord11Array CustomRecord11[];
+
+type ClosedCustomRecord11Array CustomRecord11[3];
+
+type CustomRecord12Array CustomRecord12[];
+
+type ClosedCustomRecord12Array CustomRecord12[3];
+
+type CustomRecord13Array CustomRecord13[];
+
+type ClosedCustomRecord13Array CustomRecord13[3];
+
+type CustomRecord14Array CustomRecord14[];
+
+type ClosedCustomRecord14Array CustomRecord14[3];
+
+type CustomRecord15Array CustomRecord15[];
+
+type CustomRecord16Array CustomRecord16[];
+
+type CustomRecord17Array CustomRecord17[];
+
+type CustomRecord18Array CustomRecord18[];
+
+type CustomRecord19Array CustomRecord19[];
+
+type CustomRecord20Array CustomRecord20[];
+
+type CustomRecord21Array CustomRecord21[];
+
+type CustomRecord22Array CustomRecord22[];
+
+type CustomRecord23Array CustomRecord23[];
+
+type CustomRecord24Array CustomRecord24[];
+
+type CustomRecord25Array CustomRecord25[];
+
+type CustomRecord26Array CustomRecord26[];
+
+type CustomRecord27Array CustomRecord27[];
+type CustomRecord28Array CustomRecord28[];
+type CustomRecord29Array CustomRecord29[];
+type CustomRecord30Array CustomRecord30[];
+type CustomRecord31Array CustomRecord31[];
+type CustomRecord32Array CustomRecord32[];
+type CustomRecord33Array CustomRecord33[];
+type CustomRecord34Array CustomRecord34[];
+type CustomRecord35Array CustomRecord35[];
+type CustomRecord36Array CustomRecord36[];
+type CustomRecord37Array CustomRecord37[];
+type CustomRecord38Array CustomRecord38[];
+type CustomRecord39Array CustomRecord39[];
+type CustomRecord40Array CustomRecord40[];
+type CustomRecord41Array CustomRecord41[];
+type CustomRecord42Array CustomRecord42[];
+type CustomRecord43Array CustomRecord43[];
+type CustomRecord44Array CustomRecord44[];
+type CustomRecord45Array CustomRecord45[];
+type CustomRecord46Array CustomRecord46[];
+type CustomRecord47Array CustomRecord47[];
+type CustomRecord48Array CustomRecord48[];
+type CustomRecord49Array CustomRecord49[];
+type CustomRecord50Array CustomRecord50[];
+type CustomRecord51Array CustomRecord51[];
+type CustomRecord52Array CustomRecord52[];
+type CustomRecord53Array CustomRecord53[];
+type CustomRecord54Array CustomRecord54[];
+type CustomRecord55Array CustomRecord55[];
+type CustomRecord56Array CustomRecord56[];
+
+type BooleanTuple1Array BooleanTuple1[];
+
+type ClosedBooleanTuple1Array BooleanTuple1[3];
+
+type BooleanTuple2Array BooleanTuple2[];
+
+type ClosedBooleanTuple2Array BooleanTuple2[3];
+
+type BooleanTuple3Array BooleanTuple3[];
+
+type ClosedBooleanTuple3Array BooleanTuple3[3];
+
+type BooleanTuple4Array BooleanTuple4[];
+
+type ClosedBooleanTuple4Array BooleanTuple4[3];
+
+type NillableBooleanTuple5Array NillableBooleanTuple5[];
+
+type NillableBooleanTuple6Array NillableBooleanTuple6[];
+
+type NillableBooleanTuple7Array NillableBooleanTuple7[];
+
+type NillableBooleanTuple8Array NillableBooleanTuple8[];
+
+type NillableIntBooleanTuple9Array NillableIntBooleanTuple9[];
+
+type NilTuple1Array NilTuple1[];
+
+type ClosedNilTuple1Array NilTuple1[3];
+
+type NilTuple2Array NilTuple2[];
+
+type ClosedNilTuple2Array NilTuple2[3];
+
+type NilTuple3Array NilTuple3[];
+
+type ClosedNilTuple3Array NilTuple3[3];
+
+type NilTuple4Array NilTuple4[];
+
+type ClosedNilTuple4Array NilTuple4[3];
+
+type IntegerTuple1Array IntegerTuple1[];
+
+type ClosedIntegerTuple1Array IntegerTuple1[3];
+
+type IntegerTuple2Array IntegerTuple2[];
+
+type ClosedIntegerTuple2Array IntegerTuple2[3];
+
+type IntegerTuple3Array IntegerTuple3[];
+
+type ClosedIntegerTuple3Array IntegerTuple3[3];
+
+type IntegerTuple4Array IntegerTuple4[];
+
+type ClosedIntegerTuple4Array IntegerTuple4[3];
+
+type FloatTuple1Array FloatTuple1[];
+
+type ClosedFloatTuple1Array FloatTuple1[3];
+
+type FloatTuple2Array FloatTuple2[];
+
+type ClosedFloatTuple2Array FloatTuple2[3];
+
+type FloatTuple3Array FloatTuple3[];
+
+type ClosedFloatTuple3Array FloatTuple3[3];
+
+type FloatTuple4Array FloatTuple4[];
+
+type ClosedFloatTuple4Array FloatTuple4[3];
+
+type DecimalTuple1Array DecimalTuple1[];
+
+type ClosedDecimalTuple1Array DecimalTuple1[3];
+
+type DecimalTuple2Array DecimalTuple2[];
+
+type ClosedDecimalTuple2Array DecimalTuple2[3];
+
+type DecimalTuple3Array DecimalTuple3[];
+
+type ClosedDecimalTuple3Array DecimalTuple3[3];
+
+type DecimalTuple4Array DecimalTuple4[];
+
+type ClosedDecimalTuple4Array DecimalTuple4[3];
+
+type StringTuple1Array StringTuple1[];
+
+type ClosedStringTuple1Array StringTuple1[3];
+
+type StringTuple2Array StringTuple2[];
+
+type ClosedStringTuple2Array StringTuple2[3];
+
+type StringTuple3Array StringTuple3[];
+
+type ClosedStringTuple3Array StringTuple3[3];
+
+type StringTuple4Array StringTuple4[];
+
+type ClosedStringTuple4Array StringTuple4[3];
+
+type AnydataTuple1Array AnydataTuple1[];
+
+type ClosedAnydataTuple1Array AnydataTuple1[3];
+
+type AnydataTuple2Array AnydataTuple2[];
+
+type ClosedAnydataTuple2Array AnydataTuple2[3];
+
+type AnydataTuple3Array AnydataTuple3[];
+
+type ClosedAnydataTuple3Array AnydataTuple3[3];
+
+type AnydataTuple4Array AnydataTuple4[];
+
+type ClosedAnydataTuple4Array AnydataTuple4[3];
+
+type JsonTuple1Array JsonTuple1[];
+
+type ClosedJsonTuple1Array JsonTuple1[3];
+
+type JsonTuple2Array JsonTuple2[];
+
+type ClosedJsonTuple2Array JsonTuple2[3];
+
+type JsonTuple3Array JsonTuple3[];
+
+type ClosedJsonTuple3Array JsonTuple3[3];
+
+type JsonTuple4Array JsonTuple4[];
+
+type ClosedJsonTuple4Array JsonTuple4[3];
+
+type CustomTuple1Array CustomTuple1[];
+
+type ClosedCustomTuple1Array CustomTuple1[3];
+
+type CustomTuple2Array CustomTuple2[];
+
+type ClosedCustomTuple2Array CustomTuple2[3];
+
+type CustomTuple3Array CustomTuple3[];
+
+type ClosedCustomTuple3Array CustomTuple3[3];
+
+type CustomTuple4Array CustomTuple4[];
+
+type ClosedCustomTuple4Array CustomTuple4[3];
+
+type CustomTuple5Array CustomTuple5[];
+
+type ClosedCustomTuple5Array CustomTuple5[3];
+
+type CustomTuple6Array CustomTuple6[];
+
+type CustomTuple7Array CustomTuple7[];
+
+type CustomTuple8Array CustomTuple8[];
+
+type ClosedCustomTuple6Array CustomTuple6[3];
+
+type IntegerArray1Array IntegerArray1[];
+
+type ClosedIntegerArray1Array IntegerArray1[3];
+
+type IntegerArray2Array IntegerArray2[];
+
+type ClosedIntegerArray2Array IntegerArray2[3];
+
+type IntegerArray3Array IntegerArray3[];
+
+type ClosedIntegerArray3Array IntegerArray3[3];
+
+type IntegerArray4Array IntegerArray4[];
+
+type ClosedIntegerArray4Array IntegerArray4[3];
+
+type IntegerArray5Array IntegerArray5[];
+
+type ClosedIntegerArray5Array IntegerArray5[3];
+
+type IntegerArray6Array IntegerArray5[];
+
+type ClosedIntegerArray6Array IntegerArray5[3];
+
+type StringArray1Array StringArray1[];
+
+type StringArrayArray StringArray[];
+
+type NillableStringArrayArray NillableStringArray[];
+
+type NillableIntOrUnionStringArrayArray NillableIntOrUnionStringArray[];
+
+type ClosedStringArray1Array StringArray1[3];
+
+type StringArray2Array StringArray2[];
+
+type ClosedStringArray2Array StringArray2[3];
+
+type StringArray3Array StringArray3[];
+
+type ClosedStringArray3Array StringArray3[3];
+
+type StringArray4Array StringArray4[];
+
+type ClosedStringArray4Array StringArray4[3];
+
+type StringArray5Array StringArray5[];
+
+type ClosedStringArray5Array StringArray5[3];
+
+type StringArray6Array StringArray5[];
+
+type ClosedStringArray6Array StringArray5[3];
+
+type FloatArray1Array FloatArray1[];
+
+type ClosedFloatArray1Array FloatArray1[3];
+
+type FloatArray2Array FloatArray2[];
+
+type ClosedFloatArray2Array FloatArray2[3];
+
+type FloatArray3Array FloatArray3[];
+
+type ClosedFloatArray3Array FloatArray3[3];
+
+type FloatArray4Array FloatArray4[];
+
+type ClosedFloatArray4Array FloatArray4[3];
+
+type FloatArray5Array FloatArray5[];
+
+type ClosedFloatArray5Array FloatArray5[3];
+
+type FloatArray6Array FloatArray5[];
+
+type ClosedFloatArray6Array FloatArray5[3];
+
+type DecimalArray1Array DecimalArray1[];
+
+type ClosedDecimalArray1Array DecimalArray1[3];
+
+type DecimalArray2Array DecimalArray2[];
+
+type ClosedDecimalArray2Array DecimalArray2[3];
+
+type DecimalArray3Array DecimalArray3[];
+
+type ClosedDecimalArray3Array DecimalArray3[3];
+
+type DecimalArray4Array DecimalArray4[];
+
+type ClosedDecimalArray4Array DecimalArray4[3];
+
+type DecimalArray5Array DecimalArray5[];
+
+type ClosedDecimalArray5Array DecimalArray5[3];
+
+type DecimalArray6Array DecimalArray5[];
+
+type ClosedDecimalArray6Array DecimalArray5[3];
+
+type BooleanArrayArray BooleanArray[];
+
+type ClosedBooleanArrayArray BooleanArray[3];
+
+type NillableBooleanArrayArray NillableBooleanArray[];
+
+type NillableIntOrUnionBooleanArrayArray NillableIntOrUnionBooleanArray[];
+
+type BooleanArray2Array BooleanArray2[];
+
+type ClosedBooleanArray2Array BooleanArray2[3];
+
+type BooleanArray3Array BooleanArray3[];
+
+type ClosedBooleanArray3Array BooleanArray3[3];
+
+type BooleanArray4Array BooleanArray4[];
+
+type ClosedBooleanArray4Array BooleanArray4[3];
+
+type BooleanArray5Array BooleanArray5[];
+
+type ClosedBooleanArray5Array BooleanArray5[3];
+
+type BooleanArray6Array BooleanArray5[];
+
+type ClosedBooleanArray6Array BooleanArray5[3];
+
+type NilArray1Array NilArray1[];
+
+type ClosedNilArray1Array NilArray1[3];
+
+type NilArray2Array NilArray2[];
+
+type ClosedNilArray2Array NilArray2[3];
+
+type NilArray3Array NilArray3[];
+
+type ClosedNilArray3Array NilArray3[3];
+
+type NilArray4Array NilArray4[];
+
+type ClosedNilArray4Array NilArray4[3];
+
+type NilArray5Array NilArray5[];
+
+type ClosedNilArray5Array NilArray5[3];
+
+type NilArray6Array NilArray5[];
+
+type ClosedNilArray6Array NilArray5[3];
+
+type JsonArray1Array JsonArray1[];
+
+type ClosedJsonArray1Array JsonArray1[3];
+
+type JsonArray2Array JsonArray2[];
+
+type ClosedJsonArray2Array JsonArray2[3];
+
+type JsonArray3Array JsonArray3[];
+
+type ClosedJsonArray3Array JsonArray3[3];
+
+type JsonArray4Array JsonArray4[];
+
+type ClosedJsonArray4Array JsonArray4[3];
+
+type JsonArray5Array JsonArray5[];
+
+type ClosedJsonArray5Array JsonArray5[3];
+
+type JsonArray6Array JsonArray5[];
+
+type ClosedJsonArray6Array JsonArray5[3];
+
+type AnydataArray1Array AnydataArray1[];
+
+type ClosedAnydataArray1Array AnydataArray1[3];
+
+type AnydataArray2Array AnydataArray2[];
+
+type ClosedAnydataArray2Array AnydataArray2[3];
+
+type AnydataArray3Array AnydataArray3[];
+
+type ClosedAnydataArray3Array AnydataArray3[3];
+
+type AnydataArray4Array AnydataArray4[];
+
+type ClosedAnydataArray4Array AnydataArray4[3];
+
+type AnydataArray5Array AnydataArray5[];
+
+type ClosedAnydataArray5Array AnydataArray5[3];
+
+type AnydataArray6Array AnydataArray5[];
+
+type ClosedAnydataArray6Array AnydataArray5[3];
+
+type CustomArray1Array CustomArray1[];
+
+type ClosedCustomArray1Array CustomArray1[3];
+
+type CustomArray2Array CustomArray2[];
+
+type ClosedCustomArray2Array CustomArray2[3];
+
+type CustomArray3Array CustomArray3[];
+
+type ClosedCustomArray3Array CustomArray3[3];
+
+type CustomArray4Array CustomArray4[];
+
+type ClosedCustomArray4Array CustomArray4[3];
+
+type CustomArray5Array CustomArray5[];
+
+type ClosedCustomArray5Array CustomArray5[3];
+
+type CustomArray6Array CustomArray5[];
+
+type ClosedCustomArray6Array CustomArray5[3];
+
+type IntegerMapArray IntegerMap[];
+
+type ClosedIntegerMapArray IntegerMap[3];
+
+type StringMapArray StringMap[];
+
+type NillableIntUnionStringMapArray NillableIntUnionStringMap[];
+
+type IntUnionStringMapArray IntUnionStringMap[];
+
+type ClosedStringMapArray StringMap[3];
+
+type DecimalMapArray DecimalMap[];
+
+type ClosedDecimalMapArray DecimalMap[3];
+
+type FloatMapArray FloatMap[];
+
+type ClosedFloatMapArray FloatMap[3];
+
+type BooleanMapArray BooleanMap[];
+
+type NillableBooleanMapArray NillableBooleanMap[];
+
+type NillableIntUnionBooleanMapArray NillableIntUnionBooleanMap[];
+
+type IntUnionBooleanMapArray IntUnionBooleanMap[];
+
+type ClosedBooleanMapArray BooleanMap[3];
+
+type NilMapArray NilMap[];
+
+type ClosedNilMapArray NilMap[3];
+
+type JsonMapArray JsonMap[];
+
+type ClosedJsonMapArray JsonMap[3];
+
+type AnydataMapArray AnydataMap[];
+
+type ClosedAnydataMapArray AnydataMap[3];
+
+type CustomMapArray CustomMap[];
+
+type ClosedCustomMapArray CustomMap[3];
+
diff --git a/ballerina-tests/parse-record-types-tests/.gitignore b/ballerina-tests/parse-record-types-tests/.gitignore
new file mode 100644
index 0000000..d5fc29a
--- /dev/null
+++ b/ballerina-tests/parse-record-types-tests/.gitignore
@@ -0,0 +1,11 @@
+# Ballerina generates this directory during the compilation of a package.
+# It contains compiler-generated artifacts and the final executable if this is an application package.
+target/
+
+# Ballerina maintains the compiler-generated source code here.
+# Remove this if you want to commit generated sources.
+generated/
+
+# Contains configuration values used during development time.
+# See https://ballerina.io/learn/provide-values-to-configurable-variables/ for more details.
+Config.toml
diff --git a/ballerina-tests/parse-record-types-tests/Ballerina.toml b/ballerina-tests/parse-record-types-tests/Ballerina.toml
new file mode 100644
index 0000000..508c204
--- /dev/null
+++ b/ballerina-tests/parse-record-types-tests/Ballerina.toml
@@ -0,0 +1,13 @@
+[package]
+org = "ballerina"
+name = "parse_record_types_tests"
+version = "0.1.0"
+
+[[dependency]]
+org = "ballerina"
+name = "csv_commons"
+repository = "local"
+version = "0.1.0"
+
+[platform.java17]
+graalvmCompatible = true
diff --git a/ballerina-tests/parse-record-types-tests/Dependencies.toml b/ballerina-tests/parse-record-types-tests/Dependencies.toml
new file mode 100644
index 0000000..54bfd11
--- /dev/null
+++ b/ballerina-tests/parse-record-types-tests/Dependencies.toml
@@ -0,0 +1,98 @@
+# AUTO-GENERATED FILE. DO NOT MODIFY.
+
+# This file is auto-generated by Ballerina for managing dependency versions.
+# It should not be modified by hand.
+
+[ballerina]
+dependencies-toml-version = "2"
+distribution-version = "2201.9.0"
+
+[[package]]
+org = "ballerina"
+name = "csv_commons"
+version = "0.1.0"
+scope = "testOnly"
+modules = [
+ {org = "ballerina", packageName = "csv_commons", moduleName = "csv_commons"}
+]
+
+[[package]]
+org = "ballerina"
+name = "data.csv"
+version = "0.1.0"
+scope = "testOnly"
+dependencies = [
+ {org = "ballerina", name = "jballerina.java"}
+]
+modules = [
+ {org = "ballerina", packageName = "data.csv", moduleName = "data.csv"}
+]
+
+[[package]]
+org = "ballerina"
+name = "jballerina.java"
+version = "0.0.0"
+scope = "testOnly"
+
+[[package]]
+org = "ballerina"
+name = "lang.__internal"
+version = "0.0.0"
+scope = "testOnly"
+dependencies = [
+ {org = "ballerina", name = "jballerina.java"},
+ {org = "ballerina", name = "lang.object"}
+]
+
+[[package]]
+org = "ballerina"
+name = "lang.array"
+version = "0.0.0"
+scope = "testOnly"
+dependencies = [
+ {org = "ballerina", name = "jballerina.java"},
+ {org = "ballerina", name = "lang.__internal"}
+]
+
+[[package]]
+org = "ballerina"
+name = "lang.error"
+version = "0.0.0"
+scope = "testOnly"
+dependencies = [
+ {org = "ballerina", name = "jballerina.java"}
+]
+
+[[package]]
+org = "ballerina"
+name = "lang.object"
+version = "0.0.0"
+scope = "testOnly"
+
+[[package]]
+org = "ballerina"
+name = "parse_record_types_tests"
+version = "0.1.0"
+dependencies = [
+ {org = "ballerina", name = "csv_commons"},
+ {org = "ballerina", name = "data.csv"},
+ {org = "ballerina", name = "test"}
+]
+modules = [
+ {org = "ballerina", packageName = "parse_record_types_tests", moduleName = "parse_record_types_tests"}
+]
+
+[[package]]
+org = "ballerina"
+name = "test"
+version = "0.0.0"
+scope = "testOnly"
+dependencies = [
+ {org = "ballerina", name = "jballerina.java"},
+ {org = "ballerina", name = "lang.array"},
+ {org = "ballerina", name = "lang.error"}
+]
+modules = [
+ {org = "ballerina", packageName = "test", moduleName = "test"}
+]
+
diff --git a/ballerina-tests/parse-record-types-tests/tests/parse_record_type_as_list_test.bal b/ballerina-tests/parse-record-types-tests/tests/parse_record_type_as_list_test.bal
new file mode 100644
index 0000000..98f980c
--- /dev/null
+++ b/ballerina-tests/parse-record-types-tests/tests/parse_record_type_as_list_test.bal
@@ -0,0 +1,540 @@
+import ballerina/csv_commons as common;
+import ballerina/data.csv as csv;
+import ballerina/test;
+
+@test:Config
+function testFromCsvWithTypeForMapAndArrayAsExpectedType() {
+ BooleanArrayArray|csv:Error bm1ba = csv:parseRecordAsListType([bm1, bm1], ["b1", "b2"], {}, BooleanArrayArray);
+ test:assertEquals(bm1ba, [
+ [true, false],
+ [true, false]
+ ]);
+
+ bm1ba = csv:parseRecordAsListType([bm1, bm1], ["b2", "b1"], {}, BooleanArrayArray);
+ test:assertEquals(bm1ba, [
+ [false, true],
+ [false, true]
+ ]);
+
+ BooleanArrayArray|csv:Error bm2ba = csv:parseRecordAsListType([bm2, bm2], ["b1", "b2", "b3", "n1", "n3"], {}, BooleanArrayArray);
+ test:assertTrue(bm2ba is csv:Error);
+ test:assertEquals((bm2ba).message(), common:generateErrorMessageForInvalidValueForArrayType("null", "2", "boolean"));
+
+ BooleanArrayArray|csv:Error bm3ba = csv:parseRecordAsListType([bm3, bm3], ["b1", "b2", "b3", "b4", "i1"], {}, BooleanArrayArray);
+ test:assertTrue(bm3ba is csv:Error);
+ test:assertEquals((bm3ba).message(), common:generateErrorMessageForInvalidValueForArrayType("null", "2", "boolean"));
+
+ BooleanArrayArray|csv:Error bm4ba = csv:parseRecordAsListType([bm4, bm4], ["n1", "n3"], {}, BooleanArrayArray);
+ test:assertTrue(bm4ba is csv:Error);
+ test:assertEquals((bm4ba).message(), common:generateErrorMessageForInvalidValueForArrayType("null", "0", "boolean"));
+
+ BooleanArrayArray|csv:Error bm5ba = csv:parseRecordAsListType([bm5, bm5], ["b1", "b2", "b3", "b4"], {}, BooleanArrayArray);
+ test:assertTrue(bm5ba is csv:Error);
+ test:assertEquals((bm5ba).message(), common:generateErrorMessageForInvalidValueForArrayType("null", "2", "boolean"));
+
+ NillableBooleanArrayArray|csv:Error bm1nba = csv:parseRecordAsListType([bm1, bm1], ["b1", "b2"], {}, NillableBooleanArrayArray);
+ test:assertEquals(bm1nba, [
+ [true, false],
+ [true, false]
+ ]);
+
+ NillableBooleanArrayArray|csv:Error bm2nba = csv:parseRecordAsListType([bm2, bm2], ["b1", "b2", "b3", "n1", "n3"], {}, NillableBooleanArrayArray);
+ test:assertEquals(bm2nba, [
+ [true, false, null, null, null],
+ [true, false, null, null, null]
+ ]);
+
+ NillableBooleanArrayArray|csv:Error bm3nba = csv:parseRecordAsListType([bm3, bm3], ["b1", "b2", "b3", "b4", "i1"], {}, NillableBooleanArrayArray);
+ test:assertTrue(bm3nba is csv:Error);
+ test:assertEquals((bm3nba).message(), common:generateErrorMessageForInvalidValueForArrayType("1", "4", "boolean?"));
+
+ NillableBooleanArrayArray|csv:Error bm4nba = csv:parseRecordAsListType([bm4, bm4], ["n1", "n3"], {}, NillableBooleanArrayArray);
+ test:assertEquals(bm4nba, [
+ [(), ()],
+ [(), ()]
+ ]);
+
+ NillableBooleanArrayArray|csv:Error bm5nba = csv:parseRecordAsListType([bm5, bm5], ["b1", "b2", "b3", "b4"], {}, NillableBooleanArrayArray);
+ test:assertEquals(bm5nba, [
+ [true, false, (), true],
+ [true, false, (), true]
+ ]);
+
+ bm5nba = csv:parseRecordAsListType([bm5, bm5], ["b1", "b3", "b2", "b4"], {}, NillableBooleanArrayArray);
+ test:assertEquals(bm5nba, [
+ [true, (), false, true],
+ [true, (), false, true]
+ ]);
+
+ bm5nba = csv:parseRecordAsListType([bm5, bm5], ["b4", "b3", "b2", "b1"], {}, NillableBooleanArrayArray);
+ test:assertEquals(bm5nba, [
+ [true, (), false, true],
+ [true, (), false, true]
+ ]);
+
+ NillableIntOrUnionBooleanArrayArray|csv:Error bm1niouba = csv:parseRecordAsListType([bm1, bm1], ["b1", "b2"], {}, NillableIntOrUnionBooleanArrayArray);
+ test:assertEquals(bm1niouba, [
+ [true, false],
+ [true, false]
+ ]);
+
+ NillableIntOrUnionBooleanArrayArray|csv:Error bm2niouba = csv:parseRecordAsListType([bm2, bm2], ["b1", "b2", "b3", "n1", "n3"], {}, NillableIntOrUnionBooleanArrayArray);
+ test:assertEquals(bm2niouba, [
+ [true, false, null, null, null],
+ [true, false, null, null, null]
+ ]);
+
+ NillableIntOrUnionBooleanArrayArray|csv:Error bm3niouba = csv:parseRecordAsListType([bm3, bm3], ["b1", "b2", "b3", "b4", "i1"], {}, NillableIntOrUnionBooleanArrayArray);
+ test:assertEquals(bm3niouba, [
+ [true, false, null, false, 1],
+ [true, false, null, false, 1]
+ ]);
+
+ NillableIntOrUnionBooleanArrayArray|csv:Error bm4niouba = csv:parseRecordAsListType([bm4, bm4], ["n1", "n3"], {}, NillableIntOrUnionBooleanArrayArray);
+ test:assertEquals(bm4niouba, [
+ [(), ()],
+ [(), ()]
+ ]);
+
+ NillableIntOrUnionBooleanArrayArray|csv:Error bm5niouba = csv:parseRecordAsListType([bm5, bm5], ["b1", "b2", "b3", "b4"], {}, NillableIntOrUnionBooleanArrayArray);
+ test:assertEquals(bm5niouba, [
+ [true, false, (), true],
+ [true, false, (), true]
+ ]);
+
+ JsonArray1Array|csv:Error bm1ja = csv:parseRecordAsListType([bm1, bm1], ["b1", "b2"], {}, JsonArray1Array);
+ test:assertEquals(bm1ja, [
+ [true, false],
+ [true, false]
+ ]);
+}
+
+@test:Config
+function testFromCsvWithTypeForMapAndArrayAsExpectedType2() {
+ JsonArray1Array|csv:Error bm2ja = csv:parseRecordAsListType([bm2, bm2], ["b1", "b2", "b3", "n1", "n3"], {}, JsonArray1Array);
+ test:assertEquals(bm2ja, [
+ [true, false, null, null, null],
+ [true, false, null, null, null]
+ ]);
+
+ JsonArray1Array|csv:Error bm3ja = csv:parseRecordAsListType([bm3, bm3], ["b1", "b2", "b3", "b4", "i1"], {}, JsonArray1Array);
+ test:assertEquals(bm3ja, [
+ [true, false, null, false, 1],
+ [true, false, null, false, 1]
+ ]);
+
+ JsonArray1Array|csv:Error bm4ja = csv:parseRecordAsListType([bm4, bm4], ["n1", "n3"], {}, JsonArray1Array);
+ test:assertEquals(bm4ja, [
+ [(), ()],
+ [(), ()]
+ ]);
+
+ JsonArray1Array|csv:Error bm5ja = csv:parseRecordAsListType([bm5, bm5], ["b1", "b2", "b3", "b4"], {}, JsonArray1Array);
+ test:assertEquals(bm5ja, [
+ [true, false, (), true],
+ [true, false, (), true]
+ ]);
+
+ AnydataArray1Array|csv:Error bm1anyda = csv:parseRecordAsListType([bm1, bm1], ["b1", "b2"], {}, AnydataArray1Array);
+ test:assertEquals(bm1anyda, [
+ [true, false],
+ [true, false]
+ ]);
+
+ AnydataArray1Array|csv:Error bm2anyda = csv:parseRecordAsListType([bm2, bm2], ["b1", "b2", "b3", "n1", "n3"], {}, AnydataArray1Array);
+ test:assertEquals(bm2anyda, [
+ [true, false, null, null, null],
+ [true, false, null, null, null]
+ ]);
+
+ AnydataArray1Array|csv:Error bm3anyda = csv:parseRecordAsListType([bm3, bm3], ["b1", "b2", "b3", "b4", "i1"], {}, AnydataArray1Array);
+ test:assertEquals(bm3anyda, [
+ [true, false, null, false, 1],
+ [true, false, null, false, 1]
+ ]);
+
+ AnydataArray1Array|csv:Error bm4anyda = csv:parseRecordAsListType([bm4, bm4], ["n1", "n3"], {}, AnydataArray1Array);
+ test:assertEquals(bm4anyda, [
+ [(), ()],
+ [(), ()]
+ ]);
+
+ AnydataArray1Array|csv:Error bm5anyda = csv:parseRecordAsListType([bm5, bm5], ["b1", "b2", "b3", "b4"], {}, AnydataArray1Array);
+ test:assertEquals(bm5anyda, [
+ [true, false, (), true],
+ [true, false, (), true]
+ ]);
+
+ StringArray1Array|csv:Error bm1sa = csv:parseRecordAsListType([bm1, bm1], ["b1", "b2"], {}, StringArray1Array);
+ test:assertTrue(bm1sa is csv:Error);
+ test:assertEquals((bm1sa).message(), common:generateErrorMessageForInvalidValueForArrayType("true", "0", "string"));
+
+ StringArray1Array|csv:Error bm2sa = csv:parseRecordAsListType([bm2, bm2], ["b1", "b2", "b3", "n1", "n3"], {}, StringArray1Array);
+ test:assertTrue(bm2sa is csv:Error);
+ test:assertEquals((bm2sa).message(), common:generateErrorMessageForInvalidValueForArrayType("true", "0", "string"));
+
+ StringArray1Array|csv:Error bm3sa = csv:parseRecordAsListType([bm3, bm3], ["b1", "b2", "b3", "b4", "i1"], {}, StringArray1Array);
+ test:assertTrue(bm3sa is csv:Error);
+ test:assertEquals((bm3sa).message(), common:generateErrorMessageForInvalidValueForArrayType("true", "0", "string"));
+
+ StringArray1Array|csv:Error bm4sa = csv:parseRecordAsListType([bm4, bm4], ["n1", "n3"], {}, StringArray1Array);
+ test:assertTrue(bm4sa is csv:Error);
+ test:assertEquals((bm4sa).message(), common:generateErrorMessageForInvalidValueForArrayType("null", "0", "string"));
+
+ StringArray1Array|csv:Error bm5sa = csv:parseRecordAsListType([bm5, bm5], ["b1", "b2", "b3", "b4"], {}, StringArray1Array);
+ test:assertTrue(bm5sa is csv:Error);
+ test:assertEquals((bm5sa).message(), common:generateErrorMessageForInvalidValueForArrayType("true", "0", "string"));
+}
+
+@test:Config
+function testFromCsvWithTypeForMapAndTupleAsExpectedType() {
+ BooleanTuple1Array|csv:Error bm1bt = csv:parseRecordAsListType([bm1, bm1], ["b1", "b2"], {}, BooleanTuple1Array);
+ test:assertEquals(bm1bt, [
+ [true, false, false, false],
+ [true, false, false, false]
+ ]);
+
+ BooleanTuple1Array|csv:Error bm2bt = csv:parseRecordAsListType([bm2, bm2], ["b1", "b2", "b3", "n1", "n3"], {}, BooleanTuple1Array);
+ test:assertTrue(bm2bt is csv:Error);
+ test:assertEquals((bm2bt).message(), common:generateErrorMessageForInvalidValueForArrayType("null", "2", "boolean"));
+
+ BooleanTuple1Array|csv:Error bm3bt = csv:parseRecordAsListType([bm3, bm3], ["b1", "b2", "b3", "b4", "i1"], {}, BooleanTuple1Array);
+ test:assertTrue(bm3bt is csv:Error);
+ test:assertEquals((bm3bt).message(), common:generateErrorMessageForInvalidValueForArrayType("null", "2", "boolean"));
+
+ BooleanTuple1Array|csv:Error bm4bt = csv:parseRecordAsListType([bm4, bm4], ["n1", "n3"], {}, BooleanTuple1Array);
+ test:assertTrue(bm4bt is csv:Error);
+ test:assertEquals((bm4bt).message(), common:generateErrorMessageForInvalidValueForArrayType("null", "0", "boolean"));
+
+ BooleanTuple1Array|csv:Error bm5bt = csv:parseRecordAsListType([bm5, bm5], ["b1", "b2", "b3", "b4"], {}, BooleanTuple1Array);
+ test:assertTrue(bm5bt is csv:Error);
+ test:assertEquals((bm5bt).message(), common:generateErrorMessageForInvalidValueForArrayType("null", "2", "boolean"));
+
+ BooleanTuple2Array|csv:Error bm1b2t = csv:parseRecordAsListType([bm1, bm1], ["b1", "b2"], {}, BooleanTuple2Array);
+ test:assertEquals(bm1b2t, [
+ [true, false],
+ [true, false]
+ ]);
+
+ BooleanTuple2Array|csv:Error bm2b2t = csv:parseRecordAsListType([bm2, bm2], ["b1", "b2", "b3", "n1", "n3"], {}, BooleanTuple2Array);
+ test:assertEquals(bm2b2t, [
+ [true, false],
+ [true, false]
+ ]);
+
+ BooleanTuple2Array|csv:Error bm3b2t = csv:parseRecordAsListType([bm3, bm3], ["b1", "b2", "b3", "b4", "i1"], {}, BooleanTuple2Array);
+ test:assertEquals(bm3b2t, [
+ [true, false],
+ [true, false]
+ ]);
+
+ BooleanTuple2Array|csv:Error bm4b2t = csv:parseRecordAsListType([bm4, bm4], ["n1", "n3"], {}, BooleanTuple2Array);
+ test:assertTrue(bm4b2t is csv:Error);
+ test:assertEquals((bm4b2t).message(), common:generateErrorMessageForInvalidValueForArrayType("null", "0", "boolean"));
+
+ BooleanTuple2Array|csv:Error bm5b2t = csv:parseRecordAsListType([bm5, bm5], ["b1", "b2", "b3", "b4"], {}, BooleanTuple2Array);
+ test:assertEquals(bm5b2t, [
+ [true, false],
+ [true, false]
+ ]);
+
+ BooleanTuple3Array|csv:Error bm1b3t = csv:parseRecordAsListType([bm1, bm1], ["b1", "b2"], {}, BooleanTuple3Array);
+ test:assertEquals(bm1b3t, [
+ [true, false],
+ [true, false]
+ ]);
+
+ BooleanTuple3Array|csv:Error bm2b3t = csv:parseRecordAsListType([bm2, bm2], ["b1", "b2", "b3", "n1", "n3"], {}, BooleanTuple3Array);
+ test:assertTrue(bm2b3t is csv:Error);
+ test:assertEquals((bm2b3t).message(), common:generateErrorMessageForInvalidValueForArrayType("null", "2", "boolean"));
+
+ BooleanTuple3Array|csv:Error bm3b3t = csv:parseRecordAsListType([bm3, bm3], ["b1", "b2", "b3", "b4", "i1"], {}, BooleanTuple3Array);
+ test:assertTrue(bm3b3t is csv:Error);
+ test:assertEquals((bm3b3t).message(), common:generateErrorMessageForInvalidValueForArrayType("null", "2", "boolean"));
+
+ BooleanTuple3Array|csv:Error bm4b3t = csv:parseRecordAsListType([bm4, bm4], ["n1", "n3"], {}, BooleanTuple3Array);
+ test:assertTrue(bm4b3t is csv:Error);
+ test:assertEquals((bm4b3t).message(), common:generateErrorMessageForInvalidValueForArrayType("null", "0", "boolean"));
+
+ BooleanTuple3Array|csv:Error bm5b3t = csv:parseRecordAsListType([bm5, bm5], ["b1", "b2", "b3", "b4"], {}, BooleanTuple3Array);
+ test:assertTrue(bm5b3t is csv:Error);
+ test:assertEquals((bm5b3t).message(), common:generateErrorMessageForInvalidValueForArrayType("null", "2", "boolean"));
+
+ BooleanTuple4Array|csv:Error bm1b4t = csv:parseRecordAsListType([bm1, bm1], ["b1", "b2"], {}, BooleanTuple4Array);
+ test:assertEquals(bm1b4t, [
+ [true, false],
+ [true, false]
+ ]);
+
+ BooleanTuple4Array|csv:Error bm2b4t = csv:parseRecordAsListType([bm2, bm2], ["b1", "b2", "b3", "n1", "n3"], {}, BooleanTuple4Array);
+ test:assertTrue(bm2b4t is csv:Error);
+ test:assertEquals((bm2b4t).message(), common:generateErrorMessageForInvalidValueForArrayType("null", "2", "boolean"));
+}
+
+@test:Config
+function testFromCsvWithTypeForMapAndTupleAsExpectedType2() {
+ BooleanTuple4Array|csv:Error bm3b4t = csv:parseRecordAsListType([bm3, bm3], ["b1", "b2", "b3", "b4", "i1"], {}, BooleanTuple4Array);
+ test:assertTrue(bm3b4t is csv:Error);
+ test:assertEquals((bm3b4t).message(), common:generateErrorMessageForInvalidValueForArrayType("null", "2", "boolean"));
+
+ BooleanTuple4Array|csv:Error bm4b4t = csv:parseRecordAsListType([bm4, bm4], ["n1", "n3"], {}, BooleanTuple4Array);
+ test:assertTrue(bm4b4t is csv:Error);
+ test:assertEquals((bm4b4t).message(), common:generateErrorMessageForInvalidValueForArrayType("null", "0", "boolean"));
+
+ BooleanTuple4Array|csv:Error bm5b4t = csv:parseRecordAsListType([bm5, bm5], ["b1", "b2", "b3", "b4"], {}, BooleanTuple4Array);
+ test:assertTrue(bm5b4t is csv:Error);
+ test:assertEquals((bm5b4t).message(), common:generateErrorMessageForInvalidValueForArrayType("null", "2", "boolean"));
+
+ NillableBooleanTuple5Array|csv:Error bm1nbt = csv:parseRecordAsListType([bm1, bm1], ["b1", "b2"], {}, NillableBooleanTuple5Array);
+ test:assertEquals(bm1nbt, [
+ [true, false, (), (), ()],
+ [true, false, (), (), ()]
+ ]);
+
+ NillableBooleanTuple5Array|csv:Error bm2nbt = csv:parseRecordAsListType([bm2, bm2], ["b1", "b2", "b3", "n1", "n3"], {}, NillableBooleanTuple5Array);
+ test:assertEquals(bm2nbt, [
+ [true, false, (), (), ()],
+ [true, false, (), (), ()]
+ ]);
+
+ NillableBooleanTuple5Array|csv:Error bm3nbt = csv:parseRecordAsListType([bm3, bm3], ["b1", "b2", "b3", "b4", "i1"], {}, NillableBooleanTuple5Array);
+ test:assertTrue(bm3nbt is csv:Error);
+ test:assertEquals((bm3nbt).message(), common:generateErrorMessageForInvalidValueForArrayType("1", "4", "boolean?"));
+
+ NillableBooleanTuple5Array|csv:Error bm4nbt = csv:parseRecordAsListType([bm4, bm4], ["n1", "n3"], {}, NillableBooleanTuple5Array);
+ test:assertEquals(bm4nbt, [
+ [(), (), (), (), ()],
+ [(), (), (), (), ()]
+ ]);
+
+ NillableBooleanTuple5Array|csv:Error bm5nbt = csv:parseRecordAsListType([bm5, bm5], ["b1", "b2", "b3", "b4"], {}, NillableBooleanTuple5Array);
+ test:assertEquals(bm5nbt, [
+ [true, false, (), true, ()],
+ [true, false, (), true, ()]
+ ]);
+
+ NillableBooleanTuple6Array|csv:Error bm1nb6t = csv:parseRecordAsListType([bm1, bm1], ["b1", "b2"], {}, NillableBooleanTuple6Array);
+ test:assertEquals(bm1nb6t, [
+ [true, false],
+ [true, false]
+ ]);
+
+ NillableBooleanTuple6Array|csv:Error bm2nb6t = csv:parseRecordAsListType([bm2, bm2], ["b1", "b2", "b3", "n1", "n3"], {}, NillableBooleanTuple6Array);
+ test:assertEquals(bm2nb6t, [
+ [true, false],
+ [true, false]
+ ]);
+
+ NillableBooleanTuple6Array|csv:Error bm3nb6t = csv:parseRecordAsListType([bm3, bm3], ["b1", "b2", "b3", "b4", "i1"], {}, NillableBooleanTuple6Array);
+ test:assertEquals(bm3nb6t, [
+ [true, false],
+ [true, false]
+ ]);
+
+ NillableBooleanTuple6Array|csv:Error bm4nb6t = csv:parseRecordAsListType([bm4, bm4], ["n1", "n3"], {}, NillableBooleanTuple6Array);
+ test:assertEquals(bm4nb6t, [
+ [(), ()],
+ [(), ()]
+ ]);
+
+ NillableBooleanTuple6Array|csv:Error bm5nb6t = csv:parseRecordAsListType([bm5, bm5], ["b1", "b2", "b3", "b4"], {}, NillableBooleanTuple6Array);
+ test:assertEquals(bm5nb6t, [
+ [true, false],
+ [true, false]
+ ]);
+
+ NillableBooleanTuple7Array|csv:Error bm1nb7t = csv:parseRecordAsListType([bm1, bm1], ["b1", "b2"], {}, NillableBooleanTuple7Array);
+ test:assertEquals(bm1nb7t, [
+ [true, false],
+ [true, false]
+ ]);
+
+ NillableBooleanTuple7Array|csv:Error bm2nb7t = csv:parseRecordAsListType([bm2, bm2], ["b1", "b2", "b3", "n1", "n3"], {}, NillableBooleanTuple7Array);
+ test:assertEquals(bm2nb7t, [
+ [true, false, (), (), ()],
+ [true, false, (), (), ()]
+ ]);
+
+ NillableBooleanTuple7Array|csv:Error bm3nb7t = csv:parseRecordAsListType([bm3, bm3], ["b1", "b2", "b3", "b4", "i1"], {}, NillableBooleanTuple7Array);
+ test:assertTrue(bm3nb7t is csv:Error);
+ test:assertEquals((bm3nb7t).message(), common:generateErrorMessageForInvalidValueForArrayType("1", "4", "boolean?"));
+
+ NillableBooleanTuple7Array|csv:Error bm4nb7t = csv:parseRecordAsListType([bm4, bm4], ["n1", "n3"], {}, NillableBooleanTuple7Array);
+ test:assertEquals(bm4nb7t, [
+ [(), ()],
+ [(), ()]
+ ]);
+
+ NillableBooleanTuple7Array|csv:Error bm5nb7t = csv:parseRecordAsListType([bm5, bm5], ["b1", "b2", "b3", "b4"], {}, NillableBooleanTuple7Array);
+ test:assertEquals(bm5nb7t, [
+ [true, false, (), true],
+ [true, false, (), true]
+ ]);
+}
+
+@test:Config
+function testFromCsvWithTypeForMapAndTupleAsExpectedType3() {
+ NillableBooleanTuple8Array|csv:Error bm1nb8t = csv:parseRecordAsListType([bm1, bm1], ["b1", "b2"], {}, NillableBooleanTuple8Array);
+ test:assertEquals(bm1nb8t, [
+ [true, false],
+ [true, false]
+ ]);
+
+ NillableBooleanTuple8Array|csv:Error bm2nb8t = csv:parseRecordAsListType([bm2, bm2], ["b1", "b2", "b3", "n1", "n3"], {}, NillableBooleanTuple8Array);
+ test:assertEquals(bm2nb8t, [
+ [true, false, (), (), ()],
+ [true, false, (), (), ()]
+ ]);
+
+ NillableBooleanTuple8Array|csv:Error bm3nb8t = csv:parseRecordAsListType([bm3, bm3], ["b1", "b2", "b3", "b4", "i1"], {}, NillableBooleanTuple8Array);
+ test:assertTrue(bm3nb8t is csv:Error);
+ test:assertEquals((bm3nb8t).message(), common:generateErrorMessageForInvalidValueForArrayType("1", "4", "boolean?"));
+
+ NillableBooleanTuple8Array|csv:Error bm4nb8t = csv:parseRecordAsListType([bm4, bm4], ["n1", "n3"], {}, NillableBooleanTuple8Array);
+ test:assertEquals(bm4nb8t, [
+ [(), ()],
+ [(), ()]
+ ]);
+
+ NillableBooleanTuple8Array|csv:Error bm5nb8t = csv:parseRecordAsListType([bm5, bm5], ["b1", "b2", "b3", "b4"], {}, NillableBooleanTuple8Array);
+ test:assertEquals(bm5nb8t, [
+ [true, false, (), true],
+ [true, false, (), true]
+ ]);
+
+ NillableIntBooleanTuple9Array|csv:Error bm1nb9t = csv:parseRecordAsListType([bm1, bm1], ["b1", "b2"], {}, NillableIntBooleanTuple9Array);
+ test:assertEquals(bm1nb9t, [
+ [true, false],
+ [true, false]
+ ]);
+
+ NillableIntBooleanTuple9Array|csv:Error bm2nb9t = csv:parseRecordAsListType([bm2, bm2], ["b1", "b2", "b3", "n1", "n3"], {}, NillableIntBooleanTuple9Array);
+ test:assertEquals(bm2nb9t, [
+ [true, false, (), (), ()],
+ [true, false, (), (), ()]
+ ]);
+
+ NillableIntBooleanTuple9Array|csv:Error bm3nb9t = csv:parseRecordAsListType([bm3, bm3], ["b1", "b2", "b3", "b4", "i1"], {}, NillableIntBooleanTuple9Array);
+ test:assertEquals(bm3nb9t, [
+ [true, false, (), false, 1],
+ [true, false, (), false, 1]
+ ]);
+
+ NillableIntBooleanTuple9Array|csv:Error bm4nb9t = csv:parseRecordAsListType([bm4, bm4], ["n1", "n3"], {}, NillableIntBooleanTuple9Array);
+ test:assertEquals(bm4nb9t, [
+ [(), ()],
+ [(), ()]
+ ]);
+
+ NillableIntBooleanTuple9Array|csv:Error bm5nb9t = csv:parseRecordAsListType([bm5, bm5], ["b1", "b2", "b3", "b4"], {}, NillableIntBooleanTuple9Array);
+ test:assertEquals(bm5nb9t, [
+ [true, false, (), true],
+ [true, false, (), true]
+ ]);
+
+ NilTuple3Array|csv:Error bm1n3t = csv:parseRecordAsListType([bm1, bm1], ["b1", "b2"], {}, NilTuple3Array);
+ test:assertTrue(bm1n3t is csv:Error);
+ test:assertEquals((bm1n3t).message(), common:generateErrorMessageForInvalidValueForArrayType("true", "0", "()"));
+
+ NilTuple3Array|csv:Error bm2n3t = csv:parseRecordAsListType([bm2, bm2], ["b1", "b2", "b3", "n1", "n3"], {}, NilTuple3Array);
+ test:assertTrue(bm2n3t is csv:Error);
+ test:assertEquals((bm2n3t).message(), common:generateErrorMessageForInvalidValueForArrayType("true", "0", "()"));
+
+ NilTuple3Array|csv:Error bm3n3t = csv:parseRecordAsListType([bm3, bm3], ["b1", "b2", "b3", "b4", "i1"], {}, NilTuple3Array);
+ test:assertTrue(bm3n3t is csv:Error);
+ test:assertEquals((bm3n3t).message(), common:generateErrorMessageForInvalidValueForArrayType("true", "0", "()"));
+
+ NilTuple3Array|csv:Error bm4n3t = csv:parseRecordAsListType([bm4, bm4], ["n1", "n3"], {}, NilTuple3Array);
+ test:assertEquals(bm4n3t, [
+ [(), ()],
+ [(), ()]
+ ]);
+
+ NilTuple3Array|csv:Error bm5n3t = csv:parseRecordAsListType([bm5, bm5], ["b1", "b2", "b3", "b4"], {}, NilTuple3Array);
+ test:assertTrue(bm5n3t is csv:Error);
+ test:assertEquals((bm5n3t).message(), common:generateErrorMessageForInvalidValueForArrayType("true", "0", "()"));
+}
+
+@test:Config
+function testFromCsvWithTypeForMapAndArrayAsExpectedType3() {
+
+ AnydataTuple3Array|csv:Error bm1anyd3t = csv:parseRecordAsListType([bm1, bm1], ["b1", "b2"], {}, AnydataTuple3Array);
+ test:assertEquals(bm1anyd3t, [
+ [true, false],
+ [true, false]
+ ]);
+
+ AnydataTuple3Array|csv:Error bm2anyd3t = csv:parseRecordAsListType([bm2, bm2], ["b1", "b2", "b3", "n1", "n3"], {}, AnydataTuple3Array);
+ test:assertEquals(bm2anyd3t, [
+ [true, false, (), (), ()],
+ [true, false, (), (), ()]
+ ]);
+
+ AnydataTuple3Array|csv:Error bm3anyd3t = csv:parseRecordAsListType([bm3, bm3], ["b1", "b2", "b3", "b4", "i1"], {}, AnydataTuple3Array);
+ test:assertEquals(bm3anyd3t, [
+ [true, false, (), false, 1],
+ [true, false, (), false, 1]
+ ]);
+
+ AnydataTuple3Array|csv:Error bm4anyd3t = csv:parseRecordAsListType([bm4, bm4], ["n1", "n3"], {}, AnydataTuple3Array);
+ test:assertEquals(bm4anyd3t, [
+ [(), ()],
+ [(), ()]
+ ]);
+
+ AnydataTuple3Array|csv:Error bm5anyd3t = csv:parseRecordAsListType([bm5, bm5], ["b1", "b2", "b3", "b4"], {}, AnydataTuple3Array);
+ test:assertEquals(bm5anyd3t, [
+ [true, false, (), true],
+ [true, false, (), true]
+ ]);
+
+ JsonTuple3Array|csv:Error bm1j3t = csv:parseRecordAsListType([bm1, bm1], ["b1", "b2"], {}, JsonTuple3Array);
+ test:assertEquals(bm1j3t, [
+ [true, false],
+ [true, false]
+ ]);
+
+ JsonTuple3Array|csv:Error bm2j3t = csv:parseRecordAsListType([bm2, bm2], ["b1", "b2", "b3", "n1", "n3"], {}, JsonTuple3Array);
+ test:assertEquals(bm2j3t, [
+ [true, false, (), (), ()],
+ [true, false, (), (), ()]
+ ]);
+
+ JsonTuple3Array|csv:Error bm3j3t = csv:parseRecordAsListType([bm3, bm3], ["b1", "b2", "b3", "b4", "i1"], {}, JsonTuple3Array);
+ test:assertEquals(bm3j3t, [
+ [true, false, (), false, 1],
+ [true, false, (), false, 1]
+ ]);
+
+ JsonTuple3Array|csv:Error bm4j3t = csv:parseRecordAsListType([bm4, bm4], ["n1", "n3"], {}, JsonTuple3Array);
+ test:assertEquals(bm4j3t, [
+ [(), ()],
+ [(), ()]
+ ]);
+
+ JsonTuple3Array|csv:Error bm5j3t = csv:parseRecordAsListType([bm5, bm5], ["b1", "b2", "b3", "b4"], {}, JsonTuple3Array);
+ test:assertEquals(bm5j3t, [
+ [true, false, (), true],
+ [true, false, (), true]
+ ]);
+
+ StringTuple3Array|csv:Error bm1s3t = csv:parseRecordAsListType([bm1, bm1], ["b1", "b2"], {}, StringTuple3Array);
+ test:assertTrue(bm1s3t is csv:Error);
+ test:assertEquals((bm1s3t).message(), common:generateErrorMessageForInvalidValueForArrayType("true", "0", "string"));
+
+ StringTuple3Array|csv:Error bm2s3t = csv:parseRecordAsListType([bm2, bm2], ["b1", "b2", "b3", "n1", "n3"], {}, StringTuple3Array);
+ test:assertTrue(bm2s3t is csv:Error);
+ test:assertEquals((bm2s3t).message(), common:generateErrorMessageForInvalidValueForArrayType("true", "0", "string"));
+
+ StringTuple3Array|csv:Error bm3s3t = csv:parseRecordAsListType([bm3, bm3], ["b1", "b2", "b3", "b4", "i1"], {}, StringTuple3Array);
+ test:assertTrue(bm3s3t is csv:Error);
+ test:assertEquals((bm3s3t).message(), common:generateErrorMessageForInvalidValueForArrayType("true", "0", "string"));
+
+ StringTuple3Array|csv:Error bm4s3t = csv:parseRecordAsListType([bm4, bm4], ["n1", "n3"], {}, StringTuple3Array);
+ test:assertTrue(bm4s3t is csv:Error);
+ test:assertEquals((bm4s3t).message(), common:generateErrorMessageForInvalidValueForArrayType("null", "0", "string"));
+
+ StringTuple3Array|csv:Error bm5s3t = csv:parseRecordAsListType([bm5, bm5], ["b1", "b2", "b3", "b4"], {}, StringTuple3Array);
+ test:assertTrue(bm5s3t is csv:Error);
+ test:assertEquals((bm5s3t).message(), common:generateErrorMessageForInvalidValueForArrayType("true", "0", "string"));
+}
diff --git a/ballerina-tests/parse-record-types-tests/tests/parse_record_type_as_record_test.bal b/ballerina-tests/parse-record-types-tests/tests/parse_record_type_as_record_test.bal
new file mode 100644
index 0000000..a1373ae
--- /dev/null
+++ b/ballerina-tests/parse-record-types-tests/tests/parse_record_type_as_record_test.bal
@@ -0,0 +1,733 @@
+import ballerina/csv_commons as common;
+import ballerina/data.csv as csv;
+import ballerina/test;
+
+@test:Config
+function testFromCsvWithTypeForMapAndRecordAsExpectedType() {
+ BooleanRecord1Array|csv:Error bm1br1 = csv:parseRecordAsRecordType([bm1, bm1], {}, BooleanRecord1Array);
+ test:assertTrue(bm1br1 is csv:Error);
+ test:assertEquals((bm1br1).message(), common:generateErrorMessageForMissingRequiredField("b3"));
+
+ BooleanRecord1Array|csv:Error bm2br1 = csv:parseRecordAsRecordType([bm2, bm2], {}, BooleanRecord1Array);
+ test:assertTrue(bm2br1 is csv:Error);
+ test:assertEquals((bm2br1).message(), common:generateErrorMessageForMissingRequiredField("b4"));
+
+ BooleanRecord1Array|csv:Error bm3br1 = csv:parseRecordAsRecordType([bm3, bm3], {}, BooleanRecord1Array);
+ test:assertEquals(bm3br1, [
+ {b1: true, b2: false, b3: (), b4: false, i1: 1},
+ {b1: true, b2: false, b3: (), b4: false, i1: 1}
+ ]);
+
+ BooleanRecord1Array|csv:Error bm4br1 = csv:parseRecordAsRecordType([bm4, bm4], {}, BooleanRecord1Array);
+ test:assertTrue(bm4br1 is csv:Error);
+ test:assertEquals((bm4br1).message(), common:generateErrorMessageForMissingRequiredField("b2"));
+
+ BooleanRecord1Array|csv:Error bm5br1 = csv:parseRecordAsRecordType([bm5, bm5], {}, BooleanRecord1Array);
+ test:assertEquals(bm5br1, [
+ {b1: true, b2: false, b3: (), b4: true},
+ {b1: true, b2: false, b3: (), b4: true}
+ ]);
+
+ BooleanRecord2Array|csv:Error bm1br2 = csv:parseRecordAsRecordType([bm1, bm1], {}, BooleanRecord2Array);
+ test:assertTrue(bm1br2 is csv:Error);
+ test:assertEquals((bm1br2).message(), common:generateErrorMessageForMissingRequiredField("b3"));
+
+ BooleanRecord2Array|csv:Error bm2br2 = csv:parseRecordAsRecordType([bm2, bm2], {}, BooleanRecord2Array);
+ test:assertTrue(bm2br2 is csv:Error);
+ test:assertEquals((bm2br2).message(), common:generateErrorMessageForMissingRequiredField("b4"));
+
+ BooleanRecord2Array|csv:Error bm3br2 = csv:parseRecordAsRecordType([bm3, bm3], {}, BooleanRecord2Array);
+ test:assertEquals(bm3br2, [
+ {b1: true, b2: false, b3: (), b4: false},
+ {b1: true, b2: false, b3: (), b4: false}
+ ]);
+
+ BooleanRecord2Array|csv:Error bm4br2 = csv:parseRecordAsRecordType([bm4, bm4], {}, BooleanRecord2Array);
+ test:assertTrue(bm4br2 is csv:Error);
+ test:assertEquals((bm4br2).message(), common:generateErrorMessageForMissingRequiredField("b2"));
+
+ BooleanRecord2Array|csv:Error bm5br2 = csv:parseRecordAsRecordType([bm5, bm5], {}, BooleanRecord2Array);
+ test:assertEquals(bm5br2, [
+ {b1: true, b2: false, b3: (), b4: true},
+ {b1: true, b2: false, b3: (), b4: true}
+ ]);
+
+ BooleanRecord3Array|csv:Error bm1br3 = csv:parseRecordAsRecordType([bm1, bm1], {}, BooleanRecord3Array);
+ test:assertTrue(bm1br3 is csv:Error);
+ test:assertEquals((bm1br3).message(), common:generateErrorMessageForMissingRequiredField("b3"));
+
+ BooleanRecord3Array|csv:Error bm2br3 = csv:parseRecordAsRecordType([bm2, bm2], {}, BooleanRecord3Array);
+ test:assertEquals(bm2br3, [
+ {b1: true, b3: ()},
+ {b1: true, b3: ()}
+ ]);
+
+ BooleanRecord3Array|csv:Error bm3br3 = csv:parseRecordAsRecordType([bm3, bm3], {}, BooleanRecord3Array);
+ test:assertEquals(bm3br3, [
+ {b1: true, b3: ()},
+ {b1: true, b3: ()}
+ ]);
+
+ BooleanRecord3Array|csv:Error bm4br3 = csv:parseRecordAsRecordType([bm4, bm4], {}, BooleanRecord3Array);
+ test:assertTrue(bm4br3 is csv:Error);
+ test:assertEquals((bm4br3).message(), common:generateErrorMessageForMissingRequiredField("b3"));
+
+ BooleanRecord3Array|csv:Error bm5br3 = csv:parseRecordAsRecordType([bm5, bm5], {}, BooleanRecord3Array);
+ test:assertEquals(bm5br3, [{b1: true, b3: ()}, {b1: true, b3: ()}]);
+
+ BooleanRecord4Array|csv:Error bm1br4 = csv:parseRecordAsRecordType([bm1, bm1], {}, BooleanRecord4Array);
+ test:assertTrue(bm1br4 is csv:Error);
+ test:assertEquals((bm1br4).message(), common:generateErrorMessageForMissingRequiredField("b3"));
+
+ BooleanRecord4Array|csv:Error bm2br4 = csv:parseRecordAsRecordType([bm2, bm2], {}, BooleanRecord4Array);
+ test:assertEquals(bm2br4, [
+ {b1: true, b2: false, b3: (), n1: (), n3: ()},
+ {b1: true, b2: false, b3: (), n1: (), n3: ()}
+ ]);
+
+ BooleanRecord4Array|csv:Error bm3br4 = csv:parseRecordAsRecordType([bm3, bm3], {}, BooleanRecord4Array);
+ test:assertEquals(bm3br4, [
+ {b1: true, b2: false, b3: (), b4: false, i1: 1},
+ {b1: true, b2: false, b3: (), b4: false, i1: 1}
+ ]);
+
+ BooleanRecord4Array|csv:Error bm4br4 = csv:parseRecordAsRecordType([bm4, bm4], {}, BooleanRecord4Array);
+ test:assertTrue(bm4br4 is csv:Error);
+ test:assertEquals((bm4br4).message(), common:generateErrorMessageForMissingRequiredField("b3"));
+
+ BooleanRecord4Array|csv:Error bm5br4 = csv:parseRecordAsRecordType([bm5, bm5], {}, BooleanRecord4Array);
+ test:assertEquals(bm5br4, [
+ {b1: true, b2: false, b3: (), b4: true},
+ {b1: true, b2: false, b3: (), b4: true}
+ ]);
+
+ BooleanRecord5Array|csv:Error bm1br5 = csv:parseRecordAsRecordType([bm1, bm1], {}, BooleanRecord5Array);
+ test:assertTrue(bm1br5 is csv:Error);
+ test:assertEquals((bm1br5).message(), common:generateErrorMessageForMissingRequiredField("b3"));
+
+ BooleanRecord5Array|csv:Error bm2br5 = csv:parseRecordAsRecordType([bm2, bm2], {}, BooleanRecord5Array);
+ test:assertEquals(bm2br5, [
+ {b1: true, b3: (), defaultableField: "", nillableField: (), b2: false, n1: (), n3: ()},
+ {b1: true, b3: (), defaultableField: "", nillableField: (), b2: false, n1: (), n3: ()}
+ ]);
+}
+
+@test:Config
+function testFromCsvWithTypeForMapAndRecordAsExpectedType2() {
+ BooleanRecord5Array|csv:Error bm3br5 = csv:parseRecordAsRecordType([bm3, bm3], {}, BooleanRecord5Array);
+ test:assertEquals(bm3br5, [
+ {b1: true, b3: (), defaultableField: "", nillableField: (), b2: false, i1: 1, b4: false},
+ {b1: true, b3: (), defaultableField: "", nillableField: (), b2: false, i1: 1, b4: false}
+ ]);
+
+ BooleanRecord5Array|csv:Error bm4br5 = csv:parseRecordAsRecordType([bm4, bm4], {}, BooleanRecord5Array);
+ test:assertTrue(bm4br5 is csv:Error);
+ test:assertEquals((bm4br5).message(), common:generateErrorMessageForMissingRequiredField("b3"));
+
+ BooleanRecord5Array|csv:Error bm5br5 = csv:parseRecordAsRecordType([bm5, bm5], {}, BooleanRecord5Array);
+ test:assertEquals(bm5br5, [
+ {b1: true, b2: false, b3: (), b4: true, defaultableField: "", nillableField: ()},
+ {b1: true, b2: false, b3: (), b4: true, defaultableField: "", nillableField: ()}
+ ]);
+
+ BooleanRecord6Array|csv:Error bm1br6 = csv:parseRecordAsRecordType([bm1, bm1], {}, BooleanRecord6Array);
+ test:assertTrue(bm1br6 is csv:Error);
+ test:assertEquals((bm1br6).message(), common:generateErrorMessageForMissingRequiredField("b3"));
+
+ BooleanRecord6Array|csv:Error bm2br6 = csv:parseRecordAsRecordType([bm2, bm2], {}, BooleanRecord6Array);
+ test:assertEquals(bm2br6, [
+ {b1: true, b3: (), defaultableField: "", nillableField: ()},
+ {b1: true, b3: (), defaultableField: "", nillableField: ()}
+ ]);
+
+ BooleanRecord6Array|csv:Error bm3br6 = csv:parseRecordAsRecordType([bm3, bm3], {}, BooleanRecord6Array);
+ test:assertEquals(bm3br6, [
+ {b1: true, b3: (), defaultableField: "", nillableField: ()},
+ {b1: true, b3: (), defaultableField: "", nillableField: ()}
+ ]);
+
+ BooleanRecord6Array|csv:Error bm4br6 = csv:parseRecordAsRecordType([bm4, bm4], {}, BooleanRecord6Array);
+ test:assertTrue(bm4br6 is csv:Error);
+ test:assertEquals((bm4br6).message(), common:generateErrorMessageForMissingRequiredField("b3"));
+
+ BooleanRecord6Array|csv:Error bm5br6 = csv:parseRecordAsRecordType([bm5, bm5], {}, BooleanRecord6Array);
+ test:assertEquals(bm5br6, [
+ {b1: true, b3: (), defaultableField: "", nillableField: ()},
+ {b1: true, b3: (), defaultableField: "", nillableField: ()}
+ ]);
+
+ BooleanRecord7Array|csv:Error bm1br7 = csv:parseRecordAsRecordType([bm1, bm1], {}, BooleanRecord7Array);
+ test:assertTrue(bm1br7 is csv:Error);
+ test:assertEquals((bm1br7).message(), common:generateErrorMessageForMissingRequiredField("b3"));
+
+ BooleanRecord7Array|csv:Error bm2br7 = csv:parseRecordAsRecordType([bm2, bm2], {}, BooleanRecord7Array);
+ test:assertTrue(bm2br7 is csv:Error);
+ test:assertEquals((bm2br7).message(), common:generateErrorMessageForMissingRequiredField("requiredField"));
+
+ BooleanRecord7Array|csv:Error bm3br7 = csv:parseRecordAsRecordType([bm3, bm3], {}, BooleanRecord7Array);
+ test:assertTrue(bm3br7 is csv:Error);
+ test:assertEquals((bm3br7).message(), common:generateErrorMessageForMissingRequiredField("requiredField"));
+
+ BooleanRecord7Array|csv:Error bm4br7 = csv:parseRecordAsRecordType([bm4, bm4], {}, BooleanRecord7Array);
+ test:assertTrue(bm4br7 is csv:Error);
+ test:assertEquals((bm4br7).message(), common:generateErrorMessageForMissingRequiredField("b3"));
+
+ BooleanRecord7Array|csv:Error bm5br7 = csv:parseRecordAsRecordType([bm5, bm5], {}, BooleanRecord7Array);
+ test:assertTrue(bm5br7 is csv:Error);
+ test:assertEquals((bm5br7).message(), common:generateErrorMessageForMissingRequiredField("requiredField"));
+
+ BooleanRecord8Array|csv:Error bm1br8 = csv:parseRecordAsRecordType([bm1, bm1], {}, BooleanRecord8Array);
+ test:assertTrue(bm1br8 is csv:Error);
+ test:assertEquals((bm1br8).message(), common:generateErrorMessageForMissingRequiredField("b3"));
+
+ BooleanRecord8Array|csv:Error bm2br8 = csv:parseRecordAsRecordType([bm2, bm2], {}, BooleanRecord8Array);
+ test:assertTrue(bm2br8 is csv:Error);
+ test:assertEquals((bm2br8).message(), common:generateErrorMessageForMissingRequiredField("requiredField"));
+
+ BooleanRecord8Array|csv:Error bm3br8 = csv:parseRecordAsRecordType([bm3, bm3], {}, BooleanRecord8Array);
+ test:assertTrue(bm3br8 is csv:Error);
+ test:assertEquals((bm3br8).message(), common:generateErrorMessageForMissingRequiredField("requiredField"));
+
+ BooleanRecord8Array|csv:Error bm4br8 = csv:parseRecordAsRecordType([bm4, bm4], {}, BooleanRecord8Array);
+ test:assertTrue(bm4br8 is csv:Error);
+ test:assertEquals((bm4br8).message(), common:generateErrorMessageForMissingRequiredField("b3"));
+
+ BooleanRecord8Array|csv:Error bm5br8 = csv:parseRecordAsRecordType([bm5, bm5], {}, BooleanRecord8Array);
+ test:assertTrue(bm5br8 is csv:Error);
+ test:assertEquals((bm5br8).message(), common:generateErrorMessageForMissingRequiredField("requiredField"));
+}
+
+@test:Config
+function testFromCsvWithTypeForMapAndRecordAsExpectedType3() {
+ BooleanRecord9Array|csv:Error bm1br9 = csv:parseRecordAsRecordType([bm1, bm1], {}, BooleanRecord9Array);
+ test:assertTrue(bm1br9 is csv:Error);
+ test:assertEquals((bm1br9).message(), common:generateErrorMessageForMissingRequiredField("b3"));
+
+ BooleanRecord9Array|csv:Error bm2br9 = csv:parseRecordAsRecordType([bm2, bm2], {}, BooleanRecord9Array);
+ test:assertEquals(bm2br9, [
+ {b1: true, b2: false, b3: (), n1: (), n3: ()},
+ {b1: true, b2: false, b3: (), n1: (), n3: ()}
+ ]);
+
+ BooleanRecord9Array|csv:Error bm3br9 = csv:parseRecordAsRecordType([bm3, bm3], {}, BooleanRecord9Array);
+ test:assertEquals(bm3br9, [
+ {b1: true, b2: false, b3: (), b4: false},
+ {b1: true, b2: false, b3: (), b4: false}
+ ]);
+
+ BooleanRecord9Array|csv:Error bm4br9 = csv:parseRecordAsRecordType([bm4, bm4], {}, BooleanRecord9Array);
+ test:assertTrue(bm4br9 is csv:Error);
+ test:assertEquals((bm4br9).message(), common:generateErrorMessageForMissingRequiredField("b3"));
+
+ BooleanRecord9Array|csv:Error bm5br9 = csv:parseRecordAsRecordType([bm5, bm5], {}, BooleanRecord9Array);
+ test:assertEquals(bm5br9, [
+ {b1: true, b2: false, b3: (), b4: true},
+ {b1: true, b2: false, b3: (), b4: true}
+ ]);
+
+ BooleanRecord10Array|csv:Error bm1br10 = csv:parseRecordAsRecordType([bm1, bm1], {}, BooleanRecord10Array);
+ test:assertEquals(bm1br10, [
+ {b1: true, b2: false},
+ {b1: true, b2: false}
+ ]);
+
+ BooleanRecord10Array|csv:Error bm2br10 = csv:parseRecordAsRecordType([bm2, bm2], {}, BooleanRecord10Array);
+ test:assertEquals(bm2br10, [
+ {b1: true, b2: false},
+ {b1: true, b2: false}
+ ]);
+
+ BooleanRecord10Array|csv:Error bm3br10 = csv:parseRecordAsRecordType([bm3, bm3], {}, BooleanRecord10Array);
+ test:assertEquals(bm3br10, [
+ {b1: true, b2: false, b4: false},
+ {b1: true, b2: false, b4: false}
+ ]);
+
+ BooleanRecord10Array|csv:Error bm4br10 = csv:parseRecordAsRecordType([bm4, bm4], {}, BooleanRecord10Array);
+ test:assertEquals(bm4br10, [
+ {},
+ {}
+ ]);
+
+ BooleanRecord10Array|csv:Error bm5br10 = csv:parseRecordAsRecordType([bm5, bm5], {}, BooleanRecord10Array);
+ test:assertEquals(bm5br10, [
+ {b1: true, b2: false, b4: true},
+ {b1: true, b2: false, b4: true}
+ ]);
+
+ BooleanRecord11Array|csv:Error bm1br11 = csv:parseRecordAsRecordType([bm1, bm1], {}, BooleanRecord11Array);
+ test:assertEquals(bm1br11, [
+ {b1: true, b2: false, defaultableField: "", nillableField :null},
+ {b1: true, b2: false, defaultableField: "", nillableField :null}
+ ]);
+
+ BooleanRecord11Array|csv:Error bm2br11 = csv:parseRecordAsRecordType([bm2, bm2], {}, BooleanRecord11Array);
+ test:assertEquals(bm2br11, [
+ {b1: true, b2: false, b3: (), n1: (), n3: (), defaultableField: "", nillableField :null},
+ {b1: true, b2: false, b3: (), n1: (), n3: (), defaultableField: "", nillableField :null}
+ ]);
+
+ BooleanRecord11Array|csv:Error bm3br11 = csv:parseRecordAsRecordType([bm3, bm3], {}, BooleanRecord11Array);
+ test:assertEquals(bm3br11, [
+ {b1: true, b2: false, b3: (), b4: false, defaultableField: "", nillableField :null},
+ {b1: true, b2: false, b3: (), b4: false, defaultableField: "", nillableField :null}
+ ]);
+
+ BooleanRecord11Array|csv:Error bm4br11 = csv:parseRecordAsRecordType([bm4, bm4], {}, BooleanRecord11Array);
+ test:assertTrue(bm4br11 is csv:Error);
+ test:assertEquals((bm4br11).message(), common:generateErrorMessageForMissingRequiredField("b1"));
+
+ BooleanRecord11Array|csv:Error bm5br11 = csv:parseRecordAsRecordType([bm5, bm5], {}, BooleanRecord11Array);
+ test:assertEquals(bm5br11, [
+ {b1: true, b2: false, b3: (), b4: true, defaultableField: "", nillableField :null},
+ {b1: true, b2: false, b3: (), b4: true, defaultableField: "", nillableField :null}
+ ]);
+
+ BooleanRecord12Array|csv:Error bm1br12 = csv:parseRecordAsRecordType([bm1, bm1], {}, BooleanRecord12Array);
+ test:assertTrue(bm1br12 is csv:Error);
+ test:assertEquals((bm1br12).message(), common:generateErrorMessageForMissingRequiredField("requiredField"));
+
+ BooleanRecord12Array|csv:Error bm2br12 = csv:parseRecordAsRecordType([bm2, bm2], {}, BooleanRecord12Array);
+ test:assertTrue(bm2br12 is csv:Error);
+ test:assertEquals((bm2br12).message(), common:generateErrorMessageForMissingRequiredField("requiredField"));
+
+ BooleanRecord12Array|csv:Error bm3br12 = csv:parseRecordAsRecordType([bm3, bm3], {}, BooleanRecord12Array);
+ test:assertTrue(bm3br12 is csv:Error);
+ test:assertEquals((bm3br12).message(), common:generateErrorMessageForMissingRequiredField("requiredField"));
+
+ BooleanRecord12Array|csv:Error bm4br12 = csv:parseRecordAsRecordType([bm4, bm4], {}, BooleanRecord12Array);
+ test:assertTrue(bm4br12 is csv:Error);
+ test:assertEquals((bm4br12).message(), common:generateErrorMessageForMissingRequiredField("requiredField"));
+
+ BooleanRecord12Array|csv:Error bm5br12 = csv:parseRecordAsRecordType([bm5, bm5], {}, BooleanRecord12Array);
+ test:assertTrue(bm5br12 is csv:Error);
+ test:assertEquals((bm5br12).message(), common:generateErrorMessageForMissingRequiredField("requiredField"));
+
+ BooleanRecord13Array|csv:Error bm1br13 = csv:parseRecordAsRecordType([bm1, bm1], {}, BooleanRecord13Array);
+ test:assertEquals(bm1br13, [
+ {b1: true, b2: false, defaultableField: "", nillableField :null},
+ {b1: true, b2: false, defaultableField: "", nillableField :null}
+ ]);
+
+ BooleanRecord13Array|csv:Error bm2br13 = csv:parseRecordAsRecordType([bm2, bm2], {}, BooleanRecord13Array);
+ test:assertEquals(bm2br13, [
+ {b1: true, b2: false, defaultableField: "", nillableField :null},
+ {b1: true, b2: false, defaultableField: "", nillableField :null}
+ ]);
+
+ BooleanRecord13Array|csv:Error bm3br13 = csv:parseRecordAsRecordType([bm3, bm3], {}, BooleanRecord13Array);
+ test:assertEquals(bm3br13, [
+ {b1: true, b2: false, b4: false, defaultableField: "", nillableField :null},
+ {b1: true, b2: false, b4: false, defaultableField: "", nillableField :null}
+ ]);
+
+ BooleanRecord13Array|csv:Error bm4br13 = csv:parseRecordAsRecordType([bm4, bm4], {}, BooleanRecord13Array);
+ test:assertEquals(bm4br13, [
+ {defaultableField: "", nillableField :null},
+ {defaultableField: "", nillableField :null}
+ ]);
+}
+
+@test:Config
+function testFromCsvWithTypeForMapAndRecordAsExpectedType4() {
+ BooleanRecord13Array|csv:Error bm5br13 = csv:parseRecordAsRecordType([bm5, bm5], {}, BooleanRecord13Array);
+ test:assertEquals(bm5br13, [
+ {b1: true, b2: false, b4: true, defaultableField: "", nillableField :null},
+ {b1: true, b2: false, b4: true, defaultableField: "", nillableField :null}
+ ]);
+
+ BooleanRecord14Array|csv:Error bm1br14 = csv:parseRecordAsRecordType([bm1, bm1], {}, BooleanRecord14Array);
+ test:assertTrue(bm1br14 is csv:Error);
+ test:assertEquals((bm1br14).message(), common:generateErrorMessageForMissingRequiredField("requiredField"));
+
+ BooleanRecord14Array|csv:Error bm2br14 = csv:parseRecordAsRecordType([bm2, bm2], {}, BooleanRecord14Array);
+ test:assertTrue(bm2br14 is csv:Error);
+ test:assertEquals((bm2br14).message(), common:generateErrorMessageForMissingRequiredField("requiredField"));
+
+ BooleanRecord14Array|csv:Error bm3br14 = csv:parseRecordAsRecordType([bm3, bm3], {}, BooleanRecord14Array);
+ test:assertTrue(bm3br14 is csv:Error);
+ test:assertEquals((bm3br14).message(), common:generateErrorMessageForMissingRequiredField("requiredField"));
+
+ BooleanRecord14Array|csv:Error bm4br14 = csv:parseRecordAsRecordType([bm4, bm4], {}, BooleanRecord14Array);
+ test:assertTrue(bm4br14 is csv:Error);
+ test:assertEquals((bm4br14).message(), common:generateErrorMessageForMissingRequiredField("requiredField"));
+
+ BooleanRecord14Array|csv:Error bm5br14 = csv:parseRecordAsRecordType([bm5, bm5], {}, BooleanRecord14Array);
+ test:assertTrue(bm5br14 is csv:Error);
+ test:assertEquals((bm5br14).message(), common:generateErrorMessageForMissingRequiredField("requiredField"));
+
+ BooleanRecord15Array|csv:Error bm1br15 = csv:parseRecordAsRecordType([bm1, bm1], {}, BooleanRecord15Array);
+ test:assertTrue(bm1br15 is csv:Error);
+ test:assertEquals((bm1br15).message(), common:generateErrorMessageForInvalidFieldType("true", "b1"));
+
+ BooleanRecord15Array|csv:Error bm3br15 = csv:parseRecordAsRecordType([bm3, bm3], {}, BooleanRecord15Array);
+ test:assertTrue(bm3br15 is csv:Error);
+ test:assertEquals((bm3br15).message(), common:generateErrorMessageForInvalidFieldType("true", "b1"));
+
+ BooleanRecord15Array|csv:Error bm4br15 = csv:parseRecordAsRecordType([bm4, bm4], {}, BooleanRecord15Array);
+ test:assertTrue(bm4br15 is csv:Error);
+ test:assertEquals((bm4br15).message(), common:generateErrorMessageForMissingRequiredField("b1"));
+
+ BooleanRecord16Array|csv:Error bm1br16 = csv:parseRecordAsRecordType([bm1, bm1], {}, BooleanRecord16Array);
+ test:assertEquals(bm1br16, [
+ {b1: true, b2: false},
+ {b1: true, b2: false}
+ ]);
+
+ BooleanRecord16Array|csv:Error bm2br16 = csv:parseRecordAsRecordType([bm2, bm2], {}, BooleanRecord16Array);
+ test:assertEquals(bm2br16, [
+ {b1: true, b2: false, b3: (), n1: (), n3: ()},
+ {b1: true, b2: false, b3: (), n1: (), n3: ()}
+ ]);
+
+ BooleanRecord16Array|csv:Error bm3br16 = csv:parseRecordAsRecordType([bm3, bm3], {}, BooleanRecord16Array);
+ test:assertEquals(bm3br16, [
+ {b1: true, b2: false, b4: false, b3: ()},
+ {b1: true, b2: false, b4: false, b3: ()}
+ ]);
+
+ BooleanRecord16Array|csv:Error bm4br16 = csv:parseRecordAsRecordType([bm4, bm4], {}, BooleanRecord16Array);
+ test:assertEquals(bm4br16, [
+ {n1: (), n3: ()},
+ {n1: (), n3: ()}
+ ]);
+
+ BooleanRecord16Array|csv:Error bm5br16 = csv:parseRecordAsRecordType([bm5, bm5], {}, BooleanRecord16Array);
+ test:assertEquals(bm5br16, [
+ {b1: true, b2: false, b4: true, b3: ()},
+ {b1: true, b2: false, b4: true, b3: ()}
+ ]);
+
+ BooleanRecord17Array|csv:Error bm1br17 = csv:parseRecordAsRecordType([bm1, bm1], {}, BooleanRecord17Array);
+ test:assertEquals(bm1br17, [
+ {},
+ {}
+ ]);
+
+ BooleanRecord17Array|csv:Error bm2br17 = csv:parseRecordAsRecordType([bm2, bm2], {}, BooleanRecord17Array);
+ test:assertEquals(bm2br17, [
+ {},
+ {}
+ ]);
+
+ BooleanRecord17Array|csv:Error bm3br17 = csv:parseRecordAsRecordType([bm3, bm3], {}, BooleanRecord17Array);
+ test:assertEquals(bm3br17, [
+ {i1: 1},
+ {i1: 1}
+ ]);
+
+ BooleanRecord17Array|csv:Error bm4br17 = csv:parseRecordAsRecordType([bm4, bm4], {}, BooleanRecord17Array);
+ test:assertEquals(bm4br17, [
+ {},
+ {}
+ ]);
+
+ BooleanRecord17Array|csv:Error bm5br17 = csv:parseRecordAsRecordType([bm5, bm5], {}, BooleanRecord17Array);
+ test:assertEquals(bm5br17, [
+ {},
+ {}
+ ]);
+
+ BooleanRecord18Array|csv:Error bm1br18 = csv:parseRecordAsRecordType([bm1, bm1], {}, BooleanRecord18Array);
+ test:assertEquals(bm1br18, [
+ {b2: false},
+ {b2: false}
+ ]);
+
+ BooleanRecord18Array|csv:Error bm2br18 = csv:parseRecordAsRecordType([bm2, bm2], {}, BooleanRecord18Array);
+ test:assertEquals(bm2br18, [
+ {b2: false, b3: (), n1: (), n3: ()},
+ {b2: false, b3: (), n1: (), n3: ()}
+ ]);
+
+ BooleanRecord18Array|csv:Error bm3br18 = csv:parseRecordAsRecordType([bm3, bm3], {}, BooleanRecord18Array);
+ test:assertEquals(bm3br18, [
+ {b2: false, b3: (), i1: 1},
+ {b2: false, b3: (), i1: 1}
+ ]);
+
+ BooleanRecord18Array|csv:Error bm4br18 = csv:parseRecordAsRecordType([bm4, bm4], {}, BooleanRecord18Array);
+ test:assertTrue(bm4br18 is csv:Error);
+ test:assertEquals((bm4br18).message(), common:generateErrorMessageForMissingRequiredField("b2"));
+
+ BooleanRecord18Array|csv:Error bm5br18 = csv:parseRecordAsRecordType([bm5, bm5], {}, BooleanRecord18Array);
+ test:assertEquals(bm5br18, [
+ {b2: false, b3: ()},
+ {b2: false, b3: ()}
+ ]);
+}
+
+@test:Config
+function testFromCsvWithTypeForMapAndMapAsExpectedType() {
+ BooleanMapArray|csv:Error bm1bma = csv:parseRecordAsRecordType([bm1, bm1], {}, BooleanMapArray);
+ test:assertEquals(bm1bma, [
+ {b1: true, b2: false},
+ {b1: true, b2: false}
+ ]);
+
+ BooleanMapArray|csv:Error bm2bma = csv:parseRecordAsRecordType([bm2, bm2], {}, BooleanMapArray);
+ test:assertEquals(bm2bma, [
+ {b1: true, b2: false},
+ {b1: true, b2: false}
+ ]);
+
+ BooleanMapArray|csv:Error bm3bma = csv:parseRecordAsRecordType([bm3, bm3], {}, BooleanMapArray);
+ test:assertEquals(bm3bma, [
+ {b1: true, b2: false, b4: false},
+ {b1: true, b2: false, b4: false}
+ ]);
+
+ BooleanMapArray|csv:Error bm4bma = csv:parseRecordAsRecordType([bm4, bm4], {}, BooleanMapArray);
+ test:assertEquals(bm4bma, [
+ {},
+ {}
+ ]);
+
+ BooleanMapArray|csv:Error bm5bma = csv:parseRecordAsRecordType([bm5, bm5], {}, BooleanMapArray);
+ test:assertEquals(bm5bma, [
+ {b1: true, b2: false, b4: true},
+ {b1: true, b2: false, b4: true}
+ ]);
+
+ NillableBooleanMapArray|csv:Error bm1nbma = csv:parseRecordAsRecordType([bm1, bm1], {}, NillableBooleanMapArray);
+ test:assertEquals(bm1nbma, [
+ {b1: true, b2: false},
+ {b1: true, b2: false}
+ ]);
+
+ NillableBooleanMapArray|csv:Error bm2nbma = csv:parseRecordAsRecordType([bm2, bm2], {}, NillableBooleanMapArray);
+ test:assertEquals(bm2nbma, [
+ {b1: true, b2: false, b3:(), n1: (), n3: ()},
+ {b1: true, b2: false, b3:(), n1: (), n3: ()}
+ ]);
+
+ NillableBooleanMapArray|csv:Error bm3nbma = csv:parseRecordAsRecordType([bm3, bm3], {}, NillableBooleanMapArray);
+ test:assertEquals(bm3nbma, [
+ {b1: true, b2: false, b3:(), b4: false},
+ {b1: true, b2: false, b3:(), b4: false}
+ ]);
+
+ NillableBooleanMapArray|csv:Error bm4nbma = csv:parseRecordAsRecordType([bm4, bm4], {}, NillableBooleanMapArray);
+ test:assertEquals(bm4nbma, [
+ {n1: (), n3: ()},
+ {n1: (), n3: ()}
+ ]);
+
+ NillableBooleanMapArray|csv:Error bm5nbma = csv:parseRecordAsRecordType([bm5, bm5], {}, NillableBooleanMapArray);
+ test:assertEquals(bm5nbma, [
+ {b1: true, b2: false, b3: (), b4: true},
+ {b1: true, b2: false, b3: (), b4: true}
+ ]);
+
+ NillableIntUnionBooleanMapArray|csv:Error bm1niubma = csv:parseRecordAsRecordType([bm1, bm1], {}, NillableIntUnionBooleanMapArray);
+ test:assertEquals(bm1niubma, [
+ {b1: true, b2: false},
+ {b1: true, b2: false}
+ ]);
+
+ NillableIntUnionBooleanMapArray|csv:Error bm2niubma = csv:parseRecordAsRecordType([bm2, bm2], {}, NillableIntUnionBooleanMapArray);
+ test:assertEquals(bm2niubma, [
+ {b1: true, b2: false, b3:(), n1: (), n3: ()},
+ {b1: true, b2: false, b3:(), n1: (), n3: ()}
+ ]);
+
+ NillableIntUnionBooleanMapArray|csv:Error bm3niubma = csv:parseRecordAsRecordType([bm3, bm3], {}, NillableIntUnionBooleanMapArray);
+ test:assertEquals(bm3niubma, [
+ {b1: true, b2: false, b3:(), b4: false, i1: 1},
+ {b1: true, b2: false, b3:(), b4: false, i1: 1}
+ ]);
+
+ NillableIntUnionBooleanMapArray|csv:Error bm4niubma = csv:parseRecordAsRecordType([bm4, bm4], {}, NillableIntUnionBooleanMapArray);
+ test:assertEquals(bm4niubma, [
+ {n1: (), n3: ()},
+ {n1: (), n3: ()}
+ ]);
+
+ NillableIntUnionBooleanMapArray|csv:Error bm5niubma = csv:parseRecordAsRecordType([bm5, bm5], {}, NillableIntUnionBooleanMapArray);
+ test:assertEquals(bm5niubma, [
+ {b1: true, b2: false, b3: (), b4: true},
+ {b1: true, b2: false, b3: (), b4: true}
+ ]);
+
+ IntUnionBooleanMapArray|csv:Error bm1iubma = csv:parseRecordAsRecordType([bm1, bm1], {}, IntUnionBooleanMapArray);
+ test:assertEquals(bm1iubma, [
+ {b1: true, b2: false},
+ {b1: true, b2: false}
+ ]);
+
+ IntUnionBooleanMapArray|csv:Error bm2iubma = csv:parseRecordAsRecordType([bm2, bm2], {}, IntUnionBooleanMapArray);
+ test:assertEquals(bm2iubma, [
+ {b1: true, b2: false},
+ {b1: true, b2: false}
+ ]);
+
+ IntUnionBooleanMapArray|csv:Error bm3iubma = csv:parseRecordAsRecordType([bm3, bm3], {}, IntUnionBooleanMapArray);
+ test:assertEquals(bm3iubma, [
+ {b1: true, b2: false, b4: false, i1: 1},
+ {b1: true, b2: false, b4: false, i1: 1}
+ ]);
+
+ IntUnionBooleanMapArray|csv:Error bm4iubma = csv:parseRecordAsRecordType([bm4, bm4], {}, IntUnionBooleanMapArray);
+ test:assertEquals(bm4iubma, [
+ {},
+ {}
+ ]);
+
+ IntUnionBooleanMapArray|csv:Error bm5iubma = csv:parseRecordAsRecordType([bm5, bm5], {}, IntUnionBooleanMapArray);
+ test:assertEquals(bm5iubma, [
+ {b1: true, b2: false, b4: true},
+ {b1: true, b2: false, b4: true}
+ ]);
+
+ NilMapArray|csv:Error bm1nma = csv:parseRecordAsRecordType([bm1, bm1], {}, NilMapArray);
+ test:assertEquals(bm1nma, [
+ {},
+ {}
+ ]);
+
+ NilMapArray|csv:Error bm2nma = csv:parseRecordAsRecordType([bm2, bm2], {}, NilMapArray);
+ test:assertEquals(bm2nma, [
+ {n1: (), n3: (), b3: ()},
+ {n1: (), n3: (), b3: ()}
+ ]);
+}
+
+@test:Config
+function testFromCsvWithTypeForMapAndMapAsExpectedType2() {
+ NilMapArray|csv:Error bm3nma = csv:parseRecordAsRecordType([bm3, bm3], {}, NilMapArray);
+ test:assertEquals(bm3nma, [
+ {b3: ()},
+ {b3: ()}
+ ]);
+
+ NilMapArray|csv:Error bm4nma = csv:parseRecordAsRecordType([bm4, bm4], {}, NilMapArray);
+ test:assertEquals(bm4nma, [
+ {n1: (), n3: ()},
+ {n1: (), n3: ()}
+ ]);
+ NilMapArray|csv:Error bm5nma = csv:parseRecordAsRecordType([bm5, bm5], {}, NilMapArray);
+ test:assertEquals(bm5nma, [
+ {b3: ()},
+ {b3: ()}
+ ]);
+
+ JsonMapArray|csv:Error bm1jma = csv:parseRecordAsRecordType([bm1, bm1], {}, JsonMapArray);
+ test:assertEquals(bm1jma, [
+ {b1: true, b2: false},
+ {b1: true, b2: false}
+ ]);
+
+ JsonMapArray|csv:Error bm2jma = csv:parseRecordAsRecordType([bm2, bm2], {}, JsonMapArray);
+ test:assertEquals(bm2jma, [
+ {b1: true, b2: false, b3: (), n1: (), n3: ()},
+ {b1: true, b2: false, b3: (), n1: (), n3: ()}
+ ]);
+
+ JsonMapArray|csv:Error bm3jma = csv:parseRecordAsRecordType([bm3, bm3], {}, JsonMapArray);
+ test:assertEquals(bm3jma, [
+ {b1: true, b2: false, b4: false, b3: (), i1: 1},
+ {b1: true, b2: false, b4: false, b3: (), i1: 1}
+ ]);
+
+ JsonMapArray|csv:Error bm4jma = csv:parseRecordAsRecordType([bm4, bm4], {}, JsonMapArray);
+ test:assertEquals(bm4jma, [
+ {n1: (), n3: ()},
+ {n1: (), n3: ()}
+ ]);
+
+ JsonMapArray|csv:Error bm5jma = csv:parseRecordAsRecordType([bm5, bm5], {}, JsonMapArray);
+ test:assertEquals(bm5jma, [
+ {b1: true, b2: false, b4: true, b3: ()},
+ {b1: true, b2: false, b4: true, b3: ()}
+ ]);
+
+ AnydataMapArray|csv:Error bm1anydma = csv:parseRecordAsRecordType([bm1, bm1], {}, AnydataMapArray);
+ test:assertEquals(bm1anydma, [
+ {b1: true, b2: false},
+ {b1: true, b2: false}
+ ]);
+
+ AnydataMapArray|csv:Error bm2anydma = csv:parseRecordAsRecordType([bm2, bm2], {}, AnydataMapArray);
+ test:assertEquals(bm2anydma, [
+ {b1: true, b2: false, b3: (), n1: (), n3: ()},
+ {b1: true, b2: false, b3: (), n1: (), n3: ()}
+ ]);
+
+ AnydataMapArray|csv:Error bm3anydma = csv:parseRecordAsRecordType([bm3, bm3], {}, AnydataMapArray);
+ test:assertEquals(bm3anydma, [
+ {b1: true, b2: false, b4: false, b3: (), i1: 1},
+ {b1: true, b2: false, b4: false, b3: (), i1: 1}
+ ]);
+
+ AnydataMapArray|csv:Error bm4anydma = csv:parseRecordAsRecordType([bm4, bm4], {}, AnydataMapArray);
+ test:assertEquals(bm4anydma, [
+ {n1: (), n3: ()},
+ {n1: (), n3: ()}
+ ]);
+
+ AnydataMapArray|csv:Error bm5anydma = csv:parseRecordAsRecordType([bm5, bm5], {}, AnydataMapArray);
+ test:assertEquals(bm5anydma, [
+ {b1: true, b2: false, b4: true, b3: ()},
+ {b1: true, b2: false, b4: true, b3: ()}
+ ]);
+
+ CustomMapArray|csv:Error bm1cma = csv:parseRecordAsRecordType([bm1, bm1], {}, CustomMapArray);
+ test:assertEquals(bm1cma, [
+ {},
+ {}
+ ]);
+
+ CustomMapArray|csv:Error bm2cma = csv:parseRecordAsRecordType([bm2, bm2], {}, CustomMapArray);
+ test:assertEquals(bm2cma, [
+ {},
+ {}
+ ]);
+
+ CustomMapArray|csv:Error bm3cma = csv:parseRecordAsRecordType([bm3, bm3], {}, CustomMapArray);
+ test:assertEquals(bm3cma, [
+ {i1: 1},
+ {i1: 1}
+ ]);
+
+ CustomMapArray|csv:Error bm4cma = csv:parseRecordAsRecordType([bm4, bm4], {}, CustomMapArray);
+ test:assertEquals(bm4cma, [
+ {},
+ {}
+ ]);
+
+ CustomMapArray|csv:Error bm5cma = csv:parseRecordAsRecordType([bm5, bm5], {}, CustomMapArray);
+ test:assertEquals(bm5cma, [
+ {},
+ {}
+ ]);
+
+ StringMapArray|csv:Error bm1sma = csv:parseRecordAsRecordType([bm1, bm1], {}, StringMapArray);
+ test:assertEquals(bm1sma, [
+ {},
+ {}
+ ]);
+
+ StringMapArray|csv:Error bm2sma = csv:parseRecordAsRecordType([bm2, bm2], {}, StringMapArray);
+ test:assertEquals(bm2sma, [
+ {},
+ {}
+ ]);
+
+ StringMapArray|csv:Error bm3sma = csv:parseRecordAsRecordType([bm3, bm3], {}, StringMapArray);
+ test:assertEquals(bm3sma, [
+ {},
+ {}
+ ]);
+
+ StringMapArray|csv:Error bm4sma = csv:parseRecordAsRecordType([bm4, bm4], {}, StringMapArray);
+ test:assertEquals(bm4sma, [
+ {},
+ {}
+ ]);
+
+ StringMapArray|csv:Error bm5sma = csv:parseRecordAsRecordType([bm5, bm5], {}, StringMapArray);
+ test:assertEquals(bm5sma, [
+ {},
+ {}
+ ]);
+}
diff --git a/ballerina-tests/parse-record-types-tests/tests/test_data_values.bal b/ballerina-tests/parse-record-types-tests/tests/test_data_values.bal
new file mode 100644
index 0000000..360a493
--- /dev/null
+++ b/ballerina-tests/parse-record-types-tests/tests/test_data_values.bal
@@ -0,0 +1,256 @@
+boolean b1 = true;
+false b2 = false;
+boolean? b3 = ();
+boolean|int b4 = false;
+
+() n1 = ();
+int? n2 = ();
+() n3 = null;
+
+int i1 = 1;
+int i2 = -2;
+int i3 = int:MAX_VALUE;
+int i4 = int:MIN_VALUE;
+int i5 = 0;
+2 i6 = 2;
+int? i7 = ();
+int|string i8 = 100;
+
+float f1 = 2.234;
+float f2 = -3.21f;
+float f3 = 0;
+float f4 = float:Infinity;
+float f5 = -float:Infinity;
+float f6 = float:NaN;
+2.3f f7 = 2.3;
+float? f8 = ();
+float|decimal f9 = 1.21;
+
+decimal d1 = 2.234;
+decimal d2 = -3.21d;
+decimal d3 = 0;
+2.3d d4 = 2.3;
+decimal? d5 = ();
+decimal|int d6 = 1.21;
+
+string s1 = "string";
+string s2 = "";
+string:Char s3 = "a";
+
+map bm1 = {b1, b2};
+map bm2 = {b1, b2, b3, n1, n3};
+map bm3 = {b1, b2, b3, b4, i1};
+map<()> bm4 = {n1, n3};
+map bm5 = {b1, b2, b3, b4:true};
+
+map m5 = {i1, i2, i3, i4, i5, i6};
+map m6 = {f1, f2, f3, f4, f5, f6, f7};
+map m7 = {d1, d2, d3, d4};
+map m8 = {d1, f1, f9, f10: 1.23};
+map m9 = {s1, s2, s3};
+map m10 = {b1, b2, b3, b4, n1, n2, n3, i1, i2, i3, i4, i5, i6, i7, i8, f1, f2, f3, f4, f5, f6, f7, f8};
+map m11 = {b1, b2, b3, b4, n1, n2, n3, i1, i2, i3, i4, i5, i6, i7, i8, f1, f2, f3, f4, f5, f6, f7, f8};
+
+boolean[] arr1 = [b1, b2];
+boolean?[] arr2 = [b1, b2, b3, n1, n3];
+(boolean|int?)[] arr3 = [b1, b2, b3, b4, i1];
+()[] arr4 = [n1, n3];
+int[] arr5 = [i1, i2, i3, i4, i5, i6];
+float[] arr6 = [f1, f2, f3, f4, f5, f6, f7];
+decimal[] arr7 = [d1, d2, d3, d4];
+(decimal|float)[] arr8 = [d1, f1, f9, 1.23];
+string[] arr9 = [s1, s2, s3];
+anydata[] arr10 = [b1, b2, b3, b4, n1, n2, n3, i1, i2, i3, i4, i5, i6, i7, i8, f1, f2, f3, f4, f5, f6, f7, f8];
+json[] arr11 = [b1, b2, b3, b4, n1, n2, n3, i1, i2, i3, i4, i5, i6, i7, i8, f1, f2, f3, f4, f5, f6, f7, f8];
+
+[boolean, boolean] bt1 = [b1, b2];
+[boolean, boolean, boolean, boolean] bt2 = [b1, b2, b1, b2];
+[boolean?, boolean?, boolean?, boolean?, boolean?] bt3 = [b1, b2, b3, n1, n3];
+[boolean|int?, boolean|int?, boolean|int?, boolean|int?, boolean|int?] bt4 = [b1, b2, b3, b4, i1];
+[boolean...] bt5 = [b1, b2];
+
+[string, string] st1 = [s1, s2];
+[string, string, string, string] st2 = [s1, s2, s3, s2];
+[string...] st3 = [s1, s2];
+[string, string, string...] st4 = [s1, s2, s3, s2];
+
+[string?, string?, string?, string?, string?] st5 = [s1, s2, s3, n1, n3];
+[string|int?, string|int?, string|int?, string|int?, string|int?] st6 = [s1, s2, s3, n1, i1];
+[string?...] st7 = [s1, s2];
+[string...] st8 = [];
+[string, string, string] st9 = [s1, s2, s3];
+
+[(), ()] tup4 = [n1, n3];
+[int, int, int, int, int, int] tup5 = [i1, i2, i3, i4, i5, i6];
+[float, float, float, float, float, float, float] tup6 = [f1, f2, f3, f4, f5, f6, f7];
+[decimal, decimal, decimal, decimal] tup7 = [d1, d2, d3, d4];
+[decimal|float, decimal|float, decimal|float, decimal|float] tup8 = [d1, f1, f9, 1.23];
+[string, string, string] tup9 = [s1, s2, s3];
+[anydata, anydata, anydata, anydata, anydata, anydata, anydata, anydata,
+ anydata, anydata, anydata, anydata, anydata, anydata, anydata, anydata,
+ anydata, anydata, anydata, anydata, anydata, anydata, anydata] tup10 = [b1, b2, b3, b4,
+ n1, n2, n3, i1, i2, i3, i4, i5, i6, i7, i8, f1, f2, f3, f4, f5, f6, f7, f8];
+[json, json, json, json, json, json, json, json, json, json, json, json,
+ json, json, json, json, json, json, json, json, json, json, json] tup11 =
+ [b1, b2, b3, b4, n1, n2, n3, i1, i2, i3, i4, i5, i6, i7, i8, f1,
+ f2, f3, f4, f5, f6, f7, f8];
+[string, string, int, int, boolean, boolean, (), (), decimal, decimal, float, float] tup12 = [
+ s1, s2, i1, i2, b1, b2, n1, n3, d1, d2, f1, f2
+];
+
+[boolean, boolean...] restTup1 = [b1, b2];
+[boolean?, boolean?, boolean?...] restTup2 = [b1, b2, b3, n1, n3];
+[boolean|int?...] restTup3 = [b1, b2, b3, b4, i1];
+[(), ()...] restTup4 = [n1, n3];
+[int...] restTup5 = [i1, i2, i3, i4, i5, i6];
+[float...] restTup6 = [f1, f2, f3, f4, f5, f6, f7];
+[decimal...] restTup7 = [d1, d2, d3, d4];
+[decimal|float, decimal|float...] restTup8 = [d1, f1, f9, 1.23];
+[string...] restTup9 = [s1, s2, s3];
+[anydata...] restTup10 = [b1, b2, b3, b4, n1, n2, n3, i1, i2, i3, i4, i5, i6, i7, i8, f1, f2, f3, f4, f5, f6, f7, f8];
+[json, json, json...] restTup11 = [b1, b2, b3, b4, n1, n2, n3, i1, i2, i3, i4, i5, i6, i7, i8, f1, f2, f3, f4, f5, f6, f7, f8];
+[string, string, int, int, boolean, boolean, (), (), decimal, decimal, float, float...] restTup12 = [
+ s1, s2, i1, i2, b1, b2, n1, n3, d1, d2, f1, f2, f2, f2
+];
+
+var booleanRecordArray = [
+ {b1, b2, b3, b4}, {b1, b2, b3, b4}
+];
+
+var booleanRecordArray2 = [
+ {},{}
+];
+
+string csvStringWithBooleanValues1 = string `b1,b2,b3,b4
+true,false,true,false
+true,false, true,false
+true,false,true,false
+`;
+
+string csvStringWithBooleanValues2 = string `b1,b2,b3,b4,b5
+true,false, true,false,true
+true,false, true,false,true`;
+
+string csvStringWithBooleanValues3 = string `b1,b2,b3
+${" "}${"\t"}
+true, false,true
+${" "}
+ TRUE, FALSE,()
+${" "}
+
+true, true,FALSE
+
+`;
+
+string csvStringWithBooleanValues4 = string `b1,b2,b3,b4
+ true,(), (),false
+ true,(), null,false
+
+`;
+
+string csvStringWithBooleanValues5 = string `b1,b2,b3,b4
+
+true,false,true,2
+
+true,false,true,3
+`;
+
+string csvStringWithBooleanValues6 = string `b2,b3
+(),()
+
+`;
+
+string csvStringWithBooleanValues7 = string `b1,b2,b3,b4
+${b1},${b2},(),${b4}
+`;
+
+string csvStringData1 = string `
+ a, b, c, d, e, f
+ 1, string1, true, 2.234, 2.234, ()
+ 2, string2, false, 0, 0, null
+ 3, string3, false, 1.23, 1.23, ()
+ 4, string4, true, -6.51, -6.51, ()
+ 5, string5, true, 3, 3, ()`;
+
+string csvStringData2 = string `
+ hello, hello, (), 12, true, 12.34
+ // comment
+
+ a, b, c, d, e, f
+
+
+ 1, string1, true, 2.234, 2.234, ()
+ 2, string2, false, 0, 0, null
+ 3, string3, false, 1.23, 1.23, ()
+ 4, string4, true, -6.51, -6.51, ()
+ 5, string5, true, 3, 3, ()`;
+
+string csvStringData3 = string `
+ a, b, c, d, e, f
+
+
+
+ 1, string1, true, 2.234, 2.234, ()
+ 2, string2, false, 0, 0, null
+ 3, string3, false, 1.23, 1.23, ()
+
+ 4, string4, true, -6.51, -6.51, ()
+ 5, string5, true, 3, 3, ()`;
+
+string csvStringData4 = string `
+ 1, string1, true, 2.234, 2.234, ()
+ 2, string2, false, 0, 0, null
+ 3, string3, false, 1.23, 1.23, ()
+ 4, string4, true, -6.51, -6.51, ()
+ 5, string5, true, 3, 3, ()`;
+
+string csvStringData5 = string `
+
+
+
+ 1, string1, true, 2.234, 2.234, ()
+ 2, string2, false, 0, 0, null
+
+ 3, string3, false, 1.23, 1.23, ()
+ 4, string4, true, -6.51, -6.51, ()
+
+ 5, string5, true, 3, 3, ()`;
+
+string csvStringData6 = string `
+
+ 1, string1, true, 2.234, 2.234, ()
+ 2, string2, false, 0, 0, null
+
+ 3, string3, false, 1.23, 1.23, ()
+ 4, string4, true, -6.51, -6.51, ()
+
+ 5, string5, true, 3, 3, ()`;
+
+string csvStringData7 = string `
+ a@ b@ c@ d@ e@ f
+ 1@ string@ true@ 2.234@ -3.21@ ()
+ 2@ s,tring@ true@ 2.234@ -3.21@ null
+ 3@ stri,ng@ true@ 2.234@ -3.21@ ()
+ 4@ string@ true@ 2.234@ -3.21@ ()
+ 5@ string@ true@ 2.234@ -3.21@ ()`;
+string csvStringData8 = string `
+ a@ b@ c@ d@ e@ f
+
+
+
+ 1@ stri,ng@ true@ 2.234@ -3.21@ ()
+ 2@ string@ true@ 2.234@ ()@-3.21
+ 3@ string@ true@ 2.234@ -3.21@ null
+
+ 4@ s,tring@ true@ 2.234@ -3.21@ ()
+ 5@ string@ true@ 2.234@ -3.21@ ()`;
+
+string csvStringData9 = string `
+
+ 1@ string@ true@ 2.234@ -3.21@ ()
+ 2@ string@ true@ 2.234@ -3.21@ null
+
+ 3@ string@ true@ 2.234@ -3.21@ ()
+ 4@ string@ true@ 2.234@ ()@-3.21
+
+ 5@ string@ true@ 2.234@ -3.21@ null`;
diff --git a/ballerina-tests/parse-record-types-tests/tests/types.bal b/ballerina-tests/parse-record-types-tests/tests/types.bal
new file mode 100644
index 0000000..a2b4b2b
--- /dev/null
+++ b/ballerina-tests/parse-record-types-tests/tests/types.bal
@@ -0,0 +1,2534 @@
+type BooleanRecord1 record {
+ boolean b1;
+ boolean|string b2;
+ boolean|string? b3;
+ boolean b4;
+};
+
+type BooleanRecord2 record {|
+ boolean b1;
+ boolean|string b2;
+ boolean|string? b3;
+ boolean b4;
+|};
+
+type BooleanRecord3 record {|
+ boolean b1;
+ boolean? b3;
+|};
+
+type BooleanRecord4 record {
+ boolean b1;
+ boolean? b3;
+};
+
+type BooleanRecord5 record {
+ boolean b1;
+ boolean? b3;
+ string defaultableField = "";
+ string? nillableField = ();
+};
+
+type BooleanRecord6 record {|
+ boolean b1;
+ boolean? b3;
+ string defaultableField = "";
+ string? nillableField = ();
+|};
+
+type BooleanRecord7 record {
+ boolean b1;
+ boolean? b3;
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+};
+
+type BooleanRecord8 record {|
+ boolean b1;
+ boolean? b3;
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+|};
+
+type BooleanRecord9 record {|
+ boolean b1;
+ boolean? b3;
+ boolean?...;
+|};
+
+type BooleanRecord10 record {|
+ boolean...;
+|};
+
+type BooleanRecord11 record {|
+ boolean b1;
+ string defaultableField = "";
+ string? nillableField = ();
+ boolean?|string...;
+|};
+
+type BooleanRecord12 record {|
+ boolean b1;
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+ boolean...;
+|};
+
+type BooleanRecord13 record {|
+ string defaultableField = "";
+ string? nillableField = ();
+ string|boolean...;
+|};
+
+type BooleanRecord14 record {|
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+ boolean...;
+|};
+
+type BooleanRecord15 record {|
+ int b1;
+ string defaultableField = "";
+ string? nillableField = ();
+ boolean?...;
+|};
+
+type BooleanRecord16 record {|
+ boolean?...;
+|};
+
+type BooleanRecord17 record {|
+ int...;
+|};
+
+type BooleanRecord18 record {|
+ boolean b2;
+ int?...;
+|};
+
+type NilRecord1 record {
+ () n1;
+ () n2;
+ () n3;
+};
+
+type NilRecord2 record {|
+ () n1;
+ () n2;
+ () n3;
+|};
+
+type NilRecord3 record {|
+ () n1;
+ () n4;
+|};
+
+type NilRecord4 record {
+ () n1;
+ () n4;
+};
+
+type NilRecord5 record {
+ () n1;
+ () n4;
+ string defaultableField = "";
+ string? nillableField = ();
+};
+
+type NilRecord6 record {|
+ () n1;
+ () n4;
+ string defaultableField = "";
+ string? nillableField = ();
+|};
+
+type NilRecord7 record {
+ () n1;
+ () n4;
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+};
+
+type NilRecord8 record {|
+ () n1;
+ () n4;
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+|};
+
+type NilRecord9 record {|
+ () n1;
+ () n2;
+ ()...;
+|};
+
+type NilRecord10 record {|
+ ()...;
+|};
+
+type NilRecord11 record {|
+ () n1;
+ string defaultableField = "";
+ string? nillableField = ();
+ ()...;
+|};
+
+type NilRecord12 record {|
+ () n1;
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+ ()...;
+|};
+
+type NilRecord13 record {|
+ string defaultableField = "";
+ string? nillableField = ();
+ ()...;
+|};
+
+type NilRecord14 record {|
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+ ()...;
+|};
+
+type IntegerRecord1 record {
+ int i1;
+ int i2;
+ int i3;
+ int? i4;
+ int? i5;
+ int i6;
+ int i7;
+ int? i8;
+};
+
+type IntegerRecord2 record {|
+ int i1;
+ int? i2;
+ int i3;
+ int i4;
+ int? i5;
+ int i6;
+ int i7;
+ int? i8;
+|};
+
+type IntegerRecord3 record {|
+ int i1;
+ int i4;
+ int i6;
+|};
+
+type IntegerRecord4 record {
+ int i1;
+ int i4;
+ int i6;
+};
+
+type IntegerRecord5 record {
+ int i1;
+ int i4;
+ int i6;
+ string defaultableField = "";
+ string? nillableField = ();
+};
+
+type IntegerRecord6 record {|
+ int i1;
+ int i4;
+ int i6;
+ string defaultableField = "";
+ string? nillableField = ();
+|};
+
+type IntegerRecord7 record {
+ int i1;
+ int i4;
+ int i6;
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+};
+
+type IntegerRecord8 record {|
+ int i1;
+ int i4;
+ int i6;
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+|};
+
+type IntegerRecord9 record {|
+ int i1;
+ int i2;
+ int...;
+|};
+
+type IntegerRecord10 record {|
+ int...;
+|};
+
+type IntegerRecord11 record {|
+ int i1;
+ string defaultableField = "";
+ string? nillableField = ();
+ int...;
+|};
+
+type IntegerRecord12 record {|
+ int i1;
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+ int...;
+|};
+
+type IntegerRecord13 record {|
+ string defaultableField = "";
+ string? nillableField = ();
+ int...;
+|};
+
+type IntegerRecord14 record {|
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+ int...;
+|};
+
+type FloatRecord1 record {
+ float f1;
+ float f2;
+ float f3;
+ float f4;
+ float f5;
+ float f6;
+ float f7;
+ float f8;
+};
+
+type FloatRecord2 record {|
+ float f1;
+ float f2;
+ float f3;
+ float f4;
+ float f5;
+ float f6;
+ float f7;
+ float f8;
+|};
+
+type FloatRecord3 record {|
+ float f1;
+ float f4;
+ float f7;
+|};
+
+type FloatRecord4 record {
+ float f1;
+ float f4;
+ float f7;
+};
+
+type FloatRecord5 record {
+ float f1;
+ float f4;
+ float f7;
+ string defaultableField = "";
+ string? nillableField = ();
+};
+
+type FloatRecord6 record {|
+ float f1;
+ float f4;
+ float f7;
+ string defaultableField = "";
+ string? nillableField = ();
+|};
+
+type FloatRecord7 record {
+ float f1;
+ float f4;
+ float f7;
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+};
+
+type FloatRecord8 record {|
+ float f1;
+ float f4;
+ float f7;
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+|};
+
+type FloatRecord9 record {|
+ float f1;
+ float f2;
+ float...;
+|};
+
+type FloatRecord10 record {|
+ float...;
+|};
+
+type FloatRecord11 record {|
+ float f1;
+ string defaultableField = "";
+ string? nillableField = ();
+ float...;
+|};
+
+type FloatRecord12 record {|
+ float f1;
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+ float...;
+|};
+
+type FloatRecord13 record {|
+ string defaultableField = "";
+ string? nillableField = ();
+ float...;
+|};
+
+type FloatRecord14 record {|
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+ float...;
+|};
+
+type DecimalRecord1 record {
+ decimal d1;
+ decimal d2;
+ decimal d3;
+ decimal d4;
+ decimal d5;
+ decimal d6;
+ decimal d7;
+ decimal d8;
+};
+
+type DecimalRecord2 record {|
+ decimal d1;
+ decimal d2;
+ decimal d3;
+ decimal d4;
+ decimal d5;
+ decimal d6;
+ decimal d7;
+ decimal d8;
+|};
+
+type DecimalRecord3 record {|
+ decimal d1;
+ decimal d4;
+ decimal d7;
+|};
+
+type DecimalRecord4 record {
+ decimal d1;
+ decimal d4;
+ decimal d7;
+};
+
+type DecimalRecord5 record {
+ decimal d1;
+ decimal d4;
+ decimal d7;
+ string defaultableField = "";
+ string? nillableField = ();
+};
+
+type DecimalRecord6 record {|
+ decimal d1;
+ decimal d4;
+ decimal d7;
+ string defaultableField = "";
+ string? nillableField = ();
+|};
+
+type DecimalRecord7 record {
+ decimal d1;
+ decimal d4;
+ decimal d7;
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+};
+
+type DecimalRecord8 record {|
+ decimal d1;
+ decimal d4;
+ decimal d7;
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+|};
+
+type DecimalRecord9 record {|
+ decimal d1;
+ decimal d2;
+ decimal...;
+|};
+
+type DecimalRecord10 record {|
+ decimal...;
+|};
+
+type DecimalRecord11 record {|
+ decimal d1;
+ string defaultableField = "";
+ string? nillableField = ();
+ decimal...;
+|};
+
+type DecimalRecord12 record {|
+ decimal d1;
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+ decimal...;
+|};
+
+type DecimalRecord13 record {|
+ string defaultableField = "";
+ string? nillableField = ();
+ decimal...;
+|};
+
+type DecimalRecord14 record {|
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+ decimal...;
+|};
+
+type StringRecord1 record {
+ string s1;
+ string s2;
+ string s3;
+};
+
+type StringRecord2 record {|
+ string s1;
+ string s2;
+ string s3;
+|};
+
+type StringRecord3 record {|
+ string s1;
+ string s4;
+|};
+
+type StringRecord4 record {
+ string s1;
+ string s4;
+};
+
+type StringRecord5 record {
+ string s1;
+ string s4;
+ string defaultableField = "";
+ string? nillableField = ();
+};
+
+type StringRecord6 record {|
+ string s1;
+ string s4;
+ string defaultableField = "";
+ string? nillableField = ();
+|};
+
+type StringRecord7 record {
+ string s1;
+ string s4;
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+};
+
+type StringRecord8 record {|
+ string s1;
+ string s4;
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+|};
+
+type StringRecord9 record {|
+ string s1;
+ string s2;
+ string...;
+|};
+
+type StringRecord10 record {|
+ string...;
+|};
+
+type StringRecord11 record {|
+ string s1;
+ string defaultableField = "";
+ string? nillableField = ();
+ string...;
+|};
+
+type StringRecord12 record {|
+ string d1;
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+ string...;
+|};
+
+type StringRecord13 record {|
+ string defaultableField = "";
+ string? nillableField = ();
+ string...;
+|};
+
+type StringRecord14 record {|
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+ string...;
+|};
+
+type StringRecord15 record {|
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+ string...;
+|};
+
+type StringRecord16 record {|
+ string?...;
+|};
+
+type StringRecord17 record {|
+ int...;
+|};
+
+type StringRecord18 record {|
+ string b2;
+ int?...;
+|};
+
+type StringRecord19 record {
+ string s1 = "";
+ string s2 = "";
+};
+
+type StringRecord20 record {|
+ string s1 = "";
+ string s2 = "";
+|};
+
+type StringRecord21 record {
+};
+
+type StringRecord22 record {|
+ string s1 = "";
+ string s2 = "";
+ json...;
+|};
+
+type StringRecord23 record {|
+ json...;
+|};
+
+type JsonRecord1 record {
+ json j1;
+ json j2;
+ json j3;
+};
+
+type JsonRecord2 record {|
+ json j1;
+ json j2;
+ json j3;
+|};
+
+type JsonRecord3 record {|
+ json j1;
+ json j4;
+|};
+
+type JsonRecord4 record {
+ json j1;
+ json j4;
+};
+
+type JsonRecord5 record {
+ json j1;
+ json j4;
+ json defaultableField = "";
+ json? nillableField = ();
+};
+
+type JsonRecord6 record {|
+ json j1;
+ json j4;
+ json defaultableField = "";
+ json? nillableField = ();
+|};
+
+type JsonRecord7 record {
+ json j1;
+ json j4;
+ json defaultableField = "";
+ json? nillableField = ();
+ json requiredField;
+};
+
+type JsonRecord8 record {|
+ json j1;
+ json j4;
+ json defaultableField = "";
+ json? nillableField = ();
+ json requiredField;
+|};
+
+type JsonRecord9 record {|
+ json j1;
+ json j2;
+ json...;
+|};
+
+type JsonRecord10 record {|
+ json...;
+|};
+
+type JsonRecord11 record {|
+ json j1;
+ json defaultableField = "";
+ json? nillableField = ();
+ json...;
+|};
+
+type JsonRecord12 record {|
+ json j1;
+ json defaultableField = "";
+ json? nillableField = ();
+ json requiredField;
+ json...;
+|};
+
+type JsonRecord13 record {|
+ json defaultableField = "";
+ json? nillableField = ();
+ json...;
+|};
+
+type JsonRecord14 record {|
+ json defaultableField = "";
+ json? nillableField = ();
+ json requiredField;
+ json...;
+|};
+
+type AnydataRecord1 record {
+ anydata anydata1;
+ anydata anydata2;
+ anydata anydata3;
+};
+
+type AnydataRecord2 record {|
+ anydata anydata1;
+ anydata anydata2;
+ anydata anydata3;
+|};
+
+type AnydataRecord3 record {|
+ anydata anydata1;
+ anydata anydata4;
+|};
+
+type AnydataRecord4 record {
+ anydata anydata1;
+ anydata anydata4;
+};
+
+type AnydataRecord5 record {
+ anydata anydata1;
+ anydata anydata4;
+ anydata defaultableField = "";
+ anydata? nillableField = ();
+};
+
+type AnydataRecord6 record {|
+ anydata anydata1;
+ anydata anydata4;
+ anydata defaultableField = "";
+ anydata? nillableField = ();
+|};
+
+type AnydataRecord7 record {
+ anydata anydata1;
+ anydata anydata4;
+ anydata defaultableField = "";
+ anydata? nillableField = ();
+ anydata requiredField;
+};
+
+type AnydataRecord8 record {|
+ anydata anydata1;
+ anydata anydata4;
+ anydata defaultableField = "";
+ anydata? nillableField = ();
+ anydata requiredField;
+|};
+
+type AnydataRecord9 record {|
+ anydata anydata1;
+ anydata anydata2;
+ anydata...;
+|};
+
+type AnydataRecord10 record {|
+ anydata...;
+|};
+
+type AnydataRecord11 record {|
+ anydata anydata1;
+ anydata defaultableField = "";
+ anydata? nillableField = ();
+ anydata...;
+|};
+
+type AnydataRecord12 record {|
+ anydata anydata1;
+ anydata defaultableField = "";
+ anydata? nillableField = ();
+ anydata requiredField;
+ anydata...;
+|};
+
+type AnydataRecord13 record {|
+ anydata defaultableField = "";
+ anydata? nillableField = ();
+ anydata...;
+|};
+
+type AnydataRecord14 record {|
+ anydata defaultableField = "";
+ anydata? nillableField = ();
+ anydata requiredField;
+ anydata...;
+|};
+
+type CustomRecord1 record {
+ int i1;
+ int i2;
+ string s1;
+ string s2;
+ boolean b1;
+ boolean b2;
+ () n1;
+ () n2;
+ float f1;
+ float f2;
+ decimal d1;
+ decimal d2;
+};
+
+type CustomRecord2 record {|
+ int i1;
+ int i2;
+ string s1;
+ string s2;
+ boolean b1;
+ boolean b2;
+ () n1;
+ () n2;
+ float f1;
+ float f2;
+ decimal d1;
+ decimal d2;
+|};
+
+type CustomRecord3 record {|
+ int i1;
+ string s1;
+ boolean b1;
+ () n1;
+ float f1;
+ decimal d1;
+|};
+
+type CustomRecord4 record {
+ int i1;
+ string s1;
+ boolean b1;
+ () n1;
+ float f1;
+ decimal d1;
+};
+
+type CustomRecord5 record {
+ int i1;
+ string s1;
+ boolean b1;
+ () n1;
+ float f1;
+ decimal d1;
+ string defaultableField = "";
+ string? nillableField = ();
+};
+
+type CustomRecord6 record {|
+ int i1;
+ string s1;
+ boolean b1;
+ () n1;
+ float f1;
+ decimal d1;
+ anydata defaultableField = "";
+ anydata? nillableField = ();
+|};
+
+type CustomRecord7 record {
+ int i1;
+ string s1;
+ boolean b1;
+ () n1;
+ float f1;
+ decimal d1;
+ anydata defaultableField = "";
+ anydata? nillableField = ();
+ anydata requiredField;
+};
+
+type CustomRecord8 record {|
+ int i1;
+ string s1;
+ boolean b1;
+ () n1;
+ float f1;
+ decimal d1;
+ anydata defaultableField = "";
+ anydata? nillableField = ();
+ anydata requiredField;
+|};
+
+type CustomRecord9 record {|
+ int i1;
+ string s1;
+ boolean b1;
+ () n1;
+ float f1;
+ decimal d1;
+ string...;
+|};
+
+type CustomRecord10 record {|
+ string...;
+|};
+
+type CustomRecord11 record {|
+ int i1;
+ string s1;
+ boolean b1;
+ () n1;
+ float f1;
+ decimal d1;
+ anydata defaultableField = "";
+ anydata? nillableField = ();
+ string...;
+|};
+
+type CustomRecord12 record {|
+ int i1;
+ string s1;
+ boolean b1;
+ () n1;
+ float f1;
+ decimal d1;
+ anydata defaultableField = "";
+ anydata? nillableField = ();
+ anydata requiredField;
+ string...;
+|};
+
+type CustomRecord13 record {|
+ anydata defaultableField = "";
+ anydata? nillableField = ();
+ string...;
+|};
+
+type CustomRecord14 record {|
+ anydata defaultableField = "";
+ anydata? nillableField = ();
+ anydata requiredField;
+ string...;
+|};
+
+type CustomRecord15 record {|
+ string '1;
+ string '2;
+|};
+
+type CustomRecord16 record {|
+ string '1;
+ string '2;
+ string '3;
+ string '4;
+|};
+
+type CustomRecord17 record {
+ string '1;
+ string '2;
+};
+
+type CustomRecord18 record {
+ string '1;
+ string '2;
+ string '3;
+ string '4;
+};
+
+type CustomRecord19 record {
+ string '1;
+ string '2;
+ string '3 = "";
+ string '4 = "";
+};
+
+type CustomRecord20 record {
+ string '1;
+};
+
+type CustomRecord21 record {|
+ string '1;
+ json...;
+|};
+
+type CustomRecord22 record {|
+ string '1;
+ string...;
+|};
+
+type CustomRecord23 record {|
+ string '1;
+ string a = "";
+ string...;
+|};
+
+type CustomRecord24 record {|
+ string '1;
+ string '2 = "";
+ string...;
+|};
+
+type CustomRecord25 record {|
+ int '1;
+ string...;
+|};
+
+type CustomRecord26 record {|
+ string '1;
+ int...;
+|};
+
+type CustomRecord27 record {|
+ int i1;
+ string s1;
+ boolean b1;
+ () n1;
+ float f1;
+ decimal d1;
+ anydata a1;
+ json j1;
+ anydata defaultableField = "";
+ anydata? nillableField = ();
+ string...;
+|};
+
+type CustomRecord28 record {
+ string '1;
+};
+
+type CustomRecord29 record {
+ int '1;
+};
+
+type CustomRecord30 record {|
+ string '1;
+ string '2;
+ string '3;
+ string '4;
+ string '5;
+ string '6;
+|};
+
+type CustomRecord31 record {|
+ string '1;
+ string '6;
+|};
+
+type CustomRecord32 record {|
+ int '1;
+|};
+
+type CustomRecord33 record {|
+ string '1;
+ string '2;
+ string '3;
+ string '4;
+ string '5;
+ string '6;
+|};
+
+type CustomRecord34 record {
+ string '1;
+ string '6;
+ string '5 = "";
+};
+
+type CustomRecord35 record {
+ string '1;
+ string '6;
+ string '9 = "";
+};
+
+type CustomRecord36 record {|
+ string '1;
+ string '6;
+ string '9 = "";
+|};
+
+type CustomRecord37 record {|
+ string '1;
+ string '6;
+ string '5 = "";
+|};
+
+type CustomRecord38 record {|
+ string '1;
+ string '2;
+ string '3;
+ string '4;
+ string '5;
+ string '6;
+ string ...;
+|};
+
+type CustomRecord39 record {|
+ string '1;
+ string '2;
+ string '3;
+ string '4;
+ string '5;
+ string '6;
+ json ...;
+|};
+
+type CustomRecord40 record {|
+ string '5;
+ string '6;
+ json ...;
+|};
+
+type CustomRecord41 record {|
+ json ...;
+|};
+
+type CustomRecord42 record {|
+ int '1;
+ string '2;
+ boolean '3;
+ decimal '4;
+ float '5;
+ () '6;
+|};
+
+type CustomRecord43 record {
+ int '1;
+ string '2;
+ boolean '3;
+ decimal '4;
+ float '5;
+ () '6;
+};
+
+type CustomRecord44 record {|
+ int '1;
+ string '2;
+ boolean '3;
+ decimal '4;
+ float '5;
+ () '6;
+ string ...;
+|};
+
+type CustomRecord45 record {|
+ int H1;
+ string H2;
+ boolean H3;
+ decimal H4;
+ float H5;
+ () H6;
+|};
+
+type CustomRecord46 record {
+ int H1;
+ string H2;
+ boolean H3;
+ decimal H4;
+ float H5;
+ () H6;
+};
+
+type CustomRecord47 record {|
+ int H1;
+ string H2;
+ boolean H3;
+ decimal H4;
+ float H5;
+ () H6;
+ string ...;
+|};
+
+type CustomRecord48 record {
+ string H1;
+ string H2;
+ string H3;
+ string H4;
+ string H5;
+ string H6;
+};
+
+type CustomRecord49 record {|
+ string H1;
+ string H2;
+ string H3;
+ string H4;
+ string H5;
+ string H6;
+|};
+
+type CustomRecord50 record {
+ int H1;
+ float H4;
+};
+
+type CustomRecord51 record {|
+ int H1;
+ float H4;
+|};
+
+type CustomRecord52 record {|
+ string H1;
+ string H4;
+ string ...;
+|};
+
+type CustomRecord53 record {|
+ int H1;
+ float H4;
+ decimal ...;
+|};
+
+type CustomRecord54 record {|
+ string H1 = "";
+ string H4;
+ string '1;
+|};
+
+type CustomRecord55 record {|
+ string H1 = "";
+ string H4 = "";
+ int '1 = 10;
+|};
+
+type CustomRecord56 record {
+ string H1 = "";
+ string H4 = "";
+ anydata '1 = 10;
+};
+
+type BooleanTuple1 [boolean, boolean, boolean, boolean];
+
+type BooleanTuple2 [boolean, boolean];
+
+type BooleanTuple3 [boolean, boolean...];
+
+type BooleanTuple4 [boolean...];
+
+type NillableBooleanTuple5 [boolean?, boolean?, boolean?, boolean?, boolean?];
+
+type NillableBooleanTuple6 [boolean?, boolean?];
+
+type NillableBooleanTuple7 [boolean?, boolean?, boolean?...];
+
+type NillableBooleanTuple8 [boolean?...];
+
+type NillableIntBooleanTuple9 [int|boolean?, int|boolean?...];
+
+type NilTuple1 [(), (), ()];
+
+type NilTuple2 [(), ()];
+
+type NilTuple3 [(), ()...];
+
+type NilTuple4 [()...];
+
+type IntegerTuple1 [int, int, int, int, int, int];
+
+type IntegerTuple2 [int, int];
+
+type IntegerTuple3 [int, int...];
+
+type IntegerTuple4 [int...];
+
+type FloatTuple1 [float, float, float, float, float, float, float];
+
+type FloatTuple2 [float, float];
+
+type FloatTuple3 [float, float...];
+
+type FloatTuple4 [float...];
+
+type DecimalTuple1 [decimal, decimal, decimal, decimal];
+
+type DecimalTuple2 [decimal, decimal];
+
+type DecimalTuple3 [decimal, decimal...];
+
+type DecimalTuple4 [decimal...];
+
+type StringTuple1 [string, string, string, string];
+
+type StringTuple2 [string, string];
+
+type StringTuple3 [string, string...];
+
+type StringTuple4 [string...];
+
+type AnydataTuple1 [anydata, anydata, anydata, anydata, anydata,
+ anydata, anydata, anydata, anydata, anydata, anydata, anydata,
+ anydata, anydata, anydata, anydata, anydata, anydata, anydata,
+ anydata, anydata, anydata, anydata];
+
+type AnydataTuple2 [anydata, anydata];
+
+type AnydataTuple3 [anydata, anydata...];
+
+type AnydataTuple4 [anydata...];
+
+type JsonTuple1 [json, json, json, json, json, json, json, json,
+ json, json, json, json, json, json, json, json, json, json,
+ json, json, json, json, json];
+
+type JsonTuple2 [json, json];
+
+type JsonTuple3 [json, json...];
+
+type JsonTuple4 [json...];
+
+type CustomTuple1 [string, int, decimal, float, (), boolean, anydata, json, string, int, decimal, float, (), boolean, anydata, json];
+
+type CustomTuple2 [string, int, decimal, float, (), boolean, anydata, json];
+
+type CustomTuple3 [string, int, decimal, float, (), boolean, anydata, json, string...];
+
+type CustomTuple4 [string...];
+
+type CustomTuple5 [string, int, decimal, float, (), boolean, anydata, json, anydata...];
+
+type CustomTuple6 [anydata...];
+
+type CustomTuple7 [int, string, boolean, (), float, decimal, json, anydata, string...];
+
+type CustomTuple8 [int, string, boolean, (), float, decimal, json, anydata, int...];
+
+type IntegerArray1 int[];
+
+type IntegerArray2 int[2];
+
+type IntegerArray3 int[];
+
+type IntegerArray4 int[2];
+
+type IntegerArray5 int[3];
+
+type IntegerArray6 int[4];
+
+type StringArray string[];
+
+type NillableStringArray string?[];
+
+type NillableIntOrUnionStringArray (int|string?)[];
+
+type StringArray1 string[];
+
+type StringArray2 string[2];
+
+type StringArray3 string[];
+
+type StringArray4 string[2];
+
+type StringArray5 string[3];
+
+type StringArray6 string[4];
+
+type FloatArray1 float[];
+
+type FloatArray2 float[2];
+
+type FloatArray3 float[];
+
+type FloatArray4 float[2];
+
+type FloatArray5 float[3];
+
+type FloatArray6 float[4];
+
+type DecimalArray1 decimal[];
+
+type DecimalArray2 decimal[2];
+
+type DecimalArray3 decimal[];
+
+type DecimalArray4 decimal[2];
+
+type DecimalArray5 decimal[3];
+
+type DecimalArray6 decimal[4];
+
+type BooleanArray boolean[];
+
+type NillableBooleanArray boolean?[];
+
+type NillableIntOrUnionBooleanArray (int|boolean?)[];
+
+type BooleanArray2 boolean[2];
+
+type BooleanArray3 boolean[3];
+
+type BooleanArray4 boolean[];
+
+type BooleanArray5 boolean[2];
+
+type BooleanArray6 boolean[4];
+
+type NilArray1 ()[];
+
+type NilArray2 ()[2];
+
+type NilArray3 ()[];
+
+type NilArray4 ()[2];
+
+type NilArray5 ()[3];
+
+type NilArray6 ()[4];
+
+type JsonArray1 json[];
+
+type JsonArray2 json[2];
+
+type JsonArray3 json[];
+
+type JsonArray4 json[2];
+
+type JsonArray5 json[3];
+
+type JsonArray6 json[4];
+
+type AnydataArray1 anydata[];
+
+type AnydataArray2 anydata[2];
+
+type AnydataArray3 anydata[];
+
+type AnydataArray4 anydata[2];
+
+type AnydataArray5 anydata[3];
+
+type AnydataArray6 anydata[4];
+
+type CustomArray1 CustomTuple2[];
+
+type CustomArray2 CustomTuple2[2];
+
+type CustomArray3 CustomTuple2[];
+
+type CustomArray4 CustomTuple2[2];
+
+type CustomArray5 CustomTuple2[3];
+
+type CustomArray6 CustomTuple2[4];
+
+type IntegerMap map;
+
+type StringMap map;
+
+type NillableIntUnionStringMap map;
+
+type IntUnionStringMap map;
+
+type DecimalMap map;
+
+type FloatMap map;
+
+type BooleanMap map;
+
+type NillableBooleanMap map;
+
+type NillableIntUnionBooleanMap map;
+
+type IntUnionBooleanMap map;
+
+type NilMap map<()>;
+
+type JsonMap map;
+
+type AnydataMap map;
+
+type CustomMap map;
+
+type BooleanRecord1Array BooleanRecord1[];
+
+type ClosedBooleanRecord1Array BooleanRecord1[3];
+
+type BooleanRecord2Array BooleanRecord2[];
+
+type ClosedBooleanRecord2Array BooleanRecord2[3];
+
+type BooleanRecord3Array BooleanRecord3[];
+
+type ClosedBooleanRecord3Array BooleanRecord3[3];
+
+type BooleanRecord4Array BooleanRecord4[];
+
+type ClosedBooleanRecord4Array BooleanRecord4[3];
+
+type BooleanRecord5Array BooleanRecord5[];
+
+type ClosedBooleanRecord5Array BooleanRecord5[3];
+
+type BooleanRecord6Array BooleanRecord6[];
+
+type ClosedBooleanRecord6Array BooleanRecord6[3];
+
+type BooleanRecord7Array BooleanRecord7[];
+
+type ClosedBooleanRecord7Array BooleanRecord7[3];
+
+type BooleanRecord8Array BooleanRecord8[];
+
+type ClosedBooleanRecord8Array BooleanRecord8[3];
+
+type BooleanRecord9Array BooleanRecord9[];
+
+type ClosedBooleanRecord9Array BooleanRecord9[3];
+
+type BooleanRecord10Array BooleanRecord10[];
+
+type ClosedBooleanRecord10Array BooleanRecord10[3];
+
+type BooleanRecord11Array BooleanRecord11[];
+
+type ClosedBooleanRecord11Array BooleanRecord11[3];
+
+type BooleanRecord12Array BooleanRecord12[];
+
+type ClosedBooleanRecord12Array BooleanRecord12[3];
+
+type BooleanRecord13Array BooleanRecord13[];
+
+type ClosedBooleanRecord13Array BooleanRecord13[3];
+
+type BooleanRecord14Array BooleanRecord14[];
+
+type ClosedBooleanRecord14Array BooleanRecord14[3];
+
+type BooleanRecord15Array BooleanRecord15[];
+
+type ClosedBooleanRecord15Array BooleanRecord15[3];
+
+type BooleanRecord16Array BooleanRecord16[];
+
+type ClosedBooleanRecord16Array BooleanRecord16[3];
+
+type BooleanRecord17Array BooleanRecord17[];
+
+type ClosedBooleanRecord17Array BooleanRecord17[3];
+
+type BooleanRecord18Array BooleanRecord18[];
+
+type ClosedBooleanRecord18Array BooleanRecord18[3];
+
+type NilRecord1Array NilRecord1[];
+
+type ClosedNilRecord1Array NilRecord1[3];
+
+type NilRecord2Array NilRecord2[];
+
+type ClosedNilRecord2Array NilRecord2[3];
+
+type NilRecord3Array NilRecord3[];
+
+type ClosedNilRecord3Array NilRecord3[3];
+
+type NilRecord4Array NilRecord4[];
+
+type ClosedNilRecord4Array NilRecord4[3];
+
+type NilRecord5Array NilRecord5[];
+
+type ClosedNilRecord5Array NilRecord5[3];
+
+type NilRecord6Array NilRecord6[];
+
+type ClosedNilRecord6Array NilRecord6[3];
+
+type NilRecord7Array NilRecord7[];
+
+type ClosedNilRecord7Array NilRecord7[3];
+
+type NilRecord8Array NilRecord8[];
+
+type ClosedNilRecord8Array NilRecord8[3];
+
+type NilRecord9Array NilRecord9[];
+
+type ClosedNilRecord9Array NilRecord9[3];
+
+type NilRecord10Array NilRecord10[];
+
+type ClosedNilRecord10Array NilRecord10[3];
+
+type NilRecord11Array NilRecord11[];
+
+type ClosedNilRecord11Array NilRecord11[3];
+
+type NilRecord12Array NilRecord12[];
+
+type ClosedNilRecord12Array NilRecord12[3];
+
+type NilRecord13Array NilRecord13[];
+
+type ClosedNilRecord13Array NilRecord13[3];
+
+type NilRecord14Array NilRecord14[];
+
+type ClosedNilRecord14Array NilRecord14[3];
+
+type IntegerRecord1Array IntegerRecord1[];
+
+type ClosedIntegerRecord1Array IntegerRecord1[3];
+
+type IntegerRecord2Array IntegerRecord2[];
+
+type ClosedIntegerRecord2Array IntegerRecord2[3];
+
+type IntegerRecord3Array IntegerRecord3[];
+
+type ClosedIntegerRecord3Array IntegerRecord3[3];
+
+type IntegerRecord4Array IntegerRecord4[];
+
+type ClosedIntegerRecord4Array IntegerRecord4[3];
+
+type IntegerRecord5Array IntegerRecord5[];
+
+type ClosedIntegerRecord5Array IntegerRecord5[3];
+
+type IntegerRecord6Array IntegerRecord6[];
+
+type ClosedIntegerRecord6Array IntegerRecord6[3];
+
+type IntegerRecord7Array IntegerRecord7[];
+
+type ClosedIntegerRecord7Array IntegerRecord7[3];
+
+type IntegerRecord8Array IntegerRecord8[];
+
+type ClosedIntegerRecord8Array IntegerRecord8[3];
+
+type IntegerRecord9Array IntegerRecord9[];
+
+type ClosedIntegerRecord9Array IntegerRecord9[3];
+
+type IntegerRecord10Array IntegerRecord10[];
+
+type ClosedIntegerRecord10Array IntegerRecord10[3];
+
+type IntegerRecord11Array IntegerRecord11[];
+
+type ClosedIntegerRecord11Array IntegerRecord11[3];
+
+type IntegerRecord12Array IntegerRecord12[];
+
+type ClosedIntegerRecord12Array IntegerRecord12[3];
+
+type IntegerRecord13Array IntegerRecord13[];
+
+type ClosedIntegerRecord13Array IntegerRecord13[3];
+
+type IntegerRecord14Array IntegerRecord14[];
+
+type ClosedIntegerRecord14Array IntegerRecord14[3];
+
+type FloatRecord1Array FloatRecord1[];
+
+type ClosedFloatRecord1Array FloatRecord1[3];
+
+type FloatRecord2Array FloatRecord2[];
+
+type ClosedFloatRecord2Array FloatRecord2[3];
+
+type FloatRecord3Array FloatRecord3[];
+
+type ClosedFloatRecord3Array FloatRecord3[3];
+
+type FloatRecord4Array FloatRecord4[];
+
+type ClosedFloatRecord4Array FloatRecord4[3];
+
+type FloatRecord5Array FloatRecord5[];
+
+type ClosedFloatRecord5Array FloatRecord5[3];
+
+type FloatRecord6Array FloatRecord6[];
+
+type ClosedFloatRecord6Array FloatRecord6[3];
+
+type FloatRecord7Array FloatRecord7[];
+
+type ClosedFloatRecord7Array FloatRecord7[3];
+
+type FloatRecord8Array FloatRecord8[];
+
+type ClosedFloatRecord8Array FloatRecord8[3];
+
+type FloatRecord9Array FloatRecord9[];
+
+type ClosedFloatRecord9Array FloatRecord9[3];
+
+type FloatRecord10Array FloatRecord10[];
+
+type ClosedFloatRecord10Array FloatRecord10[3];
+
+type FloatRecord11Array FloatRecord11[];
+
+type ClosedFloatRecord11Array FloatRecord11[3];
+
+type FloatRecord12Array FloatRecord12[];
+
+type ClosedFloatRecord12Array FloatRecord12[3];
+
+type FloatRecord13Array FloatRecord13[];
+
+type ClosedFloatRecord13Array FloatRecord13[3];
+
+type FloatRecord14Array FloatRecord14[];
+
+type ClosedFloatRecord14Array FloatRecord14[3];
+
+type DecimalRecord1Array DecimalRecord1[];
+
+type ClosedDecimalRecord1Array DecimalRecord1[3];
+
+type DecimalRecord2Array DecimalRecord2[];
+
+type ClosedDecimalRecord2Array DecimalRecord2[3];
+
+type DecimalRecord3Array DecimalRecord3[];
+
+type ClosedDecimalRecord3Array DecimalRecord3[3];
+
+type DecimalRecord4Array DecimalRecord4[];
+
+type ClosedDecimalRecord4Array DecimalRecord4[3];
+
+type DecimalRecord5Array DecimalRecord5[];
+
+type ClosedDecimalRecord5Array DecimalRecord5[3];
+
+type DecimalRecord6Array DecimalRecord6[];
+
+type ClosedDecimalRecord6Array DecimalRecord6[3];
+
+type DecimalRecord7Array DecimalRecord7[];
+
+type ClosedDecimalRecord7Array DecimalRecord7[3];
+
+type DecimalRecord8Array DecimalRecord8[];
+
+type ClosedDecimalRecord8Array DecimalRecord8[3];
+
+type DecimalRecord9Array DecimalRecord9[];
+
+type ClosedDecimalRecord9Array DecimalRecord9[3];
+
+type DecimalRecord10Array DecimalRecord10[];
+
+type ClosedDecimalRecord10Array DecimalRecord10[3];
+
+type DecimalRecord11Array DecimalRecord11[];
+
+type ClosedDecimalRecord11Array DecimalRecord11[3];
+
+type DecimalRecord12Array DecimalRecord12[];
+
+type ClosedDecimalRecord12Array DecimalRecord12[3];
+
+type DecimalRecord13Array DecimalRecord13[];
+
+type ClosedDecimalRecord13Array DecimalRecord13[3];
+
+type DecimalRecord14Array DecimalRecord14[];
+
+type ClosedDecimalRecord14Array DecimalRecord14[3];
+
+type StringRecord1Array StringRecord1[];
+
+type ClosedStringRecord1Array StringRecord1[3];
+
+type StringRecord2Array StringRecord2[];
+
+type ClosedStringRecord2Array StringRecord2[3];
+
+type StringRecord3Array StringRecord3[];
+
+type ClosedStringRecord3Array StringRecord3[3];
+
+type StringRecord4Array StringRecord4[];
+
+type ClosedStringRecord4Array StringRecord4[3];
+
+type StringRecord5Array StringRecord5[];
+
+type ClosedStringRecord5Array StringRecord5[3];
+
+type StringRecord6Array StringRecord6[];
+
+type ClosedStringRecord6Array StringRecord6[3];
+
+type StringRecord7Array StringRecord7[];
+
+type ClosedStringRecord7Array StringRecord7[3];
+
+type StringRecord8Array StringRecord8[];
+
+type ClosedStringRecord8Array StringRecord8[3];
+
+type StringRecord9Array StringRecord9[];
+
+type ClosedStringRecord9Array StringRecord9[3];
+
+type StringRecord10Array StringRecord10[];
+
+type ClosedStringRecord10Array StringRecord10[3];
+
+type StringRecord11Array StringRecord11[];
+
+type ClosedStringRecord11Array StringRecord11[3];
+
+type StringRecord12Array StringRecord12[];
+
+type ClosedStringRecord12Array StringRecord12[3];
+
+type StringRecord13Array StringRecord13[];
+
+type ClosedStringRecord13Array StringRecord13[3];
+
+type StringRecord14Array StringRecord14[];
+
+type ClosedStringRecord14Array StringRecord14[3];
+
+type StringRecord15Array StringRecord15[];
+
+type StringRecord16Array StringRecord16[];
+
+type StringRecord17Array StringRecord17[];
+
+type StringRecord18Array StringRecord18[];
+
+type StringRecord19Array StringRecord19[];
+
+type StringRecord20Array StringRecord20[];
+
+type StringRecord21Array StringRecord21[];
+
+type StringRecord22Array StringRecord22[];
+
+type StringRecord23Array StringRecord23[];
+
+type JsonRecord1Array JsonRecord1[];
+
+type ClosedJsonRecord1Array JsonRecord1[3];
+
+type JsonRecord2Array JsonRecord2[];
+
+type ClosedJsonRecord2Array JsonRecord2[3];
+
+type JsonRecord3Array JsonRecord3[];
+
+type ClosedJsonRecord3Array JsonRecord3[3];
+
+type JsonRecord4Array JsonRecord4[];
+
+type ClosedJsonRecord4Array JsonRecord4[3];
+
+type JsonRecord5Array JsonRecord5[];
+
+type ClosedJsonRecord5Array JsonRecord5[3];
+
+type JsonRecord6Array JsonRecord6[];
+
+type ClosedJsonRecord6Array JsonRecord6[3];
+
+type JsonRecord7Array JsonRecord7[];
+
+type ClosedJsonRecord7Array JsonRecord7[3];
+
+type JsonRecord8Array JsonRecord8[];
+
+type ClosedJsonRecord8Array JsonRecord8[3];
+
+type JsonRecord9Array JsonRecord9[];
+
+type ClosedJsonRecord9Array JsonRecord9[3];
+
+type JsonRecord10Array JsonRecord10[];
+
+type ClosedJsonRecord10Array JsonRecord10[3];
+
+type JsonRecord11Array JsonRecord11[];
+
+type ClosedJsonRecord11Array JsonRecord11[3];
+
+type JsonRecord12Array JsonRecord12[];
+
+type ClosedJsonRecord12Array JsonRecord12[3];
+
+type JsonRecord13Array JsonRecord13[];
+
+type ClosedJsonRecord13Array JsonRecord13[3];
+
+type JsonRecord14Array JsonRecord14[];
+
+type ClosedJsonRecord14Array JsonRecord14[3];
+
+type AnydataRecord1Array AnydataRecord1[];
+
+type ClosedAnydataRecord1Array AnydataRecord1[3];
+
+type AnydataRecord2Array AnydataRecord2[];
+
+type ClosedAnydataRecord2Array AnydataRecord2[3];
+
+type AnydataRecord3Array AnydataRecord3[];
+
+type ClosedAnydataRecord3Array AnydataRecord3[3];
+
+type AnydataRecord4Array AnydataRecord4[];
+
+type ClosedAnydataRecord4Array AnydataRecord4[3];
+
+type AnydataRecord5Array AnydataRecord5[];
+
+type ClosedAnydataRecord5Array AnydataRecord5[3];
+
+type AnydataRecord6Array AnydataRecord6[];
+
+type ClosedAnydataRecord6Array AnydataRecord6[3];
+
+type AnydataRecord7Array AnydataRecord7[];
+
+type ClosedAnydataRecord7Array AnydataRecord7[3];
+
+type AnydataRecord8Array AnydataRecord8[];
+
+type ClosedAnydataRecord8Array AnydataRecord8[3];
+
+type AnydataRecord9Array AnydataRecord9[];
+
+type ClosedAnydataRecord9Array AnydataRecord9[3];
+
+type AnydataRecord10Array AnydataRecord10[];
+
+type ClosedAnydataRecord10Array AnydataRecord10[3];
+
+type AnydataRecord11Array AnydataRecord11[];
+
+type ClosedAnydataRecord11Array AnydataRecord11[3];
+
+type AnydataRecord12Array AnydataRecord12[];
+
+type ClosedAnydataRecord12Array AnydataRecord12[3];
+
+type AnydataRecord13Array AnydataRecord13[];
+
+type ClosedAnydataRecord13Array AnydataRecord13[3];
+
+type AnydataRecord14Array AnydataRecord14[];
+
+type ClosedAnydataRecord14Array AnydataRecord14[3];
+
+type CustomRecord1Array CustomRecord1[];
+
+type ClosedCustomRecord1Array CustomRecord1[3];
+
+type CustomRecord2Array CustomRecord2[];
+
+type ClosedCustomRecord2Array CustomRecord2[3];
+
+type CustomRecord3Array CustomRecord3[];
+
+type ClosedCustomRecord3Array CustomRecord3[3];
+
+type CustomRecord4Array CustomRecord4[];
+
+type ClosedCustomRecord4Array CustomRecord4[3];
+
+type CustomRecord5Array CustomRecord5[];
+
+type ClosedCustomRecord5Array CustomRecord5[3];
+
+type CustomRecord6Array CustomRecord6[];
+
+type ClosedCustomRecord6Array CustomRecord6[3];
+
+type CustomRecord7Array CustomRecord7[];
+
+type ClosedCustomRecord7Array CustomRecord7[3];
+
+type CustomRecord8Array CustomRecord8[];
+
+type ClosedCustomRecord8Array CustomRecord8[3];
+
+type CustomRecord9Array CustomRecord9[];
+
+type ClosedCustomRecord9Array CustomRecord9[3];
+
+type CustomRecord10Array CustomRecord10[];
+
+type ClosedCustomRecord10Array CustomRecord10[3];
+
+type CustomRecord11Array CustomRecord11[];
+
+type ClosedCustomRecord11Array CustomRecord11[3];
+
+type CustomRecord12Array CustomRecord12[];
+
+type ClosedCustomRecord12Array CustomRecord12[3];
+
+type CustomRecord13Array CustomRecord13[];
+
+type ClosedCustomRecord13Array CustomRecord13[3];
+
+type CustomRecord14Array CustomRecord14[];
+
+type ClosedCustomRecord14Array CustomRecord14[3];
+
+type CustomRecord15Array CustomRecord15[];
+
+type CustomRecord16Array CustomRecord16[];
+
+type CustomRecord17Array CustomRecord17[];
+
+type CustomRecord18Array CustomRecord18[];
+
+type CustomRecord19Array CustomRecord19[];
+
+type CustomRecord20Array CustomRecord20[];
+
+type CustomRecord21Array CustomRecord21[];
+
+type CustomRecord22Array CustomRecord22[];
+
+type CustomRecord23Array CustomRecord23[];
+
+type CustomRecord24Array CustomRecord24[];
+
+type CustomRecord25Array CustomRecord25[];
+
+type CustomRecord26Array CustomRecord26[];
+
+type CustomRecord27Array CustomRecord27[];
+type CustomRecord28Array CustomRecord28[];
+type CustomRecord29Array CustomRecord29[];
+type CustomRecord30Array CustomRecord30[];
+type CustomRecord31Array CustomRecord31[];
+type CustomRecord32Array CustomRecord32[];
+type CustomRecord33Array CustomRecord33[];
+type CustomRecord34Array CustomRecord34[];
+type CustomRecord35Array CustomRecord35[];
+type CustomRecord36Array CustomRecord36[];
+type CustomRecord37Array CustomRecord37[];
+type CustomRecord38Array CustomRecord38[];
+type CustomRecord39Array CustomRecord39[];
+type CustomRecord40Array CustomRecord40[];
+type CustomRecord41Array CustomRecord41[];
+type CustomRecord42Array CustomRecord42[];
+type CustomRecord43Array CustomRecord43[];
+type CustomRecord44Array CustomRecord44[];
+type CustomRecord45Array CustomRecord45[];
+type CustomRecord46Array CustomRecord46[];
+type CustomRecord47Array CustomRecord47[];
+type CustomRecord48Array CustomRecord48[];
+type CustomRecord49Array CustomRecord49[];
+type CustomRecord50Array CustomRecord50[];
+type CustomRecord51Array CustomRecord51[];
+type CustomRecord52Array CustomRecord52[];
+type CustomRecord53Array CustomRecord53[];
+type CustomRecord54Array CustomRecord54[];
+type CustomRecord55Array CustomRecord55[];
+type CustomRecord56Array CustomRecord56[];
+
+type BooleanTuple1Array BooleanTuple1[];
+
+type ClosedBooleanTuple1Array BooleanTuple1[3];
+
+type BooleanTuple2Array BooleanTuple2[];
+
+type ClosedBooleanTuple2Array BooleanTuple2[3];
+
+type BooleanTuple3Array BooleanTuple3[];
+
+type ClosedBooleanTuple3Array BooleanTuple3[3];
+
+type BooleanTuple4Array BooleanTuple4[];
+
+type ClosedBooleanTuple4Array BooleanTuple4[3];
+
+type NillableBooleanTuple5Array NillableBooleanTuple5[];
+
+type NillableBooleanTuple6Array NillableBooleanTuple6[];
+
+type NillableBooleanTuple7Array NillableBooleanTuple7[];
+
+type NillableBooleanTuple8Array NillableBooleanTuple8[];
+
+type NillableIntBooleanTuple9Array NillableIntBooleanTuple9[];
+
+type NilTuple1Array NilTuple1[];
+
+type ClosedNilTuple1Array NilTuple1[3];
+
+type NilTuple2Array NilTuple2[];
+
+type ClosedNilTuple2Array NilTuple2[3];
+
+type NilTuple3Array NilTuple3[];
+
+type ClosedNilTuple3Array NilTuple3[3];
+
+type NilTuple4Array NilTuple4[];
+
+type ClosedNilTuple4Array NilTuple4[3];
+
+type IntegerTuple1Array IntegerTuple1[];
+
+type ClosedIntegerTuple1Array IntegerTuple1[3];
+
+type IntegerTuple2Array IntegerTuple2[];
+
+type ClosedIntegerTuple2Array IntegerTuple2[3];
+
+type IntegerTuple3Array IntegerTuple3[];
+
+type ClosedIntegerTuple3Array IntegerTuple3[3];
+
+type IntegerTuple4Array IntegerTuple4[];
+
+type ClosedIntegerTuple4Array IntegerTuple4[3];
+
+type FloatTuple1Array FloatTuple1[];
+
+type ClosedFloatTuple1Array FloatTuple1[3];
+
+type FloatTuple2Array FloatTuple2[];
+
+type ClosedFloatTuple2Array FloatTuple2[3];
+
+type FloatTuple3Array FloatTuple3[];
+
+type ClosedFloatTuple3Array FloatTuple3[3];
+
+type FloatTuple4Array FloatTuple4[];
+
+type ClosedFloatTuple4Array FloatTuple4[3];
+
+type DecimalTuple1Array DecimalTuple1[];
+
+type ClosedDecimalTuple1Array DecimalTuple1[3];
+
+type DecimalTuple2Array DecimalTuple2[];
+
+type ClosedDecimalTuple2Array DecimalTuple2[3];
+
+type DecimalTuple3Array DecimalTuple3[];
+
+type ClosedDecimalTuple3Array DecimalTuple3[3];
+
+type DecimalTuple4Array DecimalTuple4[];
+
+type ClosedDecimalTuple4Array DecimalTuple4[3];
+
+type StringTuple1Array StringTuple1[];
+
+type ClosedStringTuple1Array StringTuple1[3];
+
+type StringTuple2Array StringTuple2[];
+
+type ClosedStringTuple2Array StringTuple2[3];
+
+type StringTuple3Array StringTuple3[];
+
+type ClosedStringTuple3Array StringTuple3[3];
+
+type StringTuple4Array StringTuple4[];
+
+type ClosedStringTuple4Array StringTuple4[3];
+
+type AnydataTuple1Array AnydataTuple1[];
+
+type ClosedAnydataTuple1Array AnydataTuple1[3];
+
+type AnydataTuple2Array AnydataTuple2[];
+
+type ClosedAnydataTuple2Array AnydataTuple2[3];
+
+type AnydataTuple3Array AnydataTuple3[];
+
+type ClosedAnydataTuple3Array AnydataTuple3[3];
+
+type AnydataTuple4Array AnydataTuple4[];
+
+type ClosedAnydataTuple4Array AnydataTuple4[3];
+
+type JsonTuple1Array JsonTuple1[];
+
+type ClosedJsonTuple1Array JsonTuple1[3];
+
+type JsonTuple2Array JsonTuple2[];
+
+type ClosedJsonTuple2Array JsonTuple2[3];
+
+type JsonTuple3Array JsonTuple3[];
+
+type ClosedJsonTuple3Array JsonTuple3[3];
+
+type JsonTuple4Array JsonTuple4[];
+
+type ClosedJsonTuple4Array JsonTuple4[3];
+
+type CustomTuple1Array CustomTuple1[];
+
+type ClosedCustomTuple1Array CustomTuple1[3];
+
+type CustomTuple2Array CustomTuple2[];
+
+type ClosedCustomTuple2Array CustomTuple2[3];
+
+type CustomTuple3Array CustomTuple3[];
+
+type ClosedCustomTuple3Array CustomTuple3[3];
+
+type CustomTuple4Array CustomTuple4[];
+
+type ClosedCustomTuple4Array CustomTuple4[3];
+
+type CustomTuple5Array CustomTuple5[];
+
+type ClosedCustomTuple5Array CustomTuple5[3];
+
+type CustomTuple6Array CustomTuple6[];
+
+type CustomTuple7Array CustomTuple7[];
+
+type CustomTuple8Array CustomTuple8[];
+
+type ClosedCustomTuple6Array CustomTuple6[3];
+
+type IntegerArray1Array IntegerArray1[];
+
+type ClosedIntegerArray1Array IntegerArray1[3];
+
+type IntegerArray2Array IntegerArray2[];
+
+type ClosedIntegerArray2Array IntegerArray2[3];
+
+type IntegerArray3Array IntegerArray3[];
+
+type ClosedIntegerArray3Array IntegerArray3[3];
+
+type IntegerArray4Array IntegerArray4[];
+
+type ClosedIntegerArray4Array IntegerArray4[3];
+
+type IntegerArray5Array IntegerArray5[];
+
+type ClosedIntegerArray5Array IntegerArray5[3];
+
+type IntegerArray6Array IntegerArray5[];
+
+type ClosedIntegerArray6Array IntegerArray5[3];
+
+type StringArray1Array StringArray1[];
+
+type StringArrayArray StringArray[];
+
+type NillableStringArrayArray NillableStringArray[];
+
+type NillableIntOrUnionStringArrayArray NillableIntOrUnionStringArray[];
+
+type ClosedStringArray1Array StringArray1[3];
+
+type StringArray2Array StringArray2[];
+
+type ClosedStringArray2Array StringArray2[3];
+
+type StringArray3Array StringArray3[];
+
+type ClosedStringArray3Array StringArray3[3];
+
+type StringArray4Array StringArray4[];
+
+type ClosedStringArray4Array StringArray4[3];
+
+type StringArray5Array StringArray5[];
+
+type ClosedStringArray5Array StringArray5[3];
+
+type StringArray6Array StringArray5[];
+
+type ClosedStringArray6Array StringArray5[3];
+
+type FloatArray1Array FloatArray1[];
+
+type ClosedFloatArray1Array FloatArray1[3];
+
+type FloatArray2Array FloatArray2[];
+
+type ClosedFloatArray2Array FloatArray2[3];
+
+type FloatArray3Array FloatArray3[];
+
+type ClosedFloatArray3Array FloatArray3[3];
+
+type FloatArray4Array FloatArray4[];
+
+type ClosedFloatArray4Array FloatArray4[3];
+
+type FloatArray5Array FloatArray5[];
+
+type ClosedFloatArray5Array FloatArray5[3];
+
+type FloatArray6Array FloatArray5[];
+
+type ClosedFloatArray6Array FloatArray5[3];
+
+type DecimalArray1Array DecimalArray1[];
+
+type ClosedDecimalArray1Array DecimalArray1[3];
+
+type DecimalArray2Array DecimalArray2[];
+
+type ClosedDecimalArray2Array DecimalArray2[3];
+
+type DecimalArray3Array DecimalArray3[];
+
+type ClosedDecimalArray3Array DecimalArray3[3];
+
+type DecimalArray4Array DecimalArray4[];
+
+type ClosedDecimalArray4Array DecimalArray4[3];
+
+type DecimalArray5Array DecimalArray5[];
+
+type ClosedDecimalArray5Array DecimalArray5[3];
+
+type DecimalArray6Array DecimalArray5[];
+
+type ClosedDecimalArray6Array DecimalArray5[3];
+
+type BooleanArrayArray BooleanArray[];
+
+type ClosedBooleanArrayArray BooleanArray[3];
+
+type NillableBooleanArrayArray NillableBooleanArray[];
+
+type NillableIntOrUnionBooleanArrayArray NillableIntOrUnionBooleanArray[];
+
+type BooleanArray2Array BooleanArray2[];
+
+type ClosedBooleanArray2Array BooleanArray2[3];
+
+type BooleanArray3Array BooleanArray3[];
+
+type ClosedBooleanArray3Array BooleanArray3[3];
+
+type BooleanArray4Array BooleanArray4[];
+
+type ClosedBooleanArray4Array BooleanArray4[3];
+
+type BooleanArray5Array BooleanArray5[];
+
+type ClosedBooleanArray5Array BooleanArray5[3];
+
+type BooleanArray6Array BooleanArray5[];
+
+type ClosedBooleanArray6Array BooleanArray5[3];
+
+type NilArray1Array NilArray1[];
+
+type ClosedNilArray1Array NilArray1[3];
+
+type NilArray2Array NilArray2[];
+
+type ClosedNilArray2Array NilArray2[3];
+
+type NilArray3Array NilArray3[];
+
+type ClosedNilArray3Array NilArray3[3];
+
+type NilArray4Array NilArray4[];
+
+type ClosedNilArray4Array NilArray4[3];
+
+type NilArray5Array NilArray5[];
+
+type ClosedNilArray5Array NilArray5[3];
+
+type NilArray6Array NilArray5[];
+
+type ClosedNilArray6Array NilArray5[3];
+
+type JsonArray1Array JsonArray1[];
+
+type ClosedJsonArray1Array JsonArray1[3];
+
+type JsonArray2Array JsonArray2[];
+
+type ClosedJsonArray2Array JsonArray2[3];
+
+type JsonArray3Array JsonArray3[];
+
+type ClosedJsonArray3Array JsonArray3[3];
+
+type JsonArray4Array JsonArray4[];
+
+type ClosedJsonArray4Array JsonArray4[3];
+
+type JsonArray5Array JsonArray5[];
+
+type ClosedJsonArray5Array JsonArray5[3];
+
+type JsonArray6Array JsonArray5[];
+
+type ClosedJsonArray6Array JsonArray5[3];
+
+type AnydataArray1Array AnydataArray1[];
+
+type ClosedAnydataArray1Array AnydataArray1[3];
+
+type AnydataArray2Array AnydataArray2[];
+
+type ClosedAnydataArray2Array AnydataArray2[3];
+
+type AnydataArray3Array AnydataArray3[];
+
+type ClosedAnydataArray3Array AnydataArray3[3];
+
+type AnydataArray4Array AnydataArray4[];
+
+type ClosedAnydataArray4Array AnydataArray4[3];
+
+type AnydataArray5Array AnydataArray5[];
+
+type ClosedAnydataArray5Array AnydataArray5[3];
+
+type AnydataArray6Array AnydataArray5[];
+
+type ClosedAnydataArray6Array AnydataArray5[3];
+
+type CustomArray1Array CustomArray1[];
+
+type ClosedCustomArray1Array CustomArray1[3];
+
+type CustomArray2Array CustomArray2[];
+
+type ClosedCustomArray2Array CustomArray2[3];
+
+type CustomArray3Array CustomArray3[];
+
+type ClosedCustomArray3Array CustomArray3[3];
+
+type CustomArray4Array CustomArray4[];
+
+type ClosedCustomArray4Array CustomArray4[3];
+
+type CustomArray5Array CustomArray5[];
+
+type ClosedCustomArray5Array CustomArray5[3];
+
+type CustomArray6Array CustomArray5[];
+
+type ClosedCustomArray6Array CustomArray5[3];
+
+type IntegerMapArray IntegerMap[];
+
+type ClosedIntegerMapArray IntegerMap[3];
+
+type StringMapArray StringMap[];
+
+type NillableIntUnionStringMapArray NillableIntUnionStringMap[];
+
+type IntUnionStringMapArray IntUnionStringMap[];
+
+type ClosedStringMapArray StringMap[3];
+
+type DecimalMapArray DecimalMap[];
+
+type ClosedDecimalMapArray DecimalMap[3];
+
+type FloatMapArray FloatMap[];
+
+type ClosedFloatMapArray FloatMap[3];
+
+type BooleanMapArray BooleanMap[];
+
+type NillableBooleanMapArray NillableBooleanMap[];
+
+type NillableIntUnionBooleanMapArray NillableIntUnionBooleanMap[];
+
+type IntUnionBooleanMapArray IntUnionBooleanMap[];
+
+type ClosedBooleanMapArray BooleanMap[3];
+
+type NilMapArray NilMap[];
+
+type ClosedNilMapArray NilMap[3];
+
+type JsonMapArray JsonMap[];
+
+type ClosedJsonMapArray JsonMap[3];
+
+type AnydataMapArray AnydataMap[];
+
+type ClosedAnydataMapArray AnydataMap[3];
+
+type CustomMapArray CustomMap[];
+
+type ClosedCustomMapArray CustomMap[3];
diff --git a/ballerina-tests/parse-string-array-types-tests/.gitignore b/ballerina-tests/parse-string-array-types-tests/.gitignore
new file mode 100644
index 0000000..d5fc29a
--- /dev/null
+++ b/ballerina-tests/parse-string-array-types-tests/.gitignore
@@ -0,0 +1,11 @@
+# Ballerina generates this directory during the compilation of a package.
+# It contains compiler-generated artifacts and the final executable if this is an application package.
+target/
+
+# Ballerina maintains the compiler-generated source code here.
+# Remove this if you want to commit generated sources.
+generated/
+
+# Contains configuration values used during development time.
+# See https://ballerina.io/learn/provide-values-to-configurable-variables/ for more details.
+Config.toml
diff --git a/ballerina-tests/parse-string-array-types-tests/Ballerina.toml b/ballerina-tests/parse-string-array-types-tests/Ballerina.toml
new file mode 100644
index 0000000..256e0d0
--- /dev/null
+++ b/ballerina-tests/parse-string-array-types-tests/Ballerina.toml
@@ -0,0 +1,13 @@
+[package]
+org = "ballerina"
+name = "parse_string_array_types_tests"
+version = "0.1.0"
+
+[[dependency]]
+org = "ballerina"
+name = "csv_commons"
+repository = "local"
+version = "0.1.0"
+
+[platform.java17]
+graalvmCompatible = true
diff --git a/ballerina-tests/parse-string-array-types-tests/Dependencies.toml b/ballerina-tests/parse-string-array-types-tests/Dependencies.toml
new file mode 100644
index 0000000..81c0d40
--- /dev/null
+++ b/ballerina-tests/parse-string-array-types-tests/Dependencies.toml
@@ -0,0 +1,98 @@
+# AUTO-GENERATED FILE. DO NOT MODIFY.
+
+# This file is auto-generated by Ballerina for managing dependency versions.
+# It should not be modified by hand.
+
+[ballerina]
+dependencies-toml-version = "2"
+distribution-version = "2201.9.0"
+
+[[package]]
+org = "ballerina"
+name = "csv_commons"
+version = "0.1.0"
+scope = "testOnly"
+modules = [
+ {org = "ballerina", packageName = "csv_commons", moduleName = "csv_commons"}
+]
+
+[[package]]
+org = "ballerina"
+name = "data.csv"
+version = "0.1.0"
+scope = "testOnly"
+dependencies = [
+ {org = "ballerina", name = "jballerina.java"}
+]
+modules = [
+ {org = "ballerina", packageName = "data.csv", moduleName = "data.csv"}
+]
+
+[[package]]
+org = "ballerina"
+name = "jballerina.java"
+version = "0.0.0"
+scope = "testOnly"
+
+[[package]]
+org = "ballerina"
+name = "lang.__internal"
+version = "0.0.0"
+scope = "testOnly"
+dependencies = [
+ {org = "ballerina", name = "jballerina.java"},
+ {org = "ballerina", name = "lang.object"}
+]
+
+[[package]]
+org = "ballerina"
+name = "lang.array"
+version = "0.0.0"
+scope = "testOnly"
+dependencies = [
+ {org = "ballerina", name = "jballerina.java"},
+ {org = "ballerina", name = "lang.__internal"}
+]
+
+[[package]]
+org = "ballerina"
+name = "lang.error"
+version = "0.0.0"
+scope = "testOnly"
+dependencies = [
+ {org = "ballerina", name = "jballerina.java"}
+]
+
+[[package]]
+org = "ballerina"
+name = "lang.object"
+version = "0.0.0"
+scope = "testOnly"
+
+[[package]]
+org = "ballerina"
+name = "parse_string_array_types_tests"
+version = "0.1.0"
+dependencies = [
+ {org = "ballerina", name = "csv_commons"},
+ {org = "ballerina", name = "data.csv"},
+ {org = "ballerina", name = "test"}
+]
+modules = [
+ {org = "ballerina", packageName = "parse_string_array_types_tests", moduleName = "parse_string_array_types_tests"}
+]
+
+[[package]]
+org = "ballerina"
+name = "test"
+version = "0.0.0"
+scope = "testOnly"
+dependencies = [
+ {org = "ballerina", name = "jballerina.java"},
+ {org = "ballerina", name = "lang.array"},
+ {org = "ballerina", name = "lang.error"}
+]
+modules = [
+ {org = "ballerina", packageName = "test", moduleName = "test"}
+]
+
diff --git a/ballerina-tests/parse-string-array-types-tests/tests/parse_string_to_array_test.bal b/ballerina-tests/parse-string-array-types-tests/tests/parse_string_to_array_test.bal
new file mode 100644
index 0000000..ce7d4c5
--- /dev/null
+++ b/ballerina-tests/parse-string-array-types-tests/tests/parse_string_to_array_test.bal
@@ -0,0 +1,436 @@
+import ballerina/csv_commons as common;
+import ballerina/data.csv as csv;
+import ballerina/test;
+
+@test:Config
+function testFromCsvStringWithTypeForStringAndArrayAsExpectedType() {
+ BooleanArrayArray|csv:Error cv1baa = csv:parseStringToList(csvStringWithBooleanValues1);
+ test:assertEquals(cv1baa, [
+ [true, false, true, false],
+ [true, false, true, false],
+ [true, false, true, false]
+ ]);
+
+ BooleanArrayArray|csv:Error cv2baa = csv:parseStringToList(csvStringWithBooleanValues2);
+ test:assertEquals(cv2baa, [
+ [true, false, true, false, true],
+ [true, false, true, false, true]
+ ]);
+
+ BooleanArrayArray|csv:Error cv3baa = csv:parseStringToList(csvStringWithBooleanValues3);
+ test:assertTrue(cv3baa is csv:Error);
+ test:assertEquals((cv3baa).message(), common:generateErrorMessageForInvalidCast("()", "boolean"));
+
+ BooleanArrayArray|csv:Error cv4baa = csv:parseStringToList(csvStringWithBooleanValues4);
+ test:assertTrue(cv4baa is csv:Error);
+ test:assertEquals((cv4baa).message(), common:generateErrorMessageForInvalidCast("()", "boolean"));
+
+ BooleanArrayArray|csv:Error cv5baa = csv:parseStringToList(csvStringWithBooleanValues5);
+ test:assertTrue(cv5baa is csv:Error);
+ test:assertEquals((cv5baa).message(), common:generateErrorMessageForInvalidCast("2", "boolean"));
+
+ BooleanArrayArray|csv:Error cv6baa = csv:parseStringToList(csvStringWithBooleanValues6);
+ test:assertTrue(cv6baa is csv:Error);
+ test:assertEquals((cv6baa).message(), common:generateErrorMessageForInvalidCast("()", "boolean"));
+
+ BooleanArrayArray|csv:Error cv7baa = csv:parseStringToList(csvStringWithBooleanValues7);
+ test:assertTrue(cv7baa is csv:Error);
+ test:assertEquals((cv7baa).message(), common:generateErrorMessageForInvalidCast("()", "boolean"));
+
+ NillableBooleanArrayArray|csv:Error cv1nbaa = csv:parseStringToList(csvStringWithBooleanValues1);
+ test:assertEquals(cv1nbaa, [
+ [true, false, true, false],
+ [true, false, true, false],
+ [true, false, true, false]
+ ]);
+
+ NillableBooleanArrayArray|csv:Error cv2nbaa = csv:parseStringToList(csvStringWithBooleanValues2);
+ test:assertEquals(cv2nbaa, [
+ [true, false, true, false, true],
+ [true, false, true, false, true]
+ ]);
+
+ NillableBooleanArrayArray|csv:Error cv3nbaa = csv:parseStringToList(csvStringWithBooleanValues3);
+ test:assertEquals(cv3nbaa, [
+ [true, false, true],
+ [true, false, ()],
+ [true, true, false]
+ ]);
+
+ NillableBooleanArrayArray|csv:Error cv4nbaa = csv:parseStringToList(csvStringWithBooleanValues4);
+ test:assertEquals(cv4nbaa, [
+ [true, (), (), false],
+ [true, (), (), false]
+ ]);
+
+ NillableBooleanArrayArray|csv:Error cv5nbaa = csv:parseStringToList(csvStringWithBooleanValues5);
+ test:assertTrue(cv5nbaa is csv:Error);
+ test:assertEquals((cv5nbaa).message(), common:generateErrorMessageForInvalidCast("2", "boolean?"));
+
+ NillableBooleanArrayArray|csv:Error cv6nbaa = csv:parseStringToList(csvStringWithBooleanValues6);
+ test:assertEquals(cv6nbaa, [
+ [(), ()]
+ ]);
+
+ NillableBooleanArrayArray|csv:Error cv7nbaa = csv:parseStringToList(csvStringWithBooleanValues7);
+ test:assertEquals(cv7nbaa, [
+ [b1, b2, (), b4]
+ ]);
+
+ NillableIntOrUnionBooleanArrayArray|csv:Error cv1niubaa = csv:parseStringToList(csvStringWithBooleanValues1);
+ test:assertEquals(cv1niubaa, [
+ [true, false, true, false],
+ [true, false, true, false],
+ [true, false, true, false]
+ ]);
+
+ NillableIntOrUnionBooleanArrayArray|csv:Error cv2niubaa = csv:parseStringToList(csvStringWithBooleanValues2);
+ test:assertEquals(cv2niubaa, [
+ [true, false, true, false, true],
+ [true, false, true, false, true]
+ ]);
+
+ NillableIntOrUnionBooleanArrayArray|csv:Error cv3niubaa = csv:parseStringToList(csvStringWithBooleanValues3);
+ test:assertEquals(cv3niubaa, [
+ [true, false, true],
+ [true, false, ()],
+ [true, true, false]
+ ]);
+
+ NillableIntOrUnionBooleanArrayArray|csv:Error cv4niubaa = csv:parseStringToList(csvStringWithBooleanValues4);
+ test:assertEquals(cv4niubaa, [
+ [true, (), (), false],
+ [true, (), (), false]
+ ]);
+
+ NillableIntOrUnionBooleanArrayArray|csv:Error cv5niubaa = csv:parseStringToList(csvStringWithBooleanValues5);
+ test:assertEquals(cv5niubaa, [
+ [true, false, true, 2],
+ [true, false, true, 3]
+ ]);
+}
+
+@test:Config
+function testFromCsvStringWithTypeForStringAndArrayAsExpectedType2() {
+ NillableIntOrUnionBooleanArrayArray|csv:Error cv6niubaa = csv:parseStringToList(csvStringWithBooleanValues6);
+ test:assertEquals(cv6niubaa, [
+ [(), ()]
+ ]);
+
+ NillableIntOrUnionBooleanArrayArray|csv:Error cv7niubaa = csv:parseStringToList(csvStringWithBooleanValues7);
+ test:assertEquals(cv7niubaa, [
+ [b1, b2, (), b4]
+ ]);
+
+ StringArray1Array|csv:Error cv1saa = csv:parseStringToList(csvStringWithBooleanValues1);
+ test:assertEquals(cv1saa, [
+ ["true", "false", "true", "false"],
+ ["true", "false", "true", "false"],
+ ["true", "false", "true", "false"]
+ ]);
+
+ StringArray1Array|csv:Error cv2saa = csv:parseStringToList(csvStringWithBooleanValues2);
+ test:assertEquals(cv2saa, [
+ ["true", "false", "true", "false", "true"],
+ ["true", "false", "true", "false", "true"]
+ ]);
+
+ StringArray1Array|csv:Error cv3saa = csv:parseStringToList(csvStringWithBooleanValues3);
+ test:assertEquals(cv3saa, [
+ ["true", "false", "true"],
+ ["TRUE", "FALSE", "()"],
+ ["true", "true", "FALSE"]
+ ]);
+
+ StringArray1Array|csv:Error cv4saa = csv:parseStringToList(csvStringWithBooleanValues4);
+ test:assertEquals(cv4saa, [
+ ["true", "()", "()", "false"],
+ ["true", "()", "null", "false"]
+ ]);
+
+ StringArray1Array|csv:Error cv5saa = csv:parseStringToList(csvStringWithBooleanValues5);
+ test:assertEquals(cv5saa, [
+ ["true", "false", "true", "2"],
+ ["true", "false", "true", "3"]
+ ]);
+
+ StringArray1Array|csv:Error cv6saa = csv:parseStringToList(csvStringWithBooleanValues6);
+ test:assertEquals(cv6saa, [
+ ["()", "()"]
+ ]);
+
+ StringArray1Array|csv:Error cv7saa = csv:parseStringToList(csvStringWithBooleanValues7);
+ test:assertEquals(cv7saa, [
+ ["true", "false", "()", "false"]
+ ]);
+
+ StringArray2Array|csv:Error cv1s2aa = csv:parseStringToList(csvStringWithBooleanValues1);
+ test:assertEquals(cv1s2aa, [
+ ["true", "false"],
+ ["true", "false"],
+ ["true", "false"]
+ ]);
+
+ StringArray2Array|csv:Error cv2s2aa = csv:parseStringToList(csvStringWithBooleanValues2);
+ test:assertEquals(cv2s2aa, [
+ ["true", "false"],
+ ["true", "false"]
+ ]);
+
+ StringArray2Array|csv:Error cv3s2aa = csv:parseStringToList(csvStringWithBooleanValues3);
+ test:assertEquals(cv3s2aa, [
+ ["true", "false"],
+ ["TRUE", "FALSE"],
+ ["true", "true"]
+ ]);
+
+ StringArray2Array|csv:Error cv4s2aa = csv:parseStringToList(csvStringWithBooleanValues4);
+ test:assertEquals(cv4s2aa, [
+ ["true", "()"],
+ ["true", "()"]
+ ]);
+
+ StringArray2Array|csv:Error cv5s2aa = csv:parseStringToList(csvStringWithBooleanValues5);
+ test:assertEquals(cv5s2aa, [
+ ["true", "false"],
+ ["true", "false"]
+ ]);
+
+ StringArray2Array|csv:Error cv6s2aa = csv:parseStringToList(csvStringWithBooleanValues6);
+ test:assertEquals(cv6s2aa, [
+ ["()", "()"]
+ ]);
+
+ StringArray2Array|csv:Error cv7s2aa = csv:parseStringToList(csvStringWithBooleanValues7);
+ test:assertEquals(cv7s2aa, [
+ ["true", "false"]
+ ]);
+
+ JsonArray1Array|csv:Error cv1jaa = csv:parseStringToList(csvStringWithBooleanValues1);
+ test:assertEquals(cv1jaa, [
+ [true, false, true, false],
+ [true, false, true, false],
+ [true, false, true, false]
+ ]);
+}
+
+@test:Config
+function testFromCsvStringWithTypeForStringAndArrayAsExpectedType3() {
+ JsonArray1Array|csv:Error cv2jaa = csv:parseStringToList(csvStringWithBooleanValues2);
+ test:assertEquals(cv2jaa, [
+ [true, false, true, false, true],
+ [true, false, true, false, true]
+ ]);
+
+ JsonArray1Array|csv:Error cv3jaa = csv:parseStringToList(csvStringWithBooleanValues3);
+ test:assertEquals(cv3jaa, [
+ [true, false, true],
+ [true, false, ()],
+ [true, true, false]
+ ]);
+
+ JsonArray1Array|csv:Error cv4jaa = csv:parseStringToList(csvStringWithBooleanValues4);
+ test:assertEquals(cv4jaa, [
+ [true, (), (), false],
+ [true, (), (), false]
+ ]);
+
+ JsonArray1Array|csv:Error cv5jaa = csv:parseStringToList(csvStringWithBooleanValues5);
+ test:assertEquals(cv5jaa, [
+ [true, false, true, 2],
+ [true, false, true, 3]
+ ]);
+
+ JsonArray1Array|csv:Error cv6jaa = csv:parseStringToList(csvStringWithBooleanValues6);
+ test:assertEquals(cv6jaa, [
+ [(), ()]
+ ]);
+
+ JsonArray1Array|csv:Error cv7jaa = csv:parseStringToList(csvStringWithBooleanValues7);
+ test:assertEquals(cv7jaa, [
+ [b1, b2, (), b4]
+ ]);
+
+ AnydataArray1Array|csv:Error cv1anydaa = csv:parseStringToList(csvStringWithBooleanValues1);
+ test:assertEquals(cv1anydaa, [
+ [true, false, true, false],
+ [true, false, true, false],
+ [true, false, true, false]
+ ]);
+
+ AnydataArray1Array|csv:Error cv2anydaa = csv:parseStringToList(csvStringWithBooleanValues2);
+ test:assertEquals(cv2anydaa, [
+ [true, false, true, false, true],
+ [true, false, true, false, true]
+ ]);
+
+ AnydataArray1Array|csv:Error cv3anydaa = csv:parseStringToList(csvStringWithBooleanValues3);
+ test:assertEquals(cv3anydaa, [
+ [true, false, true],
+ [true, false, ()],
+ [true, true, false]
+ ]);
+
+ AnydataArray1Array|csv:Error cv4anydaa = csv:parseStringToList(csvStringWithBooleanValues4);
+ test:assertEquals(cv4anydaa, [
+ [true, (), (), false],
+ [true, (), (), false]
+ ]);
+
+ AnydataArray1Array|csv:Error cv5anydaa = csv:parseStringToList(csvStringWithBooleanValues5);
+ test:assertEquals(cv5anydaa, [
+ [true, false, true, 2],
+ [true, false, true, 3]
+ ]);
+
+ AnydataArray1Array|csv:Error cv6anydaa = csv:parseStringToList(csvStringWithBooleanValues6);
+ test:assertEquals(cv6anydaa, [
+ [(), ()]
+ ]);
+
+ AnydataArray1Array|csv:Error cv7anydaa = csv:parseStringToList(csvStringWithBooleanValues7);
+ test:assertEquals(cv7anydaa, [
+ [b1, b2, (), b4]
+ ]);
+
+ DecimalArray1Array|csv:Error cv1daa = csv:parseStringToList(csvStringWithBooleanValues1);
+ test:assertTrue(cv1daa is csv:Error);
+ test:assertEquals((cv1daa).message(), common:generateErrorMessageForInvalidCast("true", "decimal"));
+
+ DecimalArray1Array|csv:Error cv3daa = csv:parseStringToList(csvStringWithBooleanValues3);
+ test:assertTrue(cv3daa is csv:Error);
+ test:assertEquals((cv3daa).message(), common:generateErrorMessageForInvalidCast("true", "decimal"));
+
+ DecimalArray1Array|csv:Error cv6daa = csv:parseStringToList(csvStringWithBooleanValues6);
+ test:assertTrue(cv6daa is csv:Error);
+ test:assertEquals((cv6daa).message(), common:generateErrorMessageForInvalidCast("()", "decimal"));
+
+ DecimalArray1Array|csv:Error cv7daa = csv:parseStringToList(csvStringWithBooleanValues7);
+ test:assertTrue(cv7daa is csv:Error);
+ test:assertEquals((cv7daa).message(), common:generateErrorMessageForInvalidCast("true", "decimal"));
+}
+
+@test:Config
+function testArrayIndexes() {
+ string csv = string `a, b
+ 1, 2
+ 3, 4
+ 5, 6
+ 7, 8`;
+
+ string csv2 = string `a, b
+ 1, 2, 3
+ 3, 4, 5
+ 5, 6, 7
+ 7, 8, 9`;
+
+ record {}[2]|error rec = csv:parseStringToRecord(csv);
+ test:assertEquals(rec, [
+ {a: 1, b: 2},
+ {a: 3, b: 4}
+ ]);
+
+ map[2]|error rec_2 = csv:parseStringToRecord(csv);
+ test:assertEquals(rec_2, [
+ {a: 1, b: 2},
+ {a: 3, b: 4}
+ ]);
+
+ record {|int a;|}[2]|error rec2 = csv:parseStringToRecord(csv, {skipLines: [2]});
+ test:assertEquals(rec2, [
+ {a: 1},
+ {a: 5}
+ ]);
+
+ record {|int a;|}[5]|error rec2_2 = csv:parseStringToRecord(csv, {skipLines: [2]});
+ test:assertTrue(rec2_2 is csv:Error);
+
+ int[][2]|error rec3 = csv:parseStringToList(csv2);
+ test:assertEquals(rec3, [
+ [1, 2],
+ [3, 4],
+ [5, 6],
+ [7, 8]
+ ]);
+
+ [int, int][2]|error rec3_2 = csv:parseStringToList(csv2);
+ test:assertEquals(rec3_2, [
+ [1, 2],
+ [3, 4]
+ ]);
+
+ [int...][2]|error rec3_3 = csv:parseStringToList(csv2);
+ test:assertEquals(rec3_3, [
+ [1, 2, 3],
+ [3, 4, 5]
+ ]);
+
+ int[1][2]|error rec4 = csv:parseStringToList(csv2, {skipLines: [2]});
+ test:assertEquals(rec4, [
+ [1, 2]
+ ]);
+
+ int[2][]|error rec5 = csv:parseStringToList(csv2);
+ test:assertEquals(rec5, [
+ [1, 2, 3],
+ [3, 4, 5]
+ ]);
+}
+
+@test:Config
+function testArrayIndexes2() {
+ map[] csv = [{a: 1, b: 2}, {a: 3, b: 4}, {a: 5, b: 6}, {a: 7, b: 8}];
+ string[][] csv2 = [["1", "2", "3"], ["3", "4", "5"], ["5", "6", "7"], ["7", "8", "9"]];
+
+ record {}[2]|error rec = csv:parseRecordAsRecordType(csv);
+ test:assertEquals(rec, [
+ {a: 1, b: 2},
+ {a: 3, b: 4}
+ ]);
+
+ map[2]|error rec_2 = csv:parseListAsRecordType(csv2, ["a", "b", "c"]);
+ test:assertEquals(rec_2, [
+ {a: 1, b: 2, c: 3},
+ {a: 3, b: 4, c: 5}
+ ]);
+
+ record {|int a;|}[2]|error rec2 = csv:parseRecordAsRecordType(csv, {skipLines: [2]});
+ test:assertEquals(rec2, [
+ {a: 1},
+ {a: 5}
+ ]);
+
+ record {|int a;|}[5]|error rec2_2 = csv:parseRecordAsRecordType(csv, {skipLines: [2]});
+ test:assertTrue(rec2_2 is csv:Error);
+
+ int[][2]|error rec3 = csv:parseRecordAsListType(csv, ["a", "b"]);
+ test:assertEquals(rec3, [
+ [1, 2],
+ [3, 4],
+ [5, 6],
+ [7, 8]
+ ]);
+
+ [int, int][2]|error rec3_2 = csv:parseListAsListType(csv2);
+ test:assertEquals(rec3_2, [
+ [1, 2],
+ [3, 4]
+ ]);
+
+ [int...][2]|error rec3_3 = csv:parseRecordAsListType(csv, ["a", "b"], {skipLines: [1]});
+ test:assertEquals(rec3_3, [
+ [3, 4],
+ [5, 6]
+ ]);
+
+ int[1][2]|error rec4 = csv:parseRecordAsListType(csv, ["a", "b"], {skipLines: [2]});
+ test:assertEquals(rec4, [
+ [1, 2]
+ ]);
+
+ int[2][]|error rec5 = csv:parseListAsListType(csv2);
+ test:assertEquals(rec5, [
+ [1, 2, 3],
+ [3, 4, 5]
+ ]);
+}
diff --git a/ballerina-tests/parse-string-array-types-tests/tests/parse_string_to_tuple_test.bal b/ballerina-tests/parse-string-array-types-tests/tests/parse_string_to_tuple_test.bal
new file mode 100644
index 0000000..7cc5087
--- /dev/null
+++ b/ballerina-tests/parse-string-array-types-tests/tests/parse_string_to_tuple_test.bal
@@ -0,0 +1,472 @@
+import ballerina/csv_commons as common;
+import ballerina/data.csv as csv;
+import ballerina/test;
+
+@test:Config
+function testFromCsvStringWithTypeForStringAndTupleAsExpectedType() {
+ BooleanTuple1Array|csv:Error cbv1bt1 = csv:parseStringToList(csvStringWithBooleanValues1);
+ test:assertEquals(cbv1bt1, [
+ [true, false, true, false],
+ [true, false, true, false],
+ [true, false, true, false]
+ ]);
+
+ BooleanTuple1Array|csv:Error cbv2bt1 = csv:parseStringToList(csvStringWithBooleanValues2);
+ test:assertEquals(cbv2bt1, [
+ [true, false, true, false],
+ [true, false, true, false]
+ ]);
+
+ BooleanTuple1Array|csv:Error cbv3bt1 = csv:parseStringToList(csvStringWithBooleanValues3);
+ test:assertTrue(cbv3bt1 is csv:Error);
+ test:assertEquals((cbv3bt1).message(), common:generateErrorMessageForInvalidCast("()", "boolean"));
+
+ BooleanTuple1Array|csv:Error cbv5bt1 = csv:parseStringToList(csvStringWithBooleanValues5);
+ test:assertTrue(cbv5bt1 is csv:Error);
+ test:assertEquals((cbv5bt1).message(), common:generateErrorMessageForInvalidCast("2", "boolean"));
+
+ BooleanTuple1Array|csv:Error cbv7bt1 = csv:parseStringToList(csvStringWithBooleanValues7);
+ test:assertTrue(cbv7bt1 is csv:Error);
+ test:assertEquals((cbv7bt1).message(), common:generateErrorMessageForInvalidCast("()", "boolean"));
+
+ BooleanTuple2Array|csv:Error cbv1bt2 = csv:parseStringToList(csvStringWithBooleanValues1);
+ test:assertEquals(cbv1bt2, [
+ [true, false],
+ [true, false],
+ [true, false]
+ ]);
+
+ BooleanTuple2Array|csv:Error cbv2bt2 = csv:parseStringToList(csvStringWithBooleanValues2);
+ test:assertEquals(cbv2bt2, [
+ [true, false],
+ [true, false]
+ ]);
+
+ BooleanTuple2Array|csv:Error cbv3bt2 = csv:parseStringToList(csvStringWithBooleanValues3);
+ test:assertEquals(cbv3bt2, [
+ [true, false],
+ [true, false],
+ [true, true]
+ ]);
+
+ BooleanTuple2Array|csv:Error cbv4bt2 = csv:parseStringToList(csvStringWithBooleanValues4);
+ test:assertTrue(cbv4bt2 is csv:Error);
+ test:assertEquals((cbv4bt2).message(), common:generateErrorMessageForInvalidCast("()", "boolean"));
+
+ BooleanTuple3Array|csv:Error cbv1bt3 = csv:parseStringToList(csvStringWithBooleanValues1);
+ test:assertEquals(cbv1bt3, [
+ [true, false, true, false],
+ [true, false, true, false],
+ [true, false, true, false]
+ ]);
+
+ BooleanTuple3Array|csv:Error cbv2bt3 = csv:parseStringToList(csvStringWithBooleanValues2);
+ test:assertEquals(cbv2bt3, [
+ [true, false, true, false, true],
+ [true, false, true, false, true]
+ ]);
+
+ BooleanTuple3Array|csv:Error cbv3bt3 = csv:parseStringToList(csvStringWithBooleanValues3);
+ test:assertTrue(cbv3bt3 is csv:Error);
+ test:assertEquals((cbv3bt3).message(), common:generateErrorMessageForInvalidCast("()", "boolean"));
+
+ BooleanTuple3Array|csv:Error cbv5bt3 = csv:parseStringToList(csvStringWithBooleanValues5);
+ test:assertTrue(cbv5bt3 is csv:Error);
+ test:assertEquals((cbv5bt3).message(), common:generateErrorMessageForInvalidCast("2", "boolean"));
+
+ BooleanTuple3Array|csv:Error cbv7bt3 = csv:parseStringToList(csvStringWithBooleanValues7);
+ test:assertTrue(cbv7bt3 is csv:Error);
+ test:assertEquals((cbv7bt3).message(), common:generateErrorMessageForInvalidCast("()", "boolean"));
+
+ BooleanTuple4Array|csv:Error cbv1bt4 = csv:parseStringToList(csvStringWithBooleanValues1);
+ test:assertEquals(cbv1bt4, [
+ [true, false, true, false],
+ [true, false, true, false],
+ [true, false, true, false]
+ ]);
+
+ BooleanTuple4Array|csv:Error cbv2bt4 = csv:parseStringToList(csvStringWithBooleanValues2);
+ test:assertEquals(cbv2bt4, [
+ [true, false, true, false, true],
+ [true, false, true, false, true]
+ ]);
+
+ BooleanTuple4Array|csv:Error cbv3bt4 = csv:parseStringToList(csvStringWithBooleanValues3);
+ test:assertTrue(cbv3bt4 is csv:Error);
+ test:assertEquals((cbv3bt4).message(), common:generateErrorMessageForInvalidCast("()", "boolean"));
+
+ BooleanTuple4Array|csv:Error cbv4bt4 = csv:parseStringToList(csvStringWithBooleanValues4);
+ test:assertTrue(cbv4bt4 is csv:Error);
+ test:assertEquals((cbv4bt4).message(), common:generateErrorMessageForInvalidCast("()", "boolean"));
+
+ BooleanTuple4Array|csv:Error cbv5bt4 = csv:parseStringToList(csvStringWithBooleanValues5);
+ test:assertTrue(cbv5bt4 is csv:Error);
+ test:assertEquals((cbv5bt4).message(), common:generateErrorMessageForInvalidCast("2", "boolean"));
+
+ BooleanTuple4Array|csv:Error cbv6bt4 = csv:parseStringToList(csvStringWithBooleanValues6);
+ test:assertTrue(cbv6bt4 is csv:Error);
+ test:assertEquals((cbv6bt4).message(), common:generateErrorMessageForInvalidCast("()", "boolean"));
+
+}
+
+@test:Config
+function testFromCsvStringWithTypeForStringAndTupleAsExpectedType2() {
+ BooleanTuple4Array|csv:Error cbv7bt4 = csv:parseStringToList(csvStringWithBooleanValues7);
+ test:assertTrue(cbv7bt4 is csv:Error);
+ test:assertEquals((cbv7bt4).message(), common:generateErrorMessageForInvalidCast("()", "boolean"));
+
+ NillableBooleanTuple5Array|csv:Error cbv1bt5 = csv:parseStringToList(csvStringWithBooleanValues1);
+ test:assertEquals(cbv1bt5, [
+ [true, false, true, false, null],
+ [true, false, true, false, null],
+ [true, false, true, false, null]
+ ]);
+
+ NillableBooleanTuple5Array|csv:Error cbv2bt5 = csv:parseStringToList(csvStringWithBooleanValues2);
+ test:assertEquals(cbv2bt5, [
+ [true, false, true, false, true],
+ [true, false, true, false, true]
+ ]);
+
+ NillableBooleanTuple5Array|csv:Error cbv3bt5 = csv:parseStringToList(csvStringWithBooleanValues3);
+ test:assertEquals(cbv3bt5, [
+ [true, false, true, null, null],
+ [true, false, (), null, null],
+ [true, true, false, null, null]
+ ]);
+
+ NillableBooleanTuple5Array|csv:Error cbv4bt5 = csv:parseStringToList(csvStringWithBooleanValues4);
+ test:assertEquals(cbv4bt5, [
+ [true, (), (), false, null],
+ [true, (), (), false, null]
+ ]);
+
+ NillableBooleanTuple5Array|csv:Error cbv5bt5 = csv:parseStringToList(csvStringWithBooleanValues5);
+ test:assertTrue(cbv5bt5 is csv:Error);
+ test:assertEquals((cbv5bt5).message(), common:generateErrorMessageForInvalidCast("2", "boolean?"));
+
+ NillableBooleanTuple5Array|csv:Error cbv6bt5 = csv:parseStringToList(csvStringWithBooleanValues6);
+ test:assertEquals(cbv6bt5, [
+ [(), (), null, null, null]
+ ]);
+
+ NillableBooleanTuple5Array|csv:Error cbv7bt5 = csv:parseStringToList(csvStringWithBooleanValues7);
+ test:assertEquals(cbv7bt5, [
+ [b1, b2, (), b4, null]
+ ]);
+
+ NillableBooleanTuple6Array|csv:Error cbv1bt6 = csv:parseStringToList(csvStringWithBooleanValues1);
+ test:assertEquals(cbv1bt6, [
+ [true, false],
+ [true, false],
+ [true, false]
+ ]);
+
+ NillableBooleanTuple6Array|csv:Error cbv2bt6 = csv:parseStringToList(csvStringWithBooleanValues2);
+ test:assertEquals(cbv2bt6, [
+ [true, false],
+ [true, false]
+ ]);
+
+ NillableBooleanTuple6Array|csv:Error cbv3bt6 = csv:parseStringToList(csvStringWithBooleanValues3);
+ test:assertEquals(cbv3bt6, [
+ [true, false],
+ [true, false],
+ [true, true]
+ ]);
+
+ NillableBooleanTuple6Array|csv:Error cbv4bt6 = csv:parseStringToList(csvStringWithBooleanValues4);
+ test:assertEquals(cbv4bt6, [
+ [true, ()],
+ [true, ()]
+ ]);
+
+ NillableBooleanTuple6Array|csv:Error cbv6bt6 = csv:parseStringToList(csvStringWithBooleanValues6);
+ test:assertEquals(cbv6bt6, [
+ [(), null]
+ ]);
+
+ NillableBooleanTuple6Array|csv:Error cbv7bt6 = csv:parseStringToList(csvStringWithBooleanValues7);
+ test:assertEquals(cbv7bt6, [
+ [b1, b2]
+ ]);
+
+ NillableBooleanTuple7Array|csv:Error cbv1bt7 = csv:parseStringToList(csvStringWithBooleanValues1);
+ test:assertEquals(cbv1bt7, [
+ [true, false, true, false],
+ [true, false, true, false],
+ [true, false, true, false]
+ ]);
+
+ NillableBooleanTuple7Array|csv:Error cbv2bt7 = csv:parseStringToList(csvStringWithBooleanValues2);
+ test:assertEquals(cbv2bt7, [
+ [true, false, true, false, true],
+ [true, false, true, false, true]
+ ]);
+
+ NillableBooleanTuple7Array|csv:Error cbv3bt7 = csv:parseStringToList(csvStringWithBooleanValues3);
+ test:assertEquals(cbv3bt7, [
+ [true, false, true],
+ [true, false, ()],
+ [true, true, false]
+ ]);
+
+ NillableBooleanTuple7Array|csv:Error cbv4bt7 = csv:parseStringToList(csvStringWithBooleanValues4);
+ test:assertEquals(cbv4bt7, [
+ [true, (), (), false],
+ [true, (), (), false]
+ ]);
+
+}
+@test:Config
+function testFromCsvStringWithTypeForStringAndTupleAsExpectedType3() {
+ NillableBooleanTuple7Array|csv:Error cbv5bt7 = csv:parseStringToList(csvStringWithBooleanValues5);
+ test:assertTrue(cbv5bt7 is csv:Error);
+ test:assertEquals((cbv5bt7).message(), common:generateErrorMessageForInvalidCast("2", "boolean?"));
+
+ NillableBooleanTuple7Array|csv:Error cbv6bt7 = csv:parseStringToList(csvStringWithBooleanValues6);
+ test:assertEquals(cbv6bt7, [
+ [(), ()]
+ ]);
+
+ NillableBooleanTuple7Array|csv:Error cbv7bt7 = csv:parseStringToList(csvStringWithBooleanValues7);
+ test:assertEquals(cbv7bt7, [
+ [b1, b2, (), false]
+ ]);
+
+ NillableBooleanTuple8Array|csv:Error cbv1bt8 = csv:parseStringToList(csvStringWithBooleanValues1);
+ test:assertEquals(cbv1bt8, [
+ [true, false, true, false],
+ [true, false, true, false],
+ [true, false, true, false]
+ ]);
+
+ NillableBooleanTuple8Array|csv:Error cbv2bt8 = csv:parseStringToList(csvStringWithBooleanValues2);
+ test:assertEquals(cbv2bt8, [
+ [true, false, true, false, true],
+ [true, false, true, false, true]
+ ]);
+
+ NillableBooleanTuple8Array|csv:Error cbv3bt8 = csv:parseStringToList(csvStringWithBooleanValues3);
+ test:assertEquals(cbv3bt8, [
+ [true, false, true],
+ [true, false, ()],
+ [true, true, false]
+ ]);
+
+ NillableBooleanTuple8Array|csv:Error cbv4bt8 = csv:parseStringToList(csvStringWithBooleanValues4);
+ test:assertEquals(cbv4bt8, [
+ [true, (), (), false],
+ [true, (), (), false]
+ ]);
+
+ NillableBooleanTuple8Array|csv:Error cbv5bt8 = csv:parseStringToList(csvStringWithBooleanValues5);
+ test:assertTrue(cbv5bt8 is csv:Error);
+ test:assertEquals((cbv5bt8).message(), common:generateErrorMessageForInvalidCast("2", "boolean?"));
+
+ NillableBooleanTuple8Array|csv:Error cbv6bt8 = csv:parseStringToList(csvStringWithBooleanValues6);
+ test:assertEquals(cbv6bt8, [
+ [(), ()]
+ ]);
+
+ NillableBooleanTuple8Array|csv:Error cbv7bt8 = csv:parseStringToList(csvStringWithBooleanValues7);
+ test:assertEquals(cbv7bt8, [
+ [b1, b2, (), false]
+ ]);
+
+ NillableIntBooleanTuple9Array|csv:Error cbv1bt9 = csv:parseStringToList(csvStringWithBooleanValues1);
+ test:assertEquals(cbv1bt9, [
+ [true, false, true, false],
+ [true, false, true, false],
+ [true, false, true, false]
+ ]);
+
+ NillableIntBooleanTuple9Array|csv:Error cbv2bt9 = csv:parseStringToList(csvStringWithBooleanValues2);
+ test:assertEquals(cbv2bt9, [
+ [true, false, true, false, true],
+ [true, false, true, false, true]
+ ]);
+
+ NillableIntBooleanTuple9Array|csv:Error cbv3bt9 = csv:parseStringToList(csvStringWithBooleanValues3);
+ test:assertEquals(cbv3bt9, [
+ [true, false, true],
+ [true, false, ()],
+ [true, true, false]
+ ]);
+
+ NillableIntBooleanTuple9Array|csv:Error cbv4bt9 = csv:parseStringToList(csvStringWithBooleanValues4);
+ test:assertEquals(cbv4bt9, [
+ [true, (), (), false],
+ [true, (), (), false]
+ ]);
+
+ NillableIntBooleanTuple9Array|csv:Error cbv5bt9 = csv:parseStringToList(csvStringWithBooleanValues5);
+ test:assertEquals(cbv5bt9, [
+ [true, false, true, 2],
+ [true, false, true, 3]
+ ]);
+
+ NillableIntBooleanTuple9Array|csv:Error cbv6bt9 = csv:parseStringToList(csvStringWithBooleanValues6);
+ test:assertEquals(cbv6bt9, [
+ [(), ()]
+ ]);
+
+ NillableIntBooleanTuple9Array|csv:Error cbv7bt9 = csv:parseStringToList(csvStringWithBooleanValues7);
+ test:assertEquals(cbv7bt9, [
+ [b1, b2, (), false]
+ ]);
+
+ NilTuple3Array|csv:Error cbv1nt3 = csv:parseStringToList(csvStringWithBooleanValues1);
+ test:assertTrue(cbv1nt3 is csv:Error);
+ test:assertEquals((cbv1nt3).message(), common:generateErrorMessageForInvalidCast("true", "()"));
+
+ NilTuple3Array|csv:Error cbv3nt3 = csv:parseStringToList(csvStringWithBooleanValues3);
+ test:assertTrue(cbv3nt3 is csv:Error);
+ test:assertEquals((cbv3nt3).message(), common:generateErrorMessageForInvalidCast("true", "()"));
+
+ NilTuple3Array|csv:Error cbv6nt3 = csv:parseStringToList(csvStringWithBooleanValues6);
+ test:assertEquals(cbv6nt3, [
+ [(), ()]
+ ]);
+
+ AnydataTuple3Array|csv:Error cbv1anyd3 = csv:parseStringToList(csvStringWithBooleanValues1);
+ test:assertEquals(cbv1anyd3, [
+ [true, false, true, false],
+ [true, false, true, false],
+ [true, false, true, false]
+ ]);
+
+ AnydataTuple3Array|csv:Error cbv2anyd3 = csv:parseStringToList(csvStringWithBooleanValues2);
+ test:assertEquals(cbv2anyd3, [
+ [true, false, true, false, true],
+ [true, false, true, false, true]
+ ]);
+
+ AnydataTuple3Array|csv:Error cbv3anyd3 = csv:parseStringToList(csvStringWithBooleanValues3);
+ test:assertEquals(cbv3anyd3, [
+ [true, false, true],
+ [true, false, ()],
+ [true, true, false]
+ ]);
+
+ AnydataTuple3Array|csv:Error cbv4anyd3 = csv:parseStringToList(csvStringWithBooleanValues4);
+ test:assertEquals(cbv4anyd3, [
+ [true, (), (), false],
+ [true, (), (), false]
+ ]);
+
+ AnydataTuple3Array|csv:Error cbv5anyd3 = csv:parseStringToList(csvStringWithBooleanValues5);
+ test:assertEquals(cbv5anyd3, [
+ [true, false, true, 2],
+ [true, false, true, 3]
+ ]);
+
+ AnydataTuple3Array|csv:Error cbv6anyd3 = csv:parseStringToList(csvStringWithBooleanValues6);
+ test:assertEquals(cbv6anyd3, [
+ [(), ()]
+ ]);
+
+ AnydataTuple3Array|csv:Error cbv7anyd3 = csv:parseStringToList(csvStringWithBooleanValues7);
+ test:assertEquals(cbv7anyd3, [
+ [b1, b2, (), false]
+ ]);
+}
+
+@test:Config
+function testFromCsvStringWithTypeForStringAndTupleAsExpectedType4() {
+ JsonTuple3Array|csv:Error cbv1j3 = csv:parseStringToList(csvStringWithBooleanValues1);
+ test:assertEquals(cbv1j3, [
+ [true, false, true, false],
+ [true, false, true, false],
+ [true, false, true, false]
+ ]);
+
+ JsonTuple3Array|csv:Error cbv2j3 = csv:parseStringToList(csvStringWithBooleanValues2);
+ test:assertEquals(cbv2j3, [
+ [true, false, true, false, true],
+ [true, false, true, false, true]
+ ]);
+
+ JsonTuple3Array|csv:Error cbv3j3 = csv:parseStringToList(csvStringWithBooleanValues3);
+ test:assertEquals(cbv3j3, [
+ [true, false, true],
+ [true, false, ()],
+ [true, true, false]
+ ]);
+
+ JsonTuple3Array|csv:Error cbv4j3 = csv:parseStringToList(csvStringWithBooleanValues4);
+ test:assertEquals(cbv4j3, [
+ [true, (), (), false],
+ [true, (), (), false]
+ ]);
+
+ JsonTuple3Array|csv:Error cbv5j3 = csv:parseStringToList(csvStringWithBooleanValues5);
+ test:assertEquals(cbv5j3, [
+ [true, false, true, 2],
+ [true, false, true, 3]
+ ]);
+
+ JsonTuple3Array|csv:Error cbv6j3 = csv:parseStringToList(csvStringWithBooleanValues6);
+ test:assertEquals(cbv6j3, [
+ [(), ()]
+ ]);
+
+ JsonTuple3Array|csv:Error cbv7j3 = csv:parseStringToList(csvStringWithBooleanValues7);
+ test:assertEquals(cbv7j3, [
+ [b1, b2, (), false]
+ ]);
+
+ StringTuple3Array|csv:Error cbv1s3 = csv:parseStringToList(csvStringWithBooleanValues1);
+ test:assertEquals(cbv1s3, [
+ ["true", "false", "true", "false"],
+ ["true", "false", "true", "false"],
+ ["true", "false", "true", "false"]
+ ]);
+
+ StringTuple3Array|csv:Error cbv2s3 = csv:parseStringToList(csvStringWithBooleanValues2);
+ test:assertEquals(cbv2s3, [
+ ["true", "false", "true", "false", "true"],
+ ["true", "false", "true", "false", "true"]
+ ]);
+
+ StringTuple3Array|csv:Error cbv3s3 = csv:parseStringToList(csvStringWithBooleanValues3);
+ test:assertEquals(cbv3s3, [
+ ["true", "false", "true"],
+ ["TRUE", "FALSE", "()"],
+ ["true", "true", "FALSE"]
+ ]);
+
+ StringTuple3Array|csv:Error cbv4s3 = csv:parseStringToList(csvStringWithBooleanValues4);
+ test:assertEquals(cbv4s3, [
+ ["true", "()", "()", "false"],
+ ["true", "()", "null", "false"]
+ ]);
+
+ StringTuple3Array|csv:Error cbv5s3 = csv:parseStringToList(csvStringWithBooleanValues5);
+ test:assertEquals(cbv5s3, [
+ ["true", "false", "true", "2"],
+ ["true", "false", "true", "3"]
+ ]);
+
+ StringTuple3Array|csv:Error cbv6s3 = csv:parseStringToList(csvStringWithBooleanValues6);
+ test:assertEquals(cbv6s3, [
+ ["()", "()"]
+ ]);
+
+ StringTuple3Array|csv:Error cbv7s3 = csv:parseStringToList(csvStringWithBooleanValues7);
+ test:assertEquals(cbv7s3, [
+ ["true", "false", "()", "false"]
+ ]);
+
+ DecimalTuple3Array|csv:Error cbv1dt3 = csv:parseStringToList(csvStringWithBooleanValues1);
+ test:assertTrue(cbv1dt3 is csv:Error);
+ test:assertEquals((cbv1dt3).message(), common:generateErrorMessageForInvalidCast("true", "decimal"));
+
+ DecimalTuple3Array|csv:Error cbv3dt3 = csv:parseStringToList(csvStringWithBooleanValues3);
+ test:assertTrue(cbv3dt3 is csv:Error);
+ test:assertEquals((cbv3dt3).message(), common:generateErrorMessageForInvalidCast("true", "decimal"));
+
+ DecimalTuple3Array|csv:Error cbv6dt3 = csv:parseStringToList(csvStringWithBooleanValues6);
+ test:assertTrue(cbv6dt3 is csv:Error);
+ test:assertEquals((cbv6dt3).message(), common:generateErrorMessageForInvalidCast("()", "decimal"));
+}
diff --git a/ballerina-tests/parse-string-array-types-tests/tests/test_data_values.bal b/ballerina-tests/parse-string-array-types-tests/tests/test_data_values.bal
new file mode 100644
index 0000000..360a493
--- /dev/null
+++ b/ballerina-tests/parse-string-array-types-tests/tests/test_data_values.bal
@@ -0,0 +1,256 @@
+boolean b1 = true;
+false b2 = false;
+boolean? b3 = ();
+boolean|int b4 = false;
+
+() n1 = ();
+int? n2 = ();
+() n3 = null;
+
+int i1 = 1;
+int i2 = -2;
+int i3 = int:MAX_VALUE;
+int i4 = int:MIN_VALUE;
+int i5 = 0;
+2 i6 = 2;
+int? i7 = ();
+int|string i8 = 100;
+
+float f1 = 2.234;
+float f2 = -3.21f;
+float f3 = 0;
+float f4 = float:Infinity;
+float f5 = -float:Infinity;
+float f6 = float:NaN;
+2.3f f7 = 2.3;
+float? f8 = ();
+float|decimal f9 = 1.21;
+
+decimal d1 = 2.234;
+decimal d2 = -3.21d;
+decimal d3 = 0;
+2.3d d4 = 2.3;
+decimal? d5 = ();
+decimal|int d6 = 1.21;
+
+string s1 = "string";
+string s2 = "";
+string:Char s3 = "a";
+
+map bm1 = {b1, b2};
+map bm2 = {b1, b2, b3, n1, n3};
+map bm3 = {b1, b2, b3, b4, i1};
+map<()> bm4 = {n1, n3};
+map bm5 = {b1, b2, b3, b4:true};
+
+map m5 = {i1, i2, i3, i4, i5, i6};
+map m6 = {f1, f2, f3, f4, f5, f6, f7};
+map m7 = {d1, d2, d3, d4};
+map m8 = {d1, f1, f9, f10: 1.23};
+map m9 = {s1, s2, s3};
+map m10 = {b1, b2, b3, b4, n1, n2, n3, i1, i2, i3, i4, i5, i6, i7, i8, f1, f2, f3, f4, f5, f6, f7, f8};
+map m11 = {b1, b2, b3, b4, n1, n2, n3, i1, i2, i3, i4, i5, i6, i7, i8, f1, f2, f3, f4, f5, f6, f7, f8};
+
+boolean[] arr1 = [b1, b2];
+boolean?[] arr2 = [b1, b2, b3, n1, n3];
+(boolean|int?)[] arr3 = [b1, b2, b3, b4, i1];
+()[] arr4 = [n1, n3];
+int[] arr5 = [i1, i2, i3, i4, i5, i6];
+float[] arr6 = [f1, f2, f3, f4, f5, f6, f7];
+decimal[] arr7 = [d1, d2, d3, d4];
+(decimal|float)[] arr8 = [d1, f1, f9, 1.23];
+string[] arr9 = [s1, s2, s3];
+anydata[] arr10 = [b1, b2, b3, b4, n1, n2, n3, i1, i2, i3, i4, i5, i6, i7, i8, f1, f2, f3, f4, f5, f6, f7, f8];
+json[] arr11 = [b1, b2, b3, b4, n1, n2, n3, i1, i2, i3, i4, i5, i6, i7, i8, f1, f2, f3, f4, f5, f6, f7, f8];
+
+[boolean, boolean] bt1 = [b1, b2];
+[boolean, boolean, boolean, boolean] bt2 = [b1, b2, b1, b2];
+[boolean?, boolean?, boolean?, boolean?, boolean?] bt3 = [b1, b2, b3, n1, n3];
+[boolean|int?, boolean|int?, boolean|int?, boolean|int?, boolean|int?] bt4 = [b1, b2, b3, b4, i1];
+[boolean...] bt5 = [b1, b2];
+
+[string, string] st1 = [s1, s2];
+[string, string, string, string] st2 = [s1, s2, s3, s2];
+[string...] st3 = [s1, s2];
+[string, string, string...] st4 = [s1, s2, s3, s2];
+
+[string?, string?, string?, string?, string?] st5 = [s1, s2, s3, n1, n3];
+[string|int?, string|int?, string|int?, string|int?, string|int?] st6 = [s1, s2, s3, n1, i1];
+[string?...] st7 = [s1, s2];
+[string...] st8 = [];
+[string, string, string] st9 = [s1, s2, s3];
+
+[(), ()] tup4 = [n1, n3];
+[int, int, int, int, int, int] tup5 = [i1, i2, i3, i4, i5, i6];
+[float, float, float, float, float, float, float] tup6 = [f1, f2, f3, f4, f5, f6, f7];
+[decimal, decimal, decimal, decimal] tup7 = [d1, d2, d3, d4];
+[decimal|float, decimal|float, decimal|float, decimal|float] tup8 = [d1, f1, f9, 1.23];
+[string, string, string] tup9 = [s1, s2, s3];
+[anydata, anydata, anydata, anydata, anydata, anydata, anydata, anydata,
+ anydata, anydata, anydata, anydata, anydata, anydata, anydata, anydata,
+ anydata, anydata, anydata, anydata, anydata, anydata, anydata] tup10 = [b1, b2, b3, b4,
+ n1, n2, n3, i1, i2, i3, i4, i5, i6, i7, i8, f1, f2, f3, f4, f5, f6, f7, f8];
+[json, json, json, json, json, json, json, json, json, json, json, json,
+ json, json, json, json, json, json, json, json, json, json, json] tup11 =
+ [b1, b2, b3, b4, n1, n2, n3, i1, i2, i3, i4, i5, i6, i7, i8, f1,
+ f2, f3, f4, f5, f6, f7, f8];
+[string, string, int, int, boolean, boolean, (), (), decimal, decimal, float, float] tup12 = [
+ s1, s2, i1, i2, b1, b2, n1, n3, d1, d2, f1, f2
+];
+
+[boolean, boolean...] restTup1 = [b1, b2];
+[boolean?, boolean?, boolean?...] restTup2 = [b1, b2, b3, n1, n3];
+[boolean|int?...] restTup3 = [b1, b2, b3, b4, i1];
+[(), ()...] restTup4 = [n1, n3];
+[int...] restTup5 = [i1, i2, i3, i4, i5, i6];
+[float...] restTup6 = [f1, f2, f3, f4, f5, f6, f7];
+[decimal...] restTup7 = [d1, d2, d3, d4];
+[decimal|float, decimal|float...] restTup8 = [d1, f1, f9, 1.23];
+[string...] restTup9 = [s1, s2, s3];
+[anydata...] restTup10 = [b1, b2, b3, b4, n1, n2, n3, i1, i2, i3, i4, i5, i6, i7, i8, f1, f2, f3, f4, f5, f6, f7, f8];
+[json, json, json...] restTup11 = [b1, b2, b3, b4, n1, n2, n3, i1, i2, i3, i4, i5, i6, i7, i8, f1, f2, f3, f4, f5, f6, f7, f8];
+[string, string, int, int, boolean, boolean, (), (), decimal, decimal, float, float...] restTup12 = [
+ s1, s2, i1, i2, b1, b2, n1, n3, d1, d2, f1, f2, f2, f2
+];
+
+var booleanRecordArray = [
+ {b1, b2, b3, b4}, {b1, b2, b3, b4}
+];
+
+var booleanRecordArray2 = [
+ {},{}
+];
+
+string csvStringWithBooleanValues1 = string `b1,b2,b3,b4
+true,false,true,false
+true,false, true,false
+true,false,true,false
+`;
+
+string csvStringWithBooleanValues2 = string `b1,b2,b3,b4,b5
+true,false, true,false,true
+true,false, true,false,true`;
+
+string csvStringWithBooleanValues3 = string `b1,b2,b3
+${" "}${"\t"}
+true, false,true
+${" "}
+ TRUE, FALSE,()
+${" "}
+
+true, true,FALSE
+
+`;
+
+string csvStringWithBooleanValues4 = string `b1,b2,b3,b4
+ true,(), (),false
+ true,(), null,false
+
+`;
+
+string csvStringWithBooleanValues5 = string `b1,b2,b3,b4
+
+true,false,true,2
+
+true,false,true,3
+`;
+
+string csvStringWithBooleanValues6 = string `b2,b3
+(),()
+
+`;
+
+string csvStringWithBooleanValues7 = string `b1,b2,b3,b4
+${b1},${b2},(),${b4}
+`;
+
+string csvStringData1 = string `
+ a, b, c, d, e, f
+ 1, string1, true, 2.234, 2.234, ()
+ 2, string2, false, 0, 0, null
+ 3, string3, false, 1.23, 1.23, ()
+ 4, string4, true, -6.51, -6.51, ()
+ 5, string5, true, 3, 3, ()`;
+
+string csvStringData2 = string `
+ hello, hello, (), 12, true, 12.34
+ // comment
+
+ a, b, c, d, e, f
+
+
+ 1, string1, true, 2.234, 2.234, ()
+ 2, string2, false, 0, 0, null
+ 3, string3, false, 1.23, 1.23, ()
+ 4, string4, true, -6.51, -6.51, ()
+ 5, string5, true, 3, 3, ()`;
+
+string csvStringData3 = string `
+ a, b, c, d, e, f
+
+
+
+ 1, string1, true, 2.234, 2.234, ()
+ 2, string2, false, 0, 0, null
+ 3, string3, false, 1.23, 1.23, ()
+
+ 4, string4, true, -6.51, -6.51, ()
+ 5, string5, true, 3, 3, ()`;
+
+string csvStringData4 = string `
+ 1, string1, true, 2.234, 2.234, ()
+ 2, string2, false, 0, 0, null
+ 3, string3, false, 1.23, 1.23, ()
+ 4, string4, true, -6.51, -6.51, ()
+ 5, string5, true, 3, 3, ()`;
+
+string csvStringData5 = string `
+
+
+
+ 1, string1, true, 2.234, 2.234, ()
+ 2, string2, false, 0, 0, null
+
+ 3, string3, false, 1.23, 1.23, ()
+ 4, string4, true, -6.51, -6.51, ()
+
+ 5, string5, true, 3, 3, ()`;
+
+string csvStringData6 = string `
+
+ 1, string1, true, 2.234, 2.234, ()
+ 2, string2, false, 0, 0, null
+
+ 3, string3, false, 1.23, 1.23, ()
+ 4, string4, true, -6.51, -6.51, ()
+
+ 5, string5, true, 3, 3, ()`;
+
+string csvStringData7 = string `
+ a@ b@ c@ d@ e@ f
+ 1@ string@ true@ 2.234@ -3.21@ ()
+ 2@ s,tring@ true@ 2.234@ -3.21@ null
+ 3@ stri,ng@ true@ 2.234@ -3.21@ ()
+ 4@ string@ true@ 2.234@ -3.21@ ()
+ 5@ string@ true@ 2.234@ -3.21@ ()`;
+string csvStringData8 = string `
+ a@ b@ c@ d@ e@ f
+
+
+
+ 1@ stri,ng@ true@ 2.234@ -3.21@ ()
+ 2@ string@ true@ 2.234@ ()@-3.21
+ 3@ string@ true@ 2.234@ -3.21@ null
+
+ 4@ s,tring@ true@ 2.234@ -3.21@ ()
+ 5@ string@ true@ 2.234@ -3.21@ ()`;
+
+string csvStringData9 = string `
+
+ 1@ string@ true@ 2.234@ -3.21@ ()
+ 2@ string@ true@ 2.234@ -3.21@ null
+
+ 3@ string@ true@ 2.234@ -3.21@ ()
+ 4@ string@ true@ 2.234@ ()@-3.21
+
+ 5@ string@ true@ 2.234@ -3.21@ null`;
diff --git a/ballerina-tests/parse-string-array-types-tests/tests/types.bal b/ballerina-tests/parse-string-array-types-tests/tests/types.bal
new file mode 100644
index 0000000..a2b4b2b
--- /dev/null
+++ b/ballerina-tests/parse-string-array-types-tests/tests/types.bal
@@ -0,0 +1,2534 @@
+type BooleanRecord1 record {
+ boolean b1;
+ boolean|string b2;
+ boolean|string? b3;
+ boolean b4;
+};
+
+type BooleanRecord2 record {|
+ boolean b1;
+ boolean|string b2;
+ boolean|string? b3;
+ boolean b4;
+|};
+
+type BooleanRecord3 record {|
+ boolean b1;
+ boolean? b3;
+|};
+
+type BooleanRecord4 record {
+ boolean b1;
+ boolean? b3;
+};
+
+type BooleanRecord5 record {
+ boolean b1;
+ boolean? b3;
+ string defaultableField = "";
+ string? nillableField = ();
+};
+
+type BooleanRecord6 record {|
+ boolean b1;
+ boolean? b3;
+ string defaultableField = "";
+ string? nillableField = ();
+|};
+
+type BooleanRecord7 record {
+ boolean b1;
+ boolean? b3;
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+};
+
+type BooleanRecord8 record {|
+ boolean b1;
+ boolean? b3;
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+|};
+
+type BooleanRecord9 record {|
+ boolean b1;
+ boolean? b3;
+ boolean?...;
+|};
+
+type BooleanRecord10 record {|
+ boolean...;
+|};
+
+type BooleanRecord11 record {|
+ boolean b1;
+ string defaultableField = "";
+ string? nillableField = ();
+ boolean?|string...;
+|};
+
+type BooleanRecord12 record {|
+ boolean b1;
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+ boolean...;
+|};
+
+type BooleanRecord13 record {|
+ string defaultableField = "";
+ string? nillableField = ();
+ string|boolean...;
+|};
+
+type BooleanRecord14 record {|
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+ boolean...;
+|};
+
+type BooleanRecord15 record {|
+ int b1;
+ string defaultableField = "";
+ string? nillableField = ();
+ boolean?...;
+|};
+
+type BooleanRecord16 record {|
+ boolean?...;
+|};
+
+type BooleanRecord17 record {|
+ int...;
+|};
+
+type BooleanRecord18 record {|
+ boolean b2;
+ int?...;
+|};
+
+type NilRecord1 record {
+ () n1;
+ () n2;
+ () n3;
+};
+
+type NilRecord2 record {|
+ () n1;
+ () n2;
+ () n3;
+|};
+
+type NilRecord3 record {|
+ () n1;
+ () n4;
+|};
+
+type NilRecord4 record {
+ () n1;
+ () n4;
+};
+
+type NilRecord5 record {
+ () n1;
+ () n4;
+ string defaultableField = "";
+ string? nillableField = ();
+};
+
+type NilRecord6 record {|
+ () n1;
+ () n4;
+ string defaultableField = "";
+ string? nillableField = ();
+|};
+
+type NilRecord7 record {
+ () n1;
+ () n4;
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+};
+
+type NilRecord8 record {|
+ () n1;
+ () n4;
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+|};
+
+type NilRecord9 record {|
+ () n1;
+ () n2;
+ ()...;
+|};
+
+type NilRecord10 record {|
+ ()...;
+|};
+
+type NilRecord11 record {|
+ () n1;
+ string defaultableField = "";
+ string? nillableField = ();
+ ()...;
+|};
+
+type NilRecord12 record {|
+ () n1;
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+ ()...;
+|};
+
+type NilRecord13 record {|
+ string defaultableField = "";
+ string? nillableField = ();
+ ()...;
+|};
+
+type NilRecord14 record {|
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+ ()...;
+|};
+
+type IntegerRecord1 record {
+ int i1;
+ int i2;
+ int i3;
+ int? i4;
+ int? i5;
+ int i6;
+ int i7;
+ int? i8;
+};
+
+type IntegerRecord2 record {|
+ int i1;
+ int? i2;
+ int i3;
+ int i4;
+ int? i5;
+ int i6;
+ int i7;
+ int? i8;
+|};
+
+type IntegerRecord3 record {|
+ int i1;
+ int i4;
+ int i6;
+|};
+
+type IntegerRecord4 record {
+ int i1;
+ int i4;
+ int i6;
+};
+
+type IntegerRecord5 record {
+ int i1;
+ int i4;
+ int i6;
+ string defaultableField = "";
+ string? nillableField = ();
+};
+
+type IntegerRecord6 record {|
+ int i1;
+ int i4;
+ int i6;
+ string defaultableField = "";
+ string? nillableField = ();
+|};
+
+type IntegerRecord7 record {
+ int i1;
+ int i4;
+ int i6;
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+};
+
+type IntegerRecord8 record {|
+ int i1;
+ int i4;
+ int i6;
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+|};
+
+type IntegerRecord9 record {|
+ int i1;
+ int i2;
+ int...;
+|};
+
+type IntegerRecord10 record {|
+ int...;
+|};
+
+type IntegerRecord11 record {|
+ int i1;
+ string defaultableField = "";
+ string? nillableField = ();
+ int...;
+|};
+
+type IntegerRecord12 record {|
+ int i1;
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+ int...;
+|};
+
+type IntegerRecord13 record {|
+ string defaultableField = "";
+ string? nillableField = ();
+ int...;
+|};
+
+type IntegerRecord14 record {|
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+ int...;
+|};
+
+type FloatRecord1 record {
+ float f1;
+ float f2;
+ float f3;
+ float f4;
+ float f5;
+ float f6;
+ float f7;
+ float f8;
+};
+
+type FloatRecord2 record {|
+ float f1;
+ float f2;
+ float f3;
+ float f4;
+ float f5;
+ float f6;
+ float f7;
+ float f8;
+|};
+
+type FloatRecord3 record {|
+ float f1;
+ float f4;
+ float f7;
+|};
+
+type FloatRecord4 record {
+ float f1;
+ float f4;
+ float f7;
+};
+
+type FloatRecord5 record {
+ float f1;
+ float f4;
+ float f7;
+ string defaultableField = "";
+ string? nillableField = ();
+};
+
+type FloatRecord6 record {|
+ float f1;
+ float f4;
+ float f7;
+ string defaultableField = "";
+ string? nillableField = ();
+|};
+
+type FloatRecord7 record {
+ float f1;
+ float f4;
+ float f7;
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+};
+
+type FloatRecord8 record {|
+ float f1;
+ float f4;
+ float f7;
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+|};
+
+type FloatRecord9 record {|
+ float f1;
+ float f2;
+ float...;
+|};
+
+type FloatRecord10 record {|
+ float...;
+|};
+
+type FloatRecord11 record {|
+ float f1;
+ string defaultableField = "";
+ string? nillableField = ();
+ float...;
+|};
+
+type FloatRecord12 record {|
+ float f1;
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+ float...;
+|};
+
+type FloatRecord13 record {|
+ string defaultableField = "";
+ string? nillableField = ();
+ float...;
+|};
+
+type FloatRecord14 record {|
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+ float...;
+|};
+
+type DecimalRecord1 record {
+ decimal d1;
+ decimal d2;
+ decimal d3;
+ decimal d4;
+ decimal d5;
+ decimal d6;
+ decimal d7;
+ decimal d8;
+};
+
+type DecimalRecord2 record {|
+ decimal d1;
+ decimal d2;
+ decimal d3;
+ decimal d4;
+ decimal d5;
+ decimal d6;
+ decimal d7;
+ decimal d8;
+|};
+
+type DecimalRecord3 record {|
+ decimal d1;
+ decimal d4;
+ decimal d7;
+|};
+
+type DecimalRecord4 record {
+ decimal d1;
+ decimal d4;
+ decimal d7;
+};
+
+type DecimalRecord5 record {
+ decimal d1;
+ decimal d4;
+ decimal d7;
+ string defaultableField = "";
+ string? nillableField = ();
+};
+
+type DecimalRecord6 record {|
+ decimal d1;
+ decimal d4;
+ decimal d7;
+ string defaultableField = "";
+ string? nillableField = ();
+|};
+
+type DecimalRecord7 record {
+ decimal d1;
+ decimal d4;
+ decimal d7;
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+};
+
+type DecimalRecord8 record {|
+ decimal d1;
+ decimal d4;
+ decimal d7;
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+|};
+
+type DecimalRecord9 record {|
+ decimal d1;
+ decimal d2;
+ decimal...;
+|};
+
+type DecimalRecord10 record {|
+ decimal...;
+|};
+
+type DecimalRecord11 record {|
+ decimal d1;
+ string defaultableField = "";
+ string? nillableField = ();
+ decimal...;
+|};
+
+type DecimalRecord12 record {|
+ decimal d1;
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+ decimal...;
+|};
+
+type DecimalRecord13 record {|
+ string defaultableField = "";
+ string? nillableField = ();
+ decimal...;
+|};
+
+type DecimalRecord14 record {|
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+ decimal...;
+|};
+
+type StringRecord1 record {
+ string s1;
+ string s2;
+ string s3;
+};
+
+type StringRecord2 record {|
+ string s1;
+ string s2;
+ string s3;
+|};
+
+type StringRecord3 record {|
+ string s1;
+ string s4;
+|};
+
+type StringRecord4 record {
+ string s1;
+ string s4;
+};
+
+type StringRecord5 record {
+ string s1;
+ string s4;
+ string defaultableField = "";
+ string? nillableField = ();
+};
+
+type StringRecord6 record {|
+ string s1;
+ string s4;
+ string defaultableField = "";
+ string? nillableField = ();
+|};
+
+type StringRecord7 record {
+ string s1;
+ string s4;
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+};
+
+type StringRecord8 record {|
+ string s1;
+ string s4;
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+|};
+
+type StringRecord9 record {|
+ string s1;
+ string s2;
+ string...;
+|};
+
+type StringRecord10 record {|
+ string...;
+|};
+
+type StringRecord11 record {|
+ string s1;
+ string defaultableField = "";
+ string? nillableField = ();
+ string...;
+|};
+
+type StringRecord12 record {|
+ string d1;
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+ string...;
+|};
+
+type StringRecord13 record {|
+ string defaultableField = "";
+ string? nillableField = ();
+ string...;
+|};
+
+type StringRecord14 record {|
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+ string...;
+|};
+
+type StringRecord15 record {|
+ string defaultableField = "";
+ string? nillableField = ();
+ string requiredField;
+ string...;
+|};
+
+type StringRecord16 record {|
+ string?...;
+|};
+
+type StringRecord17 record {|
+ int...;
+|};
+
+type StringRecord18 record {|
+ string b2;
+ int?...;
+|};
+
+type StringRecord19 record {
+ string s1 = "";
+ string s2 = "";
+};
+
+type StringRecord20 record {|
+ string s1 = "";
+ string s2 = "";
+|};
+
+type StringRecord21 record {
+};
+
+type StringRecord22 record {|
+ string s1 = "";
+ string s2 = "";
+ json...;
+|};
+
+type StringRecord23 record {|
+ json...;
+|};
+
+type JsonRecord1 record {
+ json j1;
+ json j2;
+ json j3;
+};
+
+type JsonRecord2 record {|
+ json j1;
+ json j2;
+ json j3;
+|};
+
+type JsonRecord3 record {|
+ json j1;
+ json j4;
+|};
+
+type JsonRecord4 record {
+ json j1;
+ json j4;
+};
+
+type JsonRecord5 record {
+ json j1;
+ json j4;
+ json defaultableField = "";
+ json? nillableField = ();
+};
+
+type JsonRecord6 record {|
+ json j1;
+ json j4;
+ json defaultableField = "";
+ json? nillableField = ();
+|};
+
+type JsonRecord7 record {
+ json j1;
+ json j4;
+ json defaultableField = "";
+ json? nillableField = ();
+ json requiredField;
+};
+
+type JsonRecord8 record {|
+ json j1;
+ json j4;
+ json defaultableField = "";
+ json? nillableField = ();
+ json requiredField;
+|};
+
+type JsonRecord9 record {|
+ json j1;
+ json j2;
+ json...;
+|};
+
+type JsonRecord10 record {|
+ json...;
+|};
+
+type JsonRecord11 record {|
+ json j1;
+ json defaultableField = "";
+ json? nillableField = ();
+ json...;
+|};
+
+type JsonRecord12 record {|
+ json j1;
+ json defaultableField = "";
+ json? nillableField = ();
+ json requiredField;
+ json...;
+|};
+
+type JsonRecord13 record {|
+ json defaultableField = "";
+ json? nillableField = ();
+ json...;
+|};
+
+type JsonRecord14 record {|
+ json defaultableField = "";
+ json? nillableField = ();
+ json requiredField;
+ json...;
+|};
+
+type AnydataRecord1 record {
+ anydata anydata1;
+ anydata anydata2;
+ anydata anydata3;
+};
+
+type AnydataRecord2 record {|
+ anydata anydata1;
+ anydata anydata2;
+ anydata anydata3;
+|};
+
+type AnydataRecord3 record {|
+ anydata anydata1;
+ anydata anydata4;
+|};
+
+type AnydataRecord4 record {
+ anydata anydata1;
+ anydata anydata4;
+};
+
+type AnydataRecord5 record {
+ anydata anydata1;
+ anydata anydata4;
+ anydata defaultableField = "";
+ anydata? nillableField = ();
+};
+
+type AnydataRecord6 record {|
+ anydata anydata1;
+ anydata anydata4;
+ anydata defaultableField = "";
+ anydata? nillableField = ();
+|};
+
+type AnydataRecord7 record {
+ anydata anydata1;
+ anydata anydata4;
+ anydata defaultableField = "";
+ anydata? nillableField = ();
+ anydata requiredField;
+};
+
+type AnydataRecord8 record {|
+ anydata anydata1;
+ anydata anydata4;
+ anydata defaultableField = "";
+ anydata? nillableField = ();
+ anydata requiredField;
+|};
+
+type AnydataRecord9 record {|
+ anydata anydata1;
+ anydata anydata2;
+ anydata...;
+|};
+
+type AnydataRecord10 record {|
+ anydata...;
+|};
+
+type AnydataRecord11 record {|
+ anydata anydata1;
+ anydata defaultableField = "";
+ anydata? nillableField = ();
+ anydata...;
+|};
+
+type AnydataRecord12 record {|
+ anydata anydata1;
+ anydata defaultableField = "";
+ anydata? nillableField = ();
+ anydata requiredField;
+ anydata...;
+|};
+
+type AnydataRecord13 record {|
+ anydata defaultableField = "";
+ anydata? nillableField = ();
+ anydata...;
+|};
+
+type AnydataRecord14 record {|
+ anydata defaultableField = "";
+ anydata? nillableField = ();
+ anydata requiredField;
+ anydata...;
+|};
+
+type CustomRecord1 record {
+ int i1;
+ int i2;
+ string s1;
+ string s2;
+ boolean b1;
+ boolean b2;
+ () n1;
+ () n2;
+ float f1;
+ float f2;
+ decimal d1;
+ decimal d2;
+};
+
+type CustomRecord2 record {|
+ int i1;
+ int i2;
+ string s1;
+ string s2;
+ boolean b1;
+ boolean b2;
+ () n1;
+ () n2;
+ float f1;
+ float f2;
+ decimal d1;
+ decimal d2;
+|};
+
+type CustomRecord3 record {|
+ int i1;
+ string s1;
+ boolean b1;
+ () n1;
+ float f1;
+ decimal d1;
+|};
+
+type CustomRecord4 record {
+ int i1;
+ string s1;
+ boolean b1;
+ () n1;
+ float f1;
+ decimal d1;
+};
+
+type CustomRecord5 record {
+ int i1;
+ string s1;
+ boolean b1;
+ () n1;
+ float f1;
+ decimal d1;
+ string defaultableField = "";
+ string? nillableField = ();
+};
+
+type CustomRecord6 record {|
+ int i1;
+ string s1;
+ boolean b1;
+ () n1;
+ float f1;
+ decimal d1;
+ anydata defaultableField = "";
+ anydata? nillableField = ();
+|};
+
+type CustomRecord7 record {
+ int i1;
+ string s1;
+ boolean b1;
+ () n1;
+ float f1;
+ decimal d1;
+ anydata defaultableField = "";
+ anydata? nillableField = ();
+ anydata requiredField;
+};
+
+type CustomRecord8 record {|
+ int i1;
+ string s1;
+ boolean b1;
+ () n1;
+ float f1;
+ decimal d1;
+ anydata defaultableField = "";
+ anydata? nillableField = ();
+ anydata requiredField;
+|};
+
+type CustomRecord9 record {|
+ int i1;
+ string s1;
+ boolean b1;
+ () n1;
+ float f1;
+ decimal d1;
+ string...;
+|};
+
+type CustomRecord10 record {|
+ string...;
+|};
+
+type CustomRecord11 record {|
+ int i1;
+ string s1;
+ boolean b1;
+ () n1;
+ float f1;
+ decimal d1;
+ anydata defaultableField = "";
+ anydata? nillableField = ();
+ string...;
+|};
+
+type CustomRecord12 record {|
+ int i1;
+ string s1;
+ boolean b1;
+ () n1;
+ float f1;
+ decimal d1;
+ anydata defaultableField = "";
+ anydata? nillableField = ();
+ anydata requiredField;
+ string...;
+|};
+
+type CustomRecord13 record {|
+ anydata defaultableField = "";
+ anydata? nillableField = ();
+ string...;
+|};
+
+type CustomRecord14 record {|
+ anydata defaultableField = "";
+ anydata? nillableField = ();
+ anydata requiredField;
+ string...;
+|};
+
+type CustomRecord15 record {|
+ string '1;
+ string '2;
+|};
+
+type CustomRecord16 record {|
+ string '1;
+ string '2;
+ string '3;
+ string '4;
+|};
+
+type CustomRecord17 record {
+ string '1;
+ string '2;
+};
+
+type CustomRecord18 record {
+ string '1;
+ string '2;
+ string '3;
+ string '4;
+};
+
+type CustomRecord19 record {
+ string '1;
+ string '2;
+ string '3 = "";
+ string '4 = "";
+};
+
+type CustomRecord20 record {
+ string '1;
+};
+
+type CustomRecord21 record {|
+ string '1;
+ json...;
+|};
+
+type CustomRecord22 record {|
+ string '1;
+ string...;
+|};
+
+type CustomRecord23 record {|
+ string '1;
+ string a = "";
+ string...;
+|};
+
+type CustomRecord24 record {|
+ string '1;
+ string '2 = "";
+ string...;
+|};
+
+type CustomRecord25 record {|
+ int '1;
+ string...;
+|};
+
+type CustomRecord26 record {|
+ string '1;
+ int...;
+|};
+
+type CustomRecord27 record {|
+ int i1;
+ string s1;
+ boolean b1;
+ () n1;
+ float f1;
+ decimal d1;
+ anydata a1;
+ json j1;
+ anydata defaultableField = "";
+ anydata? nillableField = ();
+ string...;
+|};
+
+type CustomRecord28 record {
+ string '1;
+};
+
+type CustomRecord29 record {
+ int '1;
+};
+
+type CustomRecord30 record {|
+ string '1;
+ string '2;
+ string '3;
+ string '4;
+ string '5;
+ string '6;
+|};
+
+type CustomRecord31 record {|
+ string '1;
+ string '6;
+|};
+
+type CustomRecord32 record {|
+ int '1;
+|};
+
+type CustomRecord33 record {|
+ string '1;
+ string '2;
+ string '3;
+ string '4;
+ string '5;
+ string '6;
+|};
+
+type CustomRecord34 record {
+ string '1;
+ string '6;
+ string '5 = "";
+};
+
+type CustomRecord35 record {
+ string '1;
+ string '6;
+ string '9 = "";
+};
+
+type CustomRecord36 record {|
+ string '1;
+ string '6;
+ string '9 = "";
+|};
+
+type CustomRecord37 record {|
+ string '1;
+ string '6;
+ string '5 = "";
+|};
+
+type CustomRecord38 record {|
+ string '1;
+ string '2;
+ string '3;
+ string '4;
+ string '5;
+ string '6;
+ string ...;
+|};
+
+type CustomRecord39 record {|
+ string '1;
+ string '2;
+ string '3;
+ string '4;
+ string '5;
+ string '6;
+ json ...;
+|};
+
+type CustomRecord40 record {|
+ string '5;
+ string '6;
+ json ...;
+|};
+
+type CustomRecord41 record {|
+ json ...;
+|};
+
+type CustomRecord42 record {|
+ int '1;
+ string '2;
+ boolean '3;
+ decimal '4;
+ float '5;
+ () '6;
+|};
+
+type CustomRecord43 record {
+ int '1;
+ string '2;
+ boolean '3;
+ decimal '4;
+ float '5;
+ () '6;
+};
+
+type CustomRecord44 record {|
+ int '1;
+ string '2;
+ boolean '3;
+ decimal '4;
+ float '5;
+ () '6;
+ string ...;
+|};
+
+type CustomRecord45 record {|
+ int H1;
+ string H2;
+ boolean H3;
+ decimal H4;
+ float H5;
+ () H6;
+|};
+
+type CustomRecord46 record {
+ int H1;
+ string H2;
+ boolean H3;
+ decimal H4;
+ float H5;
+ () H6;
+};
+
+type CustomRecord47 record {|
+ int H1;
+ string H2;
+ boolean H3;
+ decimal H4;
+ float H5;
+ () H6;
+ string ...;
+|};
+
+type CustomRecord48 record {
+ string H1;
+ string H2;
+ string H3;
+ string H4;
+ string H5;
+ string H6;
+};
+
+type CustomRecord49 record {|
+ string H1;
+ string H2;
+ string H3;
+ string H4;
+ string H5;
+ string H6;
+|};
+
+type CustomRecord50 record {
+ int H1;
+ float H4;
+};
+
+type CustomRecord51 record {|
+ int H1;
+ float H4;
+|};
+
+type CustomRecord52 record {|
+ string H1;
+ string H4;
+ string ...;
+|};
+
+type CustomRecord53 record {|
+ int H1;
+ float H4;
+ decimal ...;
+|};
+
+type CustomRecord54 record {|
+ string H1 = "";
+ string H4;
+ string '1;
+|};
+
+type CustomRecord55 record {|
+ string H1 = "";
+ string H4 = "";
+ int '1 = 10;
+|};
+
+type CustomRecord56 record {
+ string H1 = "";
+ string H4 = "";
+ anydata '1 = 10;
+};
+
+type BooleanTuple1 [boolean, boolean, boolean, boolean];
+
+type BooleanTuple2 [boolean, boolean];
+
+type BooleanTuple3 [boolean, boolean...];
+
+type BooleanTuple4 [boolean...];
+
+type NillableBooleanTuple5 [boolean?, boolean?, boolean?, boolean?, boolean?];
+
+type NillableBooleanTuple6 [boolean?, boolean?];
+
+type NillableBooleanTuple7 [boolean?, boolean?, boolean?...];
+
+type NillableBooleanTuple8 [boolean?...];
+
+type NillableIntBooleanTuple9 [int|boolean?, int|boolean?...];
+
+type NilTuple1 [(), (), ()];
+
+type NilTuple2 [(), ()];
+
+type NilTuple3 [(), ()...];
+
+type NilTuple4 [()...];
+
+type IntegerTuple1 [int, int, int, int, int, int];
+
+type IntegerTuple2 [int, int];
+
+type IntegerTuple3 [int, int...];
+
+type IntegerTuple4 [int...];
+
+type FloatTuple1 [float, float, float, float, float, float, float];
+
+type FloatTuple2 [float, float];
+
+type FloatTuple3 [float, float...];
+
+type FloatTuple4 [float...];
+
+type DecimalTuple1 [decimal, decimal, decimal, decimal];
+
+type DecimalTuple2 [decimal, decimal];
+
+type DecimalTuple3 [decimal, decimal...];
+
+type DecimalTuple4 [decimal...];
+
+type StringTuple1 [string, string, string, string];
+
+type StringTuple2 [string, string];
+
+type StringTuple3 [string, string...];
+
+type StringTuple4 [string...];
+
+type AnydataTuple1 [anydata, anydata, anydata, anydata, anydata,
+ anydata, anydata, anydata, anydata, anydata, anydata, anydata,
+ anydata, anydata, anydata, anydata, anydata, anydata, anydata,
+ anydata, anydata, anydata, anydata];
+
+type AnydataTuple2 [anydata, anydata];
+
+type AnydataTuple3 [anydata, anydata...];
+
+type AnydataTuple4 [anydata...];
+
+type JsonTuple1 [json, json, json, json, json, json, json, json,
+ json, json, json, json, json, json, json, json, json, json,
+ json, json, json, json, json];
+
+type JsonTuple2 [json, json];
+
+type JsonTuple3 [json, json...];
+
+type JsonTuple4 [json...];
+
+type CustomTuple1 [string, int, decimal, float, (), boolean, anydata, json, string, int, decimal, float, (), boolean, anydata, json];
+
+type CustomTuple2 [string, int, decimal, float, (), boolean, anydata, json];
+
+type CustomTuple3 [string, int, decimal, float, (), boolean, anydata, json, string...];
+
+type CustomTuple4 [string...];
+
+type CustomTuple5 [string, int, decimal, float, (), boolean, anydata, json, anydata...];
+
+type CustomTuple6 [anydata...];
+
+type CustomTuple7 [int, string, boolean, (), float, decimal, json, anydata, string...];
+
+type CustomTuple8 [int, string, boolean, (), float, decimal, json, anydata, int...];
+
+type IntegerArray1 int[];
+
+type IntegerArray2 int[2];
+
+type IntegerArray3 int[];
+
+type IntegerArray4 int[2];
+
+type IntegerArray5 int[3];
+
+type IntegerArray6 int[4];
+
+type StringArray string[];
+
+type NillableStringArray string?[];
+
+type NillableIntOrUnionStringArray (int|string?)[];
+
+type StringArray1 string[];
+
+type StringArray2 string[2];
+
+type StringArray3 string[];
+
+type StringArray4 string[2];
+
+type StringArray5 string[3];
+
+type StringArray6 string[4];
+
+type FloatArray1 float[];
+
+type FloatArray2 float[2];
+
+type FloatArray3 float[];
+
+type FloatArray4 float[2];
+
+type FloatArray5 float[3];
+
+type FloatArray6 float[4];
+
+type DecimalArray1 decimal[];
+
+type DecimalArray2 decimal[2];
+
+type DecimalArray3 decimal[];
+
+type DecimalArray4 decimal[2];
+
+type DecimalArray5 decimal[3];
+
+type DecimalArray6 decimal[4];
+
+type BooleanArray boolean[];
+
+type NillableBooleanArray boolean?[];
+
+type NillableIntOrUnionBooleanArray (int|boolean?)[];
+
+type BooleanArray2 boolean[2];
+
+type BooleanArray3 boolean[3];
+
+type BooleanArray4 boolean[];
+
+type BooleanArray5 boolean[2];
+
+type BooleanArray6 boolean[4];
+
+type NilArray1 ()[];
+
+type NilArray2 ()[2];
+
+type NilArray3 ()[];
+
+type NilArray4 ()[2];
+
+type NilArray5 ()[3];
+
+type NilArray6 ()[4];
+
+type JsonArray1 json[];
+
+type JsonArray2 json[2];
+
+type JsonArray3 json[];
+
+type JsonArray4 json[2];
+
+type JsonArray5 json[3];
+
+type JsonArray6 json[4];
+
+type AnydataArray1 anydata[];
+
+type AnydataArray2 anydata[2];
+
+type AnydataArray3 anydata[];
+
+type AnydataArray4 anydata[2];
+
+type AnydataArray5 anydata[3];
+
+type AnydataArray6 anydata[4];
+
+type CustomArray1 CustomTuple2[];
+
+type CustomArray2 CustomTuple2[2];
+
+type CustomArray3 CustomTuple2[];
+
+type CustomArray4 CustomTuple2[2];
+
+type CustomArray5 CustomTuple2[3];
+
+type CustomArray6 CustomTuple2[4];
+
+type IntegerMap map;
+
+type StringMap map;
+
+type NillableIntUnionStringMap map;
+
+type IntUnionStringMap map;
+
+type DecimalMap map;
+
+type FloatMap map