1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-27 20:24:26 +01:00

Fixed some bugs, added some tests.

This commit is contained in:
Matias Fontanini
2012-08-02 21:21:10 -03:00
parent 383deb8641
commit c4a92d2b96
10 changed files with 223 additions and 152 deletions

View File

@@ -42,6 +42,15 @@ TEST_F(TCPTest, CopyAssignmentOperator) {
test_equals(tcp1, tcp2);
}
TEST_F(TCPTest, NestedCopy) {
TCP *nested_tcp = new TCP(0x6d1f, 0x78f2);
TCP tcp1(0x6d1f, 0x78f2);
tcp1.inner_pdu(nested_tcp);
TCP tcp2(tcp1);
test_equals(tcp1, tcp2);
test_equals(tcp1, *nested_tcp);
}
TEST_F(TCPTest, CompleteConstructor) {
TCP tcp(0x6d1f, 0x78f2);
EXPECT_EQ(tcp.dport(), 0x6d1f);