summaryrefslogtreecommitdiffstats
path: root/test/API/H5_api_object_test.h
blob: 54708434a187b12ae7f3afa2009bc3c39ed0bcd2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * 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_OBJECT_TEST_H
#define H5_API_OBJECT_TEST_H

#include "H5_api_test.h"

int H5_api_object_test(void);

/***********************************************
 *                                             *
 *           API Object test defines           *
 *                                             *
 ***********************************************/

#define OBJECT_OPEN_TEST_SPACE_RANK 2
#define OBJECT_OPEN_TEST_GROUP_NAME "object_open_test"
#define OBJECT_OPEN_TEST_GRP_NAME   "object_open_test_group"
#define OBJECT_OPEN_TEST_DSET_NAME  "object_open_test_dset"
#define OBJECT_OPEN_TEST_TYPE_NAME  "object_open_test_type"

#define OBJECT_OPEN_INVALID_PARAMS_TEST_GROUP_NAME "object_open_invalid_params_test"
#define OBJECT_OPEN_INVALID_PARAMS_TEST_GRP_NAME   "object_open_invalid_params_test_group"

#define OBJECT_CLOSE_INVALID_TEST_GROUP_NAME     "object_close_invalid_params_test"
#define OBJECT_CLOSE_INVALID_TEST_ATTRIBUTE_NAME "object_close_invalid_test_attribute"
#define OBJECT_CLOSE_INVALID_TEST_SPACE_RANK     2

#define OBJECT_EXISTS_TEST_DSET_SPACE_RANK    2
#define OBJECT_EXISTS_TEST_SUBGROUP_NAME      "object_exists_test"
#define OBJECT_EXISTS_TEST_DANGLING_LINK_NAME "object_exists_test_dangling_soft_link"
#define OBJECT_EXISTS_TEST_SOFT_LINK_NAME     "object_exists_test_soft_link"
#define OBJECT_EXISTS_TEST_GRP_NAME           "object_exists_test_group"
#define OBJECT_EXISTS_TEST_TYPE_NAME          "object_exists_test_type"
#define OBJECT_EXISTS_TEST_DSET_NAME          "object_exists_test_dset"

#define OBJECT_EXISTS_INVALID_PARAMS_TEST_SUBGROUP_NAME "object_exists_invalid_params_test"
#define OBJECT_EXISTS_INVALID_PARAMS_TEST_GRP_NAME      "object_exists_invalid_params_test_group"

#define OBJECT_COPY_BASIC_TEST_DEEP_NESTED_GROUP_NAME "deep_nested_group"
#define OBJECT_COPY_BASIC_TEST_NUM_NESTED_OBJS        3
#define OBJECT_COPY_BASIC_TEST_NEW_GROUP_NAME         "copied_group"
#define OBJECT_COPY_BASIC_TEST_NEW_DSET_NAME          "copied_dset"
#define OBJECT_COPY_BASIC_TEST_NEW_DTYPE_NAME         "copied_dtype"
#define OBJECT_COPY_BASIC_TEST_SUBGROUP_NAME          "object_copy_basic_test"
#define OBJECT_COPY_BASIC_TEST_GROUP_NAME             "group_to_copy"
#define OBJECT_COPY_BASIC_TEST_DSET_NAME              "dset_to_copy"
#define OBJECT_COPY_BASIC_TEST_DTYPE_NAME             "dtype_to_copy"
#define OBJECT_COPY_BASIC_TEST_SPACE_RANK             2
#define OBJECT_COPY_BASIC_TEST_NUM_ATTRS              3
#define OBJECT_COPY_BASIC_TEST_BUF_SIZE               256

#define OBJECT_COPY_ALREADY_EXISTING_TEST_SUBGROUP_NAME "object_copy_existing_objects_test"
#define OBJECT_COPY_ALREADY_EXISTING_TEST_GROUP_NAME    "group_to_copy"
#define OBJECT_COPY_ALREADY_EXISTING_TEST_DSET_NAME     "dset_to_copy"
#define OBJECT_COPY_ALREADY_EXISTING_TEST_DTYPE_NAME    "dtype_to_copy"
#define OBJECT_COPY_ALREADY_EXISTING_TEST_SPACE_RANK    2

