refactored tests based on test-file.txt; this file is no more needed
This commit is contained in:
+1
-4
@@ -130,8 +130,6 @@ func TestFilterIterator(t *testing.T) {
|
||||
inputs := []inputType{
|
||||
/* 1 */ {`$$([1,2,3] filter $_%2==0)`, list.NewLinkedListA(2), nil},
|
||||
/* 2 */ {`it = [1,2,3] filter $_%2!=1; $$(it)`, list.NewLinkedListA(2), nil},
|
||||
/* 3 */ {`builtin "os.file"; #$$(fileLineIterator("test-file.txt") filter (#${_} == 2))`, int64(0), nil},
|
||||
/* 4 */ {`builtin "os.file"; #$$(fileLineIterator("test-file.txt") filter (#${_} == 3))`, int64(2), nil},
|
||||
}
|
||||
|
||||
// runTestSuiteSpec(t, section, inputs, 2)
|
||||
@@ -171,8 +169,7 @@ func TestMapIterator(t *testing.T) {
|
||||
/* 1 */ {`$$([3,4,5] map ${_#})`, list.NewLinkedListA(1, 2, 3), nil},
|
||||
/* 2 */ {`#$$($(..10) map ${_})`, int64(10), nil},
|
||||
/* 3 */ {`#$$($(10..0) map ${_})`, int64(10), nil},
|
||||
/* 4 */ {`builtin "os.file"; $$(fileLineIterator("test-file.txt") map ${__})`, list.NewLinkedListA(0, 1), nil},
|
||||
/* 5 */ {`$$(["1", "2", "3"] map int())`, nil, `int(): too few params -- expected 1, got 0`},
|
||||
/* 4 */ {`$$(["1", "2", "3"] map int())`, nil, `int(): too few params -- expected 1, got 0`},
|
||||
}
|
||||
|
||||
// runTestSuiteSpec(t, section, inputs, 2)
|
||||
|
||||
Reference in New Issue
Block a user