iter-iter: changed item operation from function and args to a list of expressions
This commit is contained in:
+4
-3
@@ -14,11 +14,12 @@ func TestIterIterator(t *testing.T) {
|
||||
section := "Iterator"
|
||||
inputs := []inputType{
|
||||
/* 1 */ {`it=$(4); $(it) filter ${_}==100`, kern.NewListA(), nil},
|
||||
/* 2 */ {`it=$(4); $(it, func(){$_}) filter ${_}==100`, kern.NewListA(), nil},
|
||||
/* 3 */ {`it=$(4); $(it, func(arg1){arg1+$_}, 10) filter ${_}==100`, kern.NewListA(), nil},
|
||||
/* 2 */ {`it=$(4); $(it, $_) filter ${_}==100`, kern.NewListA(), nil},
|
||||
/* 3 */ {`it=$(4); $(it, 10+$_, last-1) digest ${_}`, int64(12), nil},
|
||||
/* 4 */ {`f=func(n){last-n}; it=$(4); $(it, 10+$_, f(-1)) digest ${_}`, int64(14), nil},
|
||||
}
|
||||
|
||||
runTestSuiteSpec(t, section, inputs, 3)
|
||||
runTestSuiteSpec(t, section, inputs, 4)
|
||||
// runTestSuite(t, section, inputs)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user