File tree Expand file tree Collapse file tree 1 file changed +3
-13
lines changed Expand file tree Collapse file tree 1 file changed +3
-13
lines changed Original file line number Diff line number Diff line change @@ -1053,24 +1053,14 @@ func TestDumpJSON(t *testing.T) {
10531053 })
10541054}
10551055
1056- type hasStringer struct {
1057- internal string
1058- }
1059-
1060- func (hasStringer ) String () string {
1061- return "stringer value"
1062- }
1063-
10641056func TestDisableMethods (t * testing.T ) {
1065- data := hasStringer {
1066- internal : "internal value" ,
1067- }
1057+ data := hidden {secret : "not so secret" }
10681058
10691059 d := NewDumper (WithDisableMethods (true ))
10701060 v := d .DumpStr (data )
1071- require .Contains (t , v , "internal value " )
1061+ require .Contains (t , v , "not so secret " )
10721062
10731063 d = NewDumper ()
10741064 v = d .DumpStr (data )
1075- require .Contains (t , v , "stringer value " )
1065+ assert .Contains (t , v , "👻 hidden stringer " )
10761066}
You can’t perform that action at this time.
0 commit comments