1
0
mirror of https://github.com/alecthomas/chroma.git synced 2025-12-03 22:59:11 +02:00

refactor: Iterator -> iter.Seq[Token]

This commit is contained in:
Alec Thomas
2025-09-21 20:08:46 +10:00
parent 26ea2fc245
commit ca57a0bae1
28 changed files with 96 additions and 83 deletions

View File

@@ -1,6 +1,7 @@
package chroma
import (
"slices"
"testing"
assert "github.com/alecthomas/assert/v2"
@@ -104,7 +105,7 @@ func TestDelegate(t *testing.T) {
t.Run(test.name, func(t *testing.T) {
it, err := delegate.Tokenise(nil, test.source)
assert.NoError(t, err)
actual := it.Tokens()
actual := slices.Collect(it)
assert.Equal(t, test.expected, actual)
})
}