From d49d8840711ab16800ba9a870eb032719887433e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A1lint=20Aradi?= Date: Sat, 29 Jun 2024 13:38:30 +0200 Subject: [PATCH] Remove some superfluous allocatable attributes (#16) --- example/fixtured_suite_tests.f90 | 4 ++-- src/fortuno_serial/serialcase.f90 | 3 +-- src/fortuno_serial/serialsuite.f90 | 3 +-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/example/fixtured_suite_tests.f90 b/example/fixtured_suite_tests.f90 index d313c98..f5abbca 100644 --- a/example/fixtured_suite_tests.f90 +++ b/example/fixtured_suite_tests.f90 @@ -13,7 +13,7 @@ module fixtured_suite_tests public :: get_fixtured_suite_tests - ! Test suite containing data initialized through the set_up() procedures + ! Test suite containing data initialized through the set_up() procedure type, extends(serial_suite_base) :: random_test_suite integer :: nn = -1 contains @@ -29,7 +29,7 @@ module fixtured_suite_tests contains - ! Overrides run procedure to pass hosting suite's to test procedure + ! Overrides run procedure to pass hosting suite's data to test procedure procedure :: run => random_test_case_run end type random_test_case diff --git a/src/fortuno_serial/serialcase.f90 b/src/fortuno_serial/serialcase.f90 index d4c2d0c..e5c59c7 100644 --- a/src/fortuno_serial/serialcase.f90 +++ b/src/fortuno_serial/serialcase.f90 @@ -40,9 +40,8 @@ end subroutine serial_case_proc function serial_case_item(name, proc) result(testitem) character(len=*), intent(in) :: name procedure(serial_case_proc) :: proc - type(test_item), allocatable :: testitem + type(test_item) :: testitem - allocate(testitem) testitem%item = serial_case(name=name, proc=proc) end function serial_case_item diff --git a/src/fortuno_serial/serialsuite.f90 b/src/fortuno_serial/serialsuite.f90 index ae2a51c..2067898 100644 --- a/src/fortuno_serial/serialsuite.f90 +++ b/src/fortuno_serial/serialsuite.f90 @@ -22,9 +22,8 @@ module fortuno_serial_serialsuite function serial_suite_item(name, items) result(testitem) character(*), intent(in) :: name type(test_item), intent(in) :: items(:) - type(test_item), allocatable :: testitem + type(test_item) :: testitem - allocate(testitem) testitem%item = serial_suite(name=name, items=items) end function serial_suite_item