mirror of
https://github.com/mfontanini/libtins
synced 2026-01-29 04:54:28 +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:
@@ -7,7 +7,7 @@ using Tins::Dot11;
|
||||
|
||||
typedef Dot11::address_type address_type;
|
||||
|
||||
inline void test_equals(const Dot11 &dot1, const Dot11 &dot2) {
|
||||
inline void test_equals(const Dot11& dot1, const Dot11& dot2) {
|
||||
EXPECT_EQ(dot1.protocol(), dot2.protocol());
|
||||
EXPECT_EQ(dot1.type(), dot2.type());
|
||||
EXPECT_EQ(dot1.subtype(), dot2.subtype());
|
||||
@@ -22,7 +22,7 @@ inline void test_equals(const Dot11 &dot1, const Dot11 &dot2) {
|
||||
EXPECT_EQ(dot1.addr1(), dot2.addr1());
|
||||
}
|
||||
|
||||
inline void test_equals_empty(const Dot11 &dot11) {
|
||||
inline void test_equals_empty(const Dot11& dot11) {
|
||||
Dot11::address_type empty_addr;
|
||||
|
||||
EXPECT_EQ(dot11.protocol(), 0);
|
||||
|
||||
@@ -12,12 +12,12 @@ inline void test_equals(const Dot11ControlTA& b1, const Dot11ControlTA& b2) {
|
||||
}
|
||||
|
||||
|
||||
inline void test_equals_expected(const Dot11ControlTA &dot11) {
|
||||
inline void test_equals_expected(const Dot11ControlTA& dot11) {
|
||||
EXPECT_EQ(dot11.target_addr(), "01:02:03:04:05:06");
|
||||
EXPECT_EQ(dot11.addr1(), "00:01:02:03:04:05");
|
||||
}
|
||||
|
||||
inline void test_equals_empty(const Dot11ControlTA &dot11) {
|
||||
inline void test_equals_empty(const Dot11ControlTA& dot11) {
|
||||
Dot11::address_type empty_addr;
|
||||
|
||||
EXPECT_EQ(dot11.target_addr(), empty_addr);
|
||||
|
||||
@@ -16,7 +16,7 @@ inline void test_equals(const Dot11Data& b1, const Dot11Data& b2) {
|
||||
test_equals(static_cast<const Dot11&>(b1), static_cast<const Dot11&>(b2));
|
||||
}
|
||||
|
||||
inline void test_equals_expected(const Dot11Data &dot11) {
|
||||
inline void test_equals_expected(const Dot11Data& dot11) {
|
||||
EXPECT_EQ(dot11.type(), Dot11::DATA);
|
||||
EXPECT_EQ(dot11.addr1(), "00:01:02:03:04:05");
|
||||
EXPECT_EQ(dot11.addr2(), "01:02:03:04:05:06");
|
||||
@@ -25,7 +25,7 @@ inline void test_equals_expected(const Dot11Data &dot11) {
|
||||
EXPECT_EQ(dot11.seq_num(), 0xf1d);
|
||||
}
|
||||
|
||||
inline void test_equals_empty(const Dot11Data &dot11) {
|
||||
inline void test_equals_empty(const Dot11Data& dot11) {
|
||||
Dot11::address_type empty_addr;
|
||||
|
||||
EXPECT_EQ(dot11.addr1(), empty_addr);
|
||||
|
||||
@@ -18,7 +18,7 @@ inline void test_equals(const Dot11ManagementFrame& b1, const Dot11ManagementFra
|
||||
test_equals(static_cast<const Dot11&>(b1), static_cast<const Dot11&>(b2));
|
||||
}
|
||||
|
||||
inline void test_equals_expected(const Dot11ManagementFrame &dot11) {
|
||||
inline void test_equals_expected(const Dot11ManagementFrame& dot11) {
|
||||
EXPECT_EQ(dot11.protocol(), 1);
|
||||
EXPECT_EQ(dot11.type(), Dot11::MANAGEMENT);
|
||||
EXPECT_EQ(dot11.to_ds(), 1);
|
||||
@@ -34,7 +34,7 @@ inline void test_equals_expected(const Dot11ManagementFrame &dot11) {
|
||||
EXPECT_EQ(dot11.addr3(), "02:03:04:05:06:07");
|
||||
}
|
||||
|
||||
inline void test_equals_empty(const Dot11ManagementFrame &dot11) {
|
||||
inline void test_equals_empty(const Dot11ManagementFrame& dot11) {
|
||||
Dot11::address_type empty_addr;
|
||||
|
||||
EXPECT_EQ(dot11.type(), Dot11::MANAGEMENT);
|
||||
@@ -48,7 +48,7 @@ inline void test_equals_empty(const Dot11ManagementFrame &dot11) {
|
||||
}
|
||||
|
||||
|
||||
inline void test_equals(const capability_information &info1, const capability_information &info2) {
|
||||
inline void test_equals(const capability_information& info1, const capability_information& info2) {
|
||||
EXPECT_EQ(info1.ess(), info2.ess());
|
||||
EXPECT_EQ(info1.ibss(), info2.ibss());
|
||||
EXPECT_EQ(info1.cf_poll(), info2.cf_poll());
|
||||
@@ -67,7 +67,7 @@ inline void test_equals(const capability_information &info1, const capability_in
|
||||
EXPECT_EQ(info1.immediate_block_ack(), info2.immediate_block_ack());
|
||||
}
|
||||
|
||||
inline void test_equals_empty(const capability_information &info) {
|
||||
inline void test_equals_empty(const capability_information& info) {
|
||||
EXPECT_EQ(info.ess(), false);
|
||||
EXPECT_EQ(info.ibss(), false);
|
||||
EXPECT_EQ(info.cf_poll(), false);
|
||||
|
||||
Reference in New Issue
Block a user