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

Fixed lots of warnings in test cases, due to narrowing conversions.

This commit is contained in:
Matias Fontanini
2013-03-18 11:32:34 -03:00
parent a8edc2af74
commit 0f27b04a92
37 changed files with 216 additions and 305 deletions

View File

@@ -23,11 +23,8 @@ const address_type Dot11BeaconTest::empty_addr,
Dot11BeaconTest::hwaddr("72:91:34:fa:de:ad");
const uint8_t Dot11BeaconTest::expected_packet[] = {
'\x81', '\x01', 'O', '#', '\x00', '\x01', '\x02', '\x03', '\x04',
'\x05', '\x01', '\x02', '\x03', '\x04', '\x05', '\x06', '\x02',
'\x03', '\x04', '\x05', '\x06', '\x07', '\x00', '\x00', '\xfa',
'\x01', '\x93', '(', 'A', '#', '\xad', '\x1f', '\xfa', '\x14',
'\x95', ' '
129, 1, 79, 35, 0, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 6, 2, 3, 4, 5, 6,
7, 0, 0, 250, 1, 147, 40, 65, 35, 173, 31, 250, 20, 149, 32
};
void test_equals_expected(const Dot11Beacon &dot11) {
@@ -391,22 +388,14 @@ TEST_F(Dot11BeaconTest, RSNInformationTest) {
TEST_F(Dot11BeaconTest, PCAPLoad1) {
const uint8_t buffer[] = {
'\x80', '\x00', '\x00', '\x00', '\xff', '\xff', '\xff', '\xff',
'\xff', '\xff', '\xf4', '\xec', '8', '\xfe', 'M', '\x92', '\xf4',
'\xec', '8', '\xfe', 'M', '\x92', '\xe0', '\xea', '\x80', '\xd1',
'\xd4', '\xce', ',', '\x00', '\x00', '\x00', 'd', '\x00', '1',
'\x04', '\x00', '\x07', 'S', 'e', 'g', 'u', 'n', 'd', 'o', '\x01',
'\x08', '\x82', '\x84', '\x8b', '\x96', '\x0c', '\x12', '\x18', '$',
'\x03', '\x01', '\x01', '\x05', '\x04', '\x00', '\x01', '\x00',
'\x00', '\x07', '\x06', 'U', 'S', ' ', '\x01', '\r', '\x14', '*',
'\x01', '\x00', '0', '\x14', '\x01', '\x00', '\x00', '\x0f', '\xac',
'\x04', '\x01', '\x00', '\x00', '\x0f', '\xac', '\x04', '\x01',
'\x00', '\x00', '\x0f', '\xac', '\x02', '\x00', '\x00', '2', '\x04',
'0', 'H', '`', 'l', '\xdd', '\x18', '\x00', 'P', '\xf2', '\x02',
'\x01', '\x01', '\x03', '\x00', '\x03', '\xa4', '\x00', '\x00',
'\'', '\xa4', '\x00', '\x00', 'B', 'C', '^', '\x00', 'b', '2',
'/', '\x00', '\xdd', '\t', '\x00', '\x03', '\x7f', '\x01', '\x01',
'\x00', '\x00', '\xff', '\x7f'
128, 0, 0, 0, 255, 255, 255, 255, 255, 255, 244, 236, 56, 254, 77,
146, 244, 236, 56, 254, 77, 146, 224, 234, 128, 209, 212, 206, 44,
0, 0, 0, 100, 0, 49, 4, 0, 7, 83, 101, 103, 117, 110, 100, 111, 1,
8, 130, 132, 139, 150, 12, 18, 24, 36, 3, 1, 1, 5, 4, 0, 1, 0, 0, 7,
6, 85, 83, 32, 1, 13, 20, 42, 1, 0, 48, 20, 1, 0, 0, 15, 172, 4, 1,
0, 0, 15, 172, 4, 1, 0, 0, 15, 172, 2, 0, 0, 50, 4, 48, 72, 96, 108,
221, 24, 0, 80, 242, 2, 1, 1, 3, 0, 3, 164, 0, 0, 39, 164, 0, 0, 66,
67, 94, 0, 98, 50, 47, 0, 221, 9, 0, 3, 127, 1, 1, 0, 0, 255, 127
};
typedef Dot11Beacon::country_params::container_type country_container;
Dot11Beacon dot11(buffer, sizeof(buffer));