10#include "yac_version_check.h"
12#include "test_macros.inc"
21 character(len=1024) :: macro_version
22 character(len=:),
allocatable :: function_version
23 logical :: yac_version_is_greater_equal
27 allocate(
character(32) :: function_version)
30 call test(
allocated(function_version))
32 if (
allocated(function_version))
then
33 write(macro_version,
'(A,I0,A,I0,A,I0,A)') &
34 "v", yac_version_major,
".", &
35 yac_version_minor,
".", &
38 call test(trim(macro_version) == trim(function_version))
40 write(macro_version,
'(A,A)')
"v", yac_version
41 call test(trim(macro_version) == trim(function_version))
43 print *,
'YAC Version: ' // trim(function_version)
46# if YAC_VERSION_GREATER_EQUAL(YAC_VERSION_MAJOR-1, YAC_VERSION_MINOR, YAC_VERSION_PATCH)
47 yac_version_is_greater_equal = .true.
49 yac_version_is_greater_equal = .false.
51 call test(yac_version_is_greater_equal)
53# if YAC_VERSION_GREATER_EQUAL(YAC_VERSION_MAJOR, YAC_VERSION_MINOR-1, YAC_VERSION_PATCH)
54 yac_version_is_greater_equal = .true.
56 yac_version_is_greater_equal = .false.
58 call test(yac_version_is_greater_equal)
60# if YAC_VERSION_GREATER_EQUAL(YAC_VERSION_MAJOR, YAC_VERSION_MINOR, YAC_VERSION_PATCH-1)
61 yac_version_is_greater_equal = .true.
63 yac_version_is_greater_equal = .false.
65 call test(yac_version_is_greater_equal)
67# if YAC_VERSION_GREATER_EQUAL(YAC_VERSION_MAJOR, YAC_VERSION_MINOR, YAC_VERSION_PATCH)
68 yac_version_is_greater_equal = .true.
70 yac_version_is_greater_equal = .false.
72 call test(yac_version_is_greater_equal)
74# if YAC_VERSION_GREATER_EQUAL(YAC_VERSION_MAJOR, YAC_VERSION_MINOR, YAC_VERSION_PATCH+1)
75 yac_version_is_greater_equal = .true.
77 yac_version_is_greater_equal = .false.
79 call test(.NOT. yac_version_is_greater_equal)
81# if YAC_VERSION_GREATER_EQUAL(YAC_VERSION_MAJOR, YAC_VERSION_MINOR+1, YAC_VERSION_PATCH)
82 yac_version_is_greater_equal = .true.
84 yac_version_is_greater_equal = .false.
86 call test(.NOT. yac_version_is_greater_equal)
88# if YAC_VERSION_GREATER_EQUAL(YAC_VERSION_MAJOR+1, YAC_VERSION_MINOR, YAC_VERSION_PATCH)
89 yac_version_is_greater_equal = .true.
91 yac_version_is_greater_equal = .false.
93 call test(.NOT. yac_version_is_greater_equal)
Fortran interface for getting the YAC version.
subroutine, public start_test(name)
subroutine, public stop_test()
subroutine, public exit_tests()