Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
AsterDY committed May 17, 2024
1 parent bf0857e commit e237995
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/rt/stub_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ func TestGrowSlic(t *testing.T) {
println("n len:", len(n), "cap:", cap(n))
v := GrowSlice(et, *(*GoSlice)(unsafe.Pointer(&n)), 1025)
println("v len:", v.Len, "cap:", v.Cap)
// according to go growslice rule, the next cap must be 1.5x of old.Cap
if v.Cap != 1536 {
// according to go growslice rule, the next cap must be at most 1.5x of old.Cap
if v.Cap > 1536 {
t.Fatal(v.Cap)
}
}

0 comments on commit e237995

Please sign in to comment.