Files
quic-go/qlog/types_test.go
Marten Seemann c2131eb595 qlog: split serializiation and event definitions, remove logging abstraction (#5356)
* 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
2025-10-08 05:53:02 +02:00

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)))
}