@@ -718,7 +718,7 @@ func NotEqualValues(t TestingT, expected, actual interface{}, msgAndArgs ...inte
718718// return (false, false) if impossible.
719719// return (true, false) if element was not found.
720720// return (true, true) if element was found.
721- func includeElement (list interface {}, element interface {}) (ok , found bool ) {
721+ func containsElement (list interface {}, element interface {}) (ok , found bool ) {
722722
723723 listValue := reflect .ValueOf (list )
724724 listType := reflect .TypeOf (list )
@@ -768,7 +768,7 @@ func Contains(t TestingT, s, contains interface{}, msgAndArgs ...interface{}) bo
768768 h .Helper ()
769769 }
770770
771- ok , found := includeElement (s , contains )
771+ ok , found := containsElement (s , contains )
772772 if ! ok {
773773 return Fail (t , fmt .Sprintf ("%#v could not be applied builtin len()" , s ), msgAndArgs ... )
774774 }
@@ -791,7 +791,7 @@ func NotContains(t TestingT, s, contains interface{}, msgAndArgs ...interface{})
791791 h .Helper ()
792792 }
793793
794- ok , found := includeElement (s , contains )
794+ ok , found := containsElement (s , contains )
795795 if ! ok {
796796 return Fail (t , fmt .Sprintf ("\" %s\" could not be applied builtin len()" , s ), msgAndArgs ... )
797797 }
@@ -835,7 +835,7 @@ func Subset(t TestingT, list, subset interface{}, msgAndArgs ...interface{}) (ok
835835
836836 for i := 0 ; i < subsetValue .Len (); i ++ {
837837 element := subsetValue .Index (i ).Interface ()
838- ok , found := includeElement (list , element )
838+ ok , found := containsElement (list , element )
839839 if ! ok {
840840 return Fail (t , fmt .Sprintf ("\" %s\" could not be applied builtin len()" , list ), msgAndArgs ... )
841841 }
@@ -879,7 +879,7 @@ func NotSubset(t TestingT, list, subset interface{}, msgAndArgs ...interface{})
879879
880880 for i := 0 ; i < subsetValue .Len (); i ++ {
881881 element := subsetValue .Index (i ).Interface ()
882- ok , found := includeElement (list , element )
882+ ok , found := containsElement (list , element )
883883 if ! ok {
884884 return Fail (t , fmt .Sprintf ("\" %s\" could not be applied builtin len()" , list ), msgAndArgs ... )
885885 }
0 commit comments