Commit 1f343334 authored by Andreas Marek's avatar Andreas Marek

Put module assert in independent file

parent a18baba0
......@@ -495,6 +495,7 @@ libelpatest@SUFFIX@_la_SOURCES = \
test/shared/setup_mpi.F90 \
test/shared/blacs_infrastructure.F90 \
test/shared/prepare_matrix.F90 \
test/shared/mod_assert.F90 \
test/shared/prepare_matrix_template.X90 \
test/shared/mod_output_types.F90 \
test/shared/mod_from_c.F90 \
......
......@@ -46,22 +46,6 @@
#define stringify(x) stringify_(x)
#define assert(x) call x_assert(x, stringify(x), __FILE__, __LINE__)
module assert
implicit none
contains
subroutine x_assert(condition, condition_string, file, line)
use elpa_utilities, only : error_unit
logical, intent(in) :: condition
character(len=*), intent(in) :: condition_string
character(len=*), intent(in) :: file
integer, intent(in) :: line
if (.not. condition) then
write(error_unit,'(a,i0)') "Assertion failed:" // condition_string // " at " // file // ":", line
end if
end subroutine
end module
program test_interface
use precision
use assert
......
......@@ -46,22 +46,6 @@
#define stringify(x) stringify_(x)
#define assert(x) call x_assert(x, stringify(x), __FILE__, __LINE__)
module assert
implicit none
contains
subroutine x_assert(condition, condition_string, file, line)
use elpa_utilities, only : error_unit
logical, intent(in) :: condition
character(len=*), intent(in) :: condition_string
character(len=*), intent(in) :: file
integer, intent(in) :: line
if (.not. condition) then
write(error_unit,'(a,i0)') "Assertion failed:" // condition_string // " at " // file // ":", line
end if
end subroutine
end module
program test_interface
use precision
use assert
......
......@@ -46,22 +46,6 @@
#define stringify(x) stringify_(x)
#define assert(x) call x_assert(x, stringify(x), __FILE__, __LINE__)
module assert
implicit none
contains
subroutine x_assert(condition, condition_string, file, line)
use elpa_utilities, only : error_unit
logical, intent(in) :: condition
character(len=*), intent(in) :: condition_string
character(len=*), intent(in) :: file
integer, intent(in) :: line
if (.not. condition) then
write(error_unit,'(a,i0)') "Assertion failed:" // condition_string // " at " // file // ":", line
end if
end subroutine
end module
program test_interface
use precision
use assert
......
......@@ -46,22 +46,6 @@
#define stringify(x) stringify_(x)
#define assert(x) call x_assert(x, stringify(x), __FILE__, __LINE__)
module assert
implicit none
contains
subroutine x_assert(condition, condition_string, file, line)
use elpa_utilities, only : error_unit
logical, intent(in) :: condition
character(len=*), intent(in) :: condition_string
character(len=*), intent(in) :: file
integer, intent(in) :: line
if (.not. condition) then
write(error_unit,'(a,i0)') "Assertion failed:" // condition_string // " at " // file // ":", line
end if
end subroutine
end module
program test_interface
use precision
use assert
......
module assert
implicit none
contains
subroutine x_assert(condition, condition_string, file, line)
use elpa_utilities, only : error_unit
logical, intent(in) :: condition
character(len=*), intent(in) :: condition_string
character(len=*), intent(in) :: file
integer, intent(in) :: line
if (.not. condition) then
write(error_unit,'(a,i0)') "Assertion failed:" // condition_string // " at " // file // ":", line
end if
end subroutine
end module
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment