Skip to content

Language Fortran

kazk edited this page Apr 13, 2018 · 12 revisions

Status

Beta

Versions

Fortran 95

Test Frameworks

CW2

module Solution
  implicit none
contains
  function add(a, b)result(c)
    integer(kind=4)::a
    integer(kind=4)::b
    integer(kind=4)::c
    c = a + b
  end function
end module
program TestCases
  use CW2
  use Solution
  implicit none
  call assertEquals(add(1, 1), 2)
end program

Module names can be anything valid. Preloaded can be used to add another module.

Using describe and it:

program TestCases
  use CW2
  use Solution
  implicit none
  call describe("add")
    call it("adds integers")
      call assertEquals(add(1, 1), 2)
    call endContext()
  call endContext()
end program

Timeout

12 seconds

Packages

None

Services

None

Clone this wiki locally