improve test descriptions

This commit is contained in:
Mark Spanbroek 2020-10-12 17:14:55 +02:00 committed by markspanbroek
parent b889e029ed
commit 621f3086ee
2 changed files with 5 additions and 5 deletions

View File

@ -1,7 +1,7 @@
import unittest
import quic/connectionid
suite "Connection Ids":
suite "connection ids":
test "generates random ids":
check randomConnectionId() != randomConnectionId()

View File

@ -2,26 +2,26 @@ import unittest
import ngtcp2
import quic/ngtcp2/params
suite "ngtcp2":
suite "transport parameters":
var settings: ngtcp2_settings
setup:
ngtcp2_settings_default(addr settings)
test "encoding and decoding of transport parameters":
test "encoding and decoding":
let encoded = encodeTransportParameters(settings.transport_params)
let decoded = decodeTransportParameters(encoded)
check decoded == settings.transport_params
test "raises when decoding of transport parameters fails":
test "raises when decoding fails":
var encoded = encodeTransportParameters(settings.transport_params)
encoded[0] = 0xFF
expect IOError:
discard decodeTransportParameters(encoded)
test "raises when setting remote transport parameters fails":
test "raises when setting remote parameters fails":
var connection: ngtcp2_conn
settings.transport_params.active_connection_id_limit = 0