Skip to content

Commit

Permalink
Add clone test case for streams
Browse files Browse the repository at this point in the history
  • Loading branch information
nipunayf committed Jul 19, 2024
1 parent b0a4321 commit 087ebac
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ public Object[][] dataProvider() {
{"clone_value_config24.json"},
{"clone_value_config25.json"},
{"clone_value_config26.json"},
{"clone_value_config27.json"}
{"clone_value_config27.json"},
{"clone_value_config28.json"}
};
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"position": {
"line": 4,
"character": 17
},
"source": "clone_value9.bal",
"description": "Clone a record value",
"expected": [
{
"title": "Clone the value",
"kind": "quickfix",
"edits": [
{
"range": {
"start": {
"line": 4,
"character": 32
},
"end": {
"line": 4,
"character": 32
}
},
"newText": ".clone()"
}
],
"resolvable": false
},
{
"title": "Clone as a readonly value",
"kind": "quickfix",
"edits": [
{
"range": {
"start": {
"line": 4,
"character": 32
},
"end": {
"line": 4,
"character": 32
}
},
"newText": ".cloneReadOnly()"
}
],
"resolvable": false
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
isolated stream<string[]> streamName = new;

isolated function isolatedFn3() returns record {| string[] value; |}? {
lock {
return streamName.next();
}
}

0 comments on commit 087ebac

Please sign in to comment.