~marcopolo/di

8a9c929e34c255ee81315b9ebe524919c65587d0 — Marco Munizaga 9 months ago 1b12668
s/interface{}/any
1 files changed, 17 insertions(+), 17 deletions(-)

M di_test.go
M di_test.go => di_test.go +17 -17
@@ 119,9 119,9 @@ func TestBuildSuccess(t *testing.T) {

	tests := []struct {
		name   string
		config interface{}
		result interface{}
		verify func(t *testing.T, result interface{})
		config any
		result any
		verify func(t *testing.T, result any)
	}{
		{
			name: "complex dependencies with providers",


@@ 147,7 147,7 @@ func TestBuildSuccess(t *testing.T) {
				A *A
				B *B
			}{},
			verify: func(t *testing.T, result interface{}) {
			verify: func(t *testing.T, result any) {
				res := result.(*struct {
					A *A
					B *B


@@ 191,7 191,7 @@ func TestBuildSuccess(t *testing.T) {
			result: &struct {
				A *A
			}{},
			verify: func(t *testing.T, result interface{}) {
			verify: func(t *testing.T, result any) {
				res := result.(*struct {
					A *A
				})


@@ 218,7 218,7 @@ func TestBuildSuccess(t *testing.T) {
				A *A
				B *B
			}{},
			verify: func(t *testing.T, result interface{}) {
			verify: func(t *testing.T, result any) {
				res := result.(*struct {
					A *A
					B *B


@@ 240,7 240,7 @@ func TestBuildSuccess(t *testing.T) {
			result: &struct {
				A ANum
			}{},
			verify: func(t *testing.T, result interface{}) {
			verify: func(t *testing.T, result any) {
				res := result.(*struct {
					A ANum
				})


@@ 273,7 273,7 @@ func TestBuildSuccess(t *testing.T) {
				A int
				B uint
			}{},
			verify: func(t *testing.T, result interface{}) {
			verify: func(t *testing.T, result any) {
				res := result.(*struct {
					A int
					B uint


@@ 311,10 311,10 @@ func TestBuildErrors(t *testing.T) {

	tests := []struct {
		name           string
		config         interface{}
		result         interface{}
		config         any
		result         any
		expectedErrors []string
		verify         func(t *testing.T, result interface{})
		verify         func(t *testing.T, result any)
	}{
		{
			name: "constructor error propagation",


@@ 329,7 329,7 @@ func TestBuildErrors(t *testing.T) {
				A *A
			}{},
			expectedErrors: []string{"MakeA", "boom"},
			verify: func(t *testing.T, result interface{}) {
			verify: func(t *testing.T, result any) {
				res := result.(*struct {
					A *A
				})


@@ 351,7 351,7 @@ func TestBuildErrors(t *testing.T) {
				B *B
			}{},
			expectedErrors: []string{"*di.A", "di.A"},
			verify: func(t *testing.T, result interface{}) {
			verify: func(t *testing.T, result any) {
				res := result.(*struct {
					B *B
				})


@@ 378,7 378,7 @@ func TestBuildErrors(t *testing.T) {
				Y *Y
			}{},
			expectedErrors: []string{"MakeX", "MakeY"},
			verify: func(t *testing.T, result interface{}) {
			verify: func(t *testing.T, result any) {
				res := result.(*struct {
					X *X
					Y *Y


@@ 419,8 419,8 @@ func TestNewFunction(t *testing.T) {

	tests := []struct {
		name     string
		config   interface{}
		expected interface{}
		config   any
		expected any
	}{
		{
			name: "struct result",


@@ 465,7 465,7 @@ func TestNewFunction(t *testing.T) {
func TestBuildPrimitiveTypes(t *testing.T) {
	tests := []struct {
		name     string
		config   interface{}
		config   any
		expected int
	}{
		{