1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-27 04:11:35 +01:00

Code cleanup and use same syntax on the entire project

Initial code cleanup

More code cleanup

Cleanup more code

Cleanup Dot11 code

Fix OSX build issue

Cleanup examples

Fix ref and pointer declaration syntax

Fix braces
This commit is contained in:
Matias Fontanini
2016-01-02 08:17:59 -08:00
parent f5a82b1a17
commit d84f10cf08
177 changed files with 13203 additions and 12272 deletions

View File

@@ -22,14 +22,14 @@ const uint8_t Dot11AckTest::expected_packet[] = {
213, 1, 79, 35, 0, 1, 2, 3, 4, 5
};
void test_equals(const Dot11Ack &dot1, const Dot11Ack &dot2) {
void test_equals(const Dot11Ack& dot1, const Dot11Ack& dot2) {
test_equals(
static_cast<const Dot11&>(dot1),
static_cast<const Dot11&>(dot2)
);
}
void test_equals_expected(const Dot11Ack &dot11) {
void test_equals_expected(const Dot11Ack& dot11) {
EXPECT_EQ(dot11.protocol(), 1);
EXPECT_EQ(dot11.type(), Dot11::CONTROL);
EXPECT_EQ(dot11.subtype(), Dot11::ACK);
@@ -89,7 +89,7 @@ TEST_F(Dot11AckTest, ClonePDU) {
TEST_F(Dot11AckTest, FromBytes) {
Internals::smart_ptr<PDU>::type dot11(Dot11::from_bytes(expected_packet, sizeof(expected_packet)));
ASSERT_TRUE(dot11.get() != NULL);
const Dot11Ack *inner = dot11->find_pdu<Dot11Ack>();
const Dot11Ack* inner = dot11->find_pdu<Dot11Ack>();
ASSERT_TRUE(inner != NULL);
test_equals_expected(*inner);
}