Source
TestErrPrintf("Error encoding meta-data at offset %u, wanted: %u, got: %u\n", (unsigned) u, (unsigned) compar_buffer[u], (unsigned) encode_buffer[u]);
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
* distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/***********************************************************
*
* Test program: tmeta
*
* Test the basic meta-data encode/decode macros calls.
*
*************************************************************/
uint8_t compar_buffer[] =
{
/* Little-endian encoded version of the 16-bit signed integer */
(uint8_t) ((TEST_INT16_VALUE) & 0xff), (uint8_t) ((TEST_INT16_VALUE >> 8) & 0xff),
/* Little-endian encoded version of the 16-bit unsigned integer */
(uint8_t) ((TEST_UINT16_VALUE) & 0xff), (uint8_t) ((TEST_UINT16_VALUE >> 8) & 0xff),
/* Little-endian encoded version of the 32-bit signed integer */
(uint8_t) ((TEST_INT32_VALUE) & 0xff), (uint8_t) ((TEST_INT32_VALUE >> 8) & 0xff),
(uint8_t) ((TEST_INT32_VALUE >> 16) & 0xff), (uint8_t) ((TEST_INT32_VALUE >> 24) & 0xff),
/* Little-endian encoded version of the 32-bit unsigned integer */
(uint8_t) ((TEST_UINT32_VALUE) & 0xff), (uint8_t) ((TEST_UINT32_VALUE >> 8) & 0xff),
(uint8_t) ((TEST_UINT32_VALUE >> 16) & 0xff), (uint8_t) ((TEST_UINT32_VALUE >> 24) & 0xff),
};
uint8_t encode_buffer[sizeof(compar_buffer)];
/****************************************************************
**
** test_metadata(): Main meta-data encode/decode testing routine.
**
****************************************************************/
void