Reset() and Clean() have new, simpler signature
This commit is contained in:
+4
-2
@@ -17,7 +17,7 @@ func TestIteratorParser(t *testing.T) {
|
||||
/* 6 */ {`builtin "math.arith"; include "test-resources/iterator.expr"; it=$(ds,3); mul(it)`, int64(0), nil},
|
||||
/* 7 */ {`builtin "math.arith"; include "test-resources/file-reader.expr"; it=$(ds,"test-resources/int.list"); mul(it)`, int64(12000), nil},
|
||||
/* 8 */ {`include "test-resources/file-reader.expr"; it=$(ds,"test-resources/int.list"); it++; it.index`, int64(0), nil},
|
||||
/* 9 */ {`include "test-resources/file-reader.expr"; it=$(ds,"test-resources/int.list"); it.clean`, true, nil},
|
||||
/* 9 */ {`include "test-resources/file-reader.expr"; it=$(ds,"test-resources/int.list"); it.clean`, nil, nil},
|
||||
/* 10 */ {`it=$(1,2,3); it++`, int64(1), nil},
|
||||
/* 11 */ {`it=$(1,2,3); it++; it.reset; it++`, int64(1), nil},
|
||||
/* 12 */ {`it=$([1,2,3,4],1); it++`, int64(2), nil},
|
||||
@@ -25,8 +25,10 @@ func TestIteratorParser(t *testing.T) {
|
||||
/* 14 */ {`it=$([1,2,3,4],1,3,2); it++; it++;`, int64(4), nil},
|
||||
/* 15 */ {`it=$([1,2,3,4],1,2,2); it++; it++;`, nil, `EOF`},
|
||||
/* 16 */ {`include "test-resources/filter.expr"; it=$(ds,10); it++`, int64(2), nil},
|
||||
/* 17 */ {`it=$({"next":func(){5}}); it++`, int64(5), nil},
|
||||
/* 18 */ {`it=$({"next":func(){5}}); it.clean`, nil, nil},
|
||||
}
|
||||
|
||||
// runTestSuiteSpec(t, section, inputs, 11)
|
||||
//runTestSuiteSpec(t, section, inputs, 18)
|
||||
runTestSuite(t, section, inputs)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user