Define interfaces for writing assertions
Error terminate if test_diagnosis%test_passed() == .false.
, in which
case the stop code contains
test_diagnosis%diagnostics_string(),
,Most compilers write the stop code to error_unit
.
call julienne_assert(.all. (["a","b","c"] .isBefore. "efg"))
call_julienne_assert(.all. (["a","b","c"] .isBefore. "efg"))
The first line above guarantees execution, whereas the second ensures
removal when compiled without -DASSERTIONS
. When invoked via macro,
the second line also causes the automatic insertion of items 1-4 above.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(test_diagnosis_t), | intent(in) | :: | test_diagnosis | |||
character(len=*), | intent(in), | optional | :: | file | ||
integer, | intent(in), | optional | :: | line | ||
character(len=*), | intent(in), | optional | :: | description |
Error terminate if assertion == .false.
, in which case the stop code
contains
Most compilers write the stop code to error_unit
.
call julienne_assert(associated(A))
call_julienne_assert(associated(A))
The first line above guarantees execution, whereas the second ensures
removal when compiled without -DASSERTIONS
. When invoked via macro,
the second line also causes the automatic insertion of items 1-4 above.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
logical, | intent(in) | :: | assertion | |||
character(len=*), | intent(in), | optional | :: | file | ||
integer, | intent(in), | optional | :: | line | ||
character(len=*), | intent(in), | optional | :: | description |
Error terminate if test_diagnosis%test_passed() == .false.
, in which
case the stop code contains
test_diagnosis%diagnostics_string(),
,Most compilers write the stop code to error_unit
.
call julienne_assert(.all. (["a","b","c"] .isBefore. "efg"))
call_julienne_assert(.all. (["a","b","c"] .isBefore. "efg"))
The first line above guarantees execution, whereas the second ensures
removal when compiled without -DASSERTIONS
. When invoked via macro,
the second line also causes the automatic insertion of items 1-4 above.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(test_diagnosis_t), | intent(in) | :: | test_diagnosis | |||
character(len=*), | intent(in), | optional | :: | file | ||
integer, | intent(in), | optional | :: | line | ||
character(len=*), | intent(in), | optional | :: | description |
Error terminate if assertion == .false.
, in which case the stop code
contains
Most compilers write the stop code to error_unit
.
call julienne_assert(associated(A))
call_julienne_assert(associated(A))
The first line above guarantees execution, whereas the second ensures
removal when compiled without -DASSERTIONS
. When invoked via macro,
the second line also causes the automatic insertion of items 1-4 above.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
logical, | intent(in) | :: | assertion | |||
character(len=*), | intent(in), | optional | :: | file | ||
integer, | intent(in), | optional | :: | line | ||
character(len=*), | intent(in), | optional | :: | description |