mirror of
https://github.com/charlienet/go-mixed.git
synced 2025-07-18 08:32:40 +08:00
22 lines
337 B
Go
22 lines
337 B
Go
package structs_test
|
|
|
|
import (
|
|
"reflect"
|
|
"testing"
|
|
|
|
"github.com/charlienet/go-mixed/structs"
|
|
"github.com/go-playground/assert/v2"
|
|
)
|
|
|
|
func TestNew(t *testing.T) {
|
|
o := struct {
|
|
Field1Name string
|
|
}{Field1Name: "field 1 name"}
|
|
|
|
s := structs.New(o)
|
|
assert.Equal(t, reflect.Struct, s.Kind())
|
|
|
|
t.Log(s.Names())
|
|
t.Log(s.Values())
|
|
}
|