| 386 | } |
| 387 | |
| 388 | func TestEmptyWrapper(t *testing.T) { |
| 389 | t.Parallel() |
| 390 | |
| 391 | assert := New(t) |
| 392 | mockAssert := New(new(testing.T)) |
| 393 | |
| 394 | assert.True(mockAssert.Empty(""), "Empty string is empty") |
| 395 | assert.True(mockAssert.Empty(nil), "Nil is empty") |
| 396 | assert.True(mockAssert.Empty([]string{}), "Empty string array is empty") |
| 397 | assert.True(mockAssert.Empty(0), "Zero int value is empty") |
| 398 | assert.True(mockAssert.Empty(false), "False value is empty") |
| 399 | |
| 400 | assert.False(mockAssert.Empty("something"), "Non Empty string is not empty") |
| 401 | assert.False(mockAssert.Empty(errors.New("something")), "Non nil object is not empty") |
| 402 | assert.False(mockAssert.Empty([]string{"something"}), "Non empty string array is not empty") |
| 403 | assert.False(mockAssert.Empty(1), "Non-zero int value is not empty") |
| 404 | assert.False(mockAssert.Empty(true), "True value is not empty") |
| 405 | |
| 406 | } |
| 407 | |
| 408 | func TestNotEmptyWrapper(t *testing.T) { |
| 409 | t.Parallel() |