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

Split dot11.h and dot11.cpp into several files.

This commit is contained in:
Matias Fontanini
2013-05-31 22:16:56 -03:00
parent eeb62add59
commit ec8374be60
54 changed files with 6971 additions and 5925 deletions

View File

@@ -1,9 +1,5 @@
#include <gtest/gtest.h>
#include <algorithm>
#include <memory>
#include <stdint.h>
#include "dot11.h"
#include "tests/dot11.h"
#include "tests/dot11_control.h"
using namespace std;
@@ -59,12 +55,12 @@ TEST_F(Dot11PSPollTest, CopyAssignmentOperator) {
TEST_F(Dot11PSPollTest, ClonePDU) {
Dot11PSPoll dot1(expected_packet, sizeof(expected_packet));
std::auto_ptr<Dot11PSPoll> dot2(dot1.clone());
Internals::smart_ptr<Dot11PSPoll>::type dot2(dot1.clone());
test_equals(dot1, *dot2);
}
TEST_F(Dot11PSPollTest, FromBytes) {
std::auto_ptr<PDU> dot11(Dot11::from_bytes(expected_packet, sizeof(expected_packet)));
Internals::smart_ptr<PDU>::type dot11(Dot11::from_bytes(expected_packet, sizeof(expected_packet)));
ASSERT_TRUE(dot11.get());
const Dot11PSPoll *inner = dot11->find_pdu<Dot11PSPoll>();
ASSERT_TRUE(inner);