Skip to content
Snippets Groups Projects
Commit 00237228 authored by Luis Kornblueh's avatar Luis Kornblueh
Browse files

All Fortran tests implemented so far work.

parent 1691d7f7
No related branches found
No related tags found
No related merge requests found
......@@ -16,4 +16,5 @@ libtool
*.la
autom4te.cache
test/model_integration
test/time_calculus
\ No newline at end of file
test/time_calculus
test/example
......@@ -150,7 +150,7 @@ module libmtime
function my_datetostring(my_date, string) result(string_ptr) bind(c, name='dateToString')
import :: c_ptr, c_char
type(c_ptr) :: string_ptr
type(c_ptr) :: my_date
type(c_ptr), value :: my_date
character(c_char), dimension(*) :: string
end function my_datetostring
!
......@@ -178,7 +178,7 @@ module libmtime
function my_timetostring(my_time, string) result(string_ptr) bind(c, name='timeToString')
import :: c_ptr, c_char
type(c_ptr) :: string_ptr
type(c_ptr) :: my_time
type(c_ptr), value :: my_time
character(c_char), dimension(*) :: string
end function my_timetostring
!
......@@ -206,7 +206,7 @@ module libmtime
function my_datetimetostring(my_time, string) result(string_ptr) bind(c, name='datetimeToString')
import :: c_ptr, c_char
type(c_ptr) :: string_ptr
type(c_ptr) :: my_time
type(c_ptr), value :: my_time
character(c_char), dimension(*) :: string
end function my_datetimetostring
!
......@@ -230,6 +230,7 @@ module libmtime
integer(c_int) :: getdayofyearfromdatetime
type(c_ptr), value :: currentdt
end function getdayofyearfromdatetime
!
end interface
!_____________________________________________________________________________________________
interface
......
......@@ -25,21 +25,21 @@ program example
test_date => newDate('2012-09-01')
if (associated(test_date)) print *, 'allocated test_date'
call dateToString(test_date, test_date_string)
print *, '>1<', trim(test_date_string)
print *, trim(test_date_string)
call deallocateDate(test_date)
if (.not. (associated(test_date))) print *, 'deallocated test_date'
test_time => newTime('12:13:49.654')
if (associated(test_time)) print *, 'allocated test_time'
call timeToString(test_time, test_time_string)
print *, '>2<', trim(test_time_string)
print *, trim(test_time_string)
call deallocateTime(test_time)
if (.not. (associated(test_time))) print *, 'deallocated test_time'
start_date => newDatetime('2012-09-01T02:10:00.000')
if (associated(start_date)) print *, 'allocated start_date'
call datetimeToString(start_date, start_date_string)
print *, '>3<', trim(start_date_string)
print *, trim(start_date_string)
call deallocateDatetime(start_date)
! printf("Model time step: %s\n", timedeltatoString(timestep, current_step));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment