From c94cb5c23072c009e7027907033fbb05cea056b3 Mon Sep 17 00:00:00 2001 From: Dennis Coldwell Date: Fri, 20 Nov 2015 23:35:46 -0800 Subject: [PATCH 1/2] small fix for example formatting on Empty func --- assert/assertions.go | 2 +- assert/forward_assertions.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assert/assertions.go b/assert/assertions.go index f9f56a5..22e7d0f 100644 --- a/assert/assertions.go +++ b/assert/assertions.go @@ -382,7 +382,7 @@ func isEmpty(object interface{}) bool { // Empty asserts that the specified object is empty. I.e. nil, "", false, 0 or either // a slice or a channel with len == 0. // -// assert.Empty(t, obj) +// assert.Empty(t, obj) // // Returns whether the assertion was successful (true) or not (false). func Empty(t TestingT, object interface{}, msgAndArgs ...interface{}) bool { diff --git a/assert/forward_assertions.go b/assert/forward_assertions.go index 3a21ee9..2e7bfc6 100644 --- a/assert/forward_assertions.go +++ b/assert/forward_assertions.go @@ -81,7 +81,7 @@ func (a *Assertions) Nil(object interface{}, msgAndArgs ...interface{}) bool { // Empty asserts that the specified object is empty. I.e. nil, "", false, 0 or a // slice with len == 0. // -// assert.Empty(obj) +// assert.Empty(obj) // // Returns whether the assertion was successful (true) or not (false). func (a *Assertions) Empty(object interface{}, msgAndArgs ...interface{}) bool { From a3045216a73d46e9cedec0361f0e1e2eb1df48ae Mon Sep 17 00:00:00 2001 From: Dennis Coldwell Date: Fri, 20 Nov 2015 23:49:31 -0800 Subject: [PATCH 2/2] found another formatting issue with NotEmpty func --- assert/assertions.go | 6 +++--- assert/forward_assertions.go | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/assert/assertions.go b/assert/assertions.go index 22e7d0f..1935d18 100644 --- a/assert/assertions.go +++ b/assert/assertions.go @@ -399,9 +399,9 @@ func Empty(t TestingT, object interface{}, msgAndArgs ...interface{}) bool { // NotEmpty asserts that the specified object is NOT empty. I.e. not nil, "", false, 0 or either // a slice or a channel with len == 0. // -// if assert.NotEmpty(t, obj) { -// assert.Equal(t, "two", obj[1]) -// } +// if assert.NotEmpty(t, obj) { +// assert.Equal(t, "two", obj[1]) +// } // // Returns whether the assertion was successful (true) or not (false). func NotEmpty(t TestingT, object interface{}, msgAndArgs ...interface{}) bool { diff --git a/assert/forward_assertions.go b/assert/forward_assertions.go index 2e7bfc6..cab3aa2 100644 --- a/assert/forward_assertions.go +++ b/assert/forward_assertions.go @@ -91,9 +91,9 @@ func (a *Assertions) Empty(object interface{}, msgAndArgs ...interface{}) bool { // NotEmpty asserts that the specified object is NOT empty. I.e. not nil, "", false, 0 or a // slice with len == 0. // -// if assert.NotEmpty(obj) { -// assert.Equal("two", obj[1]) -// } +// if assert.NotEmpty(obj) { +// assert.Equal("two", obj[1]) +// } // // Returns whether the assertion was successful (true) or not (false). func (a *Assertions) NotEmpty(object interface{}, msgAndArgs ...interface{}) bool {