Add test
This commit is contained in:
parent
c65527f821
commit
11277ded5b
1 changed files with 8 additions and 0 deletions
|
@ -17,3 +17,11 @@ func TestIllegalField(t *testing.T) {
|
|||
|
||||
assert.Equal(t, "10 foo", s.String())
|
||||
}
|
||||
|
||||
func TestIllegalWrongFieldType(t *testing.T) {
|
||||
var s internal.Struct
|
||||
|
||||
assert.Panics(t, func() {
|
||||
illegal.SetPrivateField(&s, "a", "1234")
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue