1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-08 22:52:29 +08:00

fix: Fixed the issue of missing cap when StringToBytes returns result (#306)

Co-authored-by: 燕归来 <dylan@infinni.io>
This commit is contained in:
燕归来
2025-05-14 15:08:12 +08:00
committed by GitHub
parent 03f0d4d905
commit e78ac65605
2 changed files with 6 additions and 2 deletions

View File

@@ -518,7 +518,8 @@ func TestStringToBytes(t *testing.T) {
assert := internal.NewAssert(t, "TestStringToBytes")
bytes := StringToBytes("abc")
assert.Equal(bytes, []byte{'a', 'b', 'c'})
assert.Equal([]byte{'a', 'b', 'c'}, bytes)
assert.Equal(3, cap(bytes))
}
func TestBytesToString(t *testing.T) {