Skip to content

Commit e006e39

Browse files
committedJun 30, 2021
fix: fillPrimaryKey Uint #41
1 parent 5ba9519 commit e006e39

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
 

‎util_test.go

+21
Original file line numberDiff line numberDiff line change
@@ -235,3 +235,24 @@ func TestUtil_sortedParamKeys(t *testing.T) {
235235
}
236236
}
237237
}
238+
239+
func Test_fillPrimaryKey(t *testing.T) {
240+
var a int
241+
var b uint
242+
243+
{
244+
v := reflect.ValueOf(&a)
245+
fillPrimaryKey(v, 123)
246+
if a != 123 {
247+
t.Errorf("value want %d,but get %d", 123, a)
248+
}
249+
}
250+
251+
{
252+
v := reflect.ValueOf(&b)
253+
fillPrimaryKey(v, 465)
254+
if b != 465 {
255+
t.Errorf("value want %d,but get %d", 465, b)
256+
}
257+
}
258+
}

0 commit comments

Comments
 (0)