#define OBJECT_COPY_SHALLOW_TEST_DEEP_NESTED_GROUP_NAME "deep_nested_group"
#define OBJECT_COPY_SHALLOW_TEST_NUM_NESTED_OBJS        3
#define OBJECT_COPY_SHALLOW_TEST_SUBGROUP_NAME          "object_copy_shallow_group_copy_test"
#define OBJECT_COPY_SHALLOW_TEST_NEW_GROUP_NAME         "copied_group"
#define OBJECT_COPY_SHALLOW_TEST_GROUP_NAME             "group_to_copy"
#define OBJECT_COPY_SHALLOW_TEST_BUF_SIZE               256

#define OBJECT_COPY_NO_ATTRS_TEST_SUBGROUP_NAME  "object_copy_no_attributes_test"
#define OBJECT_COPY_NO_ATTRS_TEST_NEW_GROUP_NAME "copied_group"
#define OBJECT_COPY_NO_ATTRS_TEST_NEW_DSET_NAME  "copied_dset"
#define OBJECT_COPY_NO_ATTRS_TEST_NEW_DTYPE_NAME "copied_dtype"
#define OBJECT_COPY_NO_ATTRS_TEST_GROUP_NAME     "group_to_copy"
#define OBJECT_COPY_NO_ATTRS_TEST_DSET_NAME      "dset_to_copy"
#define OBJECT_COPY_NO_ATTRS_TEST_DTYPE_NAME     "dtype_to_copy"
#define OBJECT_COPY_NO_ATTRS_TEST_SPACE_RANK     2
#define OBJECT_COPY_NO_ATTRS_TEST_NUM_ATTRS      3
#define OBJECT_COPY_NO_ATTRS_TEST_BUF_SIZE       256

#define OBJECT_COPY_SOFT_LINK_TEST_DEEP_NESTED_GROUP_NAME "deep_nested_group"
#define OBJECT_COPY_SOFT_LINK_TEST_DANGLING_LINK_NAME     "dangling_link"
#define OBJECT_COPY_SOFT_LINK_TEST_NUM_NESTED_OBJS        3
#define OBJECT_COPY_SOFT_LINK_TEST_SUBGROUP_NAME          "object_copy_soft_link_test"
#define OBJECT_COPY_SOFT_LINK_TEST_SOFT_LINK_NAME         "soft_link_to_group_to_copy"
#define OBJECT_COPY_SOFT_LINK_TEST_NEW_GROUP_NAME         "copied_group"
#define OBJECT_COPY_SOFT_LINK_TEST_GROUP_NAME             "group_to_copy"
#define OBJECT_COPY_SOFT_LINK_TEST_SPACE_RANK             2
#define OBJECT_COPY_SOFT_LINK_TEST_NUM_ATTRS              3
#define OBJECT_COPY_SOFT_LINK_TEST_BUF_SIZE               256

#define OBJECT_COPY_GROUP_WITH_SOFT_LINKS_TEST_EXPAND_DANGLING_GROUP_NAME "expanded_dangling_soft_links_group"
#define OBJECT_COPY_GROUP_WITH_SOFT_LINKS_TEST_NON_EXPAND_GROUP_NAME      "non_expanded_soft_links_group"
#define OBJECT_COPY_GROUP_WITH_SOFT_LINKS_TEST_EXPAND_GROUP_NAME          "expanded_soft_links_group"
#define OBJECT_COPY_GROUP_WITH_SOFT_LINKS_TEST_NUM_NESTED_OBJS            3
#define OBJECT_COPY_GROUP_WITH_SOFT_LINKS_TEST_SUBGROUP_NAME              "object_copy_group_with_soft_links_test"
#define OBJECT_COPY_GROUP_WITH_SOFT_LINKS_TEST_GROUP_NAME                 "group_to_copy"
#define OBJECT_COPY_GROUP_WITH_SOFT_LINKS_TEST_BUF_SIZE                   256

