1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-29 13:04:28 +01:00

Every test now pass on big endian architectures. Ported about half of the library to windows as well.

This commit is contained in:
Matias Fontanini
2012-10-08 21:14:57 -03:00
parent 1c22dab2dc
commit 73577c744a
19 changed files with 285 additions and 83 deletions

View File

@@ -97,6 +97,20 @@ TEST_F(Dot11BeaconTest, CopyAssignmentOperator) {
test_equals(dot1, dot2);
}
TEST_F(Dot11BeaconTest, FragNum) {
Dot11Beacon dot11;
dot11.frag_num(0x3);
EXPECT_EQ(0x3, dot11.frag_num());
EXPECT_EQ(0, dot11.seq_num());
}
TEST_F(Dot11BeaconTest, SeqNum) {
Dot11Beacon dot11;
dot11.seq_num(0x1f2);
EXPECT_EQ(0x1f2, dot11.seq_num());
EXPECT_EQ(0, dot11.frag_num());
}
TEST_F(Dot11BeaconTest, FromBytes) {
std::auto_ptr<PDU> dot11(Dot11::from_bytes(expected_packet, sizeof(expected_packet)));
ASSERT_TRUE(dot11.get());