From 92388b443f081b979d93996028c9fb585571de9a Mon Sep 17 00:00:00 2001 From: sdghchj Date: Mon, 22 Jan 2024 14:52:39 +0800 Subject: [PATCH] fix test Signed-off-by: sdghchj --- generics_test.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/generics_test.go b/generics_test.go index ac5e66d55..033bcf546 100644 --- a/generics_test.go +++ b/generics_test.go @@ -4,7 +4,6 @@ package swag import ( - "bytes" "encoding/json" "fmt" "go/ast" @@ -40,8 +39,6 @@ func TestParseGenericsBasic(t *testing.T) { err = p.ParseAPI(searchDir, mainAPIFile, defaultParseDepth) assert.NoError(t, err) b, err := json.MarshalIndent(p.swagger, "", " ") - b = bytes.Replace(b, []byte{'\n'}, []byte{'\r', '\n'}, -1) - os.WriteFile(filepath.Join(searchDir, "expected.json"), b, os.ModePerm) assert.NoError(t, err) assert.Equal(t, string(expected), string(b)) }