From 1e873ead0c0857f0bbdaab36764afa67cc39479e Mon Sep 17 00:00:00 2001 From: jutke Date: Fri, 20 Jan 2017 09:55:13 -0600 Subject: TST: adding tests for compound constant provided by @zerothi This is a test code provided as a patch by @zerothi checking the compound constant parsing. --- numpy/f2py/tests/src/parameter/constant_compound.f90 | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 numpy/f2py/tests/src/parameter/constant_compound.f90 (limited to 'numpy/f2py/tests/src/parameter') diff --git a/numpy/f2py/tests/src/parameter/constant_compound.f90 b/numpy/f2py/tests/src/parameter/constant_compound.f90 new file mode 100644 index 000000000..e51f5e9b2 --- /dev/null +++ b/numpy/f2py/tests/src/parameter/constant_compound.f90 @@ -0,0 +1,15 @@ +! Check that parameters are correct intercepted. +! Constants with comma separations are commonly +! used, for instance Pi = 3._dp +subroutine foo_compound_int(x) + implicit none + integer, parameter :: ii = selected_int_kind(9) + integer(ii), intent(inout) :: x + dimension x(3) + integer(ii), parameter :: three = 3_ii + integer(ii), parameter :: two = 2_ii + integer(ii), parameter :: six = three * 1_ii * two + + x(1) = x(1) + x(2) + x(3) * six + return +end subroutine -- cgit v1.2.1