Files
@ r28800:381a234fb097
Branch filter:
Location: cpp/openttd-patchpack/source/src/tests/string_func.cpp
r28800:381a234fb097
16.1 KiB
text/x-c
Update: Translations from eints
english (au): 2 changes by krysclarke
spanish (mexican): 149 changes by Can202
estonian: 11 changes by RM87
chinese (simplified): 18 changes by WenSimEHRP
hungarian: 2 changes by PstasDev
italian: 195 changes by Rivarossi
serbian: 42 changes by nkrs
german: 2 changes by Wuzzy2
belarusian: 537 changes by KorneySan
russian: 25 changes by KorneySan
ukrainian: 21 changes by StepanIvasyn
turkish: 14 changes by jnmbk
latvian: 2 changes by lexuslatvia
dutch: 1 change by iamthedutchdude
spanish: 15 changes by MontyMontana
french: 2 changes by ottdfevr
portuguese: 2 changes by jcteotonio, 2 changes by azulcosta
portuguese (brazilian): 149 changes by pasantoro
polish: 2 changes by pAter-exe
english (au): 2 changes by krysclarke
spanish (mexican): 149 changes by Can202
estonian: 11 changes by RM87
chinese (simplified): 18 changes by WenSimEHRP
hungarian: 2 changes by PstasDev
italian: 195 changes by Rivarossi
serbian: 42 changes by nkrs
german: 2 changes by Wuzzy2
belarusian: 537 changes by KorneySan
russian: 25 changes by KorneySan
ukrainian: 21 changes by StepanIvasyn
turkish: 14 changes by jnmbk
latvian: 2 changes by lexuslatvia
dutch: 1 change by iamthedutchdude
spanish: 15 changes by MontyMontana
french: 2 changes by ottdfevr
portuguese: 2 changes by jcteotonio, 2 changes by azulcosta
portuguese (brazilian): 149 changes by pasantoro
polish: 2 changes by pAter-exe
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 | /*
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
/** @file string_func.cpp Test functionality from string_func. */
#include "../stdafx.h"
#include "../3rdparty/catch2/catch.hpp"
#include "../string_func.h"
/**** String compare/equals *****/
TEST_CASE("StrCompareIgnoreCase - std::string")
{
/* Same string, with different cases. */
CHECK(StrCompareIgnoreCase(std::string{""}, std::string{""}) == 0);
CHECK(StrCompareIgnoreCase(std::string{"a"}, std::string{"a"}) == 0);
CHECK(StrCompareIgnoreCase(std::string{"a"}, std::string{"A"}) == 0);
CHECK(StrCompareIgnoreCase(std::string{"A"}, std::string{"a"}) == 0);
CHECK(StrCompareIgnoreCase(std::string{"A"}, std::string{"A"}) == 0);
/* Not the same string. */
CHECK(StrCompareIgnoreCase(std::string{""}, std::string{"b"}) < 0);
CHECK(StrCompareIgnoreCase(std::string{"a"}, std::string{""}) > 0);
CHECK(StrCompareIgnoreCase(std::string{"a"}, std::string{"b"}) < 0);
CHECK(StrCompareIgnoreCase(std::string{"b"}, std::string{"a"}) > 0);
CHECK(StrCompareIgnoreCase(std::string{"a"}, std::string{"B"}) < 0);
CHECK(StrCompareIgnoreCase(std::string{"b"}, std::string{"A"}) > 0);
CHECK(StrCompareIgnoreCase(std::string{"A"}, std::string{"b"}) < 0);
CHECK(StrCompareIgnoreCase(std::string{"B"}, std::string{"a"}) > 0);
CHECK(StrCompareIgnoreCase(std::string{"a"}, std::string{"aa"}) < 0);
CHECK(StrCompareIgnoreCase(std::string{"aa"}, std::string{"a"}) > 0);
}
TEST_CASE("StrCompareIgnoreCase - char pointer")
{
/* Same string, with different cases. */
CHECK(StrCompareIgnoreCase("", "") == 0);
CHECK(StrCompareIgnoreCase("a", "a") == 0);
CHECK(StrCompareIgnoreCase("a", "A") == 0);
CHECK(StrCompareIgnoreCase("A", "a") == 0);
CHECK(StrCompareIgnoreCase("A", "A") == 0);
/* Not the same string. */
CHECK(StrCompareIgnoreCase("", "b") < 0);
CHECK(StrCompareIgnoreCase("a", "") > 0);
CHECK(StrCompareIgnoreCase("a", "b") < 0);
CHECK(StrCompareIgnoreCase("b", "a") > 0);
CHECK(StrCompareIgnoreCase("a", "B") < 0);
CHECK(StrCompareIgnoreCase("b", "A") > 0);
CHECK(StrCompareIgnoreCase("A", "b") < 0);
CHECK(StrCompareIgnoreCase("B", "a") > 0);
CHECK(StrCompareIgnoreCase("a", "aa") < 0);
CHECK(StrCompareIgnoreCase("aa", "a") > 0);
}
TEST_CASE("StrCompareIgnoreCase - std::string_view")
{
/*
* With std::string_view the only way to access the data is via .data(),
* which does not guarantee the termination that would be required by
* things such as stricmp/strcasecmp. So, just passing .data() into stricmp
* or strcasecmp would fail if it does not account for the length of the
* view. Thus, contrary to the string/char* tests, this uses the same base
* string but gets different sections to trigger these corner cases.
*/
std::string_view base{"aaAbB"};
/* Same string, with different cases. */
CHECK(StrCompareIgnoreCase(base.substr(0, 0), base.substr(1, 0)) == 0); // Different positions
CHECK(StrCompareIgnoreCase(base.substr(0, 1), base.substr(1, 1)) == 0); // Different positions
CHECK(StrCompareIgnoreCase(base.substr(0, 1), base.substr(2, 1)) == 0);
CHECK(StrCompareIgnoreCase(base.substr(2, 1), base.substr(1, 1)) == 0);
CHECK(StrCompareIgnoreCase(base.substr(2, 1), base.substr(2, 1)) == 0);
/* Not the same string. */
CHECK(StrCompareIgnoreCase(base.substr(3, 0), base.substr(3, 1)) < 0); // Same position, different lengths
CHECK(StrCompareIgnoreCase(base.substr(0, 1), base.substr(0, 0)) > 0); // Same position, different lengths
CHECK(StrCompareIgnoreCase(base.substr(0, 1), base.substr(3, 1)) < 0);
CHECK(StrCompareIgnoreCase(base.substr(3, 1), base.substr(0, 1)) > 0);
CHECK(StrCompareIgnoreCase(base.substr(0, 1), base.substr(4, 1)) < 0);
CHECK(StrCompareIgnoreCase(base.substr(3, 1), base.substr(2, 1)) > 0);
CHECK(StrCompareIgnoreCase(base.substr(2, 1), base.substr(3, 1)) < 0);
CHECK(StrCompareIgnoreCase(base.substr(4, 1), base.substr(0, 1)) > 0);
CHECK(StrCompareIgnoreCase(base.substr(0, 1), base.substr(0, 2)) < 0); // Same position, different lengths
CHECK(StrCompareIgnoreCase(base.substr(0, 2), base.substr(0, 1)) > 0); // Same position, different lengths
}
TEST_CASE("StrEqualsIgnoreCase - std::string")
{
/* Same string, with different cases. */
CHECK(StrEqualsIgnoreCase(std::string{""}, std::string{""}));
CHECK(StrEqualsIgnoreCase(std::string{"a"}, std::string{"a"}));
CHECK(StrEqualsIgnoreCase(std::string{"a"}, std::string{"A"}));
CHECK(StrEqualsIgnoreCase(std::string{"A"}, std::string{"a"}));
CHECK(StrEqualsIgnoreCase(std::string{"A"}, std::string{"A"}));
/* Not the same string. */
CHECK(!StrEqualsIgnoreCase(std::string{""}, std::string{"b"}));
CHECK(!StrEqualsIgnoreCase(std::string{"a"}, std::string{""}));
CHECK(!StrEqualsIgnoreCase(std::string{"a"}, std::string{"b"}));
CHECK(!StrEqualsIgnoreCase(std::string{"b"}, std::string{"a"}));
CHECK(!StrEqualsIgnoreCase(std::string{"a"}, std::string{"aa"}));
CHECK(!StrEqualsIgnoreCase(std::string{"aa"}, std::string{"a"}));
}
TEST_CASE("StrEqualsIgnoreCase - char pointer")
{
/* Same string, with different cases. */
CHECK(StrEqualsIgnoreCase("", ""));
CHECK(StrEqualsIgnoreCase("a", "a"));
CHECK(StrEqualsIgnoreCase("a", "A"));
CHECK(StrEqualsIgnoreCase("A", "a"));
CHECK(StrEqualsIgnoreCase("A", "A"));
/* Not the same string. */
CHECK(!StrEqualsIgnoreCase("", "b"));
CHECK(!StrEqualsIgnoreCase("a", ""));
CHECK(!StrEqualsIgnoreCase("a", "b"));
CHECK(!StrEqualsIgnoreCase("b", "a"));
CHECK(!StrEqualsIgnoreCase("a", "aa"));
CHECK(!StrEqualsIgnoreCase("aa", "a"));
}
TEST_CASE("StrEqualsIgnoreCase - std::string_view")
{
/*
* With std::string_view the only way to access the data is via .data(),
* which does not guarantee the termination that would be required by
* things such as stricmp/strcasecmp. So, just passing .data() into stricmp
* or strcasecmp would fail if it does not account for the length of the
* view. Thus, contrary to the string/char* tests, this uses the same base
* string but gets different sections to trigger these corner cases.
*/
std::string_view base{"aaAb"};
/* Same string, with different cases. */
CHECK(StrEqualsIgnoreCase(base.substr(0, 0), base.substr(1, 0))); // Different positions
CHECK(StrEqualsIgnoreCase(base.substr(0, 1), base.substr(1, 1))); // Different positions
CHECK(StrEqualsIgnoreCase(base.substr(0, 1), base.substr(2, 1)));
CHECK(StrEqualsIgnoreCase(base.substr(2, 1), base.substr(1, 1)));
CHECK(StrEqualsIgnoreCase(base.substr(2, 1), base.substr(2, 1)));
/* Not the same string. */
CHECK(!StrEqualsIgnoreCase(base.substr(3, 0), base.substr(3, 1))); // Same position, different lengths
CHECK(!StrEqualsIgnoreCase(base.substr(0, 1), base.substr(0, 0)));
CHECK(!StrEqualsIgnoreCase(base.substr(0, 1), base.substr(3, 1)));
CHECK(!StrEqualsIgnoreCase(base.substr(3, 1), base.substr(0, 1)));
CHECK(!StrEqualsIgnoreCase(base.substr(0, 1), base.substr(0, 2))); // Same position, different lengths
CHECK(!StrEqualsIgnoreCase(base.substr(0, 2), base.substr(0, 1))); // Same position, different lengths
}
/**** String starts with *****/
TEST_CASE("StrStartsWithIgnoreCase - std::string")
{
/* Everything starts with an empty prefix. */
CHECK(StrStartsWithIgnoreCase(std::string{""}, std::string{""}));
CHECK(StrStartsWithIgnoreCase(std::string{"a"}, std::string{""}));
/* Equals string, ignoring case. */
CHECK(StrStartsWithIgnoreCase(std::string{"a"}, std::string{"a"}));
CHECK(StrStartsWithIgnoreCase(std::string{"a"}, std::string{"A"}));
CHECK(StrStartsWithIgnoreCase(std::string{"A"}, std::string{"a"}));
CHECK(StrStartsWithIgnoreCase(std::string{"A"}, std::string{"A"}));
/* Starts with same, ignoring case. */
CHECK(StrStartsWithIgnoreCase(std::string{"ab"}, std::string{"a"}));
CHECK(StrStartsWithIgnoreCase(std::string{"ab"}, std::string{"A"}));
CHECK(StrStartsWithIgnoreCase(std::string{"Ab"}, std::string{"a"}));
CHECK(StrStartsWithIgnoreCase(std::string{"Ab"}, std::string{"A"}));
/* Does not start the same. */
CHECK(!StrStartsWithIgnoreCase(std::string{""}, std::string{"b"}));
CHECK(!StrStartsWithIgnoreCase(std::string{"a"}, std::string{"b"}));
CHECK(!StrStartsWithIgnoreCase(std::string{"b"}, std::string{"a"}));
CHECK(!StrStartsWithIgnoreCase(std::string{"a"}, std::string{"aa"}));
}
TEST_CASE("StrStartsWithIgnoreCase - char pointer")
{
/* Everything starts with an empty prefix. */
CHECK(StrStartsWithIgnoreCase("", ""));
CHECK(StrStartsWithIgnoreCase("a", ""));
/* Equals string, ignoring case. */
CHECK(StrStartsWithIgnoreCase("a", "a"));
CHECK(StrStartsWithIgnoreCase("a", "A"));
CHECK(StrStartsWithIgnoreCase("A", "a"));
CHECK(StrStartsWithIgnoreCase("A", "A"));
/* Starts with same, ignoring case. */
CHECK(StrStartsWithIgnoreCase("ab", "a"));
CHECK(StrStartsWithIgnoreCase("ab", "A"));
CHECK(StrStartsWithIgnoreCase("Ab", "a"));
CHECK(StrStartsWithIgnoreCase("Ab", "A"));
/* Does not start the same. */
CHECK(!StrStartsWithIgnoreCase("", "b"));
CHECK(!StrStartsWithIgnoreCase("a", "b"));
CHECK(!StrStartsWithIgnoreCase("b", "a"));
CHECK(!StrStartsWithIgnoreCase("a", "aa"));
}
TEST_CASE("StrStartsWithIgnoreCase - std::string_view")
{
/*
* With std::string_view the only way to access the data is via .data(),
* which does not guarantee the termination that would be required by
* things such as stricmp/strcasecmp. So, just passing .data() into stricmp
* or strcasecmp would fail if it does not account for the length of the
* view. Thus, contrary to the string/char* tests, this uses the same base
* string but gets different sections to trigger these corner cases.
*/
std::string_view base{"aabAb"};
/* Everything starts with an empty prefix. */
CHECK(StrStartsWithIgnoreCase(base.substr(0, 0), base.substr(1, 0))); // Different positions
CHECK(StrStartsWithIgnoreCase(base.substr(0, 1), base.substr(0, 0)));
/* Equals string, ignoring case. */
CHECK(StrStartsWithIgnoreCase(base.substr(0, 1), base.substr(1, 1))); // Different positions
CHECK(StrStartsWithIgnoreCase(base.substr(0, 1), base.substr(3, 1)));
CHECK(StrStartsWithIgnoreCase(base.substr(3, 1), base.substr(0, 1)));
CHECK(StrStartsWithIgnoreCase(base.substr(3, 1), base.substr(3, 1)));
/* Starts with same, ignoring case. */
CHECK(StrStartsWithIgnoreCase(base.substr(1, 2), base.substr(0, 1)));
CHECK(StrStartsWithIgnoreCase(base.substr(1, 2), base.substr(3, 1)));
CHECK(StrStartsWithIgnoreCase(base.substr(3, 2), base.substr(0, 1)));
CHECK(StrStartsWithIgnoreCase(base.substr(3, 2), base.substr(3, 1)));
/* Does not start the same. */
CHECK(!StrStartsWithIgnoreCase(base.substr(2, 0), base.substr(2, 1)));
CHECK(!StrStartsWithIgnoreCase(base.substr(0, 1), base.substr(2, 1)));
CHECK(!StrStartsWithIgnoreCase(base.substr(2, 1), base.substr(0, 1)));
CHECK(!StrStartsWithIgnoreCase(base.substr(0, 1), base.substr(0, 2)));
}
/**** String ends with *****/
TEST_CASE("StrEndsWithIgnoreCase - std::string")
{
/* Everything ends with an empty prefix. */
CHECK(StrEndsWithIgnoreCase(std::string{""}, std::string{""}));
CHECK(StrEndsWithIgnoreCase(std::string{"a"}, std::string{""}));
/* Equals string, ignoring case. */
CHECK(StrEndsWithIgnoreCase(std::string{"a"}, std::string{"a"}));
CHECK(StrEndsWithIgnoreCase(std::string{"a"}, std::string{"A"}));
CHECK(StrEndsWithIgnoreCase(std::string{"A"}, std::string{"a"}));
CHECK(StrEndsWithIgnoreCase(std::string{"A"}, std::string{"A"}));
/* Ends with same, ignoring case. */
CHECK(StrEndsWithIgnoreCase(std::string{"ba"}, std::string{"a"}));
CHECK(StrEndsWithIgnoreCase(std::string{"ba"}, std::string{"A"}));
CHECK(StrEndsWithIgnoreCase(std::string{"bA"}, std::string{"a"}));
CHECK(StrEndsWithIgnoreCase(std::string{"bA"}, std::string{"A"}));
/* Does not end the same. */
CHECK(!StrEndsWithIgnoreCase(std::string{""}, std::string{"b"}));
CHECK(!StrEndsWithIgnoreCase(std::string{"a"}, std::string{"b"}));
CHECK(!StrEndsWithIgnoreCase(std::string{"b"}, std::string{"a"}));
CHECK(!StrEndsWithIgnoreCase(std::string{"a"}, std::string{"aa"}));
}
TEST_CASE("StrEndsWithIgnoreCase - char pointer")
{
/* Everything ends with an empty prefix. */
CHECK(StrEndsWithIgnoreCase("", ""));
CHECK(StrEndsWithIgnoreCase("a", ""));
/* Equals string, ignoring case. */
CHECK(StrEndsWithIgnoreCase("a", "a"));
CHECK(StrEndsWithIgnoreCase("a", "A"));
CHECK(StrEndsWithIgnoreCase("A", "a"));
CHECK(StrEndsWithIgnoreCase("A", "A"));
/* Ends with same, ignoring case. */
CHECK(StrEndsWithIgnoreCase("ba", "a"));
CHECK(StrEndsWithIgnoreCase("ba", "A"));
CHECK(StrEndsWithIgnoreCase("bA", "a"));
CHECK(StrEndsWithIgnoreCase("bA", "A"));
/* Does not end the same. */
CHECK(!StrEndsWithIgnoreCase("", "b"));
CHECK(!StrEndsWithIgnoreCase("a", "b"));
CHECK(!StrEndsWithIgnoreCase("b", "a"));
CHECK(!StrEndsWithIgnoreCase("a", "aa"));
}
TEST_CASE("StrEndsWithIgnoreCase - std::string_view")
{
/*
* With std::string_view the only way to access the data is via .data(),
* which does not guarantee the termination that would be required by
* things such as stricmp/strcasecmp. So, just passing .data() into stricmp
* or strcasecmp would fail if it does not account for the length of the
* view. Thus, contrary to the string/char* tests, this uses the same base
* string but gets different sections to trigger these corner cases.
*/
std::string_view base{"aabAba"};
/* Everything ends with an empty prefix. */
CHECK(StrEndsWithIgnoreCase(base.substr(0, 0), base.substr(1, 0))); // Different positions
CHECK(StrEndsWithIgnoreCase(base.substr(0, 1), base.substr(0, 0)));
/* Equals string, ignoring case. */
CHECK(StrEndsWithIgnoreCase(base.substr(0, 1), base.substr(1, 1))); // Different positions
CHECK(StrEndsWithIgnoreCase(base.substr(0, 1), base.substr(3, 1)));
CHECK(StrEndsWithIgnoreCase(base.substr(3, 1), base.substr(0, 1)));
CHECK(StrEndsWithIgnoreCase(base.substr(3, 1), base.substr(3, 1)));
/* Ends with same, ignoring case. */
CHECK(StrEndsWithIgnoreCase(base.substr(2, 2), base.substr(0, 1)));
CHECK(StrEndsWithIgnoreCase(base.substr(2, 2), base.substr(3, 1)));
CHECK(StrEndsWithIgnoreCase(base.substr(4, 2), base.substr(0, 1)));
CHECK(StrEndsWithIgnoreCase(base.substr(4, 2), base.substr(3, 1)));
/* Does not end the same. */
CHECK(!StrEndsWithIgnoreCase(base.substr(2, 0), base.substr(2, 1)));
CHECK(!StrEndsWithIgnoreCase(base.substr(0, 1), base.substr(2, 1)));
CHECK(!StrEndsWithIgnoreCase(base.substr(2, 1), base.substr(0, 1)));
CHECK(!StrEndsWithIgnoreCase(base.substr(0, 1), base.substr(0, 2)));
}
TEST_CASE("FormatArrayAsHex")
{
CHECK(FormatArrayAsHex(std::array<byte, 0>{}) == "");
CHECK(FormatArrayAsHex(std::array<byte, 1>{0x12}) == "12");
CHECK(FormatArrayAsHex(std::array<byte, 4>{0x13, 0x38, 0x42, 0xAF}) == "133842AF");
}
TEST_CASE("ConvertHexToBytes")
{
CHECK(ConvertHexToBytes("", {}) == true);
CHECK(ConvertHexToBytes("1", {}) == false);
CHECK(ConvertHexToBytes("12", {}) == false);
std::array<uint8_t, 1> bytes1;
CHECK(ConvertHexToBytes("1", bytes1) == false);
CHECK(ConvertHexToBytes("12", bytes1) == true);
CHECK(bytes1[0] == 0x12);
CHECK(ConvertHexToBytes("123", bytes1) == false);
CHECK(ConvertHexToBytes("1g", bytes1) == false);
CHECK(ConvertHexToBytes("g1", bytes1) == false);
std::array<uint8_t, 2> bytes2;
CHECK(ConvertHexToBytes("12", bytes2) == false);
CHECK(ConvertHexToBytes("1234", bytes2) == true);
CHECK(bytes2[0] == 0x12);
CHECK(bytes2[1] == 0x34);
std::array<uint8_t, 8> bytes3;
CHECK(ConvertHexToBytes("123456789abcdef0", bytes3) == true);
CHECK(bytes3[0] == 0x12);
CHECK(bytes3[1] == 0x34);
CHECK(bytes3[2] == 0x56);
CHECK(bytes3[3] == 0x78);
CHECK(bytes3[4] == 0x9a);
CHECK(bytes3[5] == 0xbc);
CHECK(bytes3[6] == 0xde);
CHECK(bytes3[7] == 0xf0);
CHECK(ConvertHexToBytes("123456789ABCDEF0", bytes3) == true);
CHECK(bytes3[0] == 0x12);
CHECK(bytes3[1] == 0x34);
CHECK(bytes3[2] == 0x56);
CHECK(bytes3[3] == 0x78);
CHECK(bytes3[4] == 0x9a);
CHECK(bytes3[5] == 0xbc);
CHECK(bytes3[6] == 0xde);
CHECK(bytes3[7] == 0xf0);
}
|