gitee.com/quant1x/num@v0.3.2/type_generic_test.go (about)

     1  package num
     2  
     3  import (
     4  	"reflect"
     5  	"testing"
     6  )
     7  
     8  func TestCheckoutRawType(t *testing.T) {
     9  	type args struct {
    10  		frame any
    11  	}
    12  	tests := []struct {
    13  		name string
    14  		args args
    15  		want reflect.Kind
    16  	}{
    17  		{
    18  			name: "ints",
    19  			args: args{frame: []float64{0}},
    20  			want: reflect.Float64,
    21  		},
    22  	}
    23  	for _, tt := range tests {
    24  		t.Run(tt.name, func(t *testing.T) {
    25  			if got := CheckoutRawType(tt.args.frame); got != tt.want {
    26  				t.Errorf("CheckoutRawType() = %v, want %v", got, tt.want)
    27  			}
    28  		})
    29  	}
    30  }