From 4592ca43d8216ea57335d707deecbd47218a8c75 Mon Sep 17 00:00:00 2001 From: "ROMAXTECHNOLOGY\\hugh.walsh" Date: Tue, 24 Oct 2017 16:40:09 +0100 Subject: [PATCH 1/8] Allow the unit tests to be run from within the visual studio solution #295 --- .gitignore | 4 + src/tests/jf_test_1.f90 | 4 +- src/tests/jf_test_10.f90 | 2 + src/tests/jf_test_11.F90 | 2 + src/tests/jf_test_12.f90 | 2 + src/tests/jf_test_13.f90 | 2 + src/tests/jf_test_14.f90 | 2 + src/tests/jf_test_15.f90 | 2 + src/tests/jf_test_16.f90 | 4 +- src/tests/jf_test_17.f90 | 2 + src/tests/jf_test_18.f90 | 2 + src/tests/jf_test_19.f90 | 2 + src/tests/jf_test_2.f90 | 4 +- src/tests/jf_test_20.f90 | 2 + src/tests/jf_test_21.f90 | 2 + src/tests/jf_test_22.f90 | 2 + src/tests/jf_test_23.f90 | 2 + src/tests/jf_test_24.F90 | 2 + src/tests/jf_test_25.F90 | 2 + src/tests/jf_test_26.f90 | 2 + src/tests/jf_test_27.f90 | 2 + src/tests/jf_test_29.f90 | 2 + src/tests/jf_test_3.f90 | 5 +- src/tests/jf_test_4.f90 | 4 +- src/tests/jf_test_5.f90 | 2 + src/tests/jf_test_6.f90 | 2 + src/tests/jf_test_7.f90 | 5 +- src/tests/jf_test_8.f90 | 5 +- src/tests/jf_test_9.f90 | 3 +- visual_studio/jsonfortran.sln | 15 +++- visual_studio/jsonfortrantest/ReadMe.txt | 25 ++++++ .../jsonfortrantest/jsonfortrantest.f90 | 80 +++++++++++++++++++ .../jsonfortrantest/jsonfortrantest.vfproj | 58 ++++++++++++++ 33 files changed, 245 insertions(+), 11 deletions(-) create mode 100644 visual_studio/jsonfortrantest/ReadMe.txt create mode 100644 visual_studio/jsonfortrantest/jsonfortrantest.f90 create mode 100644 visual_studio/jsonfortrantest/jsonfortrantest.vfproj diff --git a/.gitignore b/.gitignore index 17cef069d1..cd993d6458 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,7 @@ visual_studio/*.u2d visual_studio/Debug/ visual_studio/Release/ visual_studio/x64/ +visual_studio/.vs/ +visual_studio/jsonfortranlib/ + +visual_studio/jsonfortrantest/Debug/ diff --git a/src/tests/jf_test_1.f90 b/src/tests/jf_test_1.f90 index d92fc46398..d5ebdc6309 100644 --- a/src/tests/jf_test_1.f90 +++ b/src/tests/jf_test_1.f90 @@ -430,9 +430,10 @@ subroutine print_json_variable(json,p,finished) end subroutine print_json_variable -end module jf_test_1_mod + end module jf_test_1_mod !***************************************************************************************** +#ifndef INTERGATED_TESTS !***************************************************************************************** program jf_test_1 @@ -447,3 +448,4 @@ program jf_test_1 end program jf_test_1 !***************************************************************************************** +#endif diff --git a/src/tests/jf_test_10.f90 b/src/tests/jf_test_10.f90 index c5a4e2de74..7f31202c1e 100644 --- a/src/tests/jf_test_10.f90 +++ b/src/tests/jf_test_10.f90 @@ -334,6 +334,7 @@ end subroutine test_10 end module jf_test_10_mod !***************************************************************************************** +#ifndef INTERGATED_TESTS !***************************************************************************************** program jf_test_10 @@ -348,3 +349,4 @@ program jf_test_10 end program jf_test_10 !***************************************************************************************** +#endif \ No newline at end of file diff --git a/src/tests/jf_test_11.F90 b/src/tests/jf_test_11.F90 index 1e8285dc4a..6f21f422ea 100644 --- a/src/tests/jf_test_11.F90 +++ b/src/tests/jf_test_11.F90 @@ -274,6 +274,7 @@ end subroutine test_11 end module jf_test_11_mod !***************************************************************************************** +#ifndef INTERGATED_TESTS !***************************************************************************************** program jf_test_11 @@ -288,3 +289,4 @@ program jf_test_11 end program jf_test_11 !***************************************************************************************** +#endif \ No newline at end of file diff --git a/src/tests/jf_test_12.f90 b/src/tests/jf_test_12.f90 index 4f6c772be2..6545664e4b 100644 --- a/src/tests/jf_test_12.f90 +++ b/src/tests/jf_test_12.f90 @@ -232,6 +232,7 @@ end subroutine test_12 end module jf_test_12_mod !***************************************************************************************** +#ifndef INTERGATED_TESTS !***************************************************************************************** program jf_test_12 @@ -246,3 +247,4 @@ program jf_test_12 end program jf_test_12 !***************************************************************************************** +#endif \ No newline at end of file diff --git a/src/tests/jf_test_13.f90 b/src/tests/jf_test_13.f90 index f93d68785c..21b31a5cfa 100644 --- a/src/tests/jf_test_13.f90 +++ b/src/tests/jf_test_13.f90 @@ -62,6 +62,7 @@ end subroutine test_13 end module jf_test_13_mod !***************************************************************************************** +#ifndef INTERGATED_TESTS !***************************************************************************************** program jf_test_13 @@ -75,3 +76,4 @@ program jf_test_13 end program jf_test_13 !***************************************************************************************** +#endif \ No newline at end of file diff --git a/src/tests/jf_test_14.f90 b/src/tests/jf_test_14.f90 index 29a7db5012..4fcd7b992a 100644 --- a/src/tests/jf_test_14.f90 +++ b/src/tests/jf_test_14.f90 @@ -146,6 +146,7 @@ end subroutine rename end module jf_test_14_mod !***************************************************************************************** +#ifndef INTERGATED_TESTS !***************************************************************************************** program jf_test_14 @@ -159,3 +160,4 @@ program jf_test_14 end program jf_test_14 !***************************************************************************************** +#endif \ No newline at end of file diff --git a/src/tests/jf_test_15.f90 b/src/tests/jf_test_15.f90 index fefa161bb0..1752f86aab 100644 --- a/src/tests/jf_test_15.f90 +++ b/src/tests/jf_test_15.f90 @@ -98,6 +98,7 @@ end subroutine test_15 end module jf_test_15_mod !***************************************************************************************** +#ifndef INTERGATED_TESTS !***************************************************************************************** program jf_test_15 @@ -111,3 +112,4 @@ program jf_test_15 end program jf_test_15 !***************************************************************************************** +#endif \ No newline at end of file diff --git a/src/tests/jf_test_16.f90 b/src/tests/jf_test_16.f90 index 4284ae4f60..4d36d2b4e7 100644 --- a/src/tests/jf_test_16.f90 +++ b/src/tests/jf_test_16.f90 @@ -213,9 +213,10 @@ subroutine test_16(error_cnt) end subroutine test_16 -end module jf_test_16_mod + end module jf_test_16_mod !***************************************************************************************** +#ifndef INTERGATED_TESTS !***************************************************************************************** program jf_test_16 @@ -229,3 +230,4 @@ program jf_test_16 end program jf_test_16 !***************************************************************************************** +#endif \ No newline at end of file diff --git a/src/tests/jf_test_17.f90 b/src/tests/jf_test_17.f90 index c0f3bf3f50..dc76f3fd75 100644 --- a/src/tests/jf_test_17.f90 +++ b/src/tests/jf_test_17.f90 @@ -71,6 +71,7 @@ end subroutine test_17 end module jf_test_17_mod !***************************************************************************************** +#ifndef INTERGATED_TESTS !***************************************************************************************** program jf_test_17 @@ -84,3 +85,4 @@ program jf_test_17 end program jf_test_17 !***************************************************************************************** +#endif \ No newline at end of file diff --git a/src/tests/jf_test_18.f90 b/src/tests/jf_test_18.f90 index 1a7293c86d..753680469b 100644 --- a/src/tests/jf_test_18.f90 +++ b/src/tests/jf_test_18.f90 @@ -101,6 +101,7 @@ end subroutine test_18 end module jf_test_18_mod !***************************************************************************************** +#ifndef INTERGATED_TESTS !***************************************************************************************** program jf_test_18 @@ -114,3 +115,4 @@ program jf_test_18 end program jf_test_18 !***************************************************************************************** +#endif \ No newline at end of file diff --git a/src/tests/jf_test_19.f90 b/src/tests/jf_test_19.f90 index eea7a2b025..405acbd7a5 100644 --- a/src/tests/jf_test_19.f90 +++ b/src/tests/jf_test_19.f90 @@ -160,6 +160,7 @@ end subroutine test_19 end module jf_test_19_mod !***************************************************************************************** +#ifndef INTERGATED_TESTS !***************************************************************************************** program jf_test_19 @@ -175,3 +176,4 @@ program jf_test_19 end program jf_test_19 !***************************************************************************************** +#endif \ No newline at end of file diff --git a/src/tests/jf_test_2.f90 b/src/tests/jf_test_2.f90 index e8c1e1d748..9227a2a9cf 100644 --- a/src/tests/jf_test_2.f90 +++ b/src/tests/jf_test_2.f90 @@ -391,10 +391,11 @@ subroutine add_variables_to_input(json, me, variable, units, frame, center, rdat end subroutine add_variables_to_input -end module jf_test_2_mod + end module jf_test_2_mod !***************************************************************************************** !***************************************************************************************** +#ifndef INTERGATED_TESTS program jf_test_2 !! Second unit test. @@ -407,4 +408,5 @@ program jf_test_2 if (n_errors /= 0) stop 1 end program jf_test_2 +#endif !***************************************************************************************** diff --git a/src/tests/jf_test_20.f90 b/src/tests/jf_test_20.f90 index 608fb96e0d..b0ba2f1521 100644 --- a/src/tests/jf_test_20.f90 +++ b/src/tests/jf_test_20.f90 @@ -197,6 +197,7 @@ end subroutine test_20 end module jf_test_20_mod !***************************************************************************************** +#ifndef INTERGATED_TESTS !***************************************************************************************** program jf_test_20 @@ -212,3 +213,4 @@ program jf_test_20 end program jf_test_20 !***************************************************************************************** +#endif \ No newline at end of file diff --git a/src/tests/jf_test_21.f90 b/src/tests/jf_test_21.f90 index 407ad49c61..a4cb627cde 100644 --- a/src/tests/jf_test_21.f90 +++ b/src/tests/jf_test_21.f90 @@ -74,6 +74,7 @@ end subroutine test_21 end module jf_test_21_mod !***************************************************************************************** +#ifndef INTERGATED_TESTS !***************************************************************************************** program jf_test_21 @@ -87,3 +88,4 @@ program jf_test_21 end program jf_test_21 !***************************************************************************************** +#endif \ No newline at end of file diff --git a/src/tests/jf_test_22.f90 b/src/tests/jf_test_22.f90 index 0df6251af4..6e6f4ad520 100644 --- a/src/tests/jf_test_22.f90 +++ b/src/tests/jf_test_22.f90 @@ -76,6 +76,7 @@ end subroutine test_22 end module jf_test_22_mod !***************************************************************************************** +#ifndef INTERGATED_TESTS !***************************************************************************************** program jf_test_22 @@ -90,3 +91,4 @@ program jf_test_22 end program jf_test_22 !***************************************************************************************** +#endif \ No newline at end of file diff --git a/src/tests/jf_test_23.f90 b/src/tests/jf_test_23.f90 index d92dfb1419..0135c1c60c 100644 --- a/src/tests/jf_test_23.f90 +++ b/src/tests/jf_test_23.f90 @@ -289,6 +289,7 @@ end subroutine test_23 end module jf_test_23_mod !***************************************************************************************** +#ifndef INTERGATED_TESTS !***************************************************************************************** program jf_test_23 @@ -303,3 +304,4 @@ program jf_test_23 end program jf_test_23 !***************************************************************************************** +#endif \ No newline at end of file diff --git a/src/tests/jf_test_24.F90 b/src/tests/jf_test_24.F90 index c2eaa97290..77ac06f205 100644 --- a/src/tests/jf_test_24.F90 +++ b/src/tests/jf_test_24.F90 @@ -136,6 +136,7 @@ end subroutine test_24 end module jf_test_24_mod !***************************************************************************************** +#ifndef INTERGATED_TESTS !***************************************************************************************** program jf_test_24 @@ -150,3 +151,4 @@ program jf_test_24 end program jf_test_24 !***************************************************************************************** +#endif \ No newline at end of file diff --git a/src/tests/jf_test_25.F90 b/src/tests/jf_test_25.F90 index 39dded872c..3a2bd83545 100644 --- a/src/tests/jf_test_25.F90 +++ b/src/tests/jf_test_25.F90 @@ -146,6 +146,7 @@ end subroutine test_25 end module jf_test_25_mod !***************************************************************************************** +#ifndef INTERGATED_TESTS !***************************************************************************************** program jf_test_25 @@ -160,3 +161,4 @@ program jf_test_25 end program jf_test_25 !***************************************************************************************** +#endif \ No newline at end of file diff --git a/src/tests/jf_test_26.f90 b/src/tests/jf_test_26.f90 index 2b69af56ff..03a16f021f 100644 --- a/src/tests/jf_test_26.f90 +++ b/src/tests/jf_test_26.f90 @@ -64,6 +64,7 @@ end subroutine test_26 end module jf_test_26_mod +#ifndef INTERGATED_TESTS !***************************************************************************************** program jf_test_26 @@ -78,3 +79,4 @@ program jf_test_26 end program jf_test_26 !***************************************************************************************** +#endif \ No newline at end of file diff --git a/src/tests/jf_test_27.f90 b/src/tests/jf_test_27.f90 index 88216bb9ef..e4804cd327 100644 --- a/src/tests/jf_test_27.f90 +++ b/src/tests/jf_test_27.f90 @@ -79,6 +79,7 @@ end subroutine test_27 end module jf_test_27_mod !***************************************************************************************** +#ifndef INTERGATED_TESTS !***************************************************************************************** program jf_test_27 @@ -93,3 +94,4 @@ program jf_test_27 end program jf_test_27 !***************************************************************************************** +#endif \ No newline at end of file diff --git a/src/tests/jf_test_29.f90 b/src/tests/jf_test_29.f90 index 55c183a8b3..652ceeb0f8 100644 --- a/src/tests/jf_test_29.f90 +++ b/src/tests/jf_test_29.f90 @@ -139,6 +139,7 @@ end subroutine test_29 end module jf_test_29_mod !***************************************************************************************** +#ifndef INTERGATED_TESTS !***************************************************************************************** program jf_test_29 @@ -153,3 +154,4 @@ program jf_test_29 end program jf_test_29 !***************************************************************************************** +#endif \ No newline at end of file diff --git a/src/tests/jf_test_3.f90 b/src/tests/jf_test_3.f90 index 8347690664..1460d327b7 100644 --- a/src/tests/jf_test_3.f90 +++ b/src/tests/jf_test_3.f90 @@ -135,9 +135,11 @@ subroutine test_3(error_cnt) end subroutine test_3 -end module jf_test_3_mod + end module jf_test_3_mod !***************************************************************************************** +#ifndef INTERGATED_TESTS + !***************************************************************************************** program jf_test_3 @@ -152,3 +154,4 @@ program jf_test_3 end program jf_test_3 !***************************************************************************************** +#endif \ No newline at end of file diff --git a/src/tests/jf_test_4.f90 b/src/tests/jf_test_4.f90 index e3923a2e90..ff69fce257 100644 --- a/src/tests/jf_test_4.f90 +++ b/src/tests/jf_test_4.f90 @@ -157,9 +157,10 @@ subroutine test_4(error_cnt) end subroutine test_4 -end module jf_test_4_mod + end module jf_test_4_mod !***************************************************************************************** +#ifndef INTERGATED_TESTS !***************************************************************************************** program jf_test_4 @@ -173,3 +174,4 @@ program jf_test_4 if (n_errors /= 0) stop 1 end program jf_test_4 !***************************************************************************************** +#endif \ No newline at end of file diff --git a/src/tests/jf_test_5.f90 b/src/tests/jf_test_5.f90 index 18448db414..47a540f064 100644 --- a/src/tests/jf_test_5.f90 +++ b/src/tests/jf_test_5.f90 @@ -105,6 +105,7 @@ end subroutine test_5 end module jf_test_5_mod !***************************************************************************************** +#ifndef INTERGATED_TESTS !***************************************************************************************** program jf_test_5 @@ -119,3 +120,4 @@ program jf_test_5 end program jf_test_5 !***************************************************************************************** +#endif \ No newline at end of file diff --git a/src/tests/jf_test_6.f90 b/src/tests/jf_test_6.f90 index 79c0e3d661..b60a513d8f 100644 --- a/src/tests/jf_test_6.f90 +++ b/src/tests/jf_test_6.f90 @@ -69,6 +69,7 @@ end subroutine test_6 end module jf_test_6_mod !***************************************************************************************** +#ifndef INTERGATED_TESTS !***************************************************************************************** program jf_test_6 @@ -83,3 +84,4 @@ program jf_test_6 end program jf_test_6 !***************************************************************************************** +#endif \ No newline at end of file diff --git a/src/tests/jf_test_7.f90 b/src/tests/jf_test_7.f90 index 8136ba30fd..247593673d 100644 --- a/src/tests/jf_test_7.f90 +++ b/src/tests/jf_test_7.f90 @@ -257,9 +257,11 @@ subroutine test_7(error_cnt) end subroutine test_7 -end module jf_test_7_mod + end module jf_test_7_mod !***************************************************************************************** + +#ifndef INTERGATED_TESTS !***************************************************************************************** program jf_test_7 @@ -274,3 +276,4 @@ program jf_test_7 end program jf_test_7 !***************************************************************************************** +#endif \ No newline at end of file diff --git a/src/tests/jf_test_8.f90 b/src/tests/jf_test_8.f90 index 05ae46082d..5d36ff38cf 100644 --- a/src/tests/jf_test_8.f90 +++ b/src/tests/jf_test_8.f90 @@ -123,9 +123,10 @@ subroutine test_8(error_cnt) end subroutine test_8 -end module jf_test_8_mod + end module jf_test_8_mod !***************************************************************************************** +#ifndef INTERGATED_TESTS !***************************************************************************************** program jf_test_8 @@ -140,5 +141,5 @@ program jf_test_8 end program jf_test_8 !***************************************************************************************** - +#endif !******************************************************************************************************* diff --git a/src/tests/jf_test_9.f90 b/src/tests/jf_test_9.f90 index 34e516809e..68440e08a3 100644 --- a/src/tests/jf_test_9.f90 +++ b/src/tests/jf_test_9.f90 @@ -141,7 +141,7 @@ end subroutine read_file end module jf_test_9_mod !***************************************************************************************** - +#ifndef INTERGATED_TESTS !***************************************************************************************** program jf_test_9 @@ -156,3 +156,4 @@ program jf_test_9 end program jf_test_9 !***************************************************************************************** +#endif \ No newline at end of file diff --git a/visual_studio/jsonfortran.sln b/visual_studio/jsonfortran.sln index d849439643..8f7e85e7d9 100644 --- a/visual_studio/jsonfortran.sln +++ b/visual_studio/jsonfortran.sln @@ -1,10 +1,15 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -VisualStudioVersion = 12.0.40629.0 +# Visual Studio 14 +VisualStudioVersion = 14.0.25420.1 MinimumVisualStudioVersion = 10.0.40219.1 Project("{6989167D-11E4-40FE-8C1A-2192A86A7E90}") = "jsonfortranlib", "jsonfortranlib\jsonfortranlib.vfproj", "{9A2FEBBE-6702-448E-B361-AE3EA614F5CF}" EndProject +Project("{6989167D-11E4-40FE-8C1A-2192A86A7E90}") = "jsonfortrantest", "jsonfortrantest\jsonfortrantest.vfproj", "{6B8385E8-4E5B-4C63-8A06-F2DABE97F304}" + ProjectSection(ProjectDependencies) = postProject + {9A2FEBBE-6702-448E-B361-AE3EA614F5CF} = {9A2FEBBE-6702-448E-B361-AE3EA614F5CF} + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -21,6 +26,12 @@ Global {9A2FEBBE-6702-448E-B361-AE3EA614F5CF}.Release|Win32.Build.0 = Release|Win32 {9A2FEBBE-6702-448E-B361-AE3EA614F5CF}.Release|x64.ActiveCfg = Release|x64 {9A2FEBBE-6702-448E-B361-AE3EA614F5CF}.Release|x64.Build.0 = Release|x64 + {6B8385E8-4E5B-4C63-8A06-F2DABE97F304}.Debug|Win32.ActiveCfg = Debug|Win32 + {6B8385E8-4E5B-4C63-8A06-F2DABE97F304}.Debug|Win32.Build.0 = Debug|Win32 + {6B8385E8-4E5B-4C63-8A06-F2DABE97F304}.Debug|x64.ActiveCfg = Debug|Win32 + {6B8385E8-4E5B-4C63-8A06-F2DABE97F304}.Release|Win32.ActiveCfg = Release|Win32 + {6B8385E8-4E5B-4C63-8A06-F2DABE97F304}.Release|Win32.Build.0 = Release|Win32 + {6B8385E8-4E5B-4C63-8A06-F2DABE97F304}.Release|x64.ActiveCfg = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/visual_studio/jsonfortrantest/ReadMe.txt b/visual_studio/jsonfortrantest/ReadMe.txt new file mode 100644 index 0000000000..a3dc5d6273 --- /dev/null +++ b/visual_studio/jsonfortrantest/ReadMe.txt @@ -0,0 +1,25 @@ +======================================================================== + Fortran Console Application : "jsonfortrantest" Project Overview +======================================================================== + +The Intel Fortran Console Application Wizard has created this +"jsonfortrantest" project for you as a starting point. + +This file contains a summary of what you will find in each of the files +that make up your project. + +jsonfortrantest.vfproj + This is the main project file for Fortran projects generated using an + Application Wizard. It contains information about the version of + Intel Fortran that generated the file, and information about the + platforms, configurations, and project features selected with the + Application Wizard. + +jsonfortrantest.f90 + This is the main source file for the Fortran Console application. + It contains the program entry point. + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +///////////////////////////////////////////////////////////////////////////// diff --git a/visual_studio/jsonfortrantest/jsonfortrantest.f90 b/visual_studio/jsonfortrantest/jsonfortrantest.f90 new file mode 100644 index 0000000000..9d22bd0a3d --- /dev/null +++ b/visual_studio/jsonfortrantest/jsonfortrantest.f90 @@ -0,0 +1,80 @@ + +!**************************************************************************** +! +! PROGRAM: jsonfortrantest +! +! PURPOSE: Entry point for the console application. +! +! runs through all the tests in the tests folder returns 1 on shut down if there are any errors. +! +!**************************************************************************** + +program jsonfortrantest + + use jf_test_1_mod , only: test_1 + use jf_test_2_mod , only: test_2 + use jf_test_3_mod , only: test_3 + use jf_test_4_mod , only: test_4 + use jf_test_5_mod , only: test_5 + use jf_test_6_mod , only: test_6 + use jf_test_7_mod , only: test_7 + use jf_test_8_mod , only: test_8 + use jf_test_9_mod , only: test_9 + use jf_test_10_mod , only: test_10 + use jf_test_11_mod , only: test_11 + use jf_test_12_mod , only: test_12 + use jf_test_13_mod , only: test_13 + use jf_test_14_mod , only: test_14 + use jf_test_15_mod , only: test_15 + use jf_test_16_mod , only: test_16 + use jf_test_17_mod , only: test_17 + use jf_test_18_mod , only: test_18 + use jf_test_19_mod , only: test_19 + use jf_test_20_mod , only: test_20 + use jf_test_21_mod , only: test_21 + use jf_test_22_mod , only: test_22 + use jf_test_23_mod , only: test_23 + use jf_test_24_mod , only: test_24 + use jf_test_25_mod , only: test_25 + use jf_test_26_mod , only: test_26 + use jf_test_27_mod , only: test_27 + use jf_test_29_mod , only: test_29 + + + implicit none + integer :: n_errors + + call test_1(n_errors) + call test_2(n_errors) + call test_3(n_errors) + call test_4(n_errors) + call test_5(n_errors) + call test_6(n_errors) + call test_7(n_errors) + call test_8(n_errors) + call test_9(n_errors) + call test_10(n_errors) + call test_11(n_errors) + call test_12(n_errors) + call test_13(n_errors) + call test_14(n_errors) + call test_15(n_errors) + call test_16(n_errors) + call test_17(n_errors) + call test_18(n_errors) + call test_19(n_errors) + call test_20(n_errors) + call test_21(n_errors) + call test_22(n_errors) + call test_23(n_errors) + call test_24(n_errors) + call test_25(n_errors) + call test_26(n_errors) + call test_27(n_errors) + call test_29(n_errors) + + if (n_errors /= 0) stop 1 + +end program jsonfortrantest + + diff --git a/visual_studio/jsonfortrantest/jsonfortrantest.vfproj b/visual_studio/jsonfortrantest/jsonfortrantest.vfproj new file mode 100644 index 0000000000..ae3808ae3a --- /dev/null +++ b/visual_studio/jsonfortrantest/jsonfortrantest.vfproj @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From df671a6ff6896285540c9a8da01f094db447c592 Mon Sep 17 00:00:00 2001 From: "ROMAXTECHNOLOGY\\hugh.walsh" Date: Wed, 25 Oct 2017 09:31:39 +0100 Subject: [PATCH 2/8] Changes to remove erroneous spaces --- .gitignore | 2 ++ src/tests/jf_test_1.f90 | 2 +- src/tests/jf_test_16.f90 | 2 +- src/tests/jf_test_4.f90 | 2 +- src/tests/jf_test_7.f90 | 2 +- src/tests/jf_test_8.f90 | 2 +- 6 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index cd993d6458..2d30ee5d7e 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,5 @@ visual_studio/.vs/ visual_studio/jsonfortranlib/ visual_studio/jsonfortrantest/Debug/ +*.u2d +*.user diff --git a/src/tests/jf_test_1.f90 b/src/tests/jf_test_1.f90 index d5ebdc6309..3ec83f18ad 100644 --- a/src/tests/jf_test_1.f90 +++ b/src/tests/jf_test_1.f90 @@ -430,7 +430,7 @@ subroutine print_json_variable(json,p,finished) end subroutine print_json_variable - end module jf_test_1_mod +end module jf_test_1_mod !***************************************************************************************** #ifndef INTERGATED_TESTS diff --git a/src/tests/jf_test_16.f90 b/src/tests/jf_test_16.f90 index 4d36d2b4e7..7f2553d8a8 100644 --- a/src/tests/jf_test_16.f90 +++ b/src/tests/jf_test_16.f90 @@ -213,7 +213,7 @@ subroutine test_16(error_cnt) end subroutine test_16 - end module jf_test_16_mod +end module jf_test_16_mod !***************************************************************************************** #ifndef INTERGATED_TESTS diff --git a/src/tests/jf_test_4.f90 b/src/tests/jf_test_4.f90 index ff69fce257..15d5d72e0d 100644 --- a/src/tests/jf_test_4.f90 +++ b/src/tests/jf_test_4.f90 @@ -157,7 +157,7 @@ subroutine test_4(error_cnt) end subroutine test_4 - end module jf_test_4_mod +end module jf_test_4_mod !***************************************************************************************** #ifndef INTERGATED_TESTS diff --git a/src/tests/jf_test_7.f90 b/src/tests/jf_test_7.f90 index 247593673d..2e5493e959 100644 --- a/src/tests/jf_test_7.f90 +++ b/src/tests/jf_test_7.f90 @@ -257,7 +257,7 @@ subroutine test_7(error_cnt) end subroutine test_7 - end module jf_test_7_mod +end module jf_test_7_mod !***************************************************************************************** diff --git a/src/tests/jf_test_8.f90 b/src/tests/jf_test_8.f90 index 5d36ff38cf..1460732b4a 100644 --- a/src/tests/jf_test_8.f90 +++ b/src/tests/jf_test_8.f90 @@ -123,7 +123,7 @@ subroutine test_8(error_cnt) end subroutine test_8 - end module jf_test_8_mod +end module jf_test_8_mod !***************************************************************************************** #ifndef INTERGATED_TESTS From 2ac6af03ef3a441af77ad33e1bd4be6af2db6edd Mon Sep 17 00:00:00 2001 From: "ROMAXTECHNOLOGY\\hugh.walsh" Date: Wed, 25 Oct 2017 09:36:21 +0100 Subject: [PATCH 3/8] Changes to remove erroneous spaces --- src/tests/jf_test_2.f90 | 2 +- src/tests/jf_test_3.f90 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tests/jf_test_2.f90 b/src/tests/jf_test_2.f90 index 9227a2a9cf..1fbcaaaad5 100644 --- a/src/tests/jf_test_2.f90 +++ b/src/tests/jf_test_2.f90 @@ -391,7 +391,7 @@ subroutine add_variables_to_input(json, me, variable, units, frame, center, rdat end subroutine add_variables_to_input - end module jf_test_2_mod +end module jf_test_2_mod !***************************************************************************************** !***************************************************************************************** diff --git a/src/tests/jf_test_3.f90 b/src/tests/jf_test_3.f90 index 1460d327b7..4c6ea5a117 100644 --- a/src/tests/jf_test_3.f90 +++ b/src/tests/jf_test_3.f90 @@ -135,7 +135,7 @@ subroutine test_3(error_cnt) end subroutine test_3 - end module jf_test_3_mod +end module jf_test_3_mod !***************************************************************************************** #ifndef INTERGATED_TESTS From 68df006b9ffef1ef6ce63b3232f5f5576e847c66 Mon Sep 17 00:00:00 2001 From: Jacob Williams Date: Tue, 30 Jan 2018 20:52:16 -0600 Subject: [PATCH 4/8] minor fix for nag compiler. --- src/json_value_module.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/json_value_module.F90 b/src/json_value_module.F90 index ceeb93e8df..c0ba2efefc 100644 --- a/src/json_value_module.F90 +++ b/src/json_value_module.F90 @@ -6863,7 +6863,7 @@ subroutine add_to_path(str,path_sep) !! prepend the string to the path implicit none character(kind=CK,len=*),intent(in) :: str !! string to prepend to `path` - character(kind=CK,len=1),intent(in),optional :: path_sep + character(kind=CK,len=*),intent(in),optional :: path_sep !! path separator (default is '.'). !! (ignored if `json%path_mode/=1`) From 47009e4b887e889336c970334989711b9d51c818 Mon Sep 17 00:00:00 2001 From: Jacob Williams Date: Thu, 8 Mar 2018 07:07:43 -0600 Subject: [PATCH 5/8] added an escape_solidus option to the initialize() routines. This is used to specify whether the forward slash "/" is escaped when serializing JSON. By default, this is now False, which changes the behavior introduced in 6.0.0 (where the slashes were always escaped). Note that both options are valid JSON. Fixes #304 --- src/json_file_module.F90 | 12 ++++++++---- src/json_initialize_arguments.inc | 8 ++++++++ src/json_string_utilities.F90 | 26 ++++++++++++++++++++----- src/json_value_module.F90 | 32 ++++++++++++++++++++++--------- 4 files changed, 60 insertions(+), 18 deletions(-) diff --git a/src/json_file_module.F90 b/src/json_file_module.F90 index ceab4abe7a..0a800df0df 100644 --- a/src/json_file_module.F90 +++ b/src/json_file_module.F90 @@ -339,7 +339,8 @@ subroutine initialize_json_core_in_file(me,verbose,compact_reals,& path_mode,& path_separator,& compress_vectors,& - allow_duplicate_keys) + allow_duplicate_keys,& + escape_solidus) implicit none @@ -357,7 +358,8 @@ subroutine initialize_json_core_in_file(me,verbose,compact_reals,& path_mode,& path_separator,& compress_vectors,& - allow_duplicate_keys) + allow_duplicate_keys,& + escape_solidus) end subroutine initialize_json_core_in_file !***************************************************************************************** @@ -422,7 +424,8 @@ function initialize_json_file(p,verbose,compact_reals,& path_mode,& path_separator,& compress_vectors,& - allow_duplicate_keys) result(file_object) + allow_duplicate_keys,& + escape_solidus) result(file_object) implicit none @@ -442,7 +445,8 @@ function initialize_json_file(p,verbose,compact_reals,& path_mode,& path_separator,& compress_vectors,& - allow_duplicate_keys) + allow_duplicate_keys,& + escape_solidus) if (present(p)) file_object%p => p diff --git a/src/json_initialize_arguments.inc b/src/json_initialize_arguments.inc index cedc56c7ca..dcb6caf0f1 100644 --- a/src/json_initialize_arguments.inc +++ b/src/json_initialize_arguments.inc @@ -66,3 +66,11 @@ logical(LK),intent(in),optional :: allow_duplicate_keys !! keys are found, an error is thrown. A call to !! [[json_value_validate]] will also check for !! duplicates. +logical(LK),intent(in),optional :: escape_solidus + !! * If True then the solidus "`/`" is always escaped + !! "`\/`" when serializing JSON + !! * If False [default], then it is not escaped. + !! Note that this option does not affect parsing + !! (both escaped and unescaped are still valid in + !! all cases). + diff --git a/src/json_string_utilities.F90 b/src/json_string_utilities.F90 index 612aa5be20..e4db447d55 100644 --- a/src/json_string_utilities.F90 +++ b/src/json_string_utilities.F90 @@ -293,12 +293,14 @@ end subroutine compact_real_string ! ! Add the escape characters to a string for adding to JSON. - subroutine escape_string(str_in, str_out) + subroutine escape_string(str_in, str_out, escape_solidus) implicit none character(kind=CK,len=*),intent(in) :: str_in character(kind=CK,len=:),allocatable,intent(out) :: str_out + logical(LK),intent(in) :: escape_solidus !! if the solidus (forward slash) + !! is also to be escaped integer(IK) :: i !! counter integer(IK) :: ipos !! accumulated string size @@ -308,20 +310,29 @@ subroutine escape_string(str_in, str_out) #if defined __GFORTRAN__ character(kind=CK,len=:),allocatable :: tmp !! workaround for bug in gfortran 6.1 #endif + logical :: to_be_escaped !! if there are characters to be escaped - character(kind=CK,len=*),parameter :: specials = quotation_mark//& + character(kind=CK,len=*),parameter :: specials_no_slash = quotation_mark//& backslash//& - slash//& bspace//& formfeed//& newline//& carriage_return//& horizontal_tab + character(kind=CK,len=*),parameter :: specials = specials_no_slash//slash + + !Do a quick scan for the special characters, ! if any are present, then process the string, ! otherwise, return the string as is. - if (scan(str_in,specials)>0) then + if (escape_solidus) then + to_be_escaped = scan(str_in,specials)>0 + else + to_be_escaped = scan(str_in,specials_no_slash)>0 + end if + + if (to_be_escaped) then str_out = repeat(space,chunk_size) ipos = 1 @@ -351,9 +362,14 @@ subroutine escape_string(str_in, str_out) str_out(ipos:ipos+1) = backslash//c ipos = ipos + 2 - case(quotation_mark,slash) + case(quotation_mark) str_out(ipos:ipos+1) = backslash//c ipos = ipos + 2 + case(slash) + if (escape_solidus) then + str_out(ipos:ipos+1) = backslash//c + ipos = ipos + 2 + end if case(bspace) str_out(ipos:ipos+1) = '\b' ipos = ipos + 2 diff --git a/src/json_value_module.F90 b/src/json_value_module.F90 index c0ba2efefc..122fbc38cc 100644 --- a/src/json_value_module.F90 +++ b/src/json_value_module.F90 @@ -237,6 +237,13 @@ module json_value_module !! will also check for duplicates. If True !! [default] then no special checks are done + logical(LK) :: escape_solidus = .false. !! If True then the solidus "`/`" is always escaped + !! ("`\/`") when serializing JSON. + !! If False [default], then it is not escaped. + !! Note that this option does not affect parsing + !! (both escaped and unescaped versions are still + !! valid in all cases). + contains private @@ -792,7 +799,8 @@ function initialize_json_core(verbose,compact_reals,& path_mode,& path_separator,& compress_vectors,& - allow_duplicate_keys) result(json_core_object) + allow_duplicate_keys,& + escape_solidus) result(json_core_object) implicit none @@ -810,7 +818,8 @@ function initialize_json_core(verbose,compact_reals,& path_mode,& path_separator,& compress_vectors,& - allow_duplicate_keys) + allow_duplicate_keys,& + escape_solidus) end function initialize_json_core !***************************************************************************************** @@ -845,7 +854,8 @@ subroutine json_initialize(me,verbose,compact_reals,& path_mode,& path_separator,& compress_vectors,& - allow_duplicate_keys) + allow_duplicate_keys,& + escape_solidus) implicit none @@ -923,6 +933,11 @@ subroutine json_initialize(me,verbose,compact_reals,& me%allow_duplicate_keys = allow_duplicate_keys end if + ! if escaping the forward slash: + if (present(escape_solidus)) then + me%escape_solidus = escape_solidus + end if + !Set the format for real numbers: ! [if not changing it, then it remains the same] @@ -1975,7 +1990,7 @@ recursive subroutine json_value_destroy(json,p,destroy_next) if (associated(child)) then p%children => p%children%next p%n_children = p%n_children - 1 - call json_value_destroy(json,child,.false.) + call json%destroy(child,.false.) else call json%throw_exception('Error in json_value_destroy: '//& 'Malformed JSON linked list') @@ -1986,7 +2001,7 @@ recursive subroutine json_value_destroy(json,p,destroy_next) nullify(child) end if - if (associated(p%next) .and. des_next) call json_value_destroy(json,p%next) + if (associated(p%next) .and. des_next) call json%destroy(p%next) if (associated(p%previous)) nullify(p%previous) if (associated(p%parent)) nullify(p%parent) @@ -2418,7 +2433,6 @@ subroutine json_value_validate(json,p,is_valid,error_msg) logical(LK) :: has_duplicate !! to check for duplicate keys character(kind=CK,len=:),allocatable :: path !! path to duplicate key logical(LK) :: status_ok !! to check for existing exception - logical(LK) :: status_ok2 !! to check for a new exception character(kind=CK,len=:),allocatable :: exception_msg !! error message for an existing exception character(kind=CK,len=:),allocatable :: exception_msg2 !! error message for a new exception @@ -5257,7 +5271,7 @@ recursive subroutine json_value_print(json,p,iunit,str,indent,& ! print the name if (allocated(element%name)) then - call escape_string(element%name,str_escaped) + call escape_string(element%name,str_escaped,json%escape_solidus) if (json%no_whitespace) then !compact printing - no extra space call write_it(repeat(space, spaces)//quotation_mark//& @@ -5384,7 +5398,7 @@ recursive subroutine json_value_print(json,p,iunit,str,indent,& if (allocated(p%str_value)) then ! have to escape the string for printing: - call escape_string(p%str_value,str_escaped) + call escape_string(p%str_value,str_escaped,json%escape_solidus) call write_it( s//quotation_mark// & str_escaped//quotation_mark, & comma=print_comma, & @@ -7678,7 +7692,7 @@ subroutine json_get_string(json, me, value) value = me%str_value else ! return the escaped version: - call escape_string(me%str_value, value) + call escape_string(me%str_value, value, json%escape_solidus) end if else call json%throw_exception('Error in json_get_string: '//& From 9a155655049b16c63040162f711280551fa2dd79 Mon Sep 17 00:00:00 2001 From: Jacob Williams Date: Thu, 8 Mar 2018 07:44:49 -0600 Subject: [PATCH 6/8] added unit test for escape_solidus option. --- src/tests/jf_test_30.f90 | 82 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 src/tests/jf_test_30.f90 diff --git a/src/tests/jf_test_30.f90 b/src/tests/jf_test_30.f90 new file mode 100644 index 0000000000..5f4ae425cf --- /dev/null +++ b/src/tests/jf_test_30.f90 @@ -0,0 +1,82 @@ +!***************************************************************************************** +!> +! Module for the 30th unit test. + +module jf_test_30_mod + + use json_module, rk => json_rk, lk => json_lk, ik => json_ik, ck => json_ck, cdk => json_cdk + use, intrinsic :: iso_fortran_env , only: error_unit, output_unit + + implicit none + +contains + + subroutine test_30(error_cnt) + + !! Test the `escape_solidus` option. + + implicit none + + integer,intent(out) :: error_cnt + type(json_file) :: json + type(json_core) :: json_c + integer :: i + + character(kind=CK,len=*),parameter :: str = CK_'{"vars":{"a/first":1,"a\/second":2}}' + character(len=*),dimension(2),parameter :: tf = ['True ','False'] + + error_cnt = 0 + + write(error_unit,'(A)') '' + write(error_unit,'(A)') '=================================' + write(error_unit,'(A)') ' TEST 30' + write(error_unit,'(A)') '=================================' + write(error_unit,'(A)') '' + + do i = 1, 2 + + write(error_unit,'(A)') '' + write(error_unit,'(A)') 'escape_solidus = '//trim(tf(i)) + write(error_unit,'(A)') '' + + call json%initialize(escape_solidus=(i==1)) + call json%load_from_string(str) + call json%print_file() + + if (json%failed()) then + call json%print_error_message(error_unit) + error_cnt = error_cnt + 1 + end if + + call json%destroy() + + write(error_unit,'(A)') '' + + end do + + ! do this one just for code coverage: + call json_c%initialize(escape_solidus=.true.) + if (json%failed()) then + call json_c%print_error_message(error_unit) + error_cnt = error_cnt + 1 + end if + + end subroutine test_30 + +end module jf_test_30_mod +!***************************************************************************************** + +!***************************************************************************************** +program jf_test_30 + + !! 30th unit test. + + use jf_test_30_mod , only: test_30 + implicit none + integer :: n_errors + n_errors = 0 + call test_30(n_errors) + if (n_errors /= 0) stop 1 + +end program jf_test_30 +!***************************************************************************************** From f4bc7eaac2c5a2665c3edacc0006fd405a5cd6a8 Mon Sep 17 00:00:00 2001 From: Jacob Williams Date: Thu, 8 Mar 2018 08:35:18 -0600 Subject: [PATCH 7/8] some mods to the new VS unittest code. Now it stops on the first error. updated for unit test 30. --- src/tests/jf_test_30.f90 | 2 + visual_studio/jsonfortrantest/ReadMe.txt | 25 ----- .../jsonfortrantest/jsonfortrantest.f90 | 92 +++++++++---------- .../jsonfortrantest/jsonfortrantest.vfproj | 1 + 4 files changed, 48 insertions(+), 72 deletions(-) delete mode 100644 visual_studio/jsonfortrantest/ReadMe.txt diff --git a/src/tests/jf_test_30.f90 b/src/tests/jf_test_30.f90 index 5f4ae425cf..f58c36ec7a 100644 --- a/src/tests/jf_test_30.f90 +++ b/src/tests/jf_test_30.f90 @@ -66,6 +66,7 @@ end subroutine test_30 end module jf_test_30_mod !***************************************************************************************** +#ifndef INTERGATED_TESTS !***************************************************************************************** program jf_test_30 @@ -80,3 +81,4 @@ program jf_test_30 end program jf_test_30 !***************************************************************************************** +#endif diff --git a/visual_studio/jsonfortrantest/ReadMe.txt b/visual_studio/jsonfortrantest/ReadMe.txt deleted file mode 100644 index a3dc5d6273..0000000000 --- a/visual_studio/jsonfortrantest/ReadMe.txt +++ /dev/null @@ -1,25 +0,0 @@ -======================================================================== - Fortran Console Application : "jsonfortrantest" Project Overview -======================================================================== - -The Intel Fortran Console Application Wizard has created this -"jsonfortrantest" project for you as a starting point. - -This file contains a summary of what you will find in each of the files -that make up your project. - -jsonfortrantest.vfproj - This is the main project file for Fortran projects generated using an - Application Wizard. It contains information about the version of - Intel Fortran that generated the file, and information about the - platforms, configurations, and project features selected with the - Application Wizard. - -jsonfortrantest.f90 - This is the main source file for the Fortran Console application. - It contains the program entry point. - -///////////////////////////////////////////////////////////////////////////// -Other notes: - -///////////////////////////////////////////////////////////////////////////// diff --git a/visual_studio/jsonfortrantest/jsonfortrantest.f90 b/visual_studio/jsonfortrantest/jsonfortrantest.f90 index 9d22bd0a3d..9b640a03a7 100644 --- a/visual_studio/jsonfortrantest/jsonfortrantest.f90 +++ b/visual_studio/jsonfortrantest/jsonfortrantest.f90 @@ -1,15 +1,11 @@ - -!**************************************************************************** -! -! PROGRAM: jsonfortrantest -! -! PURPOSE: Entry point for the console application. -! -! runs through all the tests in the tests folder returns 1 on shut down if there are any errors. +!***************************************************************************************** +!> +! Entry point for the unified unit test application. ! -!**************************************************************************** +! Runs through all the tests in the `tests` folder +! Returns 1 if there are any errors. -program jsonfortrantest + program jsonfortrantest use jf_test_1_mod , only: test_1 use jf_test_2_mod , only: test_2 @@ -29,7 +25,7 @@ program jsonfortrantest use jf_test_16_mod , only: test_16 use jf_test_17_mod , only: test_17 use jf_test_18_mod , only: test_18 - use jf_test_19_mod , only: test_19 + use jf_test_19_mod , only: test_19 use jf_test_20_mod , only: test_20 use jf_test_21_mod , only: test_21 use jf_test_22_mod , only: test_22 @@ -38,43 +34,45 @@ program jsonfortrantest use jf_test_25_mod , only: test_25 use jf_test_26_mod , only: test_26 use jf_test_27_mod , only: test_27 - use jf_test_29_mod , only: test_29 - - + use jf_test_29_mod , only: test_29 + use jf_test_30_mod , only: test_30 + implicit none - integer :: n_errors - call test_1(n_errors) - call test_2(n_errors) - call test_3(n_errors) - call test_4(n_errors) - call test_5(n_errors) - call test_6(n_errors) - call test_7(n_errors) - call test_8(n_errors) - call test_9(n_errors) - call test_10(n_errors) - call test_11(n_errors) - call test_12(n_errors) - call test_13(n_errors) - call test_14(n_errors) - call test_15(n_errors) - call test_16(n_errors) - call test_17(n_errors) - call test_18(n_errors) - call test_19(n_errors) - call test_20(n_errors) - call test_21(n_errors) - call test_22(n_errors) - call test_23(n_errors) - call test_24(n_errors) - call test_25(n_errors) - call test_26(n_errors) - call test_27(n_errors) - call test_29(n_errors) - - if (n_errors /= 0) stop 1 - -end program jsonfortrantest + integer :: n_errors !! number of errors + + n_errors = 0 + + call test_1(n_errors); if (n_errors /= 0) stop 1 + call test_2(n_errors); if (n_errors /= 0) stop 1 + call test_3(n_errors); if (n_errors /= 0) stop 1 + call test_4(n_errors); if (n_errors /= 0) stop 1 + call test_5(n_errors); if (n_errors /= 0) stop 1 + call test_6(n_errors); if (n_errors /= 0) stop 1 + call test_7(n_errors); if (n_errors /= 0) stop 1 + call test_8(n_errors); if (n_errors /= 0) stop 1 + call test_9(n_errors); if (n_errors /= 0) stop 1 + call test_10(n_errors); if (n_errors /= 0) stop 1 + call test_11(n_errors); if (n_errors /= 0) stop 1 + call test_12(n_errors); if (n_errors /= 0) stop 1 + call test_13(n_errors); if (n_errors /= 0) stop 1 + call test_14(n_errors); if (n_errors /= 0) stop 1 + call test_15(n_errors); if (n_errors /= 0) stop 1 + call test_16(n_errors); if (n_errors /= 0) stop 1 + call test_17(n_errors); if (n_errors /= 0) stop 1 + call test_18(n_errors); if (n_errors /= 0) stop 1 + call test_19(n_errors); if (n_errors /= 0) stop 1 + call test_20(n_errors); if (n_errors /= 0) stop 1 + call test_21(n_errors); if (n_errors /= 0) stop 1 + call test_22(n_errors); if (n_errors /= 0) stop 1 + call test_23(n_errors); if (n_errors /= 0) stop 1 + call test_24(n_errors); if (n_errors /= 0) stop 1 + call test_25(n_errors); if (n_errors /= 0) stop 1 + call test_26(n_errors); if (n_errors /= 0) stop 1 + call test_27(n_errors); if (n_errors /= 0) stop 1 + call test_29(n_errors); if (n_errors /= 0) stop 1 + call test_30(n_errors); if (n_errors /= 0) stop 1 + end program jsonfortrantest +!***************************************************************************************** diff --git a/visual_studio/jsonfortrantest/jsonfortrantest.vfproj b/visual_studio/jsonfortrantest/jsonfortrantest.vfproj index ae3808ae3a..23b1abac37 100644 --- a/visual_studio/jsonfortrantest/jsonfortrantest.vfproj +++ b/visual_studio/jsonfortrantest/jsonfortrantest.vfproj @@ -46,6 +46,7 @@ + From 57a0580337b4992698e1725eae5d16af00bc2e91 Mon Sep 17 00:00:00 2001 From: Jacob Williams Date: Thu, 8 Mar 2018 13:03:41 -0600 Subject: [PATCH 8/8] updates to Visual Studio jsonfortrantest project. Updated directories. Added 64 bit builds. Changed extensions of all tests to F90 since they are now all preprocessed. --- .gitignore | 11 +- visual_studio/jsonfortran.sln | 10 +- .../jsonfortrantest/jsonfortrantest.vfproj | 138 ++++++++++-------- 3 files changed, 91 insertions(+), 68 deletions(-) diff --git a/.gitignore b/.gitignore index 2d30ee5d7e..4188245d5a 100644 --- a/.gitignore +++ b/.gitignore @@ -11,14 +11,15 @@ doc/ .sconsign.* files/*.json .cflags.* -visual_studio/*.suo -visual_studio/*.u2d +*.suo +*.u2d +*.user + visual_studio/Debug/ visual_studio/Release/ visual_studio/x64/ visual_studio/.vs/ visual_studio/jsonfortranlib/ - visual_studio/jsonfortrantest/Debug/ -*.u2d -*.user +visual_studio/jsonfortrantest/Release/ +visual_studio/jsonfortrantest/x64 \ No newline at end of file diff --git a/visual_studio/jsonfortran.sln b/visual_studio/jsonfortran.sln index 8f7e85e7d9..fff4b2230d 100644 --- a/visual_studio/jsonfortran.sln +++ b/visual_studio/jsonfortran.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25420.1 +# Visual Studio 2013 +VisualStudioVersion = 12.0.40629.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{6989167D-11E4-40FE-8C1A-2192A86A7E90}") = "jsonfortranlib", "jsonfortranlib\jsonfortranlib.vfproj", "{9A2FEBBE-6702-448E-B361-AE3EA614F5CF}" EndProject @@ -28,10 +28,12 @@ Global {9A2FEBBE-6702-448E-B361-AE3EA614F5CF}.Release|x64.Build.0 = Release|x64 {6B8385E8-4E5B-4C63-8A06-F2DABE97F304}.Debug|Win32.ActiveCfg = Debug|Win32 {6B8385E8-4E5B-4C63-8A06-F2DABE97F304}.Debug|Win32.Build.0 = Debug|Win32 - {6B8385E8-4E5B-4C63-8A06-F2DABE97F304}.Debug|x64.ActiveCfg = Debug|Win32 + {6B8385E8-4E5B-4C63-8A06-F2DABE97F304}.Debug|x64.ActiveCfg = Debug|x64 + {6B8385E8-4E5B-4C63-8A06-F2DABE97F304}.Debug|x64.Build.0 = Debug|x64 {6B8385E8-4E5B-4C63-8A06-F2DABE97F304}.Release|Win32.ActiveCfg = Release|Win32 {6B8385E8-4E5B-4C63-8A06-F2DABE97F304}.Release|Win32.Build.0 = Release|Win32 - {6B8385E8-4E5B-4C63-8A06-F2DABE97F304}.Release|x64.ActiveCfg = Release|Win32 + {6B8385E8-4E5B-4C63-8A06-F2DABE97F304}.Release|x64.ActiveCfg = Release|x64 + {6B8385E8-4E5B-4C63-8A06-F2DABE97F304}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/visual_studio/jsonfortrantest/jsonfortrantest.vfproj b/visual_studio/jsonfortrantest/jsonfortrantest.vfproj index 23b1abac37..ad96bfe25d 100644 --- a/visual_studio/jsonfortrantest/jsonfortrantest.vfproj +++ b/visual_studio/jsonfortrantest/jsonfortrantest.vfproj @@ -1,59 +1,79 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +