Skip to content

Commit ef3652c

Browse files
Equals -> Equal
1 parent 983502b commit ef3652c

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

tools/wstest.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ var stepFuncs = map[*regexp.Regexp]func(*runner, []string, interface{}) error{
212212
actual, err := ws.Get(key)
213213
if err != nil {
214214
return err
215-
} else if !value.Equals(actual) {
215+
} else if !value.Equal(actual) {
216216
return fmt.Errorf("%s.%s expected %s, actual %s", varname, key, value, actual)
217217
}
218218
}

values.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ type Value interface {
2424
// Type returns this value's type.
2525
Type() Type
2626

27-
// Equals returns a comparison on this value against that value.
28-
Equals(that Value) bool
27+
// Equal returns a comparison on this value against that value.
28+
Equal(that Value) bool
2929

3030
// String returns a string representation of the value.
3131
String() string
@@ -68,7 +68,7 @@ func (value *tUndefined) Type() Type {
6868
return &tUndefinedType{}
6969
}
7070

71-
func (value *tUndefined) Equals(that Value) bool {
71+
func (value *tUndefined) Equal(that Value) bool {
7272
_, ok := that.(*tUndefined)
7373
return ok
7474
}
@@ -81,7 +81,7 @@ func (value *tNumber) Type() Type {
8181
return value.typ
8282
}
8383

84-
func (value *tNumber) Equals(that Value) bool {
84+
func (value *tNumber) Equal(that Value) bool {
8585
typed, ok := that.(*tNumber)
8686
if !ok {
8787
return false
@@ -136,7 +136,7 @@ func (value *tText) String() string {
136136
return strconv.Quote(value.value)
137137
}
138138

139-
func (value *tText) Equals(that Value) bool {
139+
func (value *tText) Equal(that Value) bool {
140140
typed, ok := that.(*tText)
141141
if !ok {
142142
return false
@@ -152,7 +152,7 @@ func (value *tBool) Type() Type {
152152
return &tBoolType{}
153153
}
154154

155-
func (value *tBool) Equals(that Value) bool {
155+
func (value *tBool) Equal(that Value) bool {
156156
typed, ok := that.(*tBool)
157157
if !ok {
158158
return false

values_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ func (s *Zuite) TestValueString() {
3636
}
3737
}
3838

39-
func (s *Zuite) TestValueEquals() {
39+
func (s *Zuite) TestValueEqual() {
4040
// a.k.a. congruence classes
4141
buckets := [][]Value{
4242
{
@@ -78,7 +78,7 @@ func (s *Zuite) TestValueEquals() {
7878
for j = i + 1; j < len(bucket); j++ {
7979
this := bucket[i]
8080
that := bucket[j]
81-
assert.True(s.T(), this.Equals(that), "%s == %s", this, that)
81+
assert.True(s.T(), this.Equal(that), "%s == %s", this, that)
8282
}
8383
}
8484
}
@@ -90,7 +90,7 @@ func (s *Zuite) TestValueEquals() {
9090
thatBucket := buckets[j]
9191
for _, this := range thisBucket {
9292
for _, that := range thatBucket {
93-
assert.True(s.T(), !this.Equals(that), "%s != %s", this, that)
93+
assert.True(s.T(), !this.Equal(that), "%s != %s", this, that)
9494
}
9595
}
9696
}

worksheets.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ func (ws *Worksheet) diff() map[int]Value {
264264
diff[index] = &tUndefined{}
265265
} else if !hasOrig && hasData {
266266
diff[index] = data
267-
} else if !orig.Equals(data) {
267+
} else if !orig.Equal(data) {
268268
diff[index] = data
269269
}
270270
}

0 commit comments

Comments
 (0)