summaryrefslogtreecommitdiffstats
path: root/hl/test
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2022-04-07 13:01:44 (GMT)
committerGitHub <noreply@github.com>2022-04-07 13:01:44 (GMT)
commit65568d75746b56ce7066337cf4c5c4aad11ff5f9 (patch)
tree4d43fd73ab9eb9c2218c7f2df21d54f7f6509bf2 /hl/test
parent7a83173c7b289453e17f3026e825cb97778180cd (diff)
downloadhdf5-65568d75746b56ce7066337cf4c5c4aad11ff5f9.zip
hdf5-65568d75746b56ce7066337cf4c5c4aad11ff5f9.tar.gz
hdf5-65568d75746b56ce7066337cf4c5c4aad11ff5f9.tar.bz2
Normalization of HL library with develop (#1609)
Diffstat (limited to 'hl/test')
-rw-r--r--hl/test/test_ds.c28
-rw-r--r--hl/test/test_file_image.c2
-rw-r--r--hl/test/test_h5do_compat.c2
-rw-r--r--hl/test/test_image.c4
-rw-r--r--hl/test/test_ld.c6
-rw-r--r--hl/test/test_lite.c109
-rw-r--r--hl/test/test_packet_vlen.c2
-rw-r--r--hl/test/test_table.c2
8 files changed, 100 insertions, 55 deletions
diff --git a/hl/test/test_ds.c b/hl/test/test_ds.c
index c66ef49..12b6840 100644
--- a/hl/test/test_ds.c
+++ b/hl/test/test_ds.c
@@ -3021,7 +3021,7 @@ test_simple(void)
}
/*-------------------------------------------------------------------------
- * dettach for DIM0
+ * detach for DIM0
*-------------------------------------------------------------------------
*/
@@ -3319,11 +3319,11 @@ test_simple(void)
goto out;
dim = 0;
- /* iterate trough the 1st dimension of "dset_a" and verify that its DS is valid */
+ /* iterate through the 1st dimension of "dset_a" and verify that its DS is valid */
if (H5DSiterate_scales(did, dim, NULL, verify_scale, NULL) < 0)
goto out;
- /* iterate trough the 2nd dimension of "dset_a" and verify that its DS is valid
+ /* iterate through the 2nd dimension of "dset_a" and verify that its DS is valid
start at DS index 2 */
dim = 1;
scale_idx = 2;
@@ -3344,11 +3344,11 @@ test_simple(void)
goto out;
dim = 0;
- /* iterate trough the 1st dimension of "dset_a" and read the DS */
+ /* iterate through the 1st dimension of "dset_a" and read the DS */
if (H5DSiterate_scales(did, dim, NULL, read_scale, s1_wbuf) < 0)
goto out;
- /* iterate trough the 2nd dimension of "dset_a" and read the DS
+ /* iterate through the 2nd dimension of "dset_a" and read the DS
start at DS index 2 */
dim = 1;
scale_idx = 2;
@@ -3381,9 +3381,9 @@ test_simple(void)
goto out;
{
int match_size; /* does this scale size matches the dataset DIM size */
- int idx = 0; /* scale index to start iterating, on return, index where iterator stoped */
+ int idx = 0; /* scale index to start iterating, on return, index where iterator stopped */
- /* iterate trough all the dimensions */
+ /* iterate through all the dimensions */
for (dim = 0; dim < (unsigned)rank; dim++) {
if ((match_size = H5DSiterate_scales(did, dim, &idx, match_dim_scale, NULL)) < 0)
goto out;
@@ -3475,9 +3475,9 @@ test_simple(void)
goto out;
{
int match_size; /* does this scale size matches the dataset DIM size */
- int idx; /* scale index to start iterating, on return, index where iterator stoped */
+ int idx; /* scale index to start iterating, on return, index where iterator stopped */
- /* iterate trough all the dimensions */
+ /* iterate through all the dimensions */
for (dim = 0; dim < (unsigned)rank; dim++) {
/* always start at 1st scale */
idx = 0;
@@ -4025,7 +4025,7 @@ test_errors(void)
PASSED();
/*-------------------------------------------------------------------------
- * try to attach a scale to an image, pallete or table
+ * try to attach a scale to an image, palette or table
*-------------------------------------------------------------------------
*/
@@ -4036,7 +4036,7 @@ test_errors(void)
goto out;
/* make a palette */
- if (H5IMmake_palette(fid, "pallete", pal_dims, NULL) < 0)
+ if (H5IMmake_palette(fid, "palette", pal_dims, NULL) < 0)
goto out;
/* open the previous written "ds_b" */
@@ -4248,7 +4248,7 @@ test_iterators(void)
if ((did = H5Dopen2(fid, "dset_a", H5P_DEFAULT)) < 0)
goto out;
- /* try to iterate trough the 1st dimension of "dset_a", return error */
+ /* try to iterate through the 1st dimension of "dset_a", return error */
if (H5DSiterate_scales(did, 0, NULL, verify_scale, NULL) < 0)
goto out;
@@ -4269,7 +4269,7 @@ test_iterators(void)
if ((did = H5Dopen2(fid, "dset_a", H5P_DEFAULT)) < 0)
goto out;
- /* try to iterate trough the 3rd dimension of "dset_a", return error */
+ /* try to iterate through the 3rd dimension of "dset_a", return error */
if (H5DSiterate_scales(did, 3, NULL, verify_scale, NULL) == SUCCEED)
goto out;
@@ -4306,7 +4306,7 @@ test_iterators(void)
goto out;
}
- /* iterate trough the 1st dimension of "dset_a" */
+ /* iterate through the 1st dimension of "dset_a" */
if (H5DSiterate_scales(did, 0, NULL, op_continue, NULL) < 0)
goto out;
diff --git a/hl/test/test_file_image.c b/hl/test/test_file_image.c
index 36d4db3..4448e41 100644
--- a/hl/test/test_file_image.c
+++ b/hl/test/test_file_image.c
@@ -244,7 +244,7 @@ test_file_image(size_t open_images, size_t nflags, const unsigned *flags)
*/
HDmemset((uint8_t *)tmp_ptr + SUPER_STATUS_FLAGS_OFF_V0_V1, (int)0,
(size_t)SUPER_STATUS_FLAGS_SIZE_V0_V1);
- /* Does the comparision */
+ /* Does the comparison */
if (HDmemcmp(tmp_ptr, buf_ptr[i], (size_t)buf_size[i]) != 0)
FAIL_PUTS_ERROR("comparison of TMP vfd and user buffer failed");
/* Free the temporary buffer */
diff --git a/hl/test/test_h5do_compat.c b/hl/test/test_h5do_compat.c
index c554ae7..6f19d4b 100644
--- a/hl/test/test_h5do_compat.c
+++ b/hl/test/test_h5do_compat.c
@@ -31,7 +31,7 @@
*
* Purpose: Test the basic functionality of H5DOwrite_chunk
*
- * Return: Success: An identifer for the dataset used in the tests
+ * Return: Success: An identifier for the dataset used in the tests
* Failure: H5I_INVALID_HID
*
*-------------------------------------------------------------------------
diff --git a/hl/test/test_image.c b/hl/test/test_image.c
index e54875e..4997df6 100644
--- a/hl/test/test_image.c
+++ b/hl/test/test_image.c
@@ -219,7 +219,7 @@ test_simple(void)
*-------------------------------------------------------------------------
*/
- HL_TESTING2("pallete functions");
+ HL_TESTING2("palette functions");
if (H5IMget_npalettes(fid, IMAGE1_NAME, &npals) < 0)
goto out;
@@ -422,7 +422,7 @@ test_data(void)
/*-------------------------------------------------------------------------
* palette #4. blue-red
- * make a palette whith blue to red colors
+ * make a palette with blue to red colors
*-------------------------------------------------------------------------
*/
for (i = 0, n = 0; i < 256 * 3; i += 3, n++) {
diff --git a/hl/test/test_ld.c b/hl/test/test_ld.c
index dc5755c..150d04c 100644
--- a/hl/test/test_ld.c
+++ b/hl/test/test_ld.c
@@ -189,7 +189,7 @@ typedef struct set_t {
* This will fail on heiwa and amani when VALID_FIELDS1 is "field1,field3,field4"
* because of alignment problems:
* amani and heiwa - 8 byte alignment
- * jam - 4 byte alignemnt
+ * jam - 4 byte alignment
* This will need to be fixed in the library for H5Tget_native_type().
*/
/* VALID_FIELDS1 "field1,field2.a,field3,field4" */
@@ -213,8 +213,8 @@ typedef struct test_valid_fields2 {
#define TEST_BUF_SIZE 100
int * iibuf; /* buffer for storing retrieved elements */
int * ibuf; /* buffer for storing retrieved elements (integer) */
-set_t * cbuf; /* buffer for storing retrieved elemnets (compound) */
-set_t * ccbuf; /* buffer for storing retrieved elemnets (compound) */
+set_t * cbuf; /* buffer for storing retrieved elements (compound) */
+set_t * ccbuf; /* buffer for storing retrieved elements (compound) */
test_valid_fields1 *vbuf1; /* buffer for storing retrieved elements (FIELDS1) */
test_valid_fields2 *vbuf2; /* buffer for storing retrieved elements (FIELDS2) */
diff --git a/hl/test/test_lite.c b/hl/test/test_lite.c
index cae91ff..53f834a 100644
--- a/hl/test/test_lite.c
+++ b/hl/test/test_lite.c
@@ -43,8 +43,9 @@
#define ATTR7_NAME "attr ushort"
#define ATTR8_NAME "attr uint"
#define ATTR9_NAME "attr ulong"
-#define ATTR10_NAME "attr float"
-#define ATTR11_NAME "attr double"
+#define ATTR10_NAME "attr ullong"
+#define ATTR11_NAME "attr float"
+#define ATTR12_NAME "attr double"
static herr_t make_attributes(hid_t loc_id, const char *obj_name);
@@ -472,28 +473,30 @@ make_attributes(hid_t loc_id, const char *obj_name)
size_t type_size;
int i;
- char attr_str_in[] = {"My attribute"};
- char attr_str_out[20];
- char attr_char_in[5] = {1, 2, 3, 4, 5};
- char attr_char_out[5];
- short attr_short_in[5] = {1, 2, 3, 4, 5};
- short attr_short_out[5];
- int attr_int_in[5] = {1, 2, 3, 4, 5};
- int attr_int_out[5];
- long attr_long_in[5] = {1, 2, 3, 4, 5};
- long attr_long_out[5];
- float attr_float_in[5] = {1, 2, 3, 4, 5};
- float attr_float_out[5];
- double attr_double_in[5] = {1, 2, 3, 4, 5};
- double attr_double_out[5];
- unsigned char attr_uchar_in[5] = {1, 2, 3, 4, 5};
- unsigned char attr_uchar_out[5];
- unsigned short attr_ushort_in[5] = {1, 2, 3, 4, 5};
- unsigned short attr_ushort_out[5];
- unsigned int attr_uint_in[5] = {1, 2, 3, 4, 5};
- unsigned int attr_uint_out[5];
- unsigned long attr_ulong_in[5] = {1, 2, 3, 4, 5};
- unsigned long attr_ulong_out[5];
+ char attr_str_in[] = {"My attribute"};
+ char attr_str_out[20];
+ char attr_char_in[5] = {1, 2, 3, 4, 5};
+ char attr_char_out[5];
+ short attr_short_in[5] = {1, 2, 3, 4, 5};
+ short attr_short_out[5];
+ int attr_int_in[5] = {1, 2, 3, 4, 5};
+ int attr_int_out[5];
+ long attr_long_in[5] = {1, 2, 3, 4, 5};
+ long attr_long_out[5];
+ float attr_float_in[5] = {1, 2, 3, 4, 5};
+ float attr_float_out[5];
+ double attr_double_in[5] = {1, 2, 3, 4, 5};
+ double attr_double_out[5];
+ unsigned char attr_uchar_in[5] = {1, 2, 3, 4, 5};
+ unsigned char attr_uchar_out[5];
+ unsigned short attr_ushort_in[5] = {1, 2, 3, 4, 5};
+ unsigned short attr_ushort_out[5];
+ unsigned int attr_uint_in[5] = {1, 2, 3, 4, 5};
+ unsigned int attr_uint_out[5];
+ unsigned long attr_ulong_in[5] = {1, 2, 3, 4, 5};
+ unsigned long attr_ulong_out[5];
+ unsigned long long attr_ullong_in[5] = {1, 2, 3, 4, 5};
+ unsigned long long attr_ullong_out[5];
/*-------------------------------------------------------------------------
* H5LTset_attribute_string test
@@ -509,7 +512,7 @@ make_attributes(hid_t loc_id, const char *obj_name)
PASSED();
/*-------------------------------------------------------------------------
- * H5LTset_attribute_string test
+ * H5LTget_attribute_string test
*-------------------------------------------------------------------------
*/
@@ -859,7 +862,7 @@ make_attributes(hid_t loc_id, const char *obj_name)
PASSED();
/*-------------------------------------------------------------------------
- * H5LTget_attribute_long test
+ * H5LTget_attribute_ulong test
*-------------------------------------------------------------------------
*/
@@ -888,6 +891,48 @@ make_attributes(hid_t loc_id, const char *obj_name)
PASSED();
/*-------------------------------------------------------------------------
+ * H5LTset_attribute_ullong test
+ *-------------------------------------------------------------------------
+ */
+
+ HL_TESTING2("H5LTset_attribute_ullong");
+
+ /* Set the attribute */
+ if (H5LTset_attribute_ullong(loc_id, obj_name, ATTR10_NAME, attr_ullong_in, (size_t)5) < 0)
+ return -1;
+
+ PASSED();
+
+ /*-------------------------------------------------------------------------
+ * H5LTget_attribute_ullong test
+ *-------------------------------------------------------------------------
+ */
+
+ HL_TESTING2("H5LTget_attribute_ullong");
+
+ /* Get the attribute */
+ if (H5LTget_attribute_ullong(loc_id, obj_name, ATTR10_NAME, attr_ullong_out) < 0)
+ return -1;
+
+ for (i = 0; i < 5; i++) {
+ if (attr_ullong_in[i] != attr_ullong_out[i]) {
+ return -1;
+ }
+ }
+
+ /* Get the attribute */
+ if (H5LTget_attribute(loc_id, obj_name, ATTR10_NAME, H5T_NATIVE_ULLONG, attr_ullong_out) < 0)
+ return -1;
+
+ for (i = 0; i < 5; i++) {
+ if (attr_ullong_in[i] != attr_ullong_out[i]) {
+ return -1;
+ }
+ }
+
+ PASSED();
+
+ /*-------------------------------------------------------------------------
* H5LTset_attribute_float test
*-------------------------------------------------------------------------
*/
@@ -895,7 +940,7 @@ make_attributes(hid_t loc_id, const char *obj_name)
HL_TESTING2("H5LTset_attribute_float");
/* Set the attribute */
- if (H5LTset_attribute_float(loc_id, obj_name, ATTR10_NAME, attr_float_in, (size_t)5) < 0)
+ if (H5LTset_attribute_float(loc_id, obj_name, ATTR11_NAME, attr_float_in, (size_t)5) < 0)
return -1;
PASSED();
@@ -908,7 +953,7 @@ make_attributes(hid_t loc_id, const char *obj_name)
HL_TESTING2("H5LTget_attribute_float");
/* Get the attribute */
- if (H5LTget_attribute_float(loc_id, obj_name, ATTR10_NAME, attr_float_out) < 0)
+ if (H5LTget_attribute_float(loc_id, obj_name, ATTR11_NAME, attr_float_out) < 0)
return -1;
for (i = 0; i < 5; i++) {
@@ -918,7 +963,7 @@ make_attributes(hid_t loc_id, const char *obj_name)
}
/* Get the attribute */
- if (H5LTget_attribute(loc_id, obj_name, ATTR10_NAME, H5T_NATIVE_FLOAT, attr_float_out) < 0)
+ if (H5LTget_attribute(loc_id, obj_name, ATTR11_NAME, H5T_NATIVE_FLOAT, attr_float_out) < 0)
return -1;
for (i = 0; i < 5; i++) {
@@ -937,7 +982,7 @@ make_attributes(hid_t loc_id, const char *obj_name)
HL_TESTING2("H5LTset_attribute_double");
/* Set the attribute */
- if (H5LTset_attribute_double(loc_id, obj_name, ATTR11_NAME, attr_double_in, (size_t)5) < 0)
+ if (H5LTset_attribute_double(loc_id, obj_name, ATTR12_NAME, attr_double_in, (size_t)5) < 0)
return -1;
PASSED();
@@ -950,7 +995,7 @@ make_attributes(hid_t loc_id, const char *obj_name)
HL_TESTING2("H5LTget_attribute_double");
/* Get the attribute */
- if (H5LTget_attribute_double(loc_id, obj_name, ATTR11_NAME, attr_double_out) < 0)
+ if (H5LTget_attribute_double(loc_id, obj_name, ATTR12_NAME, attr_double_out) < 0)
return -1;
for (i = 0; i < 5; i++) {
@@ -960,7 +1005,7 @@ make_attributes(hid_t loc_id, const char *obj_name)
}
/* Get the attribute */
- if (H5LTget_attribute(loc_id, obj_name, ATTR11_NAME, H5T_NATIVE_DOUBLE, attr_double_out) < 0)
+ if (H5LTget_attribute(loc_id, obj_name, ATTR12_NAME, H5T_NATIVE_DOUBLE, attr_double_out) < 0)
return -1;
for (i = 0; i < 5; i++) {
diff --git a/hl/test/test_packet_vlen.c b/hl/test/test_packet_vlen.c
index c33479e..aa88a6c 100644
--- a/hl/test/test_packet_vlen.c
+++ b/hl/test/test_packet_vlen.c
@@ -677,7 +677,7 @@ error: /* An error has occurred. Clean up and exit. */
*
* Description:
* - Added a fixed-length packet table to the file for variety
- * - Use the helper funtion verify_ptlengthtype to test H5PTis_varlen
+ * - Use the helper function verify_ptlengthtype to test H5PTis_varlen
* on each packet table.
*
* 2016/01/27 -BMR
diff --git a/hl/test/test_table.c b/hl/test/test_table.c
index 6199e27..90a930c 100644
--- a/hl/test/test_table.c
+++ b/hl/test/test_table.c
@@ -1464,7 +1464,7 @@ test_table(hid_t fid, int do_write)
HL_TESTING2("getting field info");
- /* alocate */
+ /* allocate */
names_out = (char **)HDmalloc(sizeof(char *) * (size_t)NFIELDS);
for (i = 0; i < NFIELDS; i++) {
names_out[i] = (char *)HDmalloc(sizeof(char) * 255);