Lines Matching +full:magic +full:- +full:string
7 // https://www.apache.org/licenses/LICENSE-2.0
35 // For magic value always use a random 32 bit integer rather than a human
52 for (size_t value : {size_t(0), align - 1, align, align + 1, 2 * align}) { in TEST()
73 EXPECT_EQ(entry.magic(), kFormat.magic); in TEST()
85 EXPECT_EQ(entry.magic(), kFormat.magic); in TEST()
90 // For magic value always use a unique random 32 bit integer rather than a human
95 constexpr auto kKey1 = bytes::String("key45");
96 constexpr auto kValue1 = bytes::String("VALUE!");
97 constexpr auto kPadding1 = bytes::String("\0\0\0\0\0");
133 EXPECT_EQ(entry_.magic(), kMagicWithChecksum); in TEST_F()
220 constexpr auto kHeader2 = bytes::String(
221 "\x42\x51\x16\xad" // magic
230 bytes::String("K\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0");
250 EXPECT_EQ(entry_.magic(), kMagicWithChecksum); in TEST_F()
312 bytes::Concat(kHeader1, kKey1, kValue1, bytes::String("\0\0\0\0\1"))); in TEST()
320 // The in-memory verification fills in 0s for the padding. in TEST()
323 flash.buffer()[kEntry1.size() - 1] = byte{0}; in TEST()
331 EXPECT_EQ(kFormatWithChecksum.magic, entry_.magic()); in TEST_F()
341 EXPECT_EQ(kFormat.magic, entry_.magic()); in TEST_F()
354 // For magic value always use a random 32 bit integer rather than a human
356 constexpr EntryFormat kNoChecksumFormat{.magic = 0x721bad24,
398 sum_ += unsigned(b) + 1; // Add 1 so zero-value bytes affect checksum. in Update()
406 // For magic value always use a random 32 bit integer rather than a human
414 constexpr uint8_t alignment_units = (kAlignment + 15) / 16 - 1; in MakeNewFormatWithSumEntry()
418 ByteSum(bytes::Concat(kFormatWithSum.magic)) + 0 /* checksum */ + in MakeNewFormatWithSumEntry()
424 bytes::Concat(kFormatWithSum.magic, // magic in MakeNewFormatWithSumEntry()
436 // Uses 16-bit alignment, smaller than the original entry's alignment. in TEST_F()
454 EXPECT_EQ(kFormatWithSum.magic, new_entry.magic()); in TEST_F()
459 // Use 32-bit alignment, the same as the original entry's alignment. in TEST()
485 // Use 64-bit alignment, larger than the original entry's alignment. in TEST()
511 // For magic value always use a random 32 bit integer rather than a human in TEST_F()
513 constexpr EntryFormat no_checksum{.magic = 0x43fae18f, .checksum = nullptr}; in TEST_F()
522 bytes::Concat(no_checksum.magic, // magic in TEST_F()
555 EXPECT_EQ(kFormatWithSum.magic, entry.magic()); in TEST_F()