LEFT | RIGHT |
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * This program is free software; you can redistribute it and/or modify | 3 * This program is free software; you can redistribute it and/or modify |
4 * it under the terms of the GNU General Public License version 2 as | 4 * it under the terms of the GNU General Public License version 2 as |
5 * published by the Free Software Foundation; | 5 * published by the Free Software Foundation; |
6 * | 6 * |
7 * This program is distributed in the hope that it will be useful, | 7 * This program is distributed in the hope that it will be useful, |
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 8 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
10 * GNU General Public License for more details. | 10 * GNU General Public License for more details. |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 static const uint8_t TYPE = 42; //!< Option type. | 82 static const uint8_t TYPE = 42; //!< Option type. |
83 | 83 |
84 virtual uint32_t GetSerializedSize () const | 84 virtual uint32_t GetSerializedSize () const |
85 { | 85 { |
86 return 4; | 86 return 4; |
87 } | 87 } |
88 | 88 |
89 virtual void Serialize (Buffer::Iterator start) const | 89 virtual void Serialize (Buffer::Iterator start) const |
90 { | 90 { |
91 start.WriteU8 (TYPE); | 91 start.WriteU8 (TYPE); |
92 start.WriteU8 (static_cast<uint8_t>(GetSerializedSize ()-2)); | 92 start.WriteU8 (static_cast<uint8_t> (GetSerializedSize ()-2)); |
93 start.WriteU16 (0); | 93 start.WriteU16 (0); |
94 } | 94 } |
95 }; | 95 }; |
96 | 96 |
97 | 97 |
98 /** | 98 /** |
99 * \ingroup internet-test | 99 * \ingroup internet-test |
100 * \ingroup tests | 100 * \ingroup tests |
101 * | 101 * |
102 * \brief IPv6 extensions Test: Test the option without alignment. | 102 * \brief IPv6 extensions Test: Test the option without alignment. |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 static const uint8_t TYPE = 73; //!< Option Type. | 152 static const uint8_t TYPE = 73; //!< Option Type. |
153 | 153 |
154 virtual uint32_t GetSerializedSize () const | 154 virtual uint32_t GetSerializedSize () const |
155 { | 155 { |
156 return 4; | 156 return 4; |
157 } | 157 } |
158 | 158 |
159 virtual void Serialize (Buffer::Iterator start) const | 159 virtual void Serialize (Buffer::Iterator start) const |
160 { | 160 { |
161 start.WriteU8 (TYPE); | 161 start.WriteU8 (TYPE); |
162 start.WriteU8 (static_cast<uint8_t>(GetSerializedSize ()-2)); | 162 start.WriteU8 (static_cast<uint8_t> (GetSerializedSize ()-2)); |
163 start.WriteU16 (0); | 163 start.WriteU16 (0); |
164 } | 164 } |
165 | 165 |
166 virtual Alignment GetAlignment () const | 166 virtual Alignment GetAlignment () const |
167 { | 167 { |
168 Alignment alignment; | 168 Alignment alignment; |
169 alignment.factor = 4; | 169 alignment.factor = 4; |
170 alignment.offset = 0; | 170 alignment.offset = 0; |
171 return alignment; | 171 return alignment; |
172 } | 172 } |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 { | 267 { |
268 AddTestCase (new TestEmptyOptionField, TestCase::QUICK); | 268 AddTestCase (new TestEmptyOptionField, TestCase::QUICK); |
269 AddTestCase (new TestOptionWithoutAlignment, TestCase::QUICK); | 269 AddTestCase (new TestOptionWithoutAlignment, TestCase::QUICK); |
270 AddTestCase (new TestOptionWithAlignment, TestCase::QUICK); | 270 AddTestCase (new TestOptionWithAlignment, TestCase::QUICK); |
271 AddTestCase (new TestFulfilledAlignment, TestCase::QUICK); | 271 AddTestCase (new TestFulfilledAlignment, TestCase::QUICK); |
272 | 272 |
273 } | 273 } |
274 }; | 274 }; |
275 | 275 |
276 static Ipv6ExtensionHeaderTestSuite ipv6ExtensionHeaderTestSuite; //!< Static va
riable for test initialization | 276 static Ipv6ExtensionHeaderTestSuite ipv6ExtensionHeaderTestSuite; //!< Static va
riable for test initialization |
LEFT | RIGHT |