Skip to content

Commit

Permalink
Assert the number of scalar events
Browse files Browse the repository at this point in the history
  • Loading branch information
nipunayf committed Feb 9, 2024
1 parent 4e48b26 commit d2701e3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ballerina/modules/serializer/tests/lib_test.bal
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,11 @@ function testScalarWithNewLines(json line, string[] expectedOutputs) returns err
int index = 0;
foreach common:Event event in events {
if event is common:ScalarEvent {
test:assertEquals(event.value, string `"${expectedOutputs[++index]}"`);
break;
test:assertEquals(event.value, string `"${expectedOutputs[index]}"`);
index += 1;
}
}
test:assertEquals(index, expectedOutputs.length());
}

function scalarWithNewLinesDataGen()returns map<[json, string[]]> =>
Expand Down

0 comments on commit d2701e3

Please sign in to comment.