From 24cc943dfb041cea0b595ed074852b87de6fb2b6 Mon Sep 17 00:00:00 2001 From: Mark Spanbroek Date: Wed, 16 Sep 2020 14:44:30 +0200 Subject: [PATCH] Add PacketHeader --- quic.nim | 2 ++ quic/packets.nim | 6 ++++++ quic/quic.nim | 0 tests/quic/testPackets.nim | 6 ++++++ tests/quic/testQuic.nim | 4 ---- tests/testAll.nim | 2 +- 6 files changed, 15 insertions(+), 5 deletions(-) create mode 100644 quic.nim create mode 100644 quic/packets.nim delete mode 100644 quic/quic.nim create mode 100644 tests/quic/testPackets.nim delete mode 100644 tests/quic/testQuic.nim diff --git a/quic.nim b/quic.nim new file mode 100644 index 0000000..777497f --- /dev/null +++ b/quic.nim @@ -0,0 +1,2 @@ +import quic/packets +export packets diff --git a/quic/packets.nim b/quic/packets.nim new file mode 100644 index 0000000..7cd9c98 --- /dev/null +++ b/quic/packets.nim @@ -0,0 +1,6 @@ +type + PacketHeaderKind* = enum + headerShort + headerLong + PacketHeader* = object + kind*: PacketHeaderKind diff --git a/quic/quic.nim b/quic/quic.nim deleted file mode 100644 index e69de29..0000000 diff --git a/tests/quic/testPackets.nim b/tests/quic/testPackets.nim new file mode 100644 index 0000000..8885f20 --- /dev/null +++ b/tests/quic/testPackets.nim @@ -0,0 +1,6 @@ +import unittest +import quic + +test "there are two kinds of packet headers; short and long": + discard PacketHeader(kind: headerShort) + discard PacketHeader(kind: headerLong) diff --git a/tests/quic/testQuic.nim b/tests/quic/testQuic.nim deleted file mode 100644 index b2633c2..0000000 --- a/tests/quic/testQuic.nim +++ /dev/null @@ -1,4 +0,0 @@ -import unittest - -test "check testing framework": - check 1 == 1 diff --git a/tests/testAll.nim b/tests/testAll.nim index b8107a7..cc88347 100644 --- a/tests/testAll.nim +++ b/tests/testAll.nim @@ -1,4 +1,4 @@ -import quic/testQuic +import quic/testPackets import quic/testNgtcp2 {.warning[UnusedImport]:off.}