mirror of
https://github.com/duke-git/lancet.git
synced 2026-02-17 11:12:28 +08:00
Add ToPointer,ToSlicePointer,ToSlice func (#36)
* Add ToPointer func * Add ToSlice and ToSlicePointer func Co-authored-by: zhanghu <305835360@qq.com>
This commit is contained in:
@@ -178,3 +178,10 @@ func TestColorRGBToHex(t *testing.T) {
|
||||
assert := internal.NewAssert(t, "TestColorRGBToHex")
|
||||
assert.Equal(expected, colorHex)
|
||||
}
|
||||
|
||||
func TestToPointer(t *testing.T) {
|
||||
assert := internal.NewAssert(t, "TestToPointer")
|
||||
result := ToPointer[int](123)
|
||||
|
||||
assert.Equal(*result, 123)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user