Test_LatLonDecomposition.pf Source File


This file depends on

sourcefile~~test_latlondecomposition.pf~~EfferentGraph sourcefile~test_latlondecomposition.pf Test_LatLonDecomposition.pf sourcefile~latlondecomposition.f90 LatLonDecomposition.F90 sourcefile~test_latlondecomposition.pf->sourcefile~latlondecomposition.f90 sourcefile~base_base.f90 Base_Base.F90 sourcefile~latlondecomposition.f90->sourcefile~base_base.f90 sourcefile~keywordenforcer.f90 KeywordEnforcer.F90 sourcefile~latlondecomposition.f90->sourcefile~keywordenforcer.f90 sourcefile~lataxis.f90 LatAxis.F90 sourcefile~latlondecomposition.f90->sourcefile~lataxis.f90 sourcefile~lonaxis.f90 LonAxis.F90 sourcefile~latlondecomposition.f90->sourcefile~lonaxis.f90 sourcefile~base_base.f90->sourcefile~keywordenforcer.f90 sourcefile~constants.f90 Constants.F90 sourcefile~base_base.f90->sourcefile~constants.f90 sourcefile~mapl_range.f90 MAPL_Range.F90 sourcefile~base_base.f90->sourcefile~mapl_range.f90 sourcefile~maplgrid.f90 MaplGrid.F90 sourcefile~base_base.f90->sourcefile~maplgrid.f90 sourcefile~coordinateaxis.f90 CoordinateAxis.F90 sourcefile~lataxis.f90->sourcefile~coordinateaxis.f90 sourcefile~pfio.f90 pFIO.F90 sourcefile~lataxis.f90->sourcefile~pfio.f90 sourcefile~lonaxis.f90->sourcefile~coordinateaxis.f90 sourcefile~lonaxis.f90->sourcefile~pfio.f90

Source Code

module Test_LatLonDecomposition
   use mapl3g_LatLonDecomposition
   use funit
   implicit none


contains

   @test
   subroutine test_equal_to()

      type(LatLonDecomposition) :: a, b

      a = LatLonDecomposition([1,2],[3,4,5])
      b = a
      @assert_that(a == b, is(true()))
      @assert_that(a /= b, is(false()))
      
      b = LatLonDecomposition([2,1],[3,4,5])
      @assert_that(a == b, is(false()))
      @assert_that(a /= b, is(true()))

      b = LatLonDecomposition([1,2], [2,7])
      @assert_that(a == b, is(false()))
      @assert_that(a /= b, is(true()))

   end subroutine test_equal_to
 
   @test
   subroutine test_make_decomposition_npes()

      type(LatLonDecomposition) :: found, expected
     found = LatLonDecomposition([2,2], petCount=1)
      expected = LatLonDecomposition([2],[2])
      @assert_that(found == expected, is(true()))

   end subroutine test_make_decomposition_npes
end module Test_LatLonDecomposition