forked from quic-go/quic-go
* qlog: implement a Trace and a Writer struct * qlog: rename Trace to FileSeq * split qlog trace writer and QUIC qlog events into separate packages * use the new qlog.Recorder instead of the logging.ConnectionTracer
17 lines
549 B
Go
17 lines
549 B
Go
package qlog
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/quic-go/quic-go/internal/protocol"
|
|
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestEncryptionLevelToPacketType(t *testing.T) {
|
|
require.Equal(t, "initial", string(EncryptionLevelToPacketType(protocol.EncryptionInitial)))
|
|
require.Equal(t, "handshake", string(EncryptionLevelToPacketType(protocol.EncryptionHandshake)))
|
|
require.Equal(t, "0RTT", string(EncryptionLevelToPacketType(protocol.Encryption0RTT)))
|
|
require.Equal(t, "1RTT", string(EncryptionLevelToPacketType(protocol.Encryption1RTT)))
|
|
}
|