mirror of
https://github.com/mfontanini/libtins
synced 2026-01-30 05:24:26 +01:00
Finished Dot11 tests.
This commit is contained in:
@@ -63,6 +63,12 @@ TEST_F(Dot11DeauthenticationTest, CopyAssignmentOperator) {
|
||||
test_equals(dot1, dot2);
|
||||
}
|
||||
|
||||
TEST_F(Dot11DeauthenticationTest, ReasonCode) {
|
||||
Dot11Deauthentication dot11;
|
||||
dot11.reason_code(0x92f3);
|
||||
EXPECT_EQ(dot11.reason_code(), 0x92f3);
|
||||
}
|
||||
|
||||
TEST_F(Dot11DeauthenticationTest, ClonePDU) {
|
||||
Dot11Deauthentication dot1(expected_packet, sizeof(expected_packet));
|
||||
std::auto_ptr<Dot11Deauthentication> dot2(dot1.clone_pdu());
|
||||
@@ -77,3 +83,10 @@ TEST_F(Dot11DeauthenticationTest, FromBytes) {
|
||||
test_equals_expected(*inner);
|
||||
}
|
||||
|
||||
TEST_F(Dot11DeauthenticationTest, Serialize) {
|
||||
Dot11Deauthentication pdu(expected_packet, sizeof(expected_packet));
|
||||
PDU::serialization_type buffer = pdu.serialize();
|
||||
ASSERT_EQ(sizeof(expected_packet), buffer.size());
|
||||
EXPECT_TRUE(std::equal(buffer.begin(), buffer.end(), expected_packet));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user