[ci skip] update generated files
[scons.git] / test / fixture / fortran_unittests / test_2.f90
blobe27195329fd9c28e062f76a8b2b2af0e22ca351a
1 module test_2
3 type test_type_2
4 integer :: m
5 contains
6 procedure :: set_m
7 procedure :: get_m
8 procedure :: increment_m
9 procedure :: decrement_m
10 end type test_type_2
13 interface
15 module subroutine set_m ( this, m )
16 class(test_type_2), intent(inout) :: this
17 integer, intent(in) :: m
18 end subroutine
20 module function get_m ( this )
21 class(test_type_2), intent(in) :: this
22 integer :: get_m
23 end function get_m
25 module pure subroutine increment_m ( this )
26 class(test_type_2), intent(inout) :: this
27 end subroutine increment_m
29 module elemental subroutine decrement_m ( this )
30 class(test_type_2), intent(inout) :: this
31 end subroutine decrement_m
33 end interface
35 end module test_2
38 submodule(test_2) test_2_impl
40 contains
42 module procedure set_m
44 implicit none
46 this%m = m
47 end procedure set_m
49 module procedure get_m
51 implicit none
53 get_m = this%m
54 end procedure get_m
56 module procedure increment_m
58 implicit none
60 this%m = this%m+1
61 end procedure increment_m
63 module procedure decrement_m
65 implicit none
67 this%m = this%m-1
68 end procedure decrement_m
70 end submodule test_2_impl