Skip to content

Commit

Permalink
fix test params
Browse files Browse the repository at this point in the history
  • Loading branch information
compscidr committed Aug 22, 2024
1 parent b8d58a0 commit a06c959
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class ICMPv4Test {
val buffer = ByteBuffer.wrap(icmPv4EchoPacket.toByteArray())
val stringDumper = StringPacketDumper(logger)
stringDumper.dumpBuffer(buffer, 0, buffer.limit())
val parsedPacket = ICMPHeader.fromStream(buffer, true)
val parsedPacket = ICMPHeader.fromStream(buffer, isIcmpV4 = true)
assertEquals(icmPv4EchoPacket, parsedPacket)
}

Expand All @@ -39,7 +39,7 @@ class ICMPv4Test {
)
val buffer = ByteBuffer.wrap(icmPv4EchoPacket.toByteArray())
stringDumper.dumpBuffer(buffer, 0, buffer.limit())
val parsedPacket = ICMPHeader.fromStream(buffer, true)
val parsedPacket = ICMPHeader.fromStream(buffer, isIcmpV4 = true)
assertEquals(icmPv4EchoPacket, parsedPacket)
}

Expand All @@ -52,7 +52,7 @@ class ICMPv4Test {
)
val buffer = ByteBuffer.wrap(icmpV4DestinationUnreachablePacket.toByteArray())
stringDumper.dumpBuffer(buffer, 0, buffer.limit())
val parsedPacket = ICMPHeader.fromStream(buffer, true)
val parsedPacket = ICMPHeader.fromStream(buffer, isIcmpV4 = true)
assertEquals(icmpV4DestinationUnreachablePacket, parsedPacket)
}

Expand All @@ -65,7 +65,7 @@ class ICMPv4Test {
)
val buffer = ByteBuffer.wrap(icmPv4TimeExceededPacket.toByteArray())
stringDumper.dumpBuffer(buffer, 0, buffer.limit())
val parsedPacket = ICMPHeader.fromStream(buffer, true)
val parsedPacket = ICMPHeader.fromStream(buffer, isIcmpV4 = true)
assertEquals(icmPv4TimeExceededPacket, parsedPacket)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class ICMPv6Test {
val buffer = ByteBuffer.wrap(icmPv6EchoPacket.toByteArray())
val stringDumper = StringPacketDumper(logger)
stringDumper.dumpBuffer(buffer, 0, buffer.limit())
val parsedPacket = ICMPHeader.fromStream(buffer, false)
val parsedPacket = ICMPHeader.fromStream(buffer, isIcmpV4 = false)
assertEquals(icmPv6EchoPacket, parsedPacket)
}

Expand All @@ -40,7 +40,7 @@ class ICMPv6Test {
val buffer = ByteBuffer.wrap(icmPv6EchoPacket.toByteArray())

stringDumper.dumpBuffer(buffer, 0, buffer.limit())
val parsedPacket = ICMPHeader.fromStream(buffer, false)
val parsedPacket = ICMPHeader.fromStream(buffer, isIcmpV4 = false)
assertEquals(icmPv6EchoPacket, parsedPacket)
}

Expand All @@ -53,7 +53,7 @@ class ICMPv6Test {
)
val buffer = ByteBuffer.wrap(icmpV6DestinationUnreachablePacket.toByteArray())
stringDumper.dumpBuffer(buffer, 0, buffer.limit())
val parsedPacket = ICMPHeader.fromStream(buffer, false)
val parsedPacket = ICMPHeader.fromStream(buffer, isIcmpV4 = false)
assertEquals(icmpV6DestinationUnreachablePacket, parsedPacket)
}

Expand All @@ -66,7 +66,7 @@ class ICMPv6Test {
)
val buffer = ByteBuffer.wrap(icmPv6TimeExceededPacket.toByteArray())
stringDumper.dumpBuffer(buffer, 0, buffer.limit())
val parsedPacket = ICMPHeader.fromStream(buffer, false)
val parsedPacket = ICMPHeader.fromStream(buffer, isIcmpV4 = false)
assertEquals(icmPv6TimeExceededPacket, parsedPacket)
}

Expand All @@ -75,7 +75,7 @@ class ICMPv6Test {
val icmpV6MulticastListenerDiscoveryV2 = ICMPv6MulticastListenerDiscoveryV2(data = byteArrayOf(0x01, 0x02, 0x03, 0x04))
val buffer = ByteBuffer.wrap(icmpV6MulticastListenerDiscoveryV2.toByteArray())
stringDumper.dumpBuffer(buffer, 0, buffer.limit())
val parsedPacket = ICMPHeader.fromStream(buffer, false)
val parsedPacket = ICMPHeader.fromStream(buffer, isIcmpV4 = false)
assertEquals(icmpV6MulticastListenerDiscoveryV2, parsedPacket)
}

Expand All @@ -92,7 +92,7 @@ class ICMPv6Test {
)
val buffer = ByteBuffer.wrap(icmpV6RouterAdvertisement.toByteArray())
stringDumper.dumpBuffer(buffer, 0, buffer.limit())
val parsedPacket = ICMPHeader.fromStream(buffer, false)
val parsedPacket = ICMPHeader.fromStream(buffer, isIcmpV4 = false)
assertEquals(icmpV6RouterAdvertisement, parsedPacket)
}

Expand All @@ -103,7 +103,7 @@ class ICMPv6Test {
)
val buffer = ByteBuffer.wrap(icmpV6RouterSolicitation.toByteArray())
stringDumper.dumpBuffer(buffer, 0, buffer.limit())
val parsedPacket = ICMPHeader.fromStream(buffer, false)
val parsedPacket = ICMPHeader.fromStream(buffer, isIcmpV4 = false)
assertEquals(icmpV6RouterSolicitation, parsedPacket)
}

Expand Down

0 comments on commit a06c959

Please sign in to comment.