From 930824d01a070989f511c74cfb25a0cf593ae28e Mon Sep 17 00:00:00 2001 From: qth2hi Date: Mon, 28 Oct 2024 20:25:35 +0100 Subject: [PATCH] Updated self test and code snippet generator --- test/JPP_TestUsecases.csv | 6 + test/JPP_TestUsecases.html | 392 ++++++-- test/JPP_TestUsecases.rst | 62 +- test/JPP_TestUsecases.txt | 26 +- test/component_test.py | 4 +- .../test_08_NAMING_CONVENTION_BADCASE.py | 80 ++ ...test_09_COMPOSITE_EXPRESSIONS_GOODCASE.py} | 4 +- ... test_10_COMPOSITE_EXPRESSIONS_BADCASE.py} | 4 +- ...E.py => test_11_CODE_COMMENTS_GOODCASE.py} | 4 +- ...st_12_COMMON_SYNTAX_VIOLATIONS_BADCASE.py} | 4 +- ... => test_13_IMPLICIT_CREATION_GOODCASE.py} | 4 +- ...y => test_14_IMPLICIT_CREATION_BADCASE.py} | 4 +- ...E.py => test_15_CYCLIC_IMPORTS_BADCASE.py} | 4 +- ...SE.py => test_16_PATH_FORMATS_GOODCASE.py} | 4 +- ....py => test_17_BLOCKED_SLICING_BADCASE.py} | 4 +- ...SE.py => test_18_NESTED_LISTS_GOODCASE.py} | 4 +- ....py => test_19_STRING_INDICES_GOODCASE.py} | 4 +- ...est_20_NOT_EXISTING_PARAMETERS_BADCASE.py} | 4 +- ...ASE.py => test_21_LINE_BREAKS_GOODCASE.py} | 4 +- ...y => test_22_SELF_ASSIGNMENTS_GOODCASE.py} | 4 +- ...t_23_ASSIGNMENTS_BY_REFERENCE_GOODCASE.py} | 4 +- ...py => test_24_PARAMETER_SCOPE_GOODCASE.py} | 4 +- ....py => test_25_PARAMETER_SCOPE_BADCASE.py} | 4 +- test/testconfig/TestConfig.py | 256 ++++- test/testfiles/jpp-test_config_0401.jsonp | 54 ++ test/testfiles/jpp-test_config_0450.jsonp | 18 + test/testfiles/jpp-test_config_0451.jsonp | 18 + test/testfiles/jpp-test_config_0452.jsonp | 18 + test/testfiles/jpp-test_config_0453.jsonp | 18 + test/testfiles/jpp-test_config_0454.jsonp | 18 + test/testfiles/jpp-test_config_0455.jsonp | 18 + test/testfiles/jpp-test_config_0456.jsonp | 18 + test/testfiles/jpp-test_config_0457.jsonp | 18 + test/testfiles/jpp-test_config_0458.jsonp | 18 + test/testfiles/jpp-test_config_0459.jsonp | 17 + test/testfiles/jpp-test_config_0460.jsonp | 17 + test/testfiles/jpp-test_config_0461.jsonp | 17 + test/testfiles/jpp-test_config_0462.jsonp | 17 + test/testfiles/jpp-test_config_0463.jsonp | 17 + test/testfiles/jpp-test_config_0464.jsonp | 17 + test/testfiles/jpp-test_config_0465.jsonp | 18 + test/testfiles/jpp-test_config_0466.jsonp | 18 + test/testtools/GenSnippetsJPP.py | 872 +++++++++++++++++- 43 files changed, 1976 insertions(+), 144 deletions(-) create mode 100644 test/pytest/pytestfiles/test_08_NAMING_CONVENTION_BADCASE.py rename test/pytest/pytestfiles/{test_08_COMPOSITE_EXPRESSIONS_GOODCASE.py => test_09_COMPOSITE_EXPRESSIONS_GOODCASE.py} (99%) rename test/pytest/pytestfiles/{test_09_COMPOSITE_EXPRESSIONS_BADCASE.py => test_10_COMPOSITE_EXPRESSIONS_BADCASE.py} (98%) rename test/pytest/pytestfiles/{test_10_CODE_COMMENTS_GOODCASE.py => test_11_CODE_COMMENTS_GOODCASE.py} (96%) rename test/pytest/pytestfiles/{test_11_COMMON_SYNTAX_VIOLATIONS_BADCASE.py => test_12_COMMON_SYNTAX_VIOLATIONS_BADCASE.py} (97%) rename test/pytest/pytestfiles/{test_12_IMPLICIT_CREATION_GOODCASE.py => test_13_IMPLICIT_CREATION_GOODCASE.py} (98%) rename test/pytest/pytestfiles/{test_13_IMPLICIT_CREATION_BADCASE.py => test_14_IMPLICIT_CREATION_BADCASE.py} (98%) rename test/pytest/pytestfiles/{test_14_CYCLIC_IMPORTS_BADCASE.py => test_15_CYCLIC_IMPORTS_BADCASE.py} (97%) rename test/pytest/pytestfiles/{test_15_PATH_FORMATS_GOODCASE.py => test_16_PATH_FORMATS_GOODCASE.py} (96%) rename test/pytest/pytestfiles/{test_16_BLOCKED_SLICING_BADCASE.py => test_17_BLOCKED_SLICING_BADCASE.py} (99%) rename test/pytest/pytestfiles/{test_17_NESTED_LISTS_GOODCASE.py => test_18_NESTED_LISTS_GOODCASE.py} (96%) rename test/pytest/pytestfiles/{test_18_STRING_INDICES_GOODCASE.py => test_19_STRING_INDICES_GOODCASE.py} (97%) rename test/pytest/pytestfiles/{test_19_NOT_EXISTING_PARAMETERS_BADCASE.py => test_20_NOT_EXISTING_PARAMETERS_BADCASE.py} (99%) rename test/pytest/pytestfiles/{test_20_LINE_BREAKS_GOODCASE.py => test_21_LINE_BREAKS_GOODCASE.py} (96%) rename test/pytest/pytestfiles/{test_21_SELF_ASSIGNMENTS_GOODCASE.py => test_22_SELF_ASSIGNMENTS_GOODCASE.py} (96%) rename test/pytest/pytestfiles/{test_22_ASSIGNMENTS_BY_REFERENCE_GOODCASE.py => test_23_ASSIGNMENTS_BY_REFERENCE_GOODCASE.py} (96%) rename test/pytest/pytestfiles/{test_23_PARAMETER_SCOPE_GOODCASE.py => test_24_PARAMETER_SCOPE_GOODCASE.py} (98%) rename test/pytest/pytestfiles/{test_24_PARAMETER_SCOPE_BADCASE.py => test_25_PARAMETER_SCOPE_BADCASE.py} (98%) create mode 100644 test/testfiles/jpp-test_config_0401.jsonp create mode 100644 test/testfiles/jpp-test_config_0450.jsonp create mode 100644 test/testfiles/jpp-test_config_0451.jsonp create mode 100644 test/testfiles/jpp-test_config_0452.jsonp create mode 100644 test/testfiles/jpp-test_config_0453.jsonp create mode 100644 test/testfiles/jpp-test_config_0454.jsonp create mode 100644 test/testfiles/jpp-test_config_0455.jsonp create mode 100644 test/testfiles/jpp-test_config_0456.jsonp create mode 100644 test/testfiles/jpp-test_config_0457.jsonp create mode 100644 test/testfiles/jpp-test_config_0458.jsonp create mode 100644 test/testfiles/jpp-test_config_0459.jsonp create mode 100644 test/testfiles/jpp-test_config_0460.jsonp create mode 100644 test/testfiles/jpp-test_config_0461.jsonp create mode 100644 test/testfiles/jpp-test_config_0462.jsonp create mode 100644 test/testfiles/jpp-test_config_0463.jsonp create mode 100644 test/testfiles/jpp-test_config_0464.jsonp create mode 100644 test/testfiles/jpp-test_config_0465.jsonp create mode 100644 test/testfiles/jpp-test_config_0466.jsonp diff --git a/test/JPP_TestUsecases.csv b/test/JPP_TestUsecases.csv index 52d6dca9..da2e919c 100644 --- a/test/JPP_TestUsecases.csv +++ b/test/JPP_TestUsecases.csv @@ -67,6 +67,12 @@ JPP_0369|VALUE_DETECTION|BADCASE|JSON file with expression starting with '${' an JPP_0370|VALUE_DETECTION|BADCASE|JSON file with expression starting with '${' and ending with '}', further matching '${' and '}' in between (not all nested) (invalid syntax 4) JPP_0371|VALUE_DETECTION|BADCASE|JSON file with expression starting with '${' and ending with '}', further matching '${' and '}' in between (not all nested) (invalid syntax 5) JPP_0400|NAMING_CONVENTION|GOODCASE|JSON file with several parameter names w.r.t. the naming convention +JPP_0450|NAMING_CONVENTION|BADCASE|JSON file with several invalid parameter names (1) +JPP_0451|NAMING_CONVENTION|BADCASE|JSON file with several invalid parameter names (2) +JPP_0452|NAMING_CONVENTION|BADCASE|JSON file with several invalid parameter names (3) +JPP_0453|NAMING_CONVENTION|BADCASE|JSON file with several invalid parameter names (4) +JPP_0454|NAMING_CONVENTION|BADCASE|JSON file with several invalid parameter names (5) +JPP_0455|NAMING_CONVENTION|BADCASE|JSON file with several invalid parameter names (6) JPP_0500|COMPOSITE_EXPRESSIONS|GOODCASE|JSON file with composite data structure (nested lists and dictionaries 1) JPP_0501|COMPOSITE_EXPRESSIONS|GOODCASE|JSON file with composite data structure (nested lists and dictionaries 2) JPP_0502|COMPOSITE_EXPRESSIONS|GOODCASE|JSON file with composite data structure (nested lists and dictionaries 3 / some key names with dots inside) diff --git a/test/JPP_TestUsecases.html b/test/JPP_TestUsecases.html index 90c0d544..66f808c4 100644 --- a/test/JPP_TestUsecases.html +++ b/test/JPP_TestUsecases.html @@ -2272,6 +2272,204 @@ 68 + + + +JPP_0450 + + + + +NAMING_CONVENTION + + + + +BADCASE + + + + +JSON file with several invalid parameter names (1)
+Expected: All names are accepted (in definition and in reference) + + +
+ + + + + + + +69 + + + + + +JPP_0451 + + + + +NAMING_CONVENTION + + + + +BADCASE + + + + +JSON file with several invalid parameter names (2)
+Expected: All names are accepted (in definition and in reference) + + +
+ + + + + + + +70 + + + + + +JPP_0452 + + + + +NAMING_CONVENTION + + + + +BADCASE + + + + +JSON file with several invalid parameter names (3)
+Expected: All names are accepted (in definition and in reference) + + +
+ + + + + + + +71 + + + + + +JPP_0453 + + + + +NAMING_CONVENTION + + + + +BADCASE + + + + +JSON file with several invalid parameter names (4)
+Expected: All names are accepted (in definition and in reference) + + +
+ + + + + + + +72 + + + + + +JPP_0454 + + + + +NAMING_CONVENTION + + + + +BADCASE + + + + +JSON file with several invalid parameter names (5)
+Expected: All names are accepted (in definition and in reference) + + +
+ + + + + + + +73 + + + + + +JPP_0455 + + + + +NAMING_CONVENTION + + + + +BADCASE + + + + +JSON file with several invalid parameter names (6)
+Expected: All names are accepted (in definition and in reference) + + +
+ + + + + + + +74 + + @@ -2303,7 +2501,7 @@ -69 +75 @@ -2337,7 +2535,7 @@ -70 +76 @@ -2371,7 +2569,7 @@ -71 +77 @@ -2404,7 +2602,7 @@ -72 +78 @@ -2437,7 +2635,7 @@ -73 +79 @@ -2470,7 +2668,7 @@ -74 +80 @@ -2503,7 +2701,7 @@ -75 +81 @@ -2536,7 +2734,7 @@ -76 +82 @@ -2569,7 +2767,7 @@ -77 +83 @@ -2602,7 +2800,7 @@ -78 +84 @@ -2635,7 +2833,7 @@ -79 +85 @@ -2668,7 +2866,7 @@ -80 +86 @@ -2701,7 +2899,7 @@ -81 +87 @@ -2734,7 +2932,7 @@ -82 +88 @@ -2767,7 +2965,7 @@ -83 +89 @@ -2800,7 +2998,7 @@ -84 +90 @@ -2833,7 +3031,7 @@ -85 +91 @@ -2867,7 +3065,7 @@ -86 +92 @@ -2901,7 +3099,7 @@ -87 +93 @@ -2934,7 +3132,7 @@ -88 +94 @@ -2967,7 +3165,7 @@ -89 +95 @@ -3000,7 +3198,7 @@ -90 +96 @@ -3033,7 +3231,7 @@ -91 +97 @@ -3066,7 +3264,7 @@ -92 +98 @@ -3099,7 +3297,7 @@ -93 +99 @@ -3132,7 +3330,7 @@ -94 +100 @@ -3165,7 +3363,7 @@ -95 +101 @@ -3198,7 +3396,7 @@ -96 +102 @@ -3231,7 +3429,7 @@ -97 +103 @@ -3264,7 +3462,7 @@ -98 +104 @@ -3297,7 +3495,7 @@ -99 +105 @@ -3330,7 +3528,7 @@ -100 +106 @@ -3363,7 +3561,7 @@ -101 +107 @@ -3396,7 +3594,7 @@ -102 +108 @@ -3429,7 +3627,7 @@ -103 +109 @@ -3462,7 +3660,7 @@ -104 +110 @@ -3495,7 +3693,7 @@ -105 +111 @@ -3528,7 +3726,7 @@ -106 +112 @@ -3561,7 +3759,7 @@ -107 +113 @@ -3594,7 +3792,7 @@ -108 +114 @@ -3627,7 +3825,7 @@ -109 +115 @@ -3660,7 +3858,7 @@ -110 +116 @@ -3693,7 +3891,7 @@ -111 +117 @@ -3726,7 +3924,7 @@ -112 +118 @@ -3759,7 +3957,7 @@ -113 +119 @@ -3793,7 +3991,7 @@ -114 +120 @@ -3826,7 +4024,7 @@ -115 +121 @@ -3859,7 +4057,7 @@ -116 +122 @@ -3892,7 +4090,7 @@ -117 +123 @@ -3925,7 +4123,7 @@ -118 +124 @@ -3958,7 +4156,7 @@ -119 +125 @@ -3991,7 +4189,7 @@ -120 +126 @@ -4024,7 +4222,7 @@ -121 +127 @@ -4057,7 +4255,7 @@ -122 +128 @@ -4090,7 +4288,7 @@ -123 +129 @@ -4123,7 +4321,7 @@ -124 +130 @@ -4156,7 +4354,7 @@ -125 +131 @@ -4189,7 +4387,7 @@ -126 +132 @@ -4222,7 +4420,7 @@ -127 +133 @@ -4255,7 +4453,7 @@ -128 +134 @@ -4288,7 +4486,7 @@ -129 +135 @@ -4321,7 +4519,7 @@ -130 +136 @@ -4354,7 +4552,7 @@ -131 +137 @@ -4387,7 +4585,7 @@ -132 +138 @@ -4420,7 +4618,7 @@ -133 +139 @@ -4453,7 +4651,7 @@ -134 +140 @@ -4486,7 +4684,7 @@ -135 +141 @@ -4519,7 +4717,7 @@ -136 +142 @@ -4552,7 +4750,7 @@ -137 +143 @@ -4585,7 +4783,7 @@ -138 +144 @@ -4618,7 +4816,7 @@ -139 +145 @@ -4651,7 +4849,7 @@ -140 +146 @@ -4684,7 +4882,7 @@ -141 +147 @@ -4717,7 +4915,7 @@ -142 +148 @@ -4750,7 +4948,7 @@ -143 +149 @@ -4783,7 +4981,7 @@ -144 +150 @@ -4816,7 +5014,7 @@ -145 +151 @@ -4849,7 +5047,7 @@ -146 +152 @@ -4882,7 +5080,7 @@ -147 +153 @@ -4915,7 +5113,7 @@ -148 +154 @@ -4948,7 +5146,7 @@ -149 +155 @@ -4981,7 +5179,7 @@ -150 +156 @@ -5014,7 +5212,7 @@ -151 +157 @@ -5047,7 +5245,7 @@ -152 +158 @@ -5080,7 +5278,7 @@ -153 +159 @@ -5113,7 +5311,7 @@ -154 +160 @@ -5146,7 +5344,7 @@ -155 +161 @@ -5179,7 +5377,7 @@ -156 +162 @@ -5212,7 +5410,7 @@ -157 +163 @@ -5245,7 +5443,7 @@ -158 +164 @@ -5278,7 +5476,7 @@ -159 +165 @@ -5311,7 +5509,7 @@ -160 +166 @@ -5344,7 +5542,7 @@ -161 +167 @@ -5377,7 +5575,7 @@ -162 +168 @@ -5410,7 +5608,7 @@ -163 +169 @@ -5443,7 +5641,7 @@ -164 +170 @@ -5476,7 +5674,7 @@
 

