mirror of https://github.com/vacp2p/nim-quic.git
improve test descriptions
This commit is contained in:
parent
b889e029ed
commit
621f3086ee
|
@ -1,7 +1,7 @@
|
|||
import unittest
|
||||
import quic/connectionid
|
||||
|
||||
suite "Connection Ids":
|
||||
suite "connection ids":
|
||||
|
||||
test "generates random ids":
|
||||
check randomConnectionId() != randomConnectionId()
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue