!Mock object to test reading in from xml module m_MockObject implicit none !Define the mock object type type MockObject real :: mockdecimal !mock decimal end type MockObject contains !Create new instance by allocating memory, and returns pointer function newMockObject() result(object) type(MockObject), pointer :: object !create the object allocate(object) end function newMockObject end module m_MockObject