1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-25 19:51:34 +01:00

Removed the PDU* parameter in several PDU's constructors.

This commit is contained in:
Matias Fontanini
2013-04-23 20:03:08 -03:00
parent 7e85058ef1
commit bf604339f0
24 changed files with 83 additions and 143 deletions

View File

@@ -69,11 +69,9 @@ TEST_F(UDPTest, CopyAssignmentOperator) {
}
TEST_F(UDPTest, CompleteConstructor) {
UDP *inner = new UDP(0x48fa, 0x716b);
UDP udp(0x1234, 0x4321, inner);
UDP udp(0x1234, 0x4321);
EXPECT_EQ(udp.dport(), 0x1234);
EXPECT_EQ(udp.sport(), 0x4321);
EXPECT_TRUE(udp.inner_pdu() == inner);
}
TEST_F(UDPTest, DPort) {
@@ -109,7 +107,7 @@ TEST_F(UDPTest, ClonePDU) {
udp1.sport(sport);
udp1.length(length);
UDP *udp2 = static_cast<UDP*>(udp1.clone());
UDP *udp2 = udp1.clone();
ASSERT_TRUE(udp2);
EXPECT_EQ(udp2->sport(), sport);
EXPECT_EQ(udp2->dport(), dport);