X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/3b856e83ad55125111fe5961d07d7524bd6ee283..7b4f3f62cbebbc1b01df5f1de47dcdd0f02e0223:/tests/test_raw_ip.cpp?ds=sidebyside diff --git a/tests/test_raw_ip.cpp b/tests/test_raw_ip.cpp index be20ed01..637c1b67 100644 --- a/tests/test_raw_ip.cpp +++ b/tests/test_raw_ip.cpp @@ -3,6 +3,7 @@ #include #include +#include #include #include @@ -46,11 +47,11 @@ namespace tut rp.rawPacket.header.sPort = htons(80); rp.rawPacket.header.dPort = htons(38546); - ensure_equals("IP header size (explicitly)", sizeof(rp.rawPacket.header.ipHeader), 20); + ensure_equals("IP header size (explicitly)", sizeof(rp.rawPacket.header.ipHeader), static_cast(20)); ensure_equals("IP version", rp.GetIPVersion(), 4); ensure_equals("IP header size (with options)", rp.GetHeaderLen(), 20); ensure_equals("Underlying protocol version", rp.GetProto(), 6); - ensure_equals("Packet length", rp.GetLen(), 40); + ensure_equals("Packet length", rp.GetLen(), static_cast(40)); ensure_equals("Source IP address", rp.GetSrcIP(), inet_addr("192.168.0.1")); ensure_equals("Destination IP address", rp.GetDstIP(), inet_addr("192.168.0.101")); ensure_equals("Source port number", rp.GetSrcPort(), 80);