mirror of
https://github.com/mfontanini/libtins
synced 2026-01-27 04:11:35 +01:00
Finished Dot11 tests.
This commit is contained in:
@@ -65,6 +65,12 @@ TEST_F(Dot11AssocRequestTest, CopyAssignmentOperator) {
|
||||
test_equals(dot1, dot2);
|
||||
}
|
||||
|
||||
TEST_F(Dot11AssocRequestTest, ListenInterval) {
|
||||
Dot11AssocRequest dot11;
|
||||
dot11.listen_interval(0x92fd);
|
||||
EXPECT_EQ(dot11.listen_interval(), 0x92fd);
|
||||
}
|
||||
|
||||
TEST_F(Dot11AssocRequestTest, ClonePDU) {
|
||||
Dot11AssocRequest dot1(expected_packet, sizeof(expected_packet));
|
||||
std::auto_ptr<Dot11AssocRequest> dot2(dot1.clone_pdu());
|
||||
@@ -79,3 +85,10 @@ TEST_F(Dot11AssocRequestTest, FromBytes) {
|
||||
test_equals_expected(*inner);
|
||||
}
|
||||
|
||||
TEST_F(Dot11AssocRequestTest, Serialize) {
|
||||
Dot11AssocRequest 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