6 use,
intrinsic :: iso_fortran_env
16 character(:),
allocatable :: version_str
21 write(error_unit, *)
'getting version string failed'
25 if (version_str /= odc_version_str)
then
26 write(error_unit, *)
"Unexpected version: ", version_str
27 write(error_unit, *)
"Expected: ", odc_version_str
38 character(:),
allocatable :: sha1
43 write(error_unit, *)
'getting git sha1 string failed'
47 if (sha1 /= odc_git_sha1_str .and. sha1 /=
"not available")
then
48 write(error_unit, *)
"Unexpected git sha1: ", sha1
49 write(error_unit, *)
"Expected: ", odc_git_sha1_str
58 character(8) :: names(6) = [character(8) ::
"ignore",
"integer",
"real",
"string",
"bitfield",
"double"]
59 character(:),
allocatable :: name
65 write(error_unit, *)
'Failed to get type count'
70 write(error_unit, *)
'Unexpected number of types found'
76 write(error_unit, *)
'Failed to get type name, type=', test_types(n)
80 if (name /= trim(names(n)))
then
81 write(error_unit, *)
'Unexpected type name "', name,
'" for type ', n
98 err = reader%open_path(
"invalid-path")
100 write(error_unit, *)
'open_path succeeded unexpectedly with "invalid-path"'
104 if (
odc_error_string(err) /=
"Cannot open invalid-path (No such file or directory)")
then
124 write(error_unit, *)
'Failed to initialise ODC api'
133 if (.not. success) stop -1
int odc_vcs_version(const char **sha1)
int odc_column_type_name(int type, const char **type_name)
const char * odc_error_string(int err)
int odc_version(const char **version)
logical function test_git_sha1()
logical function test_error_handling()
logical function test_type_names()
logical function test_odc_version()
integer(c_int), parameter, public odc_real
integer(c_int), parameter, public odc_string
integer(c_int), parameter, public odc_double
integer(c_int), parameter, public odc_bitfield
integer(c_int), parameter, public odc_ignore
integer(c_int), parameter, public odc_integer
integer, parameter, public odc_success