diff options
Diffstat (limited to 'Tests/Fortran/test_preprocess.F90')
-rw-r--r-- | Tests/Fortran/test_preprocess.F90 | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/Tests/Fortran/test_preprocess.F90 b/Tests/Fortran/test_preprocess.F90 new file mode 100644 index 0000000..374a6ff --- /dev/null +++ b/Tests/Fortran/test_preprocess.F90 @@ -0,0 +1,55 @@ +MODULE Available +! no conent +END MODULE + +PROGRAM PPTEST +! value of InPPFalseBranch ; values of SkipToEnd +! 0 <empty> +#ifndef FOO + ! 1 ; <0> + USE NotAvailable +# ifndef FOO + ! 2 ; <0,0> + USE NotAvailable +# else + ! 2 ; <0,0> + USE NotAvailable +# endif + ! 1 ; <0> +# ifdef FOO + ! 2 ; <0,1> + USE NotAvailable +# else + ! 2 ; <0,1> + USE NotAvailable +# endif + ! 1 ; <0> +#else + ! 0 ; <0> + USE Available +# ifndef FOO + ! 1 ; <0,0> + USE NotAvailable +# else + ! 0 ; <0,0> + USE Available +# endif + ! 0 ; <0> +# ifdef FOO + ! 0 ; <0,1> + USE Available +# else + ! 1 ; <0,1> + USE NotAvailable +# endif + ! 0 ; <0> +#endif +! 0 ; <empty> + +#ifdef BAR + PRINT * , 'BAR was defined via ADD_DEFINITIONS' +#else + PRINT *, 'If you can read this something went wrong' +#endif + +END PROGRAM |