Put all tests in suites

This commit is contained in:
Mark Spanbroek 2020-09-17 10:32:31 +02:00 committed by markspanbroek
parent 63f61b2c72
commit 0ca8fd9f27
2 changed files with 15 additions and 11 deletions

View File

@ -1,8 +1,10 @@
import unittest
import ngtcp2
test "default settings":
var settings: ngtcp2_settings
ngtcp2_settings_default(addr settings)
check settings.transport_params.max_udp_payload_size > 0
check settings.transport_params.active_connection_id_limit > 0
suite "ngtcp2":
test "default settings":
var settings: ngtcp2_settings
ngtcp2_settings_default(addr settings)
check settings.transport_params.max_udp_payload_size > 0
check settings.transport_params.active_connection_id_limit > 0

View File

@ -2,10 +2,12 @@ import unittest
import quic
import math
test "there are two kinds of packet headers; short and long":
discard PacketHeader(kind: headerShort)
discard PacketHeader(kind: headerLong)
suite "packets":
test "packet numbers are in the range 0 to 2^62-1":
check PacketNumber.low == 0
check PacketNumber.high == 2'u64 ^ 62 - 1
test "there are two kinds of packet headers; short and long":
discard PacketHeader(kind: headerShort)
discard PacketHeader(kind: headerLong)
test "packet numbers are in the range 0 to 2^62-1":
check PacketNumber.low == 0
check PacketNumber.high == 2'u64 ^ 62 - 1