super 包添加 Convert 函数的单元测试
This commit is contained in:
kercylan98 2023-07-27 18:26:21 +08:00
parent 867d1ecf82
commit 930fe159bf
1 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,18 @@
package super_test
import (
"fmt"
"github.com/kercylan98/minotaur/utils/super"
"go.uber.org/atomic"
"testing"
)
func TestConvert(t *testing.T) {
type B struct {
nocmp [0]func()
v atomic.Value
}
var a = atomic.NewString("hello")
var b = super.Convert[*atomic.String, *B](a)
fmt.Println(b.v.Load())
}