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

     1  package math64
     2  
     3  import "testing"
     4  
     5  func Test_a1(t *testing.T) {
     6  	type args struct {
     7  		f float32
     8  	}
     9  	tests := []struct {
    10  		name string
    11  		args args
    12  		want uint32
    13  	}{
    14  		{
    15  			name: "t1",
    16  			args: args{f: 0.001},
    17  			want: 981668463,
    18  		},
    19  	}
    20  	for _, tt := range tests {
    21  		t.Run(tt.name, func(t *testing.T) {
    22  			if got := a1(tt.args.f); got != tt.want {
    23  				t.Errorf("a1() = %v, want %v", got, tt.want)
    24  			}
    25  		})
    26  	}
    27  }