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 unittest
import ngtcp2 import ngtcp2
test "default settings": suite "ngtcp2":
var settings: ngtcp2_settings
ngtcp2_settings_default(addr settings) test "default settings":
check settings.transport_params.max_udp_payload_size > 0 var settings: ngtcp2_settings
check settings.transport_params.active_connection_id_limit > 0 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 quic
import math import math
test "there are two kinds of packet headers; short and long": suite "packets":
discard PacketHeader(kind: headerShort)
discard PacketHeader(kind: headerLong)
test "packet numbers are in the range 0 to 2^62-1": test "there are two kinds of packet headers; short and long":
check PacketNumber.low == 0 discard PacketHeader(kind: headerShort)
check PacketNumber.high == 2'u64 ^ 62 - 1 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