@@ -91,7 +91,7 @@ func TestComparerFuncs(t *testing.T) {
9191 case "separator" :
9292 var keys [][]byte
9393 var dst []byte
94- for _ , line := range crstrings .Lines (td .Input ) {
94+ for line := range crstrings .LinesSeq (td .Input ) {
9595 keys = keys [:0 ]
9696 for _ , formattedKey := range strings .Fields (line ) {
9797 k := ParseFormattedKey (formattedKey )
@@ -107,7 +107,7 @@ func TestComparerFuncs(t *testing.T) {
107107 return buf .String ()
108108 case "successor" :
109109 var dst []byte
110- for _ , line := range crstrings .Lines (td .Input ) {
110+ for line := range crstrings .LinesSeq (td .Input ) {
111111 k := ParseFormattedKey (line )
112112 dst = Comparer .Successor (dst [:0 ], k )
113113 fmt .Fprintf (& buf , "Successor(%q [%x]) = %q [%x]\n " ,
@@ -222,7 +222,7 @@ func TestKeySchema_KeySeeker(t *testing.T) {
222222 enc .Reset ()
223223 maxKeyLen = 0
224224 var rows int
225- for _ , line := range crstrings .Lines (td .Input ) {
225+ for line := range crstrings .LinesSeq (td .Input ) {
226226 k := parseUserKey (line )
227227 fmt .Fprintf (& buf , "Parse(%s) = hex:%x\n " , line , k )
228228 maxKeyLen = max (maxKeyLen , len (k ))
@@ -241,15 +241,15 @@ func TestKeySchema_KeySeeker(t *testing.T) {
241241 initKeySeeker ()
242242 syntheticSuffix , syntheticSuffixStr , _ := getSyntheticSuffix (t , td )
243243
244- for _ , line := range crstrings .Lines (td .Input ) {
244+ for line := range crstrings .LinesSeq (td .Input ) {
245245 k := parseUserKey (line )
246246 got := ks .IsLowerBound (k , syntheticSuffix )
247247 fmt .Fprintf (& buf , "IsLowerBound(%s, %q) = %t\n " , line , syntheticSuffixStr , got )
248248 }
249249 return buf .String ()
250250 case "seek-ge" :
251251 initKeySeeker ()
252- for _ , line := range crstrings .Lines (td .Input ) {
252+ for line := range crstrings .LinesSeq (td .Input ) {
253253 k := parseUserKey (line )
254254 boundRow := - 1
255255 searchDir := 0
@@ -273,7 +273,7 @@ func TestKeySchema_KeySeeker(t *testing.T) {
273273 var kiter colblk.PrefixBytesIter
274274 kiter .Buf = make ([]byte , maxKeyLen + len (syntheticSuffix )+ 1 )
275275 prevRow := - 1
276- for _ , line := range crstrings .Lines (td .Input ) {
276+ for line := range crstrings .LinesSeq (td .Input ) {
277277 row , err := strconv .Atoi (line )
278278 if err != nil {
279279 t .Fatalf ("bad row number %q: %s" , line , err )
0 commit comments