test_serialize_real_scalar Subroutine

public subroutine test_serialize_real_scalar()

Arguments

None

Calls

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

Source Code

   subroutine test_serialize_real_scalar()

      call check(1.0); if (anyExceptions()) return
      call check(2.0); if (anyExceptions()) return

   contains

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

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

      end subroutine check
      
   end subroutine test_serialize_real_scalar