test_serialize_real_array Subroutine

public subroutine test_serialize_real_array()

Arguments

None

Calls

proc~~test_serialize_real_array~~CallsGraph proc~test_serialize_real_array test_serialize_real_array anyexceptions anyexceptions proc~test_serialize_real_array->anyexceptions assertequal assertequal proc~test_serialize_real_array->assertequal interface~deserialize_intrinsic deserialize_intrinsic proc~test_serialize_real_array->interface~deserialize_intrinsic interface~serialize_intrinsic serialize_intrinsic proc~test_serialize_real_array->interface~serialize_intrinsic

Source Code

   subroutine test_serialize_real_array()

      call check([1.0]); if (anyExceptions()) return
      call check([2.0]); if (anyExceptions()) return
      call check([1.0,2.0]); if (anyExceptions()) return
      call check([1.0,2.0,3.0]); if (anyExceptions()) return

   contains

      subroutine check(expected)
         real, intent(in) :: expected(:)
         real, allocatable :: found(:)

         call deserialize_intrinsic(serialize_intrinsic(expected),found)
         @assertEqual(expected, found)

      end subroutine check
      
   end subroutine test_serialize_real_array