1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-07-05 00:28:52 +02:00

Cleanup pgPageChecksum() test in postgres/interface module.

Some of the comments were wrong or inconsistent.

Update TEST_RESULT_U16_HEX() to the less-specific TEST_RESULT_UINT_HEX().
This commit is contained in:
David Steele
2020-03-06 15:01:50 -05:00
parent 438b957f9c
commit 54bc3b454a
2 changed files with 4 additions and 8 deletions

View File

@ -182,13 +182,10 @@ testRun(void)
if (testBegin("pgPageChecksum()"))
{
unsigned char page[PG_PAGE_SIZE_DEFAULT];
// Checksum for 0xFF fill, page 0x00
memset(page, 0xFF, PG_PAGE_SIZE_DEFAULT);
TEST_RESULT_U16_HEX(pgPageChecksum(page, 0), 0x0E1C, "check for 0xFF filled page, block 0");
// Checksum for 0xFF fill, page 0xFF
TEST_RESULT_U16_HEX(pgPageChecksum(page, 999), 0x0EC3, "check for 0xFF filled page, block 999");
TEST_RESULT_UINT_HEX(pgPageChecksum(page, 0), 0x0E1C, "check 0xFF filled page, block 0");
TEST_RESULT_UINT_HEX(pgPageChecksum(page, 999), 0x0EC3, "check 0xFF filled page, block 999");
}
// *****************************************************************************************************************************