#define OBJECT_COPY_BETWEEN_FILES_TEST_DEEP_NESTED_GROUP_NAME "deep_nested_group"
#define OBJECT_COPY_BETWEEN_FILES_TEST_NUM_NESTED_OBJS        3
#define OBJECT_COPY_BETWEEN_FILES_TEST_SUBGROUP_NAME          "object_copy_between_files_test"
#define OBJECT_COPY_BETWEEN_FILES_TEST_NEW_GROUP_NAME         "copied_group"
#define OBJECT_COPY_BETWEEN_FILES_TEST_NEW_DSET_NAME          "copied_dset"
#define OBJECT_COPY_BETWEEN_FILES_TEST_NEW_DTYPE_NAME         "copied_dtype"
#define OBJECT_COPY_BETWEEN_FILES_TEST_FILE_NAME              "object_copy_test_file.h5"
#define OBJECT_COPY_BETWEEN_FILES_TEST_GROUP_NAME             "group_to_copy"
#define OBJECT_COPY_BETWEEN_FILES_TEST_DSET_NAME              "dset_to_copy"
#define OBJECT_COPY_BETWEEN_FILES_TEST_DTYPE_NAME             "dtype_to_copy"
#define OBJECT_COPY_BETWEEN_FILES_TEST_SPACE_RANK             2
#define OBJECT_COPY_BETWEEN_FILES_TEST_NUM_ATTRS              3
#define OBJECT_COPY_BETWEEN_FILES_TEST_BUF_SIZE               256

#define OBJECT_COPY_INVALID_PARAMS_TEST_SUBGROUP_NAME "object_copy_invalid_params_test"
#define OBJECT_COPY_INVALID_PARAMS_TEST_GROUP_NAME    "object_copy_invalid_params_group"
#define OBJECT_COPY_INVALID_PARAMS_TEST_GROUP_NAME2   "object_copy_invalid_params_group_copy"

#define OBJECT_VISIT_TEST_NUM_OBJS_VISITED 4
#define OBJECT_VISIT_TEST_SUBGROUP_NAME    "object_visit_test"
#define OBJECT_VISIT_TEST_SPACE_RANK       2
#define OBJECT_VISIT_TEST_GROUP_NAME       "object_visit_test_group"
#define OBJECT_VISIT_TEST_DSET_NAME        "object_visit_test_dset"
#define OBJECT_VISIT_TEST_TYPE_NAME        "object_visit_test_type"

#define OBJECT_VISIT_SOFT_LINK_TEST_NUM_OBJS_VISITED 1
#define OBJECT_VISIT_SOFT_LINK_TEST_SUBGROUP_NAME    "object_visit_soft_link"
#define OBJECT_VISIT_SOFT_LINK_TEST_GROUP_NAME1      "links_group"
#define OBJECT_VISIT_SOFT_LINK_TEST_GROUP_NAME2      "objects_group"
#define OBJECT_VISIT_SOFT_LINK_TEST_LINK_NAME1       "soft_link1"
#define OBJECT_VISIT_SOFT_LINK_TEST_LINK_NAME2       "soft_link2"
#define OBJECT_VISIT_SOFT_LINK_TEST_LINK_NAME3       "soft_link3"
#define OBJECT_VISIT_SOFT_LINK_TEST_OBJ_NAME1        "group1"
#define OBJECT_VISIT_SOFT_LINK_TEST_OBJ_NAME2        "group2"
#define OBJECT_VISIT_SOFT_LINK_TEST_OBJ_NAME3        "group3"

