From 83bcd679dc8a470febabf9ceeb7ee3d7e9d18721 Mon Sep 17 00:00:00 2001 From: Nikita Krasnikov Date: Sun, 27 Mar 2022 14:24:42 +0300 Subject: [PATCH] Fix test --- pkg/service/service_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/service/service_test.go b/pkg/service/service_test.go index 9c4c4ae..039e060 100644 --- a/pkg/service/service_test.go +++ b/pkg/service/service_test.go @@ -53,7 +53,7 @@ using yii\base\BaseObject; * @package common\models */ class {{ Name }} extends BaseObject -{ +{ {{ Properties }} /** * @var {{ Type.Doc }} @@ -159,13 +159,13 @@ using yii\base\BaseObject; class TestCoordinatesClass extends BaseObject { /** - * @var float64 + * @var float */ - public float64 $lon; + public float $lon; /** - * @var float64 + * @var float */ - public float64 $lat; + public float $lat; } `) srv := NewService(zap.NewNop()) @@ -344,7 +344,7 @@ func TestService_GenFile(t *testing.T) { } func TestService_PredefinedLangSettings(t *testing.T) { - expected := []byte(`{"items":[{"code":"go","name":"GoLang","fileExtension":".go","splitObjectByFiles":false,"configMapping":{"typeMapping":{"array":"[]interface{}","arrayBool":"[]bool","arrayFloat":"[]float64","arrayInt":"[]int","arrayObject":"[]*{{ Name.PascalCase }}","arrayString":"[]string","bool":"bool","float":"float64","int":"int","null":"interface{}","object":"*{{ Name.PascalCase}}","string":"string"},"typeDocMapping":{"array":"[]interface{}","arrayBool":"[]bool","arrayFloat":"[]float64","arrayInt":"[]int","arrayObject":"[]*{{ Name.PascalCase }}","arrayString":"[]string","bool":"bool","float":"float64","int":"int","null":"interface{}","object":"*{{ Name.PascalCase}}","string":"string"},"classNameMapping":"{{ Name.PascalCase }}","fileNameMapping":"{{ Name.CamelCase }}"}},{"code":"php","name":"PHP","fileExtension":".php","splitObjectByFiles":true,"configMapping":{"typeMapping":{"array":"array","arrayBool":"array","arrayFloat":"array","arrayInt":"array","arrayObject":"array","arrayString":"array","bool":"bool","float":"float64","int":"int","null":"null","object":"{{ Name.PascalCase}}","string":"string"},"typeDocMapping":{"array":"array","arrayBool":"bool[]","arrayFloat":"float[]","arrayInt":"int[]","arrayObject":"{{ Name.PascalCase }}[]","arrayString":"string[]","bool":"bool","float":"float64","int":"int","null":"null","object":"{{ Name.PascalCase}}","string":"string"},"classNameMapping":"{{ Name.PascalCase }}","fileNameMapping":"{{ Name.PascalCase }}"}}]}`) + expected := []byte(`{"items":[{"code":"go","name":"GoLang","fileExtension":".go","splitObjectByFiles":false,"configMapping":{"typeMapping":{"array":"[]interface{}","arrayBool":"[]bool","arrayFloat":"[]float64","arrayInt":"[]int","arrayObject":"[]*{{ Name.PascalCase }}","arrayString":"[]string","bool":"bool","float":"float64","int":"int","null":"interface{}","object":"*{{ Name.PascalCase}}","string":"string"},"typeDocMapping":{"array":"[]interface{}","arrayBool":"[]bool","arrayFloat":"[]float64","arrayInt":"[]int","arrayObject":"[]*{{ Name.PascalCase }}","arrayString":"[]string","bool":"bool","float":"float64","int":"int","null":"interface{}","object":"*{{ Name.PascalCase}}","string":"string"},"classNameMapping":"{{ Name.PascalCase }}","fileNameMapping":"{{ Name.CamelCase }}"}},{"code":"php","name":"PHP","fileExtension":".php","splitObjectByFiles":true,"configMapping":{"typeMapping":{"array":"array","arrayBool":"array","arrayFloat":"array","arrayInt":"array","arrayObject":"array","arrayString":"array","bool":"bool","float":"float","int":"int","null":"null","object":"{{ Name.PascalCase}}","string":"string"},"typeDocMapping":{"array":"array","arrayBool":"bool[]","arrayFloat":"float[]","arrayInt":"int[]","arrayObject":"{{ Name.PascalCase }}[]","arrayString":"string[]","bool":"bool","float":"float","int":"int","null":"null","object":"{{ Name.PascalCase}}","string":"string"},"classNameMapping":"{{ Name.PascalCase }}","fileNameMapping":"{{ Name.PascalCase }}"}}]}`) srv := NewService(zap.NewNop()) rsp, err := srv.PredefinedLangSettings(context.Background(), &PredefinedLangSettingsListRequest{})