Update the test suite.

This commit is contained in:
basil00
2017-11-14 20:41:18 +08:00
parent dbb6b0fe60
commit ba5e893f8f
2 changed files with 5 additions and 2 deletions
+1
View File
@@ -29,6 +29,7 @@
#ifdef __MINGW32__
#define __in
#define __in_opt
#define __out
#define __out_opt
#define __inout
+4 -2
View File
@@ -100,6 +100,8 @@ static struct test tests[] =
{"outbound and icmp", &pkt_echo_request, TRUE},
{"outbound", &pkt_echo_request, TRUE},
{"outbound and inbound", &pkt_echo_request, FALSE},
{"loopback", &pkt_echo_request, FALSE},
{"impostor", &pkt_echo_request, FALSE},
{"icmp", &pkt_echo_request, TRUE},
{"not icmp", &pkt_echo_request, FALSE},
{"ip or ipv6", &pkt_echo_request, TRUE},
@@ -319,7 +321,7 @@ int main(void)
BOOL match = tests[i].match;
// Ensure the correct checksum:
WinDivertHelperCalcChecksums(packet, packet_len, 0);
WinDivertHelperCalcChecksums(packet, packet_len, NULL, 0);
// Run the test:
BOOL res = run_test(upper_handle, filter, packet, packet_len, match);
@@ -464,7 +466,7 @@ read_failed:
}
if (addr.Direction == WINDIVERT_DIRECTION_OUTBOUND)
{
WinDivertHelperCalcChecksums(buf, buf_len, 0);
WinDivertHelperCalcChecksums(buf, buf_len, NULL, 0);
}
// (4) Verify that the packet is the same.