| 1 |
// Copyright (c) 2018, Maxime Soulé |
| 2 |
// All rights reserved. |
| 3 |
// |
| 4 |
// This source code is licensed under the BSD-style license found in the |
| 5 |
// LICENSE file in the root directory of this source tree. |
| 6 |
|
| 7 |
package td_test |
| 8 |
|
| 9 |
import ( |
| 10 |
"testing" |
| 11 |
|
| 12 |
"github.com/maxatome/go-testdeep/internal/test" |
| 13 |
"github.com/maxatome/go-testdeep/td" |
| 14 |
) |
| 15 |
|
| 16 |
func TestIgnore(t *testing.T) { |
| 17 |
checkOK(t, "any value!", td.Ignore()) |
| 18 |
|
| 19 |
checkOK(t, nil, td.Ignore()) |
| 20 |
checkOK(t, (*int)(nil), td.Ignore()) |
| 21 |
|
| 22 |
// |
| 23 |
// String |
| 24 |
test.EqualStr(t, td.Ignore().String(), "Ignore()") |
| 25 |
} |
| 26 |
|
| 27 |
func TestIgnoreTypeBehind(t *testing.T) { |
| 28 |
equalTypes(t, td.Ignore(), nil) |
| 29 |
} |