use the error names from the draft

This commit is contained in:
Marten Seemann
2019-03-06 13:39:38 +09:00
parent 9c09e84765
commit 662041649f
11 changed files with 64 additions and 59 deletions

View File

@@ -11,14 +11,14 @@ var _ = Describe("QUIC Transport Errors", func() {
Context("QuicError", func() {
It("has a string representation", func() {
err := Error(FlowControlError, "foobar")
Expect(err.Error()).To(Equal("FlowControlError: foobar"))
Expect(err.Error()).To(Equal("FLOW_CONTROL_ERROR: foobar"))
})
})
Context("ErrorCode", func() {
It("works as error", func() {
var err error = StreamStateError
Expect(err).To(MatchError("StreamStateError"))
Expect(err).To(MatchError("STREAM_STATE_ERROR"))
})
})