Skip to content

Commit

Permalink
Fix tests with duplicate type definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
heshanpadmasiri committed Oct 9, 2024
1 parent 55d4958 commit 005e425
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
[
{
"description": "Define types.",
"code": "type Address record { string country; string state; string city; string street; }; type Person record { string name; int age; boolean married; float salary; Address address; };"
"code": "type AddressCloneTest record { string country; string state; string city; string street; }; type PersonCloneTest record { string name; int age; boolean married; float salary; AddressCloneTest address; };"
},
{
"description": "Define address.",
"code": "Address address = { country: \"USA\", state: \"NC\", city: \"Raleigh\", street: \"Daniels St\" };"
"code": "AddressCloneTest address = { country: \"USA\", state: \"NC\", city: \"Raleigh\", street: \"Daniels St\" };"
},
{
"description": "Define person.",
"code": "Person person = { name: \"Alex\", age: 24, married: false, salary: 8000.0, address: address };"
"code": "PersonCloneTest person = { name: \"Alex\", age: 24, married: false, salary: 8000.0, address: address };"
},
{
"description": "Clone operation.",
"code": "Person result = person.clone();"
"code": "PersonCloneTest result = person.clone();"
},
{
"description": "Check reference equality.",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
[
{
"description": "Define Details.",
"code": "type Details record {| string name; int id; |};"
"code": "type DetailsImmutableTest record {| string name; int id; |};"
},
{
"description": "Define Student.",
"code": "type Student record {| int 'class; Details details; map<int> marks; |};"
"code": "type StudentImmutableTest record {| int 'class; DetailsImmutableTest details; map<int> marks; |};"
},
{
"description": "Define addEntryToMap.",
"code": "function addEntryToMap(map<string|int> m, string key, string|int value) { m[key] = value; }"
},
{
"description": "Define immutable Details",
"code": "Details & readonly immutableDetails = { name: \"May\", id: 112233 };"
"code": "DetailsImmutableTest & readonly immutableDetails = { name: \"May\", id: 112233 };"
},
{
"description": "Define immutable Student &",
"code": "Student & readonly student = { 'class: 12, details: immutableDetails, marks: { math: 80, physics: 85, chemistry: 75 } };"
"code": "StudentImmutableTest & readonly student = { 'class: 12, details: immutableDetails, marks: { math: 80, physics: 85, chemistry: 75 } };"
},
{
"description": "Readonly status of student.",
Expand Down

0 comments on commit 005e425

Please sign in to comment.