From feebfb81834ff307531f8c6ab65ec88f21af0a8f Mon Sep 17 00:00:00 2001 From: Lucas Clemente Date: Tue, 17 May 2016 11:31:32 +0200 Subject: [PATCH] speed up tests --- frames/connection_close_frame_test.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/frames/connection_close_frame_test.go b/frames/connection_close_frame_test.go index 9ee4daa3..452a30d0 100644 --- a/frames/connection_close_frame_test.go +++ b/frames/connection_close_frame_test.go @@ -2,6 +2,7 @@ package frames import ( "bytes" + "strings" "github.com/lucas-clemente/quic-go/protocol" "github.com/lucas-clemente/quic-go/qerr" @@ -59,10 +60,7 @@ var _ = Describe("ConnectionCloseFrame", func() { It("rejects ReasonPhrases that are too long", func() { b := &bytes.Buffer{} - var reasonPhrase string - for i := 0; i < int(0xFFFF+0x11); i++ { - reasonPhrase += "a" - } + reasonPhrase := strings.Repeat("a", 0xFFFF+0x11) frame := &ConnectionCloseFrame{ ErrorCode: 0xDEADBEEF,