Skip to content

Commit

Permalink
chore: replace for with range loop
Browse files Browse the repository at this point in the history
  • Loading branch information
qvalentin committed Jan 17, 2025
1 parent cfcfb2e commit 9ec3efb
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions test/corpus_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,12 @@ func NewTestCase(file, name, input, sExpression string) TestCase {

func getTestCasesForFile(filename string, content string) []TestCase {
testCases := []TestCase{}
partsWithEmptyParts := TESTCASE_SEPERATOR.Split(content, -1)
parts := []string{}

// remove empty parts
for i := 0; i < len(partsWithEmptyParts); i++ {
if partsWithEmptyParts[i] != "" {
parts = append(parts, partsWithEmptyParts[i])
// split and remove empty parts
for _, part := range TESTCASE_SEPERATOR.Split(content, -1) {
if part != "" {
parts = append(parts, part)
}
}

Expand Down

0 comments on commit 9ec3efb

Please sign in to comment.