Skip to content

Commit

Permalink
fix: fillPrimaryKey Uint #41
Browse files Browse the repository at this point in the history
  • Loading branch information
fifsky committed Jun 30, 2021
1 parent 5ba9519 commit e006e39
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,3 +235,24 @@ func TestUtil_sortedParamKeys(t *testing.T) {
}
}
}

func Test_fillPrimaryKey(t *testing.T) {
var a int
var b uint

{
v := reflect.ValueOf(&a)
fillPrimaryKey(v, 123)
if a != 123 {
t.Errorf("value want %d,but get %d", 123, a)
}
}

{
v := reflect.ValueOf(&b)
fillPrimaryKey(v, 465)
if b != 465 {
t.Errorf("value want %d,but get %d", 465, b)
}
}
}

0 comments on commit e006e39

Please sign in to comment.