Skip to content

Commit 5ed315e

Browse files
committed
tested maxInt limit
1 parent c8fdc18 commit 5ed315e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

utils_test.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -649,6 +649,17 @@ func TestAsUintRange(t *testing.T) {
649649
}
650650
}
651651

652+
func TestAsUintMaxRange(t *testing.T) {
653+
max := uint64(5)
654+
src := 10
655+
dest := asUint(src, 0, max)
656+
657+
if dest.(uint64) != max {
658+
t.Errorf("dest [%d] != %d", dest, max)
659+
}
660+
661+
}
662+
652663
func TestAsBoolNil(t *testing.T) {
653664
dest := asBool(nil)
654665

0 commit comments

Comments
 (0)