test_get_month_ends Subroutine

public subroutine test_get_month_ends()

Arguments

None

Calls

proc~~test_get_month_ends~2~~CallsGraph proc~test_get_month_ends~2 test_get_month_ends assertequal assertequal proc~test_get_month_ends~2->assertequal proc~get_month_ends get_month_ends proc~test_get_month_ends~2->proc~get_month_ends proc~is_leap_year~2 is_leap_year proc~get_month_ends->proc~is_leap_year~2

Source Code

   subroutine test_get_month_ends()
      integer, dimension(size(ENDS)) :: actual
      integer :: i = -1

      actual = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]

      actual = get_month_ends(2022)
      do i = 1, size(actual)
         @assertEqual(ENDS(i), actual(i))
      end do

      actual = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]

      actual = get_month_ends(2020)
      do i = 1, size(actual)
         @assertEqual(ENDS_LEAP(i), actual(i))
      end do
   end subroutine test_get_month_ends