summaryrefslogtreecommitdiffstats
path: root/test/API/H5_api_file_test.h
diff options
context:
space:
mode:
authorjhendersonHDF <jhenderson@hdfgroup.org>2023-05-02 19:52:39 (GMT)
committerGitHub <noreply@github.com>2023-05-02 19:52:39 (GMT)
commitf8a1b3ceec485829ccdd3034ef2be68029f1a66e (patch)
tree5563ca3059b8cbda43f7f1e0ffedf7985f71a4bc /test/API/H5_api_file_test.h
parent41fd8e66a9f837a1adf36a0253e29440d82ff522 (diff)
downloadhdf5-f8a1b3ceec485829ccdd3034ef2be68029f1a66e.zip
hdf5-f8a1b3ceec485829ccdd3034ef2be68029f1a66e.tar.gz
hdf5-f8a1b3ceec485829ccdd3034ef2be68029f1a66e.tar.bz2
Add initial version of HDF5 API tests (#2877)
Diffstat (limited to 'test/API/H5_api_file_test.h')
-rw-r--r--test/API/H5_api_file_test.h85
1 files changed, 85 insertions, 0 deletions
diff --git a/test/API/H5_api_file_test.h b/test/API/H5_api_file_test.h
new file mode 100644
index 0000000..948cb6a
--- /dev/null
+++ b/test/API/H5_api_file_test.h
@@ -0,0 +1,85 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * 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. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+#ifndef H5_API_FILE_TEST_H
+#define H5_API_FILE_TEST_H
+
+#include "H5_api_test.h"
+
+int H5_api_file_test(void);
+
+/*********************************************
+ * *
+ * API File test defines *
+ * *
+ *********************************************/
+
+#define FILE_CREATE_TEST_FILENAME "test_file.h5"
+
+#define FILE_CREATE_INVALID_PARAMS_FILE_NAME "invalid_params_file.h5"
+
+#define FILE_CREATE_EXCL_FILE_NAME "excl_flag_file.h5"
+
+#define NONEXISTENT_FILENAME "nonexistent_file.h5"
+
+#define OVERLAPPING_FILENAME "overlapping_file.h5"
+#define OVERLAPPING_OPEN_TEST_GRP_NAME "group"
+#define OVERLAPPING_OPEN_TEST_DSET_NAME "dataset"
+
+#define FILE_PERMISSION_TEST_FILENAME "file_permission.h5"
+#define FILE_PERMISSION_TEST_GRP_NAME "group"
+#define FILE_PERMISSION_TEST_DSET_NAME "Dataset"
+#define FILE_PERMISSION_TEST_DSET2_NAME "Dataset2"
+#define FILE_PERMISSION_TEST_ATTR_NAME "attribute"
+#define FILE_PERMISSION_TEST_NAMED_DTYPE "named_dtype"
+
+#define FILE_FLUSH_TEST_FILENAME "flush_file.h5"
+
+#define FILE_PROPERTY_LIST_TEST_FCPL_PROP_VAL 65536
+#define FILE_PROPERTY_LIST_TEST_FNAME1 "property_list_test_file1.h5"
+#define FILE_PROPERTY_LIST_TEST_FNAME2 "property_list_test_file2.h5"
+
+#define FILE_INTENT_TEST_FILENAME "intent_test_file.h5"
+
+#define GET_OBJ_COUNT_TEST_FILENAME1 "file_obj_count1.h5"
+#define GET_OBJ_COUNT_TEST_FILENAME2 "file_obj_count2.h5"
+#define GET_OBJ_COUNT_TEST_GRP_NAME "/group"
+#define GET_OBJ_COUNT_TEST_DSET_NAME "Dataset"
+#define GET_OBJ_COUNT_TEST_ATTR_NAME "Attribute"
+#define GET_OBJ_COUNT_TEST_NAMED_DTYPE "named_dtype"
+
+#define FILE_MOUNT_TEST_FILENAME "file_mount.h5"
+#define FILE_MOUNT_TEST_GRP_NAME "group"
+
+#define GET_FILE_NAME_TEST_FNAME "file_name_retrieval.h5"
+#define GET_FILE_NAME_TEST_GRP_NAME "group"
+#define GET_FILE_NAME_TEST_DSET_NAME "dataset"
+#define GET_FILE_NAME_TEST_ATTR_NAME "attribute"
+#define GET_FILE_NAME_TEST_NAMED_DTYPE "datatype"
+
+#define FILESPACE_INFO_FILENAME "filespace_info.h5"
+#define FSP_SIZE512 (hsize_t)512
+
+#define FILE_GET_ID_TEST_FILENAME "test_file_id.h5"
+
+#define FILE_CLOSE_DEGREE_FILENAME "test_close_degree.h5"
+
+#define GET_FREE_SECTIONS_FILENAME "test_free_sections.h5"
+
+#define FILE_SIZE_FILENAME "file_size.h5"
+#define KB 1024U
+
+#define FILE_INFO_FILENAME "file_info.h5"
+
+#define DOUBLE_GROUP_OPEN_FILENAME "double_group_open.h5"
+
+#endif