diff --git a/assert/assertion_order.go b/assert/assertion_order.go index 46f3cb4..b286e2d 100644 --- a/assert/assertion_order.go +++ b/assert/assertion_order.go @@ -9,7 +9,7 @@ import ( func isOrdered(t TestingT, object interface{}, allowedComparesResults []CompareType, failMessage string, msgAndArgs ...interface{}) bool { objKind := reflect.TypeOf(object).Kind() if objKind != reflect.Slice && objKind != reflect.Array { - return Fail(t, fmt.Sprintf("object %T is not a collection", object), msgAndArgs...) + return Fail(t, fmt.Sprintf("object %T is not an ordered collection", object), msgAndArgs...) } objValue := reflect.ValueOf(object) diff --git a/assert/assertion_order_test.go b/assert/assertion_order_test.go index e4f0e92..97dd77f 100644 --- a/assert/assertion_order_test.go +++ b/assert/assertion_order_test.go @@ -44,7 +44,7 @@ func TestIsIncreasing(t *testing.T) { {collection: []uint64{2, 1}, msg: `"2" is not less than "1"`}, {collection: []float32{2.34, 1.23}, msg: `"2.34" is not less than "1.23"`}, {collection: []float64{2.34, 1.23}, msg: `"2.34" is not less than "1.23"`}, - {collection: struct{}{}, msg: `object struct {} is not a collection`}, + {collection: struct{}{}, msg: `object struct {} is not an ordered collection`}, } { t.Run(fmt.Sprintf("%#v", currCase.collection), func(t *testing.T) { out := &outputT{buf: bytes.NewBuffer(nil)} @@ -92,7 +92,7 @@ func TestIsNonIncreasing(t *testing.T) { {collection: []uint64{1, 2}, msg: `"1" is not greater than or equal to "2"`}, {collection: []float32{1.23, 2.34}, msg: `"1.23" is not greater than or equal to "2.34"`}, {collection: []float64{1.23, 2.34}, msg: `"1.23" is not greater than or equal to "2.34"`}, - {collection: struct{}{}, msg: `object struct {} is not a collection`}, + {collection: struct{}{}, msg: `object struct {} is not an ordered collection`}, } { t.Run(fmt.Sprintf("%#v", currCase.collection), func(t *testing.T) { out := &outputT{buf: bytes.NewBuffer(nil)} @@ -140,7 +140,7 @@ func TestIsDecreasing(t *testing.T) { {collection: []uint64{1, 2}, msg: `"1" is not greater than "2"`}, {collection: []float32{1.23, 2.34}, msg: `"1.23" is not greater than "2.34"`}, {collection: []float64{1.23, 2.34}, msg: `"1.23" is not greater than "2.34"`}, - {collection: struct{}{}, msg: `object struct {} is not a collection`}, + {collection: struct{}{}, msg: `object struct {} is not an ordered collection`}, } { t.Run(fmt.Sprintf("%#v", currCase.collection), func(t *testing.T) { out := &outputT{buf: bytes.NewBuffer(nil)} @@ -188,7 +188,7 @@ func TestIsNonDecreasing(t *testing.T) { {collection: []uint64{2, 1}, msg: `"2" is not less than or equal to "1"`}, {collection: []float32{2.34, 1.23}, msg: `"2.34" is not less than or equal to "1.23"`}, {collection: []float64{2.34, 1.23}, msg: `"2.34" is not less than or equal to "1.23"`}, - {collection: struct{}{}, msg: `object struct {} is not a collection`}, + {collection: struct{}{}, msg: `object struct {} is not an ordered collection`}, } { t.Run(fmt.Sprintf("%#v", currCase.collection), func(t *testing.T) { out := &outputT{buf: bytes.NewBuffer(nil)}