diff options
Diffstat (limited to 'test/API/H5_api_attribute_test.c')
-rw-r--r-- | test/API/H5_api_attribute_test.c | 224 |
1 files changed, 112 insertions, 112 deletions
diff --git a/test/API/H5_api_attribute_test.c b/test/API/H5_api_attribute_test.c index 1b3ef96..680ee43 100644 --- a/test/API/H5_api_attribute_test.c +++ b/test/API/H5_api_attribute_test.c @@ -138,12 +138,12 @@ test_create_attribute_on_root(void) goto error; } - if ((space_id = generate_random_dataspace(ATTRIBUTE_CREATE_ON_ROOT_SPACE_RANK, NULL, NULL, TRUE)) < 0) + if ((space_id = generate_random_dataspace(ATTRIBUTE_CREATE_ON_ROOT_SPACE_RANK, NULL, NULL, true)) < 0) TEST_ERROR; - if ((attr_dtype1 = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) + if ((attr_dtype1 = generate_random_datatype(H5T_NO_CLASS, true)) < 0) TEST_ERROR; - if ((attr_dtype2 = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) + if ((attr_dtype2 = generate_random_datatype(H5T_NO_CLASS, true)) < 0) TEST_ERROR; PASSED(); @@ -296,17 +296,17 @@ test_create_attribute_on_dataset(void) } if ((dset_space_id = - generate_random_dataspace(ATTRIBUTE_CREATE_ON_DATASET_DSET_SPACE_RANK, NULL, NULL, FALSE)) < 0) + generate_random_dataspace(ATTRIBUTE_CREATE_ON_DATASET_DSET_SPACE_RANK, NULL, NULL, false)) < 0) TEST_ERROR; if ((attr_space_id = - generate_random_dataspace(ATTRIBUTE_CREATE_ON_DATASET_ATTR_SPACE_RANK, NULL, NULL, TRUE)) < 0) + generate_random_dataspace(ATTRIBUTE_CREATE_ON_DATASET_ATTR_SPACE_RANK, NULL, NULL, true)) < 0) TEST_ERROR; - if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) + if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0) TEST_ERROR; - if ((attr_dtype1 = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) + if ((attr_dtype1 = generate_random_datatype(H5T_NO_CLASS, true)) < 0) TEST_ERROR; - if ((attr_dtype2 = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) + if ((attr_dtype2 = generate_random_datatype(H5T_NO_CLASS, true)) < 0) TEST_ERROR; if ((dset_id = H5Dcreate2(group_id, ATTRIBUTE_CREATE_ON_DATASET_DSET_NAME, dset_dtype, dset_space_id, @@ -479,7 +479,7 @@ test_create_attribute_on_datatype(void) goto error; } - if ((type_id = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) { + if ((type_id = generate_random_datatype(H5T_NO_CLASS, false)) < 0) { H5_FAILED(); printf(" couldn't create datatype\n"); goto error; @@ -492,12 +492,12 @@ test_create_attribute_on_datatype(void) goto error; } - if ((space_id = generate_random_dataspace(ATTRIBUTE_CREATE_ON_DATATYPE_SPACE_RANK, NULL, NULL, TRUE)) < 0) + if ((space_id = generate_random_dataspace(ATTRIBUTE_CREATE_ON_DATATYPE_SPACE_RANK, NULL, NULL, true)) < 0) TEST_ERROR; - if ((attr_dtype1 = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) + if ((attr_dtype1 = generate_random_datatype(H5T_NO_CLASS, true)) < 0) TEST_ERROR; - if ((attr_dtype2 = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) + if ((attr_dtype2 = generate_random_datatype(H5T_NO_CLASS, true)) < 0) TEST_ERROR; PASSED(); @@ -652,7 +652,7 @@ test_create_attribute_with_null_space(void) if ((space_id = H5Screate(H5S_NULL)) < 0) TEST_ERROR; - if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) + if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0) TEST_ERROR; if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_CREATE_NULL_DATASPACE_TEST_ATTR_NAME, attr_dtype, space_id, @@ -763,7 +763,7 @@ test_create_attribute_with_scalar_space(void) if ((space_id = H5Screate(H5S_SCALAR)) < 0) TEST_ERROR; - if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) + if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0) TEST_ERROR; if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_CREATE_SCALAR_DATASPACE_TEST_ATTR_NAME, attr_dtype, @@ -874,10 +874,10 @@ test_create_attribute_with_space_in_name(void) } if ((space_id = - generate_random_dataspace(ATTRIBUTE_CREATE_WITH_SPACE_IN_NAME_SPACE_RANK, NULL, NULL, TRUE)) < 0) + generate_random_dataspace(ATTRIBUTE_CREATE_WITH_SPACE_IN_NAME_SPACE_RANK, NULL, NULL, true)) < 0) TEST_ERROR; - if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) + if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0) TEST_ERROR; if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_CREATE_WITH_SPACE_IN_NAME_ATTR_NAME, attr_dtype, space_id, @@ -978,10 +978,10 @@ test_create_attribute_invalid_params(void) goto error; } - if ((space_id = generate_random_dataspace(ATTRIBUTE_CREATE_INVALID_PARAMS_SPACE_RANK, NULL, NULL, TRUE)) < + if ((space_id = generate_random_dataspace(ATTRIBUTE_CREATE_INVALID_PARAMS_SPACE_RANK, NULL, NULL, true)) < 0) TEST_ERROR; - if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) + if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0) TEST_ERROR; PASSED(); @@ -1436,10 +1436,10 @@ test_open_attribute(void) goto error; } - if ((space_id = generate_random_dataspace(ATTRIBUTE_OPEN_TEST_SPACE_RANK, NULL, NULL, TRUE)) < 0) + if ((space_id = generate_random_dataspace(ATTRIBUTE_OPEN_TEST_SPACE_RANK, NULL, NULL, true)) < 0) TEST_ERROR; - if ((attr_type = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) + if ((attr_type = generate_random_datatype(H5T_NO_CLASS, true)) < 0) TEST_ERROR; /* Create several attributes */ @@ -1826,10 +1826,10 @@ test_open_attribute_invalid_params(void) } if ((space_id = - generate_random_dataspace(ATTRIBUTE_OPEN_INVALID_PARAMS_TEST_SPACE_RANK, NULL, NULL, TRUE)) < 0) + generate_random_dataspace(ATTRIBUTE_OPEN_INVALID_PARAMS_TEST_SPACE_RANK, NULL, NULL, true)) < 0) TEST_ERROR; - if ((attr_type = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) + if ((attr_type = generate_random_datatype(H5T_NO_CLASS, true)) < 0) TEST_ERROR; if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_OPEN_INVALID_PARAMS_TEST_ATTR_NAME, attr_type, space_id, @@ -2342,7 +2342,7 @@ test_write_attribute(void) goto error; } - if ((space_id = generate_random_dataspace(ATTRIBUTE_WRITE_TEST_SPACE_RANK, NULL, dims, TRUE)) < 0) + if ((space_id = generate_random_dataspace(ATTRIBUTE_WRITE_TEST_SPACE_RANK, NULL, dims, true)) < 0) TEST_ERROR; if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_WRITE_TEST_ATTR_NAME, ATTRIBUTE_WRITE_TEST_ATTR_DTYPE, @@ -2475,7 +2475,7 @@ test_write_attribute_invalid_params(void) } if ((space_id = - generate_random_dataspace(ATTRIBUTE_WRITE_INVALID_PARAMS_TEST_SPACE_RANK, NULL, dims, TRUE)) < 0) + generate_random_dataspace(ATTRIBUTE_WRITE_INVALID_PARAMS_TEST_SPACE_RANK, NULL, dims, true)) < 0) TEST_ERROR; if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_WRITE_INVALID_PARAMS_TEST_ATTR_NAME, @@ -2662,7 +2662,7 @@ test_read_attribute(void) goto error; } - if ((space_id = generate_random_dataspace(ATTRIBUTE_READ_TEST_SPACE_RANK, NULL, dims, TRUE)) < 0) + if ((space_id = generate_random_dataspace(ATTRIBUTE_READ_TEST_SPACE_RANK, NULL, dims, true)) < 0) TEST_ERROR; if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_READ_TEST_ATTR_NAME, ATTRIBUTE_READ_TEST_ATTR_DTYPE, @@ -2821,7 +2821,7 @@ test_read_attribute_invalid_params(void) } if ((space_id = - generate_random_dataspace(ATTRIBUTE_READ_INVALID_PARAMS_TEST_SPACE_RANK, NULL, dims, TRUE)) < 0) + generate_random_dataspace(ATTRIBUTE_READ_INVALID_PARAMS_TEST_SPACE_RANK, NULL, dims, true)) < 0) TEST_ERROR; if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_READ_INVALID_PARAMS_TEST_ATTR_NAME, @@ -3029,7 +3029,7 @@ test_read_empty_attribute(void) goto error; } - if ((space_id = generate_random_dataspace(ATTRIBUTE_READ_EMPTY_SPACE_RANK, NULL, dims, TRUE)) < 0) + if ((space_id = generate_random_dataspace(ATTRIBUTE_READ_EMPTY_SPACE_RANK, NULL, dims, true)) < 0) TEST_ERROR; if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_READ_EMPTY_ATTR_NAME, ATTRIBUTE_READ_EMPTY_DTYPE, space_id, @@ -3216,10 +3216,10 @@ test_get_attribute_space_and_type(void) } if ((attr_space_id = - generate_random_dataspace(ATTRIBUTE_GET_SPACE_TYPE_TEST_SPACE_RANK, NULL, attr_dims, TRUE)) < 0) + generate_random_dataspace(ATTRIBUTE_GET_SPACE_TYPE_TEST_SPACE_RANK, NULL, attr_dims, true)) < 0) TEST_ERROR; - if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) + if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0) TEST_ERROR; if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_GET_SPACE_TYPE_TEST_ATTR_NAME, attr_dtype, attr_space_id, @@ -3520,10 +3520,10 @@ test_get_attribute_space_and_type_invalid_params(void) } if ((attr_space_id = generate_random_dataspace(ATTRIBUTE_GET_SPACE_TYPE_INVALID_PARAMS_TEST_SPACE_RANK, - NULL, NULL, TRUE)) < 0) + NULL, NULL, true)) < 0) TEST_ERROR; - if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) + if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0) TEST_ERROR; if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_GET_SPACE_TYPE_INVALID_PARAMS_TEST_ATTR_NAME, attr_dtype, @@ -3678,12 +3678,12 @@ test_attribute_property_lists(void) goto error; } - if ((space_id = generate_random_dataspace(ATTRIBUTE_PROPERTY_LIST_TEST_SPACE_RANK, NULL, NULL, TRUE)) < 0) + if ((space_id = generate_random_dataspace(ATTRIBUTE_PROPERTY_LIST_TEST_SPACE_RANK, NULL, NULL, true)) < 0) TEST_ERROR; - if ((attr_dtype1 = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) + if ((attr_dtype1 = generate_random_datatype(H5T_NO_CLASS, true)) < 0) TEST_ERROR; - if ((attr_dtype2 = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) + if ((attr_dtype2 = generate_random_datatype(H5T_NO_CLASS, true)) < 0) TEST_ERROR; if ((acpl_id1 = H5Pcreate(H5P_ATTRIBUTE_CREATE)) < 0) { @@ -3979,10 +3979,10 @@ test_get_attribute_name(void) goto error; } - if ((space_id = generate_random_dataspace(ATTRIBUTE_GET_NAME_TEST_SPACE_RANK, NULL, NULL, TRUE)) < 0) + if ((space_id = generate_random_dataspace(ATTRIBUTE_GET_NAME_TEST_SPACE_RANK, NULL, NULL, true)) < 0) TEST_ERROR; - if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) + if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0) TEST_ERROR; /* Create several attributes */ @@ -4082,8 +4082,8 @@ test_get_attribute_name(void) PART_ERROR(H5Aget_name); } - if (HDstrncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME, - strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME) + 1)) { + if (strncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME, + strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME) + 1)) { H5_FAILED(); printf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME); @@ -4127,8 +4127,8 @@ test_get_attribute_name(void) PART_ERROR(H5Aget_name_by_idx_crt_order_increasing); } - if (HDstrncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME, - strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME) + 1)) { + if (strncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME, + strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME) + 1)) { H5_FAILED(); printf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME); @@ -4145,8 +4145,8 @@ test_get_attribute_name(void) PART_ERROR(H5Aget_name_by_idx_crt_order_increasing); } - if (HDstrncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2, - strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2) + 1)) { + if (strncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2, + strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2) + 1)) { H5_FAILED(); printf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2); @@ -4163,8 +4163,8 @@ test_get_attribute_name(void) PART_ERROR(H5Aget_name_by_idx_crt_order_increasing); } - if (HDstrncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3, - strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3) + 1)) { + if (strncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3, + strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3) + 1)) { H5_FAILED(); printf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3); @@ -4195,8 +4195,8 @@ test_get_attribute_name(void) PART_ERROR(H5Aget_name_by_idx_crt_order_decreasing); } - if (HDstrncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME, - strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME) + 1)) { + if (strncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME, + strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME) + 1)) { H5_FAILED(); printf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME); @@ -4213,8 +4213,8 @@ test_get_attribute_name(void) PART_ERROR(H5Aget_name_by_idx_crt_order_decreasing); } - if (HDstrncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2, - strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2) + 1)) { + if (strncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2, + strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2) + 1)) { H5_FAILED(); printf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2); @@ -4231,8 +4231,8 @@ test_get_attribute_name(void) PART_ERROR(H5Aget_name_by_idx_crt_order_decreasing); } - if (HDstrncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3, - strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3) + 1)) { + if (strncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3, + strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3) + 1)) { H5_FAILED(); printf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3); @@ -4257,8 +4257,8 @@ test_get_attribute_name(void) PART_ERROR(H5Aget_name_by_idx_name_order_increasing); } - if (HDstrncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME, - strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME) + 1)) { + if (strncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME, + strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME) + 1)) { H5_FAILED(); printf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME); @@ -4275,8 +4275,8 @@ test_get_attribute_name(void) PART_ERROR(H5Aget_name_by_idx_name_order_increasing); } - if (HDstrncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2, - strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2) + 1)) { + if (strncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2, + strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2) + 1)) { H5_FAILED(); printf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2); @@ -4293,8 +4293,8 @@ test_get_attribute_name(void) PART_ERROR(H5Aget_name_by_idx_name_order_increasing); } - if (HDstrncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3, - strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3) + 1)) { + if (strncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3, + strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3) + 1)) { H5_FAILED(); printf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3); @@ -4319,8 +4319,8 @@ test_get_attribute_name(void) PART_ERROR(H5Aget_name_by_idx_name_order_decreasing); } - if (HDstrncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME, - strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME) + 1)) { + if (strncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME, + strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME) + 1)) { H5_FAILED(); printf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME); @@ -4337,8 +4337,8 @@ test_get_attribute_name(void) PART_ERROR(H5Aget_name_by_idx_name_order_decreasing); } - if (HDstrncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2, - strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2) + 1)) { + if (strncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2, + strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2) + 1)) { H5_FAILED(); printf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME2); @@ -4355,8 +4355,8 @@ test_get_attribute_name(void) PART_ERROR(H5Aget_name_by_idx_name_order_decreasing); } - if (HDstrncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3, - strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3) + 1)) { + if (strncmp(name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3, + strlen(ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3) + 1)) { H5_FAILED(); printf(" retrieved attribute name '%s' didn't match '%s'\n", name_buf, ATTRIBUTE_GET_NAME_TEST_ATTRIBUTE_NAME3); @@ -4463,10 +4463,10 @@ test_get_attribute_name_invalid_params(void) } if ((space_id = generate_random_dataspace(ATTRIBUTE_GET_NAME_INVALID_PARAMS_TEST_SPACE_RANK, NULL, NULL, - TRUE)) < 0) + true)) < 0) TEST_ERROR; - if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) + if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0) TEST_ERROR; if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_GET_NAME_INVALID_PARAMS_TEST_ATTRIBUTE_NAME, attr_dtype, @@ -4844,10 +4844,10 @@ test_get_attribute_info(void) goto error; } - if ((space_id = generate_random_dataspace(ATTRIBUTE_GET_INFO_TEST_SPACE_RANK, NULL, NULL, TRUE)) < 0) + if ((space_id = generate_random_dataspace(ATTRIBUTE_GET_INFO_TEST_SPACE_RANK, NULL, NULL, true)) < 0) TEST_ERROR; - if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) + if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0) TEST_ERROR; /* Create several attributes */ @@ -5480,10 +5480,10 @@ test_get_attribute_info_invalid_params(void) } if ((space_id = generate_random_dataspace(ATTRIBUTE_GET_INFO_INVALID_PARAMS_TEST_SPACE_RANK, NULL, NULL, - TRUE)) < 0) + true)) < 0) TEST_ERROR; - if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) + if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0) TEST_ERROR; if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_GET_INFO_INVALID_PARAMS_TEST_ATTR_NAME, attr_dtype, @@ -5938,10 +5938,10 @@ test_rename_attribute(void) goto error; } - if ((attr_space_id = generate_random_dataspace(ATTRIBUTE_RENAME_TEST_SPACE_RANK, NULL, NULL, TRUE)) < 0) + if ((attr_space_id = generate_random_dataspace(ATTRIBUTE_RENAME_TEST_SPACE_RANK, NULL, NULL, true)) < 0) TEST_ERROR; - if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) + if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0) TEST_ERROR; if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_RENAME_TEST_ATTR_NAME, attr_dtype, attr_space_id, @@ -6157,10 +6157,10 @@ test_rename_attribute_invalid_params(void) } if ((attr_space_id = generate_random_dataspace(ATTRIBUTE_RENAME_INVALID_PARAMS_TEST_SPACE_RANK, NULL, - NULL, TRUE)) < 0) + NULL, true)) < 0) TEST_ERROR; - if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) + if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0) TEST_ERROR; if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_RENAME_INVALID_PARAMS_TEST_ATTR_NAME, attr_dtype, @@ -6543,18 +6543,18 @@ test_attribute_iterate_group(void) goto error; } - if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) + if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0) TEST_ERROR; if ((attr_space_id = - generate_random_dataspace(ATTRIBUTE_ITERATE_TEST_ATTR_SPACE_RANK, NULL, NULL, TRUE)) < 0) + generate_random_dataspace(ATTRIBUTE_ITERATE_TEST_ATTR_SPACE_RANK, NULL, NULL, true)) < 0) TEST_ERROR; /* Create some attributes with a reverse-ordering naming scheme to test creation order */ for (i = 0; i < ATTRIBUTE_ITERATE_TEST_NUM_ATTRS; i++) { char attr_name[ATTRIBUTE_ITERATE_TEST_ATTR_NAME_BUF_SIZE]; - HDsnprintf(attr_name, ATTRIBUTE_ITERATE_TEST_ATTR_NAME_BUF_SIZE, - ATTRIBUTE_ITERATE_TEST_ATTR_NAME "%d", (int)(ATTRIBUTE_ITERATE_TEST_NUM_ATTRS - i - 1)); + snprintf(attr_name, ATTRIBUTE_ITERATE_TEST_ATTR_NAME_BUF_SIZE, ATTRIBUTE_ITERATE_TEST_ATTR_NAME "%d", + (int)(ATTRIBUTE_ITERATE_TEST_NUM_ATTRS - i - 1)); if ((attr_id = H5Acreate2(group_id, attr_name, attr_dtype, attr_space_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -6939,16 +6939,16 @@ test_attribute_iterate_dataset(void) } } - if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) + if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0) TEST_ERROR; - if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) + if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0) TEST_ERROR; if ((dset_space_id = - generate_random_dataspace(ATTRIBUTE_ITERATE_TEST_DSET_SPACE_RANK, NULL, NULL, FALSE)) < 0) + generate_random_dataspace(ATTRIBUTE_ITERATE_TEST_DSET_SPACE_RANK, NULL, NULL, false)) < 0) TEST_ERROR; if ((attr_space_id = - generate_random_dataspace(ATTRIBUTE_ITERATE_TEST_ATTR_SPACE_RANK, NULL, NULL, TRUE)) < 0) + generate_random_dataspace(ATTRIBUTE_ITERATE_TEST_ATTR_SPACE_RANK, NULL, NULL, true)) < 0) TEST_ERROR; if ((dset_id = H5Dcreate2(group_id, ATTRIBUTE_ITERATE_TEST_DSET_NAME, dset_dtype, dset_space_id, @@ -6962,8 +6962,8 @@ test_attribute_iterate_dataset(void) for (i = 0; i < ATTRIBUTE_ITERATE_TEST_NUM_ATTRS; i++) { char attr_name[ATTRIBUTE_ITERATE_TEST_ATTR_NAME_BUF_SIZE]; - HDsnprintf(attr_name, ATTRIBUTE_ITERATE_TEST_ATTR_NAME_BUF_SIZE, - ATTRIBUTE_ITERATE_TEST_ATTR_NAME "%d", (int)(ATTRIBUTE_ITERATE_TEST_NUM_ATTRS - i - 1)); + snprintf(attr_name, ATTRIBUTE_ITERATE_TEST_ATTR_NAME_BUF_SIZE, ATTRIBUTE_ITERATE_TEST_ATTR_NAME "%d", + (int)(ATTRIBUTE_ITERATE_TEST_NUM_ATTRS - i - 1)); if ((attr_id = H5Acreate2(dset_id, attr_name, attr_dtype, attr_space_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -7361,13 +7361,13 @@ test_attribute_iterate_datatype(void) } } - if ((type_id = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) + if ((type_id = generate_random_datatype(H5T_NO_CLASS, false)) < 0) TEST_ERROR; - if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) + if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0) TEST_ERROR; if ((attr_space_id = - generate_random_dataspace(ATTRIBUTE_ITERATE_TEST_ATTR_SPACE_RANK, NULL, NULL, TRUE)) < 0) + generate_random_dataspace(ATTRIBUTE_ITERATE_TEST_ATTR_SPACE_RANK, NULL, NULL, true)) < 0) TEST_ERROR; if (H5Tcommit2(group_id, ATTRIBUTE_ITERATE_TEST_DTYPE_NAME, type_id, H5P_DEFAULT, tcpl_id, H5P_DEFAULT) < @@ -7381,8 +7381,8 @@ test_attribute_iterate_datatype(void) for (i = 0; i < ATTRIBUTE_ITERATE_TEST_NUM_ATTRS; i++) { char attr_name[ATTRIBUTE_ITERATE_TEST_ATTR_NAME_BUF_SIZE]; - HDsnprintf(attr_name, ATTRIBUTE_ITERATE_TEST_ATTR_NAME_BUF_SIZE, - ATTRIBUTE_ITERATE_TEST_ATTR_NAME "%d", (int)(ATTRIBUTE_ITERATE_TEST_NUM_ATTRS - i - 1)); + snprintf(attr_name, ATTRIBUTE_ITERATE_TEST_ATTR_NAME_BUF_SIZE, ATTRIBUTE_ITERATE_TEST_ATTR_NAME "%d", + (int)(ATTRIBUTE_ITERATE_TEST_NUM_ATTRS - i - 1)); if ((attr_id = H5Acreate2(type_id, attr_name, attr_dtype, attr_space_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -7774,11 +7774,11 @@ test_attribute_iterate_invalid_params(void) goto error; } - if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) + if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0) TEST_ERROR; if ((attr_space_id = generate_random_dataspace(ATTRIBUTE_ITERATE_INVALID_PARAMS_TEST_ATTR_SPACE_RANK, - NULL, NULL, TRUE)) < 0) + NULL, NULL, true)) < 0) TEST_ERROR; if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_ITERATE_INVALID_PARAMS_TEST_ATTR_NAME, attr_dtype, @@ -8193,11 +8193,11 @@ test_attribute_iterate_0_attributes(void) goto error; } - if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, FALSE)) < 0) + if ((dset_dtype = generate_random_datatype(H5T_NO_CLASS, false)) < 0) TEST_ERROR; if ((dset_space_id = generate_random_dataspace(ATTRIBUTE_ITERATE_TEST_0_ATTRIBUTES_DSET_SPACE_RANK, NULL, - NULL, FALSE)) < 0) + NULL, false)) < 0) TEST_ERROR; if ((dset_id = H5Dcreate2(group_id, ATTRIBUTE_ITERATE_TEST_0_ATTRIBUTES_DSET_NAME, dset_dtype, @@ -8395,10 +8395,10 @@ test_delete_attribute(void) goto error; } - if ((space_id = generate_random_dataspace(ATTRIBUTE_DELETION_TEST_SPACE_RANK, NULL, NULL, TRUE)) < 0) + if ((space_id = generate_random_dataspace(ATTRIBUTE_DELETION_TEST_SPACE_RANK, NULL, NULL, true)) < 0) TEST_ERROR; - if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) + if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0) TEST_ERROR; PASSED(); @@ -9616,10 +9616,10 @@ test_delete_attribute_invalid_params(void) } if ((space_id = generate_random_dataspace(ATTRIBUTE_DELETION_INVALID_PARAMS_TEST_SPACE_RANK, NULL, NULL, - TRUE)) < 0) + true)) < 0) TEST_ERROR; - if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) + if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0) TEST_ERROR; if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_DELETION_INVALID_PARAMS_TEST_ATTR_NAME, attr_dtype, @@ -10031,10 +10031,10 @@ test_attribute_exists(void) goto error; } - if ((space_id = generate_random_dataspace(ATTRIBUTE_EXISTS_TEST_SPACE_RANK, NULL, NULL, TRUE)) < 0) + if ((space_id = generate_random_dataspace(ATTRIBUTE_EXISTS_TEST_SPACE_RANK, NULL, NULL, true)) < 0) TEST_ERROR; - if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) + if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0) TEST_ERROR; if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_EXISTS_TEST_ATTR_NAME, attr_dtype, space_id, H5P_DEFAULT, @@ -10174,10 +10174,10 @@ test_attribute_exists_invalid_params(void) } if ((space_id = generate_random_dataspace(ATTRIBUTE_EXISTS_INVALID_PARAMS_TEST_SPACE_RANK, NULL, NULL, - TRUE)) < 0) + true)) < 0) TEST_ERROR; - if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) + if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0) TEST_ERROR; if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_EXISTS_INVALID_PARAMS_TEST_ATTR_NAME, attr_dtype, space_id, @@ -10449,10 +10449,10 @@ test_attribute_many(void) goto error; } - if ((space_id = generate_random_dataspace(ATTRIBUTE_MANY_SPACE_RANK, NULL, NULL, TRUE)) < 0) + if ((space_id = generate_random_dataspace(ATTRIBUTE_MANY_SPACE_RANK, NULL, NULL, true)) < 0) TEST_ERROR; - if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) + if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0) TEST_ERROR; /* Create many attributes */ @@ -10557,10 +10557,10 @@ test_attribute_duplicate_id(void) goto error; } - if ((space_id = generate_random_dataspace(ATTRIBUTE_DUPLICATE_ID_SPACE_RANK, NULL, NULL, TRUE)) < 0) + if ((space_id = generate_random_dataspace(ATTRIBUTE_DUPLICATE_ID_SPACE_RANK, NULL, NULL, true)) < 0) TEST_ERROR; - if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) + if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0) TEST_ERROR; if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_DUPLICATE_ID_ATTR_NAME, attr_dtype, space_id, H5P_DEFAULT, @@ -10675,10 +10675,10 @@ test_get_number_attributes(void) goto error; } - if ((space_id = generate_random_dataspace(ATTRIBUTE_GET_NUM_ATTRS_TEST_SPACE_RANK, NULL, NULL, TRUE)) < 0) + if ((space_id = generate_random_dataspace(ATTRIBUTE_GET_NUM_ATTRS_TEST_SPACE_RANK, NULL, NULL, true)) < 0) TEST_ERROR; - if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) + if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0) TEST_ERROR; if ((attr_id = H5Acreate2(group_id, ATTRIBUTE_GET_NUM_ATTRS_TEST_ATTR_NAME, attr_dtype, space_id, @@ -10855,10 +10855,10 @@ test_attr_shared_dtype(void) goto error; } - if ((space_id = generate_random_dataspace(ATTRIBUTE_SHARED_DTYPE_SPACE_RANK, NULL, NULL, TRUE)) < 0) + if ((space_id = generate_random_dataspace(ATTRIBUTE_SHARED_DTYPE_SPACE_RANK, NULL, NULL, true)) < 0) TEST_ERROR; - if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, TRUE)) < 0) + if ((attr_dtype = generate_random_datatype(H5T_NO_CLASS, true)) < 0) TEST_ERROR; /* Commit datatype to file */ @@ -10990,18 +10990,18 @@ attr_iter_callback1(hid_t location_id, const char *attr_name, const H5A_info_t * */ test_iteration = (counter_val / ATTRIBUTE_ITERATE_TEST_NUM_ATTRS); if (test_iteration == 0 || test_iteration == 3) { - HDsnprintf(expected_attr_name, ATTRIBUTE_ITERATE_TEST_ATTR_NAME_BUF_SIZE, - ATTRIBUTE_ITERATE_TEST_ATTR_NAME "%d", - (int)(counter_val % ATTRIBUTE_ITERATE_TEST_NUM_ATTRS)); + snprintf(expected_attr_name, ATTRIBUTE_ITERATE_TEST_ATTR_NAME_BUF_SIZE, + ATTRIBUTE_ITERATE_TEST_ATTR_NAME "%d", + (int)(counter_val % ATTRIBUTE_ITERATE_TEST_NUM_ATTRS)); } else { - HDsnprintf( + snprintf( expected_attr_name, ATTRIBUTE_ITERATE_TEST_ATTR_NAME_BUF_SIZE, ATTRIBUTE_ITERATE_TEST_ATTR_NAME "%d", (int)(ATTRIBUTE_ITERATE_TEST_NUM_ATTRS - (counter_val % ATTRIBUTE_ITERATE_TEST_NUM_ATTRS) - 1)); } - if (HDstrncmp(attr_name, expected_attr_name, ATTRIBUTE_ITERATE_TEST_ATTR_NAME_BUF_SIZE)) { + if (strncmp(attr_name, expected_attr_name, ATTRIBUTE_ITERATE_TEST_ATTR_NAME_BUF_SIZE)) { printf(" attribute name '%s' didn't match expected name '%s'\n", attr_name, expected_attr_name); ret_val = H5_ITER_ERROR; goto done; |