You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: gen_test.go
    path of file: ./repos/vald/internal/test/data/vector
    
    the code of the file until where you have to start completion: // Copyright (C) 2019-2024 vdaas.org vald team <vald@vdaas.org>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// You may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//	https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package vector

import (
	"math"
	"reflect"
	"testing"

	"github.com/vdaas/vald/internal/errors"
	"github.com/vdaas/vald/internal/test/goleak"
)

func TestFloat32VectorGenerator(t *testing.T) {
	type args struct {
		d   Distribution
		n   int
		dim int
	}
	type want struct {
		n   int
		dim int
		err error
	}
	type test struct {
		name       string
		args       args
		want       want
		checkFunc  func(args, want, Float32VectorGeneratorFunc, error) error
		beforeFunc func(args)
		afterFunc  func(args)
	}
	defaultCheckFunc := func(a args, w want, got Float32VectorGeneratorFunc, err error) error {
		if !errors.Is(err, w.err) {
			return errors.Errorf("got_error: \"%#v\",\n\t\t\t\twant: \"%#v\"", err, w.err)
		}
		if got != nil {
			vectors := got(a.n, a.dim)
			if len(vectors) != w.n && len(vectors[0]) != w.dim {
				return errors.Errorf("got: \"%d\",\"%d\"\n\t\t\t\twant: \"%
    
func TestConvertVectorsUint8ToFloat32(t *testing.T) {
	type args struct {
		vectors [][]uint8
	}
	type want struct {
		wantRet [][]float32
	}
	type test struct {
		name       string
		args       args
		want       want
		checkFunc  func(want, [][]float32) error
		beforeFunc func(args)
		afterFunc  func(args)
	}
	defaultCheckFunc := func(w want, gotRet [][]float32) error {
		if !reflect.DeepEqual(gotRet, w.wantRet) {
			return errors.Errorf("got: \"%#v\",\n\t\t\t\twant: \"%#v\"", gotRet, w.wantRet)
		}
		return nil
	}
	tests := []test{
		{
			name: "convert 1 float32 vector from uint8 vector",
			args: args{
				vectors: [][]uint8{
					{
						1, 2, 3,
					},
				},
			},
			want: want{
				wantRet: [][]float32{
					{
						1, 2, 3,
					},
				},
			},
		},
		{
			name: "convert 3 float32 vector from uint8 vector",
			args: args{
				vectors: [][]uint8{
					{
						1, 2, 3,
					},
					{
						4, 5, 6,
					},
					{
						7, 8, 9,
					},
				},
			},
			want: want{
				wantRet: [][]float32{
					{
						1, 2, 3,
					},
					{
						4, 5, 6,
					},
					{
						7, 8, 9,
					},
				},
			},
		},
		{
			name: "convert 0 value vector",
			args: args{
				vectors: [][]uint8{
					{
						0, 0, 0,
					},
				},
			},
			want: want{
				wantRet: [][]float32{
					{
						0, 0, 0,
					},
				},
			},
		},
		{
			name: "convert max value vector",
			args: args{
				vectors: [][]uint8{
					{
						math.MaxUint8, math.MaxUint8, math.MaxUint8,
					},
				},
			},
			want: want{
				wantRet: [][]float32{
					{
						math.MaxUint8, math.MaxUint8, math.MaxUint8,
					},
				},
			},
		},
		{
			name: "return empty slice when vectors is empty",
			args: args{
				vectors: [][]uint8{},
			},
			want: want{
				wantRet: [][]float32{},
			},
		},
		{
			name: "return empty slice when vectors is nil",
			args: args{
				vectors: nil,
			},
			want: want{
				wantRet: [][]float32{},
			},
		},
		{
			name: "return empty vector when vector is empty",
			args: args{
				vectors: [][]uint8{
					{},
				},
			},
			want: want{
				wantRet: [][]float32{
					{},
				},
			},
		},
	}

	for _, tc := range tests {
		test := tc
		t.Run(test.name, func(tt *testing.T) {
			tt.Parallel()
			defer goleak.VerifyNone(tt, goleak.IgnoreCurrent())
			if test.beforeFunc != nil {
				test.beforeFunc(test.args)
			}
			if test.afterFunc != nil {
				defer test.afterFunc(test.args)
			}
			checkFunc := test.checkFunc
			if test.checkFunc == nil {
				checkFunc = defaultCheckFunc
			}

			gotRet := ConvertVectorsUint8ToFloat32(test.args.vectors)
			if err := checkFunc(test.want, gotRet); err != nil {
				tt.Errorf("error = %v", err)
			}
		})
	}
}