Add test for get customized types

This commit is contained in:
Lunny Xiao 2022-11-12 08:56:26 +08:00
parent 3acabdaf26
commit a7809284a6
No known key found for this signature in database
GPG Key ID: C3B7C91B632F738A
1 changed files with 8 additions and 0 deletions

View File

@ -1012,4 +1012,12 @@ func TestGetBytesVars(t *testing.T) {
assert.True(t, has)
assert.EqualValues(t, []byte("bytes1-1"), gbv.Bytes1)
assert.EqualValues(t, []byte("bytes2-2"), gbv.Bytes2)
type MyID int64
var myID MyID
has, err = testEngine.Table("get_bytes_vars").Get(&myID)
assert.NoError(t, err)
assert.True(t, has)
assert.EqualValues(t, gbv.Id, myID)
}