mirror of
https://github.com/mfontanini/libtins
synced 2026-01-30 13:34:27 +01:00
Modified IPv4Address interface and fixed some tests.
This commit is contained in:
@@ -51,8 +51,8 @@ void ARPTest::test_equals(const ARP &arp1, const ARP &arp2) {
|
||||
|
||||
TEST_F(ARPTest, DefaultContructor) {
|
||||
ARP arp;
|
||||
EXPECT_EQ(arp.target_ip_addr(), 0);
|
||||
EXPECT_EQ(arp.sender_ip_addr(), 0);
|
||||
EXPECT_EQ(arp.target_ip_addr(), IPv4Address());
|
||||
EXPECT_EQ(arp.sender_ip_addr(), IPv4Address());
|
||||
EXPECT_EQ(arp.target_hw_addr(), empty_addr);
|
||||
EXPECT_EQ(arp.target_hw_addr(), empty_addr);
|
||||
EXPECT_EQ(arp.pdu_type(), PDU::ARP);
|
||||
|
||||
@@ -24,8 +24,8 @@ const uint8_t IPTest::expected_packet[] = { '(', '\x7f', '\x00', ' ',
|
||||
|
||||
TEST_F(IPTest, DefaultConstructor) {
|
||||
IP ip;
|
||||
EXPECT_EQ(ip.dst_addr(), 0);
|
||||
EXPECT_EQ(ip.src_addr(), 0);
|
||||
EXPECT_EQ(ip.dst_addr(), IPv4Address());
|
||||
EXPECT_EQ(ip.src_addr(), IPv4Address());
|
||||
EXPECT_EQ(ip.version(), 4);
|
||||
EXPECT_EQ(ip.id(), 1);
|
||||
EXPECT_EQ(ip.pdu_type(), PDU::IP);
|
||||
|
||||
Reference in New Issue
Block a user