-
Generated: 25.10.2024 - 20:21:51
+
Generated: 28.10.2024 - 20:15:13
 
diff --git a/test/JPP_TestUsecases.rst b/test/JPP_TestUsecases.rst index 9d46a977..9fdc90dd 100644 --- a/test/JPP_TestUsecases.rst +++ b/test/JPP_TestUsecases.rst @@ -739,6 +739,66 @@ Test Use Cases ---- +* **Test JPP_0450** + + [NAMING_CONVENTION / BADCASE] + + **JSON file with several invalid parameter names (1)** + + Expected: All names are accepted (in definition and in reference) + +---- + +* **Test JPP_0451** + + [NAMING_CONVENTION / BADCASE] + + **JSON file with several invalid parameter names (2)** + + Expected: All names are accepted (in definition and in reference) + +---- + +* **Test JPP_0452** + + [NAMING_CONVENTION / BADCASE] + + **JSON file with several invalid parameter names (3)** + + Expected: All names are accepted (in definition and in reference) + +---- + +* **Test JPP_0453** + + [NAMING_CONVENTION / BADCASE] + + **JSON file with several invalid parameter names (4)** + + Expected: All names are accepted (in definition and in reference) + +---- + +* **Test JPP_0454** + + [NAMING_CONVENTION / BADCASE] + + **JSON file with several invalid parameter names (5)** + + Expected: All names are accepted (in definition and in reference) + +---- + +* **Test JPP_0455** + + [NAMING_CONVENTION / BADCASE] + + **JSON file with several invalid parameter names (6)** + + Expected: All names are accepted (in definition and in reference) + +---- + * **Test JPP_0500** [COMPOSITE_EXPRESSIONS / GOODCASE] @@ -1721,5 +1781,5 @@ Test Use Cases ---- -Generated: 25.10.2024 - 20:21:51 +Generated: 28.10.2024 - 20:15:13 diff --git a/test/JPP_TestUsecases.txt b/test/JPP_TestUsecases.txt index 2b0cf434..95564c2f 100644 --- a/test/JPP_TestUsecases.txt +++ b/test/JPP_TestUsecases.txt @@ -310,6 +310,30 @@ Test JPP_0400 / NAMING_CONVENTION / GOODCASE Description: JSON file with several parameter names w.r.t. the naming convention Expectation: All names are accepted (in definition and in reference) ------------------------------------------------------------------------------------------------------------------------ +Test JPP_0450 / NAMING_CONVENTION / BADCASE +Description: JSON file with several invalid parameter names (1) +Expectation: All names are accepted (in definition and in reference) +------------------------------------------------------------------------------------------------------------------------ +Test JPP_0451 / NAMING_CONVENTION / BADCASE +Description: JSON file with several invalid parameter names (2) +Expectation: All names are accepted (in definition and in reference) +------------------------------------------------------------------------------------------------------------------------ +Test JPP_0452 / NAMING_CONVENTION / BADCASE +Description: JSON file with several invalid parameter names (3) +Expectation: All names are accepted (in definition and in reference) +------------------------------------------------------------------------------------------------------------------------ +Test JPP_0453 / NAMING_CONVENTION / BADCASE +Description: JSON file with several invalid parameter names (4) +Expectation: All names are accepted (in definition and in reference) +------------------------------------------------------------------------------------------------------------------------ +Test JPP_0454 / NAMING_CONVENTION / BADCASE +Description: JSON file with several invalid parameter names (5) +Expectation: All names are accepted (in definition and in reference) +------------------------------------------------------------------------------------------------------------------------ +Test JPP_0455 / NAMING_CONVENTION / BADCASE +Description: JSON file with several invalid parameter names (6) +Expectation: All names are accepted (in definition and in reference) +------------------------------------------------------------------------------------------------------------------------ Test JPP_0500 / COMPOSITE_EXPRESSIONS / GOODCASE Description: JSON file with composite data structure (nested lists and dictionaries 1) Expectation: JsonPreprocessor returns expected value @@ -704,5 +728,5 @@ Test JPP_2508 / PARAMETER_SCOPE / BADCASE Description: JSON file containing a parameter with missing scope (9) Expectation: JsonPreprocessor returns expected value ------------------------------------------------------------------------------------------------------------------------ -Generated: 25.10.2024 - 20:21:51 +Generated: 28.10.2024 - 20:15:13 diff --git a/test/component_test.py b/test/component_test.py index c110ed1f..c92156ae 100644 --- a/test/component_test.py +++ b/test/component_test.py @@ -22,8 +22,8 @@ # # -------------------------------------------------------------------------------------------------------------- # -VERSION = "0.48.1" -VERSION_DATE = "25.10.2024" +VERSION = "0.49.0" +VERSION_DATE = "28.10.2024" # # -------------------------------------------------------------------------------------------------------------- #TM*** diff --git a/test/pytest/pytestfiles/test_08_NAMING_CONVENTION_BADCASE.py b/test/pytest/pytestfiles/test_08_NAMING_CONVENTION_BADCASE.py new file mode 100644 index 00000000..7b3484b7 --- /dev/null +++ b/test/pytest/pytestfiles/test_08_NAMING_CONVENTION_BADCASE.py @@ -0,0 +1,80 @@ +# ************************************************************************************************************** +# Copyright 2020-2023 Robert Bosch GmbH +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# -------------------------------------------------------------------------------------------------------------- +# +# test_08_NAMING_CONVENTION_BADCASE.py +# +# XC-HWP/ESW3-Queckenstedt +# +# 28.10.2024 - 20:15:13 +# +# -------------------------------------------------------------------------------------------------------------- + +import pytest +from pytestlibs.CExecute import CExecute + +# -------------------------------------------------------------------------------------------------------------- + +class Test_NAMING_CONVENTION_BADCASE: + +# -------------------------------------------------------------------------------------------------------------- + # Expected: All names are accepted (in definition and in reference) + @pytest.mark.parametrize( + "Description", ["JSON file with several invalid parameter names (1)",] + ) + def test_JPP_0450(self, Description): + nReturn = CExecute.Execute("JPP_0450") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: All names are accepted (in definition and in reference) + @pytest.mark.parametrize( + "Description", ["JSON file with several invalid parameter names (2)",] + ) + def test_JPP_0451(self, Description): + nReturn = CExecute.Execute("JPP_0451") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: All names are accepted (in definition and in reference) + @pytest.mark.parametrize( + "Description", ["JSON file with several invalid parameter names (3)",] + ) + def test_JPP_0452(self, Description): + nReturn = CExecute.Execute("JPP_0452") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: All names are accepted (in definition and in reference) + @pytest.mark.parametrize( + "Description", ["JSON file with several invalid parameter names (4)",] + ) + def test_JPP_0453(self, Description): + nReturn = CExecute.Execute("JPP_0453") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: All names are accepted (in definition and in reference) + @pytest.mark.parametrize( + "Description", ["JSON file with several invalid parameter names (5)",] + ) + def test_JPP_0454(self, Description): + nReturn = CExecute.Execute("JPP_0454") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: All names are accepted (in definition and in reference) + @pytest.mark.parametrize( + "Description", ["JSON file with several invalid parameter names (6)",] + ) + def test_JPP_0455(self, Description): + nReturn = CExecute.Execute("JPP_0455") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- diff --git a/test/pytest/pytestfiles/test_08_COMPOSITE_EXPRESSIONS_GOODCASE.py b/test/pytest/pytestfiles/test_09_COMPOSITE_EXPRESSIONS_GOODCASE.py similarity index 99% rename from test/pytest/pytestfiles/test_08_COMPOSITE_EXPRESSIONS_GOODCASE.py rename to test/pytest/pytestfiles/test_09_COMPOSITE_EXPRESSIONS_GOODCASE.py index 7940b512..77bac8f6 100644 --- a/test/pytest/pytestfiles/test_08_COMPOSITE_EXPRESSIONS_GOODCASE.py +++ b/test/pytest/pytestfiles/test_09_COMPOSITE_EXPRESSIONS_GOODCASE.py @@ -14,11 +14,11 @@ # limitations under the License. # -------------------------------------------------------------------------------------------------------------- # -# test_08_COMPOSITE_EXPRESSIONS_GOODCASE.py +# test_09_COMPOSITE_EXPRESSIONS_GOODCASE.py # # XC-HWP/ESW3-Queckenstedt # -# 25.10.2024 - 20:31:28 +# 28.10.2024 - 20:15:13 # # -------------------------------------------------------------------------------------------------------------- diff --git a/test/pytest/pytestfiles/test_09_COMPOSITE_EXPRESSIONS_BADCASE.py b/test/pytest/pytestfiles/test_10_COMPOSITE_EXPRESSIONS_BADCASE.py similarity index 98% rename from test/pytest/pytestfiles/test_09_COMPOSITE_EXPRESSIONS_BADCASE.py rename to test/pytest/pytestfiles/test_10_COMPOSITE_EXPRESSIONS_BADCASE.py index 5f4fad9f..875b9e00 100644 --- a/test/pytest/pytestfiles/test_09_COMPOSITE_EXPRESSIONS_BADCASE.py +++ b/test/pytest/pytestfiles/test_10_COMPOSITE_EXPRESSIONS_BADCASE.py @@ -14,11 +14,11 @@ # limitations under the License. # -------------------------------------------------------------------------------------------------------------- # -# test_09_COMPOSITE_EXPRESSIONS_BADCASE.py +# test_10_COMPOSITE_EXPRESSIONS_BADCASE.py # # XC-HWP/ESW3-Queckenstedt # -# 25.10.2024 - 20:31:28 +# 28.10.2024 - 20:15:13 # # -------------------------------------------------------------------------------------------------------------- diff --git a/test/pytest/pytestfiles/test_10_CODE_COMMENTS_GOODCASE.py b/test/pytest/pytestfiles/test_11_CODE_COMMENTS_GOODCASE.py similarity index 96% rename from test/pytest/pytestfiles/test_10_CODE_COMMENTS_GOODCASE.py rename to test/pytest/pytestfiles/test_11_CODE_COMMENTS_GOODCASE.py index f6691e0a..54a6e275 100644 --- a/test/pytest/pytestfiles/test_10_CODE_COMMENTS_GOODCASE.py +++ b/test/pytest/pytestfiles/test_11_CODE_COMMENTS_GOODCASE.py @@ -14,11 +14,11 @@ # limitations under the License. # -------------------------------------------------------------------------------------------------------------- # -# test_10_CODE_COMMENTS_GOODCASE.py +# test_11_CODE_COMMENTS_GOODCASE.py # # XC-HWP/ESW3-Queckenstedt # -# 25.10.2024 - 20:31:28 +# 28.10.2024 - 20:15:13 # # -------------------------------------------------------------------------------------------------------------- diff --git a/test/pytest/pytestfiles/test_11_COMMON_SYNTAX_VIOLATIONS_BADCASE.py b/test/pytest/pytestfiles/test_12_COMMON_SYNTAX_VIOLATIONS_BADCASE.py similarity index 97% rename from test/pytest/pytestfiles/test_11_COMMON_SYNTAX_VIOLATIONS_BADCASE.py rename to test/pytest/pytestfiles/test_12_COMMON_SYNTAX_VIOLATIONS_BADCASE.py index d9bbfa14..efd2e0d8 100644 --- a/test/pytest/pytestfiles/test_11_COMMON_SYNTAX_VIOLATIONS_BADCASE.py +++ b/test/pytest/pytestfiles/test_12_COMMON_SYNTAX_VIOLATIONS_BADCASE.py @@ -14,11 +14,11 @@ # limitations under the License. # -------------------------------------------------------------------------------------------------------------- # -# test_11_COMMON_SYNTAX_VIOLATIONS_BADCASE.py +# test_12_COMMON_SYNTAX_VIOLATIONS_BADCASE.py # # XC-HWP/ESW3-Queckenstedt # -# 25.10.2024 - 20:31:28 +# 28.10.2024 - 20:15:13 # # -------------------------------------------------------------------------------------------------------------- diff --git a/test/pytest/pytestfiles/test_12_IMPLICIT_CREATION_GOODCASE.py b/test/pytest/pytestfiles/test_13_IMPLICIT_CREATION_GOODCASE.py similarity index 98% rename from test/pytest/pytestfiles/test_12_IMPLICIT_CREATION_GOODCASE.py rename to test/pytest/pytestfiles/test_13_IMPLICIT_CREATION_GOODCASE.py index 10cc388a..eeb952f4 100644 --- a/test/pytest/pytestfiles/test_12_IMPLICIT_CREATION_GOODCASE.py +++ b/test/pytest/pytestfiles/test_13_IMPLICIT_CREATION_GOODCASE.py @@ -14,11 +14,11 @@ # limitations under the License. # -------------------------------------------------------------------------------------------------------------- # -# test_12_IMPLICIT_CREATION_GOODCASE.py +# test_13_IMPLICIT_CREATION_GOODCASE.py # # XC-HWP/ESW3-Queckenstedt # -# 25.10.2024 - 20:31:28 +# 28.10.2024 - 20:15:13 # # -------------------------------------------------------------------------------------------------------------- diff --git a/test/pytest/pytestfiles/test_13_IMPLICIT_CREATION_BADCASE.py b/test/pytest/pytestfiles/test_14_IMPLICIT_CREATION_BADCASE.py similarity index 98% rename from test/pytest/pytestfiles/test_13_IMPLICIT_CREATION_BADCASE.py rename to test/pytest/pytestfiles/test_14_IMPLICIT_CREATION_BADCASE.py index ebea1965..79f20f60 100644 --- a/test/pytest/pytestfiles/test_13_IMPLICIT_CREATION_BADCASE.py +++ b/test/pytest/pytestfiles/test_14_IMPLICIT_CREATION_BADCASE.py @@ -14,11 +14,11 @@ # limitations under the License. # -------------------------------------------------------------------------------------------------------------- # -# test_13_IMPLICIT_CREATION_BADCASE.py +# test_14_IMPLICIT_CREATION_BADCASE.py # # XC-HWP/ESW3-Queckenstedt # -# 25.10.2024 - 20:31:28 +# 28.10.2024 - 20:15:13 # # -------------------------------------------------------------------------------------------------------------- diff --git a/test/pytest/pytestfiles/test_14_CYCLIC_IMPORTS_BADCASE.py b/test/pytest/pytestfiles/test_15_CYCLIC_IMPORTS_BADCASE.py similarity index 97% rename from test/pytest/pytestfiles/test_14_CYCLIC_IMPORTS_BADCASE.py rename to test/pytest/pytestfiles/test_15_CYCLIC_IMPORTS_BADCASE.py index 63ba8d9a..717a3fd4 100644 --- a/test/pytest/pytestfiles/test_14_CYCLIC_IMPORTS_BADCASE.py +++ b/test/pytest/pytestfiles/test_15_CYCLIC_IMPORTS_BADCASE.py @@ -14,11 +14,11 @@ # limitations under the License. # -------------------------------------------------------------------------------------------------------------- # -# test_14_CYCLIC_IMPORTS_BADCASE.py +# test_15_CYCLIC_IMPORTS_BADCASE.py # # XC-HWP/ESW3-Queckenstedt # -# 25.10.2024 - 20:31:28 +# 28.10.2024 - 20:15:13 # # -------------------------------------------------------------------------------------------------------------- diff --git a/test/pytest/pytestfiles/test_15_PATH_FORMATS_GOODCASE.py b/test/pytest/pytestfiles/test_16_PATH_FORMATS_GOODCASE.py similarity index 96% rename from test/pytest/pytestfiles/test_15_PATH_FORMATS_GOODCASE.py rename to test/pytest/pytestfiles/test_16_PATH_FORMATS_GOODCASE.py index 7f72340e..560c2aeb 100644 --- a/test/pytest/pytestfiles/test_15_PATH_FORMATS_GOODCASE.py +++ b/test/pytest/pytestfiles/test_16_PATH_FORMATS_GOODCASE.py @@ -14,11 +14,11 @@ # limitations under the License. # -------------------------------------------------------------------------------------------------------------- # -# test_15_PATH_FORMATS_GOODCASE.py +# test_16_PATH_FORMATS_GOODCASE.py # # XC-HWP/ESW3-Queckenstedt # -# 25.10.2024 - 20:31:28 +# 28.10.2024 - 20:15:13 # # -------------------------------------------------------------------------------------------------------------- diff --git a/test/pytest/pytestfiles/test_16_BLOCKED_SLICING_BADCASE.py b/test/pytest/pytestfiles/test_17_BLOCKED_SLICING_BADCASE.py similarity index 99% rename from test/pytest/pytestfiles/test_16_BLOCKED_SLICING_BADCASE.py rename to test/pytest/pytestfiles/test_17_BLOCKED_SLICING_BADCASE.py index 15ea20ac..435ae11b 100644 --- a/test/pytest/pytestfiles/test_16_BLOCKED_SLICING_BADCASE.py +++ b/test/pytest/pytestfiles/test_17_BLOCKED_SLICING_BADCASE.py @@ -14,11 +14,11 @@ # limitations under the License. # -------------------------------------------------------------------------------------------------------------- # -# test_16_BLOCKED_SLICING_BADCASE.py +# test_17_BLOCKED_SLICING_BADCASE.py # # XC-HWP/ESW3-Queckenstedt # -# 25.10.2024 - 20:31:28 +# 28.10.2024 - 20:15:13 # # -------------------------------------------------------------------------------------------------------------- diff --git a/test/pytest/pytestfiles/test_17_NESTED_LISTS_GOODCASE.py b/test/pytest/pytestfiles/test_18_NESTED_LISTS_GOODCASE.py similarity index 96% rename from test/pytest/pytestfiles/test_17_NESTED_LISTS_GOODCASE.py rename to test/pytest/pytestfiles/test_18_NESTED_LISTS_GOODCASE.py index a57ee943..5d679bf3 100644 --- a/test/pytest/pytestfiles/test_17_NESTED_LISTS_GOODCASE.py +++ b/test/pytest/pytestfiles/test_18_NESTED_LISTS_GOODCASE.py @@ -14,11 +14,11 @@ # limitations under the License. # -------------------------------------------------------------------------------------------------------------- # -# test_17_NESTED_LISTS_GOODCASE.py +# test_18_NESTED_LISTS_GOODCASE.py # # XC-HWP/ESW3-Queckenstedt # -# 25.10.2024 - 20:31:28 +# 28.10.2024 - 20:15:13 # # -------------------------------------------------------------------------------------------------------------- diff --git a/test/pytest/pytestfiles/test_18_STRING_INDICES_GOODCASE.py b/test/pytest/pytestfiles/test_19_STRING_INDICES_GOODCASE.py similarity index 97% rename from test/pytest/pytestfiles/test_18_STRING_INDICES_GOODCASE.py rename to test/pytest/pytestfiles/test_19_STRING_INDICES_GOODCASE.py index 337a3b86..b373d9ce 100644 --- a/test/pytest/pytestfiles/test_18_STRING_INDICES_GOODCASE.py +++ b/test/pytest/pytestfiles/test_19_STRING_INDICES_GOODCASE.py @@ -14,11 +14,11 @@ # limitations under the License. # -------------------------------------------------------------------------------------------------------------- # -# test_18_STRING_INDICES_GOODCASE.py +# test_19_STRING_INDICES_GOODCASE.py # # XC-HWP/ESW3-Queckenstedt # -# 25.10.2024 - 20:31:28 +# 28.10.2024 - 20:15:13 # # -------------------------------------------------------------------------------------------------------------- diff --git a/test/pytest/pytestfiles/test_19_NOT_EXISTING_PARAMETERS_BADCASE.py b/test/pytest/pytestfiles/test_20_NOT_EXISTING_PARAMETERS_BADCASE.py similarity index 99% rename from test/pytest/pytestfiles/test_19_NOT_EXISTING_PARAMETERS_BADCASE.py rename to test/pytest/pytestfiles/test_20_NOT_EXISTING_PARAMETERS_BADCASE.py index eab1e72d..7f1192d2 100644 --- a/test/pytest/pytestfiles/test_19_NOT_EXISTING_PARAMETERS_BADCASE.py +++ b/test/pytest/pytestfiles/test_20_NOT_EXISTING_PARAMETERS_BADCASE.py @@ -14,11 +14,11 @@ # limitations under the License. # -------------------------------------------------------------------------------------------------------------- # -# test_19_NOT_EXISTING_PARAMETERS_BADCASE.py +# test_20_NOT_EXISTING_PARAMETERS_BADCASE.py # # XC-HWP/ESW3-Queckenstedt # -# 25.10.2024 - 20:31:28 +# 28.10.2024 - 20:15:13 # # -------------------------------------------------------------------------------------------------------------- diff --git a/test/pytest/pytestfiles/test_20_LINE_BREAKS_GOODCASE.py b/test/pytest/pytestfiles/test_21_LINE_BREAKS_GOODCASE.py similarity index 96% rename from test/pytest/pytestfiles/test_20_LINE_BREAKS_GOODCASE.py rename to test/pytest/pytestfiles/test_21_LINE_BREAKS_GOODCASE.py index f70070e9..1dc80dcf 100644 --- a/test/pytest/pytestfiles/test_20_LINE_BREAKS_GOODCASE.py +++ b/test/pytest/pytestfiles/test_21_LINE_BREAKS_GOODCASE.py @@ -14,11 +14,11 @@ # limitations under the License. # -------------------------------------------------------------------------------------------------------------- # -# test_20_LINE_BREAKS_GOODCASE.py +# test_21_LINE_BREAKS_GOODCASE.py # # XC-HWP/ESW3-Queckenstedt # -# 25.10.2024 - 20:31:28 +# 28.10.2024 - 20:15:13 # # -------------------------------------------------------------------------------------------------------------- diff --git a/test/pytest/pytestfiles/test_21_SELF_ASSIGNMENTS_GOODCASE.py b/test/pytest/pytestfiles/test_22_SELF_ASSIGNMENTS_GOODCASE.py similarity index 96% rename from test/pytest/pytestfiles/test_21_SELF_ASSIGNMENTS_GOODCASE.py rename to test/pytest/pytestfiles/test_22_SELF_ASSIGNMENTS_GOODCASE.py index 9e9d73d5..c3bb9d90 100644 --- a/test/pytest/pytestfiles/test_21_SELF_ASSIGNMENTS_GOODCASE.py +++ b/test/pytest/pytestfiles/test_22_SELF_ASSIGNMENTS_GOODCASE.py @@ -14,11 +14,11 @@ # limitations under the License. # -------------------------------------------------------------------------------------------------------------- # -# test_21_SELF_ASSIGNMENTS_GOODCASE.py +# test_22_SELF_ASSIGNMENTS_GOODCASE.py # # XC-HWP/ESW3-Queckenstedt # -# 25.10.2024 - 20:31:28 +# 28.10.2024 - 20:15:13 # # -------------------------------------------------------------------------------------------------------------- diff --git a/test/pytest/pytestfiles/test_22_ASSIGNMENTS_BY_REFERENCE_GOODCASE.py b/test/pytest/pytestfiles/test_23_ASSIGNMENTS_BY_REFERENCE_GOODCASE.py similarity index 96% rename from test/pytest/pytestfiles/test_22_ASSIGNMENTS_BY_REFERENCE_GOODCASE.py rename to test/pytest/pytestfiles/test_23_ASSIGNMENTS_BY_REFERENCE_GOODCASE.py index 8f5509fa..471caf70 100644 --- a/test/pytest/pytestfiles/test_22_ASSIGNMENTS_BY_REFERENCE_GOODCASE.py +++ b/test/pytest/pytestfiles/test_23_ASSIGNMENTS_BY_REFERENCE_GOODCASE.py @@ -14,11 +14,11 @@ # limitations under the License. # -------------------------------------------------------------------------------------------------------------- # -# test_22_ASSIGNMENTS_BY_REFERENCE_GOODCASE.py +# test_23_ASSIGNMENTS_BY_REFERENCE_GOODCASE.py # # XC-HWP/ESW3-Queckenstedt # -# 25.10.2024 - 20:31:28 +# 28.10.2024 - 20:15:13 # # -------------------------------------------------------------------------------------------------------------- diff --git a/test/pytest/pytestfiles/test_23_PARAMETER_SCOPE_GOODCASE.py b/test/pytest/pytestfiles/test_24_PARAMETER_SCOPE_GOODCASE.py similarity index 98% rename from test/pytest/pytestfiles/test_23_PARAMETER_SCOPE_GOODCASE.py rename to test/pytest/pytestfiles/test_24_PARAMETER_SCOPE_GOODCASE.py index 1ca0190e..06e8a5c6 100644 --- a/test/pytest/pytestfiles/test_23_PARAMETER_SCOPE_GOODCASE.py +++ b/test/pytest/pytestfiles/test_24_PARAMETER_SCOPE_GOODCASE.py @@ -14,11 +14,11 @@ # limitations under the License. # -------------------------------------------------------------------------------------------------------------- # -# test_23_PARAMETER_SCOPE_GOODCASE.py +# test_24_PARAMETER_SCOPE_GOODCASE.py # # XC-HWP/ESW3-Queckenstedt # -# 25.10.2024 - 20:31:28 +# 28.10.2024 - 20:15:13 # # -------------------------------------------------------------------------------------------------------------- diff --git a/test/pytest/pytestfiles/test_24_PARAMETER_SCOPE_BADCASE.py b/test/pytest/pytestfiles/test_25_PARAMETER_SCOPE_BADCASE.py similarity index 98% rename from test/pytest/pytestfiles/test_24_PARAMETER_SCOPE_BADCASE.py rename to test/pytest/pytestfiles/test_25_PARAMETER_SCOPE_BADCASE.py index d4f8b4c0..180e8d3a 100644 --- a/test/pytest/pytestfiles/test_24_PARAMETER_SCOPE_BADCASE.py +++ b/test/pytest/pytestfiles/test_25_PARAMETER_SCOPE_BADCASE.py @@ -14,11 +14,11 @@ # limitations under the License. # -------------------------------------------------------------------------------------------------------------- # -# test_24_PARAMETER_SCOPE_BADCASE.py +# test_25_PARAMETER_SCOPE_BADCASE.py # # XC-HWP/ESW3-Queckenstedt # -# 25.10.2024 - 20:31:28 +# 28.10.2024 - 20:15:13 # # -------------------------------------------------------------------------------------------------------------- diff --git a/test/testconfig/TestConfig.py b/test/testconfig/TestConfig.py index 59b655e2..c26fb548 100644 --- a/test/testconfig/TestConfig.py +++ b/test/testconfig/TestConfig.py @@ -22,7 +22,7 @@ # # -------------------------------------------------------------------------------------------------------------- # -# 25.10.2024 +# 28.10.2024 # # !!! Temporarily tests are deactivated by the following line commented out: # # # listofdictUsecases.append(dictUsecase) @@ -1707,6 +1707,260 @@ listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_0401" +dictUsecase['DESCRIPTION'] = "JSON file with several parameter names containing: blank, backslash, 4Byte character" +dictUsecase['EXPECTATION'] = "All names are accepted (in definition and in reference)" +dictUsecase['SECTION'] = "NAMING_CONVENTION" +dictUsecase['SUBSECTION'] = "GOODCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0401.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = None +dictUsecase['EXPECTEDRETURN'] = """ +""" +# # # listofdictUsecases.append(dictUsecase) # several issues +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_0450" +dictUsecase['DESCRIPTION'] = "JSON file with several invalid parameter names (1)" +dictUsecase['EXPECTATION'] = "All names are accepted (in definition and in reference)" +dictUsecase['SECTION'] = "NAMING_CONVENTION" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0450.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = """Invalid key name: "%A". Key names have to start with a letter, digit or underscore.""" +dictUsecase['EXPECTEDRETURN'] = None +listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_0451" +dictUsecase['DESCRIPTION'] = "JSON file with several invalid parameter names (2)" +dictUsecase['EXPECTATION'] = "All names are accepted (in definition and in reference)" +dictUsecase['SECTION'] = "NAMING_CONVENTION" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0451.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = """Invalid key name: "%A". Key names have to start with a letter, digit or underscore.""" +dictUsecase['EXPECTEDRETURN'] = None +listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_0452" +dictUsecase['DESCRIPTION'] = "JSON file with several invalid parameter names (3)" +dictUsecase['EXPECTATION'] = "All names are accepted (in definition and in reference)" +dictUsecase['SECTION'] = "NAMING_CONVENTION" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0452.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = """Invalid key name: "%A". Key names have to start with a letter, digit or underscore.""" +dictUsecase['EXPECTEDRETURN'] = None +listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_0453" +dictUsecase['DESCRIPTION'] = "JSON file with several invalid parameter names (4)" +dictUsecase['EXPECTATION'] = "All names are accepted (in definition and in reference)" +dictUsecase['SECTION'] = "NAMING_CONVENTION" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0453.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = """Invalid key name: "par%am".""" # error message to be extended +dictUsecase['EXPECTEDRETURN'] = None +listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_0454" +dictUsecase['DESCRIPTION'] = "JSON file with several invalid parameter names (5)" +dictUsecase['EXPECTATION'] = "All names are accepted (in definition and in reference)" +dictUsecase['SECTION'] = "NAMING_CONVENTION" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0454.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = """Invalid key name: "par%am".""" # error message to be extended +dictUsecase['EXPECTEDRETURN'] = None +listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_0455" +dictUsecase['DESCRIPTION'] = "JSON file with several invalid parameter names (6)" +dictUsecase['EXPECTATION'] = "All names are accepted (in definition and in reference)" +dictUsecase['SECTION'] = "NAMING_CONVENTION" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0455.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = """Invalid key name: "par%am".""" # error message to be extended +dictUsecase['EXPECTEDRETURN'] = None +listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_0456" +dictUsecase['DESCRIPTION'] = "JSON file with several invalid parameter names (7)" +dictUsecase['EXPECTATION'] = "All names are accepted (in definition and in reference)" +dictUsecase['SECTION'] = "NAMING_CONVENTION" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0456.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = None # TODO +dictUsecase['EXPECTEDRETURN'] = None +# # # listofdictUsecases.append(dictUsecase) # blanks inside name not allowed but currently accepted +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_0457" +dictUsecase['DESCRIPTION'] = "JSON file with several invalid parameter names (8)" +dictUsecase['EXPECTATION'] = "All names are accepted (in definition and in reference)" +dictUsecase['SECTION'] = "NAMING_CONVENTION" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0457.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = None # TODO +dictUsecase['EXPECTEDRETURN'] = None +# # # listofdictUsecases.append(dictUsecase) # blanks inside name not allowed but currently accepted +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_0458" +dictUsecase['DESCRIPTION'] = "JSON file with several invalid parameter names (9)" +dictUsecase['EXPECTATION'] = "All names are accepted (in definition and in reference)" +dictUsecase['SECTION'] = "NAMING_CONVENTION" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0458.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = None # TODO +dictUsecase['EXPECTEDRETURN'] = None +# # # listofdictUsecases.append(dictUsecase) # blanks inside name not allowed but currently accepted +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_0459" +dictUsecase['DESCRIPTION'] = "JSON file with several invalid parameter names (10)" +dictUsecase['EXPECTATION'] = "All names are accepted (in definition and in reference)" +dictUsecase['SECTION'] = "NAMING_CONVENTION" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0459.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = None # TODO +dictUsecase['EXPECTEDRETURN'] = None +# # # listofdictUsecases.append(dictUsecase) # empty name not allowed but currently accepted +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_0460" +dictUsecase['DESCRIPTION'] = "JSON file with several invalid parameter names (11)" +dictUsecase['EXPECTATION'] = "All names are accepted (in definition and in reference)" +dictUsecase['SECTION'] = "NAMING_CONVENTION" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0460.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = None # TODO +dictUsecase['EXPECTEDRETURN'] = None +# # # listofdictUsecases.append(dictUsecase) # empty name not allowed but currently accepted +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_0461" +dictUsecase['DESCRIPTION'] = "JSON file with several invalid parameter names (12)" +dictUsecase['EXPECTATION'] = "All names are accepted (in definition and in reference)" +dictUsecase['SECTION'] = "NAMING_CONVENTION" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0461.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = None # TODO +dictUsecase['EXPECTEDRETURN'] = None +# # # listofdictUsecases.append(dictUsecase) # empty name not allowed but currently accepted +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_0462" +dictUsecase['DESCRIPTION'] = "JSON file with several invalid parameter names (13)" +dictUsecase['EXPECTATION'] = "All names are accepted (in definition and in reference)" +dictUsecase['SECTION'] = "NAMING_CONVENTION" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0462.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = None # TODO +dictUsecase['EXPECTEDRETURN'] = None +# # # listofdictUsecases.append(dictUsecase) # name contains blanks only, waiting for final error message +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_0463" +dictUsecase['DESCRIPTION'] = "JSON file with several invalid parameter names (14)" +dictUsecase['EXPECTATION'] = "All names are accepted (in definition and in reference)" +dictUsecase['SECTION'] = "NAMING_CONVENTION" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0463.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = None # TODO +dictUsecase['EXPECTEDRETURN'] = None +# # # listofdictUsecases.append(dictUsecase) # name contains blanks only, waiting for final error message +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_0464" +dictUsecase['DESCRIPTION'] = "JSON file with several invalid parameter names (15)" +dictUsecase['EXPECTATION'] = "All names are accepted (in definition and in reference)" +dictUsecase['SECTION'] = "NAMING_CONVENTION" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0464.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = None # TODO +dictUsecase['EXPECTEDRETURN'] = None +# # # listofdictUsecases.append(dictUsecase) # name contains blanks only, waiting for final error message +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_0465" +dictUsecase['DESCRIPTION'] = "JSON file with several invalid parameter names (16)" +dictUsecase['EXPECTATION'] = "All names are accepted (in definition and in reference)" +dictUsecase['SECTION'] = "NAMING_CONVENTION" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0465.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = None # TODO +dictUsecase['EXPECTEDRETURN'] = None +# # # listofdictUsecases.append(dictUsecase) # invalid name accepted and usage causes: 'local variable 'tmpList03' referenced before assignment'! +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_0466" +dictUsecase['DESCRIPTION'] = "JSON file with several invalid parameter names (17)" +dictUsecase['EXPECTATION'] = "All names are accepted (in definition and in reference)" +dictUsecase['SECTION'] = "NAMING_CONVENTION" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0466.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = None # TODO +dictUsecase['EXPECTEDRETURN'] = None +# # # listofdictUsecases.append(dictUsecase) # invalid name accepted and usage causes: 'local variable 'tmpList03' referenced before assignment'! +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- diff --git a/test/testfiles/jpp-test_config_0401.jsonp b/test/testfiles/jpp-test_config_0401.jsonp new file mode 100644 index 00000000..bdd29d2d --- /dev/null +++ b/test/testfiles/jpp-test_config_0401.jsonp @@ -0,0 +1,54 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + // -- blank, backslash, 4Byte character + " param " : 1, + "p21" : ${param}, + // + "B" : {" param " : 1}, + "p22" : ${B}['param'], + // + "C" : [1, {" param " : 1}, 2], + "p23" : ${C}[1]['param'], + // + "par\\am" : 1, + "p24" : ${par\\am}, + // + "D" : {"par\\am" : 1}, + "p25" : ${D}['par\\am'], + // + "E" : [1, {"par\\am" : 1}, 2], + "p26" : ${E}[1]['par\\am'], + // + "path\\to\\file" : "C:\\Users\\Example\\file.txt" + // + "par𠼭am" : 1, + "p27" : ${par𠼭am}, + // + "F" : {"par𠼭am" : 1}, + "p28" : ${F}['par𠼭am'], + // + "G" : [1, {"par𠼭am" : 1}, 2], + "p29" : ${G}[1]['par𠼭am'], + // + "𠼭param" : 1, + "p30" : ${𠼭param}, + // + "H" : {"𠼭param" : 1}, + "p31" : ${H}['𠼭param'], + // + "K" : [1, {"𠼭param" : 1}, 2], + "p32" : ${K}[1]['𠼭param'], +} diff --git a/test/testfiles/jpp-test_config_0450.jsonp b/test/testfiles/jpp-test_config_0450.jsonp new file mode 100644 index 00000000..37d70f04 --- /dev/null +++ b/test/testfiles/jpp-test_config_0450.jsonp @@ -0,0 +1,18 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "%A" : 1, + "p01" : ${%A} +} diff --git a/test/testfiles/jpp-test_config_0451.jsonp b/test/testfiles/jpp-test_config_0451.jsonp new file mode 100644 index 00000000..85767bb5 --- /dev/null +++ b/test/testfiles/jpp-test_config_0451.jsonp @@ -0,0 +1,18 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "B" : {"%A" : 1}, + "p02" : ${B}['%A'] +} diff --git a/test/testfiles/jpp-test_config_0452.jsonp b/test/testfiles/jpp-test_config_0452.jsonp new file mode 100644 index 00000000..20d89afb --- /dev/null +++ b/test/testfiles/jpp-test_config_0452.jsonp @@ -0,0 +1,18 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "C" : [1, {"%A" : 1}, 2], + "p03" : ${C}[1]['%A'] +} diff --git a/test/testfiles/jpp-test_config_0453.jsonp b/test/testfiles/jpp-test_config_0453.jsonp new file mode 100644 index 00000000..241ee64b --- /dev/null +++ b/test/testfiles/jpp-test_config_0453.jsonp @@ -0,0 +1,18 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "par%am" : 1, + "p04" : ${par%am} +} diff --git a/test/testfiles/jpp-test_config_0454.jsonp b/test/testfiles/jpp-test_config_0454.jsonp new file mode 100644 index 00000000..10c0c39f --- /dev/null +++ b/test/testfiles/jpp-test_config_0454.jsonp @@ -0,0 +1,18 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "D" : {"par%am" : 1}, + "p05" : ${D}['par%am'] +} diff --git a/test/testfiles/jpp-test_config_0455.jsonp b/test/testfiles/jpp-test_config_0455.jsonp new file mode 100644 index 00000000..e7fa3774 --- /dev/null +++ b/test/testfiles/jpp-test_config_0455.jsonp @@ -0,0 +1,18 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "E" : [1, {"par%am" : 1}, 2], + "p06" : ${E}[1]['par%am'] +} diff --git a/test/testfiles/jpp-test_config_0456.jsonp b/test/testfiles/jpp-test_config_0456.jsonp new file mode 100644 index 00000000..153d2f9e --- /dev/null +++ b/test/testfiles/jpp-test_config_0456.jsonp @@ -0,0 +1,18 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "par am" : 1, + "p04" : ${par am} +} diff --git a/test/testfiles/jpp-test_config_0457.jsonp b/test/testfiles/jpp-test_config_0457.jsonp new file mode 100644 index 00000000..9b607b56 --- /dev/null +++ b/test/testfiles/jpp-test_config_0457.jsonp @@ -0,0 +1,18 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "F" : {"par am" : 1}, + "p05" : ${F}['par am'] +} diff --git a/test/testfiles/jpp-test_config_0458.jsonp b/test/testfiles/jpp-test_config_0458.jsonp new file mode 100644 index 00000000..74413ee6 --- /dev/null +++ b/test/testfiles/jpp-test_config_0458.jsonp @@ -0,0 +1,18 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "G" : [1, {"par am" : 1}, 2], + "p06" : ${G}[1]['par am'] +} diff --git a/test/testfiles/jpp-test_config_0459.jsonp b/test/testfiles/jpp-test_config_0459.jsonp new file mode 100644 index 00000000..d4b69c6e --- /dev/null +++ b/test/testfiles/jpp-test_config_0459.jsonp @@ -0,0 +1,17 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "" : 1 +} diff --git a/test/testfiles/jpp-test_config_0460.jsonp b/test/testfiles/jpp-test_config_0460.jsonp new file mode 100644 index 00000000..8196a871 --- /dev/null +++ b/test/testfiles/jpp-test_config_0460.jsonp @@ -0,0 +1,17 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "B" : {"" : 1} +} diff --git a/test/testfiles/jpp-test_config_0461.jsonp b/test/testfiles/jpp-test_config_0461.jsonp new file mode 100644 index 00000000..3aad0d87 --- /dev/null +++ b/test/testfiles/jpp-test_config_0461.jsonp @@ -0,0 +1,17 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "C" : [1, {"" : 1}, 2] +} diff --git a/test/testfiles/jpp-test_config_0462.jsonp b/test/testfiles/jpp-test_config_0462.jsonp new file mode 100644 index 00000000..1a9f2d68 --- /dev/null +++ b/test/testfiles/jpp-test_config_0462.jsonp @@ -0,0 +1,17 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + " " : 1 +} diff --git a/test/testfiles/jpp-test_config_0463.jsonp b/test/testfiles/jpp-test_config_0463.jsonp new file mode 100644 index 00000000..fc26b989 --- /dev/null +++ b/test/testfiles/jpp-test_config_0463.jsonp @@ -0,0 +1,17 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "B" : {" " : 1} +} diff --git a/test/testfiles/jpp-test_config_0464.jsonp b/test/testfiles/jpp-test_config_0464.jsonp new file mode 100644 index 00000000..155566fa --- /dev/null +++ b/test/testfiles/jpp-test_config_0464.jsonp @@ -0,0 +1,17 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "C" : [1, {" " : 1}, 2] +} diff --git a/test/testfiles/jpp-test_config_0465.jsonp b/test/testfiles/jpp-test_config_0465.jsonp new file mode 100644 index 00000000..36a1bc93 --- /dev/null +++ b/test/testfiles/jpp-test_config_0465.jsonp @@ -0,0 +1,18 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "$A:" : 1, + "p01" : ${$A:} +} diff --git a/test/testfiles/jpp-test_config_0466.jsonp b/test/testfiles/jpp-test_config_0466.jsonp new file mode 100644 index 00000000..98292803 --- /dev/null +++ b/test/testfiles/jpp-test_config_0466.jsonp @@ -0,0 +1,18 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + ":::" : 1, + "p01" : ${:::} +} diff --git a/test/testtools/GenSnippetsJPP.py b/test/testtools/GenSnippetsJPP.py index 5cad1131..b52644df 100644 --- a/test/testtools/GenSnippetsJPP.py +++ b/test/testtools/GenSnippetsJPP.py @@ -22,8 +22,8 @@ # # ************************************************************************************************************** # -VERSION = "0.28.0" -VERSION_DATE = "18.04.2024" +VERSION = "0.30.0" +VERSION_DATE = "28.10.2024" # # ************************************************************************************************************** @@ -432,8 +432,15 @@ def __ExecuteJPPSnippets(self, sHeadline="UNKNOWN", listCodeSnippets=[]): oJPPJSONFILE.Write(f"// created at {NOW}") oJPPJSONFILE.Write(sCodeSnippet) del oJPPJSONFILE - # execute temporary JSON file - dictReturned, sException, bSuccess, sResult = self.__ExecuteJPPFile(JPPJSONFILE) + + # -------------------------------------------------------------------------------------------------------------- + # === (alternative 1) execute temporary JSON file + # dictReturned, sException, bSuccess, sResult = self.__ExecuteJPPFile(JPPJSONFILE) + # + # === (alternative 2) execute temporary JSON string + dictReturned, sException, bSuccess, sResult = self.__ExecuteJPPString(sCodeSnippet) + # -------------------------------------------------------------------------------------------------------------- + # PrettyPrint(bSuccess, sPrefix="(bSuccess)") # PrettyPrint(sResult, sPrefix="(sResult)") # PrettyPrint(dictReturned, sPrefix="(dictReturned)") @@ -509,6 +516,42 @@ def __ExecuteJPPFile(self, sJSONFile=None): # eof def __ExecuteJPPFile(self, sJSONFile=None): + def __ExecuteJPPString(self, sJSONString=None): + + sMethod = "__ExecuteJPPString" + + bSuccess = None + sResult = "UNKNOWN" + dictReturned = None + sException = None + + if sJSONString is None: + sResult = CString.FormatResult(sMethod, None, "sJSONString is None") + return dictReturned, sException, bSuccess, sResult + + # use either own or common JsonPreprocessor object + oJsonPreprocessor = None + if self.__oJsonPreprocessor is None: + oJsonPreprocessor = CJsonPreprocessor() + else: + oJsonPreprocessor = self.__oJsonPreprocessor + + # execute JsonPreprocessor + dictReturned = None + sException = None + try: + dictReturned = oJsonPreprocessor.jsonLoads(sJSONString) + except Exception as reason: + sException = f"'{reason}'" + + del oJsonPreprocessor + + bSuccess = True + sResult = "done" + return dictReturned, sException, bSuccess, sResult + + # eof def __ExecuteJPPString(self, sJSONFile=None): + # -------------------------------------------------------------------------------------------------------------- # eof class CExecutor(): @@ -2348,6 +2391,819 @@ def GetSeveralParticularSnippets(self): } """) +# -------------------------------------------------------------------------------------------------------------- +# 28.10.2024 +# code snippets taken from latest issues + + listCodeSnippets.append("""{ + "keyP" : "A", + "newparam" : ${keyP}[${keyP}] +} +""") + + listCodeSnippets.append("""{ + "dictP" : {"A" : 1, "B" : 2}, + "newparam" : ${dictP}['${dictP}'] +} +""") + + listCodeSnippets.append("""{ + "dictP1" : {"A" : 1 , "B" : 2}, + "dictP2" : {"1" : "C", "2" : "D"}, + "newparam" : ${dictP2}['${dictP1}['A']'] +} +""") + + listCodeSnippets.append("""{ + "newparam" : ${listP}['${listP}'] +} +""") + + listCodeSnippets.append("""{ + "indexP" : 0, + "newparam" : ${indexP}[${indexP}] +} +""") + + listCodeSnippets.append("""{ + "listparam" : ["A","B","C"], + ${{listparam}[0] : "value"} +} +""") + + listCodeSnippets.append("""{ + "listparam1" : ["A", "B"], + "listparam2" : [1, 2], + ${listparam1}[${listparam2}] : 3 +} +""") + + listCodeSnippets.append("""{ + "listparam1" : ["A", "B"], + "listparam2" : [1, 2], + "param" : ${listparam1}[${listparam2}] +} +""") + + listCodeSnippets.append("""{ + "params" : {"A" : []} +} +""") + + listCodeSnippets.append("""{ + "params" : {"A" : ["B", []]} +} +""") + + listCodeSnippets.append("""{ + "listparam" : ["A", "B"], + "newparam" : ${listparam}[20] +} +""") + + listCodeSnippets.append("""{ + "dictparam" : {"A" : 1, "B" : 2}, + "newparam" : ${dictparam}['AB'] +} +""") + +# -------------------------------------------------------------------------------------------------------------- + +# -- NAMING_CONVENTION + + # 0400 + listCodeSnippets.append("""{ + "A" : 1, + "check01" : ${A}, + // Bug: https://github.com/test-fullautomation/python-jsonpreprocessor/issues/357#issuecomment-2435677836 + // 'The parameter '${0}' is not available!'! + "0" : 2, + "check02" : ${0}, + "_" : 3, + "check03" : ${_}, + // + "Ax" : 4, + "check04" : ${Ax}, + "0x" : 5, + "check05" : ${0x}, + "_x" : 6, + "check06" : ${_x}, + // + "param+1" : 7, + "check07" : ${param+1}, + "param-2" : 8, + "check08" : ${param-2}, + "param*3" : 9, + "check09" : ${param*3}, + "param/4" : 10, + // bug: https://github.com/test-fullautomation/python-jsonpreprocessor/issues/356#issuecomment-2435708593 + // Expecting ',' delimiter + "check10" : ${param/4}, + // + "p01" : {"A" : 7}, + "check11" : ${p01}['A'], + "p02" : {"0" : 8}, + "check12" : ${p02}['0'], + "p03" : {"_" : 9}, + "check13" : ${p03}['_'], + // + "p04" : {"Ax" : 10}, + "check14" : ${p04}['Ax'], + "p05" : {"0x" : 11}, + "check15" : ${p05}['0x'], + "p06" : {"_x" : 12}, + "check16" : ${p06}['_x'], + // + "p07" : {"param+1" : 13}, + "check17" : ${p07}['param+1'], + "p08" : {"param-2" : 14}, + "check18" : ${p08}['param-2'], + "p09" : {"param*3" : 15}, + "check19" : ${p09}['param*3'], + "p10" : {"param/4" : 16}, + // Expecting ',' delimiter + "check20" : ${p10}['param/4'], + // + "p11" : [1, {"A" : 17}, 2], + "check21" : ${p11}[1]['A'], + "p12" : [1, {"0" : 18}, 2], + "check22" : ${p12}[1]['0'], + "p13" : [1, {"_" : 19}, 2], + "check23" : ${p13}[1]['_'], + // + "p14" : [1, {"Ax" : 20}, 2], + "check24" : ${p14}[1]['Ax'], + "p15" : [1, {"0x" : 21}, 2], + "check25" : ${p15}[1]['0x'], + "p16" : [1, {"_x" : 22}, 2], + "check26" : ${p16}[1]['_x'], + // + "p17" : [1, {"param+1" : 23}, 2], + "check27" : ${p17}[1]['param+1'], + "p18" : [1, {"param-2" : 24}, 2], + "check28" : ${p18}[1]['param-2'], + "p19" : [1, {"param*3" : 25}, 2], + "check29" : ${p19}[1]['param*3'], + "p20" : [1, {"param/4" : 26}, 2] + // Expecting ',' delimiter + "check30" : ${p20}[1]['param/4'] +} +""") + + # -- blank, backslash, chinese character + + listCodeSnippets.append("""{ + " param " : 1, + "p21" : ${param} +} +""") + + listCodeSnippets.append("""{ + "B" : {" param " : 1}, + "p22" : ${B}['param'] +} +""") + + listCodeSnippets.append("""{ + "C" : [1, {" param " : 1}, 2], + "p23" : ${C}[1]['param'] +} +""") + + listCodeSnippets.append("""{ + "par\\am" : 1, + "p24" : ${par\\am} +} +""") + + listCodeSnippets.append("""{ + "D" : {"par\\am" : 1}, + "p25" : ${D}['par\\am'] +} +""") + + listCodeSnippets.append("""{ + "E" : [1, {"par\\am" : 1}, 2], + "p26" : ${E}[1]['par\\am'] +} +""") + + listCodeSnippets.append("""{ + "path_to_file" : "C:\\Users\\Example\\file.txt" +} +""") + + listCodeSnippets.append("""{ + "path\\to\\file" : "root_path" +} +""") + + listCodeSnippets.append("""{ + "path\\to\\file" : "C:\\Users\\Example\\file.txt" +} +""") + + listCodeSnippets.append("""{ + "par𠼭am" : 1, + "p27" : ${par𠼭am} +} +""") + + listCodeSnippets.append("""{ + "F" : {"par𠼭am" : 1}, + "p28" : ${F}['par𠼭am'] +} +""") + + listCodeSnippets.append("""{ + "G" : [1, {"par𠼭am" : 1}, 2], + "p29" : ${G}[1]['par𠼭am'] +} +""") + + listCodeSnippets.append("""{ + "𠼭param" : 1, + "p30" : ${𠼭param} +} +""") + + listCodeSnippets.append("""{ + "H" : {"𠼭param" : 1}, + "p31" : ${H}['𠼭param'] +} +""") + + listCodeSnippets.append("""{ + "K" : [1, {"𠼭param" : 1}, 2], + "p32" : ${K}[1]['𠼭param'] +} +""") + + + listCodeSnippets.append("""{ + "%A" : 1, + "p01" : ${%A} +} +""") + + listCodeSnippets.append("""{ + "B" : {"%A" : 1}, + "p02" : ${B}['%A'] +} +""") + + listCodeSnippets.append("""{ + "C" : [1, {"%A" : 1}, 2], + "p03" : ${C}[1]['%A'] +} +""") + + listCodeSnippets.append("""{ + "par%am" : 1, + "p04" : ${par%am} +} +""") + + listCodeSnippets.append("""{ + "D" : {"par%am" : 1}, + "p05" : ${D}['par%am'] +} +""") + + listCodeSnippets.append("""{ + "E" : [1, {"par%am" : 1}, 2], + "p06" : ${E}[1]['par%am'] +} +""") + + listCodeSnippets.append("""{ + "par am" : 1, + "p04" : ${par am} +} +""") + + listCodeSnippets.append("""{ + "F" : {"par am" : 1}, + "p05" : ${F}['par am'] +} +""") + + listCodeSnippets.append("""{ + "G" : [1, {"par am" : 1}, 2], + "p06" : ${G}[1]['par am'] +} +""") + + listCodeSnippets.append("""{ + "" : 1 +} +""") + + listCodeSnippets.append("""{ + "B" : {"" : 1} +} +""") + + listCodeSnippets.append("""{ + "C" : [1, {"" : 1}, 2] +} +""") + + listCodeSnippets.append("""{ + " " : 1 +} +""") + + listCodeSnippets.append("""{ + "B" : {" " : 1} +} +""") + + listCodeSnippets.append("""{ + "C" : [1, {" " : 1}, 2] +} +""") + + listCodeSnippets.append("""{ + "$A:" : 1, + "p01" : ${$A:} +} +""") + + listCodeSnippets.append("""{ + ":::" : 1, + "p01" : ${:::} +} +""") + + + # listCodeSnippets.append("""{ +# } +# """) + +# -------------------------------------------------------------------------------------------------------------- + +# - parameter scope + + listCodeSnippets.append("""{ + "param" : 1, + "params" : {"001" : { + "param" : 2, + ${params}['001']['param'] : 3 + } + } +} +""") + + listCodeSnippets.append("""{ + "param" : 1, + "params" : {"001" : { + "param" : 2, + ${params.001.param} : 3 + } + } +} +""") + + listCodeSnippets.append("""{ + "param" : 1, + "params" : {"001" : { + "param" : 2 + } + }, + ${params}['001']['param'] : 3 +} +""") + + listCodeSnippets.append("""{ + "param" : 1, + "params" : {"001" : { + "param" : 2 + } + }, + ${params.001.param} : 3 +} +""") + + listCodeSnippets.append("""{ + // https://github.com/test-fullautomation/python-jsonpreprocessor/issues/349 + "C" : 1, + "params" : [ + 2, + {"A" : 3, + "B" : [ + { + "C" : 4, + ${params}[1]['B'][0]['C'] : 10, + "D" : 5 + }, + 6 + ] + }, + 7 + ] +} +""") + + listCodeSnippets.append("""{ + // https://github.com/test-fullautomation/python-jsonpreprocessor/issues/349 + // 'A key with name '${params.1.B.0.C}' does not exist at this position. Use the ' : ' syntax to create a new key.'! + + "C" : 1, + "params" : [ + 2, + {"A" : 3, + "B" : [ + { + "C" : 4, + ${params.1.B.0.C} : 10, + "D" : 5 + }, + 6 + ] + }, + 7 + ] +} +""") + + listCodeSnippets.append("""{ + // https://github.com/test-fullautomation/python-jsonpreprocessor/issues/349 + // {C} [INT] : 10 + + "C" : 1, + "params" : [ + 2, + {"A" : 3, + "B" : [ + { + "C" : 4, + "D" : 5 + }, + 6 + ] + }, + 7 + ], + ${params}[1]['B'][0]['C'] : 10 +} +""") + + listCodeSnippets.append("""{ + "C" : 1, + "params" : [ + 2, + {"A" : 3, + "B" : [ + { + "C" : 4, + "D" : 5 + }, + 6 + ] + }, + 7 + ], + ${params.1.B.0.C} : 10 +} +""") + + listCodeSnippets.append("""{ + ${param} : 1 +} +""") + + listCodeSnippets.append("""{ + "param" : 1, + "params" : {"001" : { + ${param} : 2 + } + } +} +""") + + listCodeSnippets.append("""{ + "param" : 1, + "params" : {"001" : { + "param" : 2, + ${param} : 3 + } + } +} +""") + + listCodeSnippets.append("""{ + "params" : {"001" : { + ${params}['001'] : 1 + } + } +} +""") + + listCodeSnippets.append("""{ + "params" : {"001" : { + ${params.001} : 1 + } + } +} +""") + + listCodeSnippets.append("""{ + // https://github.com/test-fullautomation/python-jsonpreprocessor/issues/349 + // invalid output + "C" : 1, + "params" : [ + 2, + {"A" : 3, + "B" : [ + { + "C" : 4, + ${C} : 10, + "D" : 5 + }, + 6 + ] + }, + 7 + ] +} +""") + + listCodeSnippets.append("""{ + "C" : 1, + "params" : [ + 2, + {"A" : 3, + "B" : [ + { + ${C} : 10, + "D" : 5 + }, + 6 + ] + }, + 7 + ] +} +""") + + listCodeSnippets.append("""{ + "C" : 1, + "params" : [ + 2, + {"A" : 3, + "B" : [ + { + ${params}[1]['B'][0]['C'] : 10, + "D" : 5 + }, + 6 + ] + }, + 7 + ] +} +""") + + listCodeSnippets.append("""{ + "C" : 1, + "params" : [ + 2, + {"A" : 3, + "B" : [ + { + ${params.1.B.0.C} : 10, + "D" : 5 + }, + 6 + ] + }, + 7 + ] +} +""") + +# -------------------------------------------------------------------------------------------------------------- + +# -- BLOCKED_DATA_TYPES + + listCodeSnippets.append("""{ + "testlist" : [1,2,3], + "param" : "${testlist}" +} +""") + + listCodeSnippets.append("""{ + "testlist" : [1,2,3], + "param" : "A_${testlist}_B" +} +""") + + listCodeSnippets.append("""{ + "testdict" : {"A" : 1, "B" : 2}, + "param" : "${testdict}" +} +""") + + listCodeSnippets.append("""{ + "testdict" : {"A" : 1, "B" : 2}, + "param" : "A_${testdict}_B" +} +""") + + listCodeSnippets.append("""{ + "testlist" : [1,2,3], + "testdict" : {"A" : 1, "B" : 2}, + "param" : "A_${testlist}_${testdict}_B" +} +""") + + listCodeSnippets.append("""{ + "testdict" : {"A" : 1, "B" : 2}, + "param" : [1,"${testdict}",3] +} +""") + + listCodeSnippets.append("""{ + "testlist" : [1,2,3], + "param" : {"A" : 1, "B" : "${testlist}"} +} +""") + + listCodeSnippets.append("""{ + "testlist" : [1,2,3], + "param" : {"A" : [{"A" : 1, "B" : 2}, {"C" : 3, "D" : [1,2,"${testlist}",3]}], "E" : 5} +} +""") + + listCodeSnippets.append("""{ + "testdict" : {"A" : 1, "B" : 2}, + "param" : {"A" : [{"A" : 1, "B" : 2}, {"C" : 3, "D" : [1,2,"${testdict}",3]}], "E" : 5} +} +""") + + # -- blocked dynamic key names + + listCodeSnippets.append("""{ + "param1" : "A", + "${param1}" : "B" +} +""") + + listCodeSnippets.append("""{ + "param1" : "A", + "A.${param1}.B" : "B" +} +""") + + listCodeSnippets.append("""{ + "testlist" : [1,2,3], + "${testlist}" : "B" +} +""") + + listCodeSnippets.append("""{ + "testdict" : {"A" : 1, "B" : 2}, + "A.${testdict}.B" : "B" +} +""") + + listCodeSnippets.append("""{ + "param1" : "A", + "param1" : {"A" : 1, "${param1}" : 2} +} +""") + + listCodeSnippets.append("""{ + "param1" : "A", + "param1" : {"A" : 1, "A.${param1}.B" : 2} +} +""") + + listCodeSnippets.append("""{ + "testlist" : [1,2,3], + "param1" : {"A" : 1, "${testlist}" : 2} +} +""") + + listCodeSnippets.append("""{ + "testdict" : {"A" : 1, "B" : 2}, + "param1" : {"A" : 1, "A.${testdict}.B" : 2} +} +""") + + listCodeSnippets.append("""{ + "param" : "X", + "testdict" : {"A" : 1, "B" : 2}, + ${testdict}['${param}'] : 3 +} +""") + + listCodeSnippets.append("""{ + "testdict" : {"A" : 1, "B" : 2, "X" : 3}, + "param" : "X", + ${testdict}['${param}'] : 4 +} +""") + + listCodeSnippets.append("""{ + "param" : "X", + "testdict" : {"A" : 1, "B" : 2}, + ${testdict}[${param}] : 3 +} +""") + + listCodeSnippets.append("""{ + "testdict" : {"A" : 1, "B" : 2, "X" : 3}, + "param" : "X", + ${testdict}[${param}] : 4 +} +""") + + listCodeSnippets.append("""{ + "param" : "X", + "testdict" : {"A" : 1, "B" : 2}, + ${testdict.${param}} : 3 +} +""") + + listCodeSnippets.append("""{ + "testdict" : {"A" : 1, "B" : 2, "X" : 3}, + "param" : "X", + ${testdict.${param}} : 4 +} +""") + +# -------------------------------------------------------------------------------------------------------------- + + listCodeSnippets.append("""{ + // implicit creation in ascending dotdict syntax: + ${testdict1.subKey1} : {"subKey2" : {"subKey3" : {"subKey4" : 1}}}, + ${testdict1.subKey1.subKey2} : {"subKey3" : {"subKey4" : 2}}, + ${testdict1.subKey1.subKey2.subKey3} : {"subKey4" : 3}, + ${testdict1.subKey1.subKey2.subKey3.subKey4} : 4, + // + // implicit creation in descending dotdict syntax: + ${testdict2.subKey1.subKey2.subKey3.subKey4} : 5, + ${testdict2.subKey1.subKey2.subKey3} : {"subKey4" : 6}, + ${testdict2.subKey1.subKey2} : {"subKey3" : {"subKey4" : 7}}, + ${testdict2.subKey1} : {"subKey2" : {"subKey3" : {"subKey4" : 8}}}, + // + // cross check: + "testdict3" : {"subKey1" : {"subKey2" : {"subKey3" : {"subKey4" : 30}}}}, + "testdict4" : {"subKey1" : {"subKey2" : {"subKey3" : {"subKey4" : 40}}}} +} +""") + +# -------------------------------------------------------------------------------------------------------------- + + # -- some special cases + + listCodeSnippets.append("""{ + "params" : {"001" : {"param" : 1}}, + ${params.001.param} : 2 +} +""") + + listCodeSnippets.append("""{ + ${params}['001']['param1'] : 1, + ${params.1.param2} : 2, + ${params.a001.param3} : 3 +} +""") + + listCodeSnippets.append("""{ + ${params.001.param} : 2 +} +""") + + listCodeSnippets.append("""{ + "param1" : "A", + "testdict" : {"A" : 1, "B" : 2}, + ${testdict}["${param1}"] : 3 +} +""") + + + listCodeSnippets.append("""{ + "A" : [1, 2], + "A" : [3, 4] +} +""") + + listCodeSnippets.append("""{ + "B" : {"param1" : 1}, + "B" : {"param2" : 1} +} +""") + + listCodeSnippets.append("""{ + // within key names slicing doesn't make sense + "A" : {"$B:" : 1}, + "p02" : ${A}['$B:'] +} +""") + # listCodeSnippets.append("""{ # } @@ -3074,8 +3930,8 @@ def GetNamingConventions(self): sDataStructure1 = """ "param*01*1" : "value", "param2" : "val*02*ue", - "${param2}" : 1, - "dictParam" : {"key*03*A" : 2, "keyB" : {"key*04*C" : 3}}""" + "dictParam" : {"key*03*A" : 2, "keyB" : {"key*04*C" : 3}}, + "listParam" : [1, {"key*05*D" : 4, "keyE" : {"key*06*F" : 5}}, 2]""" sCodeSnippetPattern = """{ ####DATASTRUCTURE#### @@ -3087,9 +3943,9 @@ def GetNamingConventions(self): # expression and placeholder per iteration. All remaining placeholders in current iteration are replaced by elements # from a list of filler expressions (simple letters) that are only used to complete the code snippet, but are not in focus. - listExpressions = ["-", "+", "*", "|", "/", "$", "%", "#", "\\", "\\\\"] + listExpressions = ["+", "-", "*", "/" , "|", "$", "%", "#", "\\", "\\\\", "𠼭", "€", "ß", "{", "}", "[", "]", "'"] - listPlaceholders = ["*01*", "*02*", "*03*", "*04*"] + listPlaceholders = ["*01*", "*02*", "*03*", "*04*", "*05*", "*06*"] listPositions = listPlaceholders[:] # to support a nested iteration of the same list; better readibility of code because of different names