Permalink
Browse files

Reordered parameters to the Reduction function passed to NewTestTable

  • Loading branch information...
1 parent 444607e commit 3f0fa07bd1d5fe1c2bd47ccbd50b0939285b07ae @feyeleanor committed Nov 27, 2010
Showing with 3 additions and 3 deletions.
  1. +3 −3 test/test_table.go
View
@@ -2,7 +2,7 @@ package testLightly
import "fmt"
-type Reduction func(y, x interface{}) interface{}
+type Reduction func(x, y interface{}) interface{}
type ValueSet []interface{}
type TestTable struct {
@@ -30,8 +30,8 @@ func (t *TestTable) Y(value interface{}, compatibility... interface{}) *TestTabl
}
func (t *TestTable) Assess(T *Test) *TestTable {
- for row, x := range t.YValues {
- for column, y := range t.XValues {
+ for row, y := range t.YValues {
+ for column, x := range t.XValues {
expectation := t.compatibility[row][column]
if result := t.Apply(x, y); result != expectation {
T.Error(fmt.Sprintf("[%v, %v]", row, column), fmt.Sprintf("-> expected %v got %v", expectation, result))

0 comments on commit 3f0fa07

Please sign in to comment.