#define OBJECT_VISIT_DANGLING_LINK_TEST_SUBGROUP_NAME "object_visit_dangling_link_test"
#define OBJECT_VISIT_DANGLING_LINK_TEST_LINK_NAME1    "dangling_link1"
#define OBJECT_VISIT_DANGLING_LINK_TEST_LINK_NAME2    "dangling_link2"
#define OBJECT_VISIT_DANGLING_LINK_TEST_LINK_NAME3    "dangling_link3"

#define OBJECT_VISIT_INVALID_PARAMS_TEST_SUBGROUP_NAME "object_visit_invalid_params_test"
#define OBJECT_VISIT_INVALID_PARAMS_TEST_GROUP_NAME    "object_visit_invalid_params_group"

#define OBJECT_CLOSE_TEST_SPACE_RANK 2
#define OBJECT_CLOSE_TEST_GROUP_NAME "object_close_test"
#define OBJECT_CLOSE_TEST_GRP_NAME   "object_close_test_group"
#define OBJECT_CLOSE_TEST_DSET_NAME  "object_close_test_dset"
#define OBJECT_CLOSE_TEST_TYPE_NAME  "object_close_test_type"

#define OBJECT_LINK_TEST_GROUP_NAME  "object_link_test_group"
#define OBJECT_LINK_TEST_GROUP_NAME2 "object_link_test_group_link"
#define OBJECT_LINK_TEST_DSET_NAME   "object_link_test_dataset"
#define OBJECT_LINK_TEST_DTYPE_NAME  "object_link_test_datatype"
#define OBJECT_LINK_TEST_SPACE_RANK  2

#define OBJECT_LINK_INVALID_PARAMS_TEST_GROUP_NAME "object_link_invalid_params_test_group"

#define OBJ_REF_GET_TYPE_TEST_SUBGROUP_NAME "obj_ref_get_obj_type_test"
#define OBJ_REF_GET_TYPE_TEST_DSET_NAME     "ref_dset"
#define OBJ_REF_GET_TYPE_TEST_TYPE_NAME     "ref_dtype"
#define OBJ_REF_GET_TYPE_TEST_SPACE_RANK    2

#define OBJ_REF_DATASET_WRITE_TEST_SUBGROUP_NAME "obj_ref_write_test"
#define OBJ_REF_DATASET_WRITE_TEST_REF_DSET_NAME "ref_dset"
#define OBJ_REF_DATASET_WRITE_TEST_REF_TYPE_NAME "ref_dtype"
#define OBJ_REF_DATASET_WRITE_TEST_SPACE_RANK    1
#define OBJ_REF_DATASET_WRITE_TEST_DSET_NAME     "obj_ref_dset"

#define OBJ_REF_DATASET_READ_TEST_SUBGROUP_NAME "obj_ref_read_test"
#define OBJ_REF_DATASET_READ_TEST_REF_DSET_NAME "ref_dset"
#define OBJ_REF_DATASET_READ_TEST_REF_TYPE_NAME "ref_dtype"
#define OBJ_REF_DATASET_READ_TEST_SPACE_RANK    1
#define OBJ_REF_DATASET_READ_TEST_DSET_NAME     "obj_ref_dset"

#define OBJ_REF_DATASET_EMPTY_WRITE_TEST_SUBGROUP_NAME "obj_ref_empty_write_test"
#define OBJ_REF_DATASET_EMPTY_WRITE_TEST_SPACE_RANK    1
#define OBJ_REF_DATASET_EMPTY_WRITE_TEST_DSET_NAME     "obj_ref_dset"

#define OBJECT_REF_COUNT_TEST_SUBGROUP_NAME   "ref_count_test"
#define OBJECT_REF_COUNT_TEST_GRP_NAME        "ref_count_test_group"
#define OBJECT_REF_COUNT_TEST_DSET_NAME       "ref_count_dset"
#define OBJECT_REF_COUNT_TEST_TYPE_NAME       "ref_count_dtype"
#define OBJECT_REF_COUNT_TEST_DSET_SPACE_RANK 2

#endif