diff --git a/test/JPP_TestUsecases.csv b/test/JPP_TestUsecases.csv index 25f68d66..5bf2f164 100644 --- a/test/JPP_TestUsecases.csv +++ b/test/JPP_TestUsecases.csv @@ -27,7 +27,9 @@ JPP_0256|PARAMETER_SUBSTITUTION|BADCASE|JSON file with nested parameter / key pa JPP_0257|PARAMETER_SUBSTITUTION|BADCASE|JSON file with nested parameter / key parameter substitution in parameter name / dotdict notation / milestone number not existing JPP_0258|PARAMETER_SUBSTITUTION|BADCASE|JSON file with nested parameter / key parameter substitution in parameter value / standard notation / variant number not existing JPP_0259|PARAMETER_SUBSTITUTION|BADCASE|JSON file with nested parameter / key parameter substitution in parameter value / dotdict notation / milestone number not existing +JPP_0260|PARAMETER_SUBSTITUTION|BADCASE|JSON file with list parameter substitution in parameter name (composite data types not allowed in names) / (1) JPP_0261|PARAMETER_SUBSTITUTION|BADCASE|JSON file with list parameter substitution in parameter name (composite data types not allowed in names) / (2) +JPP_0262|PARAMETER_SUBSTITUTION|BADCASE|JSON file with dictionary parameter substitution in parameter name (composite data types not allowed in names) / (1) JPP_0263|PARAMETER_SUBSTITUTION|BADCASE|JSON file with dictionary parameter substitution in parameter name (composite data types not allowed in names) / (2) JPP_0264|PARAMETER_SUBSTITUTION|BADCASE|JSON file with list parameter substitution in key name (composite data types not allowed in names) / (1) JPP_0265|PARAMETER_SUBSTITUTION|BADCASE|JSON file with list parameter substitution in key name (composite data types not allowed in names) / (2) @@ -36,6 +38,7 @@ JPP_0267|PARAMETER_SUBSTITUTION|BADCASE|JSON file with dictionary parameter subs JPP_0300|VALUE_DETECTION|GOODCASE|JSON file with parameter of type 'list' / index (in square brackets) defined outside the curly brackets (valid syntax) JPP_0301|VALUE_DETECTION|GOODCASE|JSON file with expression containing more closing elements '}' than opening elements '${' (valid syntax) JPP_0302|VALUE_DETECTION|GOODCASE|JSON file with expression starting with '${' and ending with '}' / no further matching '${' and '}' in between (valid syntax) +JPP_0303|VALUE_DETECTION|GOODCASE|JSON file with expression starting with '${' and ending with '}', further matching '${' and '}' in between (nested) (valid syntax) JPP_0304|VALUE_DETECTION|GOODCASE|JSON file with expression starting with '${' and ending with '}', further matching '${' and '}' in between (not all nested) (valid syntax) JPP_0350|VALUE_DETECTION|BADCASE|JSON file with parameter of type 'list' / index (in square brackets) defined inside the curly brackets (invalid syntax 1) JPP_0351|VALUE_DETECTION|BADCASE|JSON file with parameter of type 'list' / index (in square brackets) defined inside the curly brackets (invalid syntax 2) @@ -73,6 +76,9 @@ JPP_0511|COMPOSITE_EXPRESSIONS|GOODCASE|JSON file containing a list; list index JPP_0512|COMPOSITE_EXPRESSIONS|GOODCASE|JSON file containing a nested use of lists and dictionaries, with the same parameter used several times within the same expression JPP_0513|COMPOSITE_EXPRESSIONS|GOODCASE|JSON file containing several square bracket expressions (as list index and dictionary key) with and without single quotes JPP_0550|COMPOSITE_EXPRESSIONS|BADCASE|JSON file with composite data structure (nested lists and dictionaries / some key names with dots inside) +JPP_0551|COMPOSITE_EXPRESSIONS|BADCASE|JSON file containing a list; list index is defined by a parameter and wrapped in single quotes +JPP_0552|COMPOSITE_EXPRESSIONS|BADCASE|JSON file containing a list; list index is defined by a parameter and placed inside the curly brackets (invalid syntax) +JPP_0553|COMPOSITE_EXPRESSIONS|BADCASE|JSON file containing a list; list index is defined by a parameter, wrapped in single quotes and placed inside the curly brackets (invalid syntax) JPP_0600|CODE_COMMENTS|GOODCASE|JSON file with several combinations of code comments JPP_0950|COMMON_SYNTAX_VIOLATIONS|BADCASE|JSON file with syntax error (1) JPP_0951|COMMON_SYNTAX_VIOLATIONS|BADCASE|JSON file with syntax error (2) diff --git a/test/JPP_TestUsecases.html b/test/JPP_TestUsecases.html index ed772796..87519d94 100644 --- a/test/JPP_TestUsecases.html +++ b/test/JPP_TestUsecases.html @@ -925,6 +925,39 @@ 28 + + + +JPP_0260 + + + + +PARAMETER_SUBSTITUTION + + + + +BADCASE + + + + +JSON file with list parameter substitution in parameter name (composite data types not allowed in names) / (1)
+Expected: No values are returned, and JsonPreprocessor throws an exception + + +
+ + + + + + + +29 + + @@ -955,7 +988,40 @@ -29 +30 + + + + + +JPP_0262 + + + + +PARAMETER_SUBSTITUTION + + + + +BADCASE + + + + +JSON file with dictionary parameter substitution in parameter name (composite data types not allowed in names) / (1)
+Expected: No values are returned, and JsonPreprocessor throws an exception + + +
+ + + + + + + +31 @@ -988,7 +1054,7 @@ -30 +32 @@ -1021,7 +1087,7 @@ -31 +33 @@ -1054,7 +1120,7 @@ -32 +34 @@ -1087,7 +1153,7 @@ -33 +35 @@ -1120,7 +1186,7 @@ -34 +36 @@ -1154,7 +1220,7 @@ -35 +37 @@ -1188,7 +1254,7 @@ -36 +38 @@ -1222,7 +1288,41 @@ -37 +39 + + + + + +JPP_0303 + + + + +VALUE_DETECTION + + + + +GOODCASE + + + + +JSON file with expression starting with '${' and ending with '}', further matching '${' and '}' in between (nested) (valid syntax)
+Expected: JsonPreprocessor returns values + +
+Checklist rule 5 +
+ + + + + + + +40 @@ -1256,7 +1356,7 @@ -38 +41 @@ -1290,7 +1390,7 @@ -39 +42 @@ -1324,7 +1424,7 @@ -40 +43 @@ -1358,7 +1458,7 @@ -41 +44 @@ -1392,7 +1492,7 @@ -42 +45 @@ -1426,7 +1526,7 @@ -43 +46 @@ -1460,7 +1560,7 @@ -44 +47 @@ -1494,7 +1594,7 @@ -45 +48 @@ -1528,7 +1628,7 @@ -46 +49 @@ -1562,7 +1662,7 @@ -47 +50 @@ -1596,7 +1696,7 @@ -48 +51 @@ -1630,7 +1730,7 @@ -49 +52 @@ -1664,7 +1764,7 @@ -50 +53 @@ -1698,7 +1798,7 @@ -51 +54 @@ -1732,7 +1832,7 @@ -52 +55 @@ -1766,7 +1866,7 @@ -53 +56 @@ -1800,7 +1900,7 @@ -54 +57 @@ -1834,7 +1934,7 @@ -55 +58 @@ -1868,7 +1968,7 @@ -56 +59 @@ -1902,7 +2002,7 @@ -57 +60 @@ -1936,7 +2036,7 @@ -58 +61 @@ -1970,7 +2070,7 @@ -59 +62 @@ -2004,7 +2104,7 @@ -60 +63 @@ -2038,7 +2138,7 @@ -61 +64 @@ -2072,7 +2172,7 @@ -62 +65 @@ -2106,7 +2206,7 @@ -63 +66 @@ -2139,7 +2239,7 @@ -64 +67 @@ -2172,7 +2272,7 @@ -65 +68 @@ -2205,7 +2305,7 @@ -66 +69 @@ -2238,7 +2338,7 @@ -67 +70 @@ -2271,7 +2371,7 @@ -68 +71 @@ -2304,7 +2404,7 @@ -69 +72 @@ -2337,7 +2437,7 @@ -70 +73 @@ -2370,7 +2470,7 @@ -71 +74 @@ -2403,7 +2503,7 @@ -72 +75 @@ -2436,7 +2536,7 @@ -73 +76 @@ -2470,7 +2570,107 @@ -74 +77 + + + + + +JPP_0551 + + + + +COMPOSITE_EXPRESSIONS + + + + +BADCASE + + + + +JSON file containing a list; list index is defined by a parameter and wrapped in single quotes
+Expected: No values are returned, and JsonPreprocessor throws an exception + +
+List indices must be of type 'int' +
+ + + + + + + +78 + + + + + +JPP_0552 + + + + +COMPOSITE_EXPRESSIONS + + + + +BADCASE + + + + +JSON file containing a list; list index is defined by a parameter and placed inside the curly brackets (invalid syntax)
+Expected: No values are returned, and JsonPreprocessor throws an exception + + +
+ + + + + + + +79 + + + + + +JPP_0553 + + + + +COMPOSITE_EXPRESSIONS + + + + +BADCASE + + + + +JSON file containing a list; list index is defined by a parameter, wrapped in single quotes and placed inside the curly brackets (invalid syntax)
+Expected: No values are returned, and JsonPreprocessor throws an exception + + +
+ + + + + + + +80 @@ -2503,7 +2703,7 @@ -75 +81 @@ -2536,7 +2736,7 @@ -76 +82 @@ -2569,7 +2769,7 @@ -77 +83 @@ -2602,7 +2802,7 @@ -78 +84 @@ -2635,7 +2835,7 @@ -79 +85 @@ -2668,7 +2868,7 @@ -80 +86 @@ -2701,7 +2901,7 @@ -81 +87 @@ -2734,7 +2934,7 @@ -82 +88 @@ -2767,7 +2967,7 @@ -83 +89 @@ -2800,7 +3000,7 @@ -84 +90 @@ -2833,7 +3033,7 @@ -85 +91 @@ -2866,7 +3066,7 @@ -86 +92 @@ -2899,7 +3099,7 @@ -87 +93 @@ -2932,7 +3132,7 @@ -88 +94 @@ -2965,7 +3165,7 @@ -89 +95 @@ -2998,7 +3198,7 @@ -90 +96 @@ -3031,7 +3231,7 @@ -91 +97 @@ -3064,7 +3264,7 @@ -92 +98 @@ -3097,7 +3297,7 @@ -93 +99 @@ -3130,7 +3330,7 @@ -94 +100 @@ -3164,7 +3364,7 @@
 

-
Generated: 16.01.2024 - 13:22:08
+
Generated: 24.01.2024 - 13:56:16
 
diff --git a/test/JPP_TestUsecases.rst b/test/JPP_TestUsecases.rst index b4213476..adf38a52 100644 --- a/test/JPP_TestUsecases.rst +++ b/test/JPP_TestUsecases.rst @@ -285,6 +285,16 @@ Test Use Cases ---- +* **Test JPP_0260** + + [PARAMETER_SUBSTITUTION / BADCASE] + + **JSON file with list parameter substitution in parameter name (composite data types not allowed in names) / (1)** + + Expected: No values are returned, and JsonPreprocessor throws an exception + +---- + * **Test JPP_0261** [PARAMETER_SUBSTITUTION / BADCASE] @@ -295,6 +305,16 @@ Test Use Cases ---- +* **Test JPP_0262** + + [PARAMETER_SUBSTITUTION / BADCASE] + + **JSON file with dictionary parameter substitution in parameter name (composite data types not allowed in names) / (1)** + + Expected: No values are returned, and JsonPreprocessor throws an exception + +---- + * **Test JPP_0263** [PARAMETER_SUBSTITUTION / BADCASE] @@ -381,6 +401,18 @@ Test Use Cases ---- +* **Test JPP_0303** + + [VALUE_DETECTION / GOODCASE] + + **JSON file with expression starting with '${' and ending with '}', further matching '${' and '}' in between (nested) (valid syntax)** + + Expected: JsonPreprocessor returns values + + *Hint: Checklist rule 5* + +---- + * **Test JPP_0304** [VALUE_DETECTION / GOODCASE] @@ -805,6 +837,38 @@ Test Use Cases ---- +* **Test JPP_0551** + + [COMPOSITE_EXPRESSIONS / BADCASE] + + **JSON file containing a list; list index is defined by a parameter and wrapped in single quotes** + + Expected: No values are returned, and JsonPreprocessor throws an exception + + *Hint: List indices must be of type 'int'* + +---- + +* **Test JPP_0552** + + [COMPOSITE_EXPRESSIONS / BADCASE] + + **JSON file containing a list; list index is defined by a parameter and placed inside the curly brackets (invalid syntax)** + + Expected: No values are returned, and JsonPreprocessor throws an exception + +---- + +* **Test JPP_0553** + + [COMPOSITE_EXPRESSIONS / BADCASE] + + **JSON file containing a list; list index is defined by a parameter, wrapped in single quotes and placed inside the curly brackets (invalid syntax)** + + Expected: No values are returned, and JsonPreprocessor throws an exception + +---- + * **Test JPP_0600** [CODE_COMMENTS / GOODCASE] @@ -1017,5 +1081,5 @@ Test Use Cases ---- -Generated: 16.01.2024 - 13:22:08 +Generated: 24.01.2024 - 13:56:16 diff --git a/test/JPP_TestUsecases.txt b/test/JPP_TestUsecases.txt index deea47d0..da3890e1 100644 --- a/test/JPP_TestUsecases.txt +++ b/test/JPP_TestUsecases.txt @@ -123,10 +123,18 @@ Test JPP_0259 / PARAMETER_SUBSTITUTION / BADCASE Description: JSON file with nested parameter / key parameter substitution in parameter value / dotdict notation / milestone number not existing Expectation: No values are returned, and JsonPreprocessor throws an exception ------------------------------------------------------------------------------------------------------------------------ +Test JPP_0260 / PARAMETER_SUBSTITUTION / BADCASE +Description: JSON file with list parameter substitution in parameter name (composite data types not allowed in names) / (1) +Expectation: No values are returned, and JsonPreprocessor throws an exception +------------------------------------------------------------------------------------------------------------------------ Test JPP_0261 / PARAMETER_SUBSTITUTION / BADCASE Description: JSON file with list parameter substitution in parameter name (composite data types not allowed in names) / (2) Expectation: No values are returned, and JsonPreprocessor throws an exception ------------------------------------------------------------------------------------------------------------------------ +Test JPP_0262 / PARAMETER_SUBSTITUTION / BADCASE +Description: JSON file with dictionary parameter substitution in parameter name (composite data types not allowed in names) / (1) +Expectation: No values are returned, and JsonPreprocessor throws an exception +------------------------------------------------------------------------------------------------------------------------ Test JPP_0263 / PARAMETER_SUBSTITUTION / BADCASE Description: JSON file with dictionary parameter substitution in parameter name (composite data types not allowed in names) / (2) Expectation: No values are returned, and JsonPreprocessor throws an exception @@ -162,6 +170,11 @@ Description: JSON file with expression starting with '${' and ending with '}' / Expectation: JsonPreprocessor returns values Hint.......: Checklist rule 4 ------------------------------------------------------------------------------------------------------------------------ +Test JPP_0303 / VALUE_DETECTION / GOODCASE +Description: JSON file with expression starting with '${' and ending with '}', further matching '${' and '}' in between (nested) (valid syntax) +Expectation: JsonPreprocessor returns values +Hint.......: Checklist rule 5 +------------------------------------------------------------------------------------------------------------------------ Test JPP_0304 / VALUE_DETECTION / GOODCASE Description: JSON file with expression starting with '${' and ending with '}', further matching '${' and '}' in between (not all nested) (valid syntax) Expectation: JsonPreprocessor returns values @@ -337,6 +350,19 @@ Description: JSON file with composite data structure (nested lists and dictionar Expectation: No values are returned, and JsonPreprocessor throws an exception Hint.......: Dotdict notation (ambiguous in this case) ------------------------------------------------------------------------------------------------------------------------ +Test JPP_0551 / COMPOSITE_EXPRESSIONS / BADCASE +Description: JSON file containing a list; list index is defined by a parameter and wrapped in single quotes +Expectation: No values are returned, and JsonPreprocessor throws an exception +Hint.......: List indices must be of type 'int' +------------------------------------------------------------------------------------------------------------------------ +Test JPP_0552 / COMPOSITE_EXPRESSIONS / BADCASE +Description: JSON file containing a list; list index is defined by a parameter and placed inside the curly brackets (invalid syntax) +Expectation: No values are returned, and JsonPreprocessor throws an exception +------------------------------------------------------------------------------------------------------------------------ +Test JPP_0553 / COMPOSITE_EXPRESSIONS / BADCASE +Description: JSON file containing a list; list index is defined by a parameter, wrapped in single quotes and placed inside the curly brackets (invalid syntax) +Expectation: No values are returned, and JsonPreprocessor throws an exception +------------------------------------------------------------------------------------------------------------------------ Test JPP_0600 / CODE_COMMENTS / GOODCASE Description: JSON file with several combinations of code comments Expectation: JsonPreprocessor returns remaining content of JSON file (valid parameters) @@ -422,5 +448,5 @@ Description: Relative path to JSON file Expectation: JsonPreprocessor resolves the relative path and returns values from JSON file Hint.......: Works with raw path to JSON file (path not normalized internally) ------------------------------------------------------------------------------------------------------------------------ -Generated: 16.01.2024 - 13:22:08 +Generated: 24.01.2024 - 13:56:16 diff --git a/test/component_test.py b/test/component_test.py index 5340b917..522f072a 100644 --- a/test/component_test.py +++ b/test/component_test.py @@ -22,8 +22,8 @@ # # -------------------------------------------------------------------------------------------------------------- # -VERSION = "0.24.0" -VERSION_DATE = "16.01.2024" +VERSION = "0.25.0" +VERSION_DATE = "24.01.2024" # # -------------------------------------------------------------------------------------------------------------- #TM*** @@ -211,8 +211,8 @@ def AnalyzeExceptions(EXPECTEDEXCEPTION=None, sException=None): try: # not yet implemented officially oJsonPreprocessor = CJsonPreprocessor() - sut_version = oJsonPreprocessor.get_version() - sut_version_date = oJsonPreprocessor.get_version_date() + sut_version = oJsonPreprocessor.getVersion() + sut_version_date = oJsonPreprocessor.getVersionDate() del oJsonPreprocessor SUT_FULL_NAME = f"JsonPreprocessor v. {sut_version} / {sut_version_date}" oConfig.Set("SUT_FULL_NAME", SUT_FULL_NAME) diff --git a/test/pytest/pytestfiles/test_04_PARAMETER_SUBSTITUTION_BADCASE.py b/test/pytest/pytestfiles/test_04_PARAMETER_SUBSTITUTION_BADCASE.py index 7957f35a..56b853f7 100644 --- a/test/pytest/pytestfiles/test_04_PARAMETER_SUBSTITUTION_BADCASE.py +++ b/test/pytest/pytestfiles/test_04_PARAMETER_SUBSTITUTION_BADCASE.py @@ -18,7 +18,7 @@ # # XC-CT/ECA3-Queckenstedt # -# 10.01.2024 - 12:25:22 +# 24.01.2024 - 13:56:16 # # -------------------------------------------------------------------------------------------------------------- @@ -109,6 +109,14 @@ def test_JPP_0258(self, Description): def test_JPP_0259(self, Description): nReturn = CExecute.Execute("JPP_0259") assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: No values are returned, and JsonPreprocessor throws an exception + @pytest.mark.parametrize( + "Description", ["JSON file with list parameter substitution in parameter name (composite data types not allowed in names) / (1)",] + ) + def test_JPP_0260(self, Description): + nReturn = CExecute.Execute("JPP_0260") + assert nReturn == 0 # -------------------------------------------------------------------------------------------------------------- # Expected: No values are returned, and JsonPreprocessor throws an exception @pytest.mark.parametrize( @@ -117,6 +125,14 @@ def test_JPP_0259(self, Description): def test_JPP_0261(self, Description): nReturn = CExecute.Execute("JPP_0261") assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: No values are returned, and JsonPreprocessor throws an exception + @pytest.mark.parametrize( + "Description", ["JSON file with dictionary parameter substitution in parameter name (composite data types not allowed in names) / (1)",] + ) + def test_JPP_0262(self, Description): + nReturn = CExecute.Execute("JPP_0262") + assert nReturn == 0 # -------------------------------------------------------------------------------------------------------------- # Expected: No values are returned, and JsonPreprocessor throws an exception @pytest.mark.parametrize( diff --git a/test/pytest/pytestfiles/test_05_VALUE_DETECTION_GOODCASE.py b/test/pytest/pytestfiles/test_05_VALUE_DETECTION_GOODCASE.py index 6e5ec073..12c81122 100644 --- a/test/pytest/pytestfiles/test_05_VALUE_DETECTION_GOODCASE.py +++ b/test/pytest/pytestfiles/test_05_VALUE_DETECTION_GOODCASE.py @@ -18,7 +18,7 @@ # # XC-CT/ECA3-Queckenstedt # -# 10.10.2023 - 13:31:11 +# 24.01.2024 - 13:56:16 # # -------------------------------------------------------------------------------------------------------------- @@ -53,6 +53,14 @@ def test_JPP_0301(self, Description): def test_JPP_0302(self, Description): nReturn = CExecute.Execute("JPP_0302") assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: JsonPreprocessor returns values + @pytest.mark.parametrize( + "Description", ["JSON file with expression starting with '${' and ending with '}', further matching '${' and '}' in between (nested) (valid syntax)",] + ) + def test_JPP_0303(self, Description): + nReturn = CExecute.Execute("JPP_0303") + assert nReturn == 0 # -------------------------------------------------------------------------------------------------------------- # Expected: JsonPreprocessor returns values @pytest.mark.parametrize( diff --git a/test/pytest/pytestfiles/test_08_COMPOSITE_EXPRESSIONS_BADCASE.py b/test/pytest/pytestfiles/test_08_COMPOSITE_EXPRESSIONS_BADCASE.py index d5da154a..ef966733 100644 --- a/test/pytest/pytestfiles/test_08_COMPOSITE_EXPRESSIONS_BADCASE.py +++ b/test/pytest/pytestfiles/test_08_COMPOSITE_EXPRESSIONS_BADCASE.py @@ -18,7 +18,7 @@ # # XC-CT/ECA3-Queckenstedt # -# 10.01.2024 - 12:25:22 +# 24.01.2024 - 13:56:16 # # -------------------------------------------------------------------------------------------------------------- @@ -37,4 +37,28 @@ class Test_COMPOSITE_EXPRESSIONS_BADCASE: def test_JPP_0550(self, Description): nReturn = CExecute.Execute("JPP_0550") assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: No values are returned, and JsonPreprocessor throws an exception + @pytest.mark.parametrize( + "Description", ["JSON file containing a list; list index is defined by a parameter and wrapped in single quotes",] + ) + def test_JPP_0551(self, Description): + nReturn = CExecute.Execute("JPP_0551") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: No values are returned, and JsonPreprocessor throws an exception + @pytest.mark.parametrize( + "Description", ["JSON file containing a list; list index is defined by a parameter and placed inside the curly brackets (invalid syntax)",] + ) + def test_JPP_0552(self, Description): + nReturn = CExecute.Execute("JPP_0552") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: No values are returned, and JsonPreprocessor throws an exception + @pytest.mark.parametrize( + "Description", ["JSON file containing a list; list index is defined by a parameter, wrapped in single quotes and placed inside the curly brackets (invalid syntax)",] + ) + def test_JPP_0553(self, Description): + nReturn = CExecute.Execute("JPP_0553") + assert nReturn == 0 # -------------------------------------------------------------------------------------------------------------- diff --git a/test/testconfig/TestConfig.py b/test/testconfig/TestConfig.py index 6680eecc..809c2af7 100644 --- a/test/testconfig/TestConfig.py +++ b/test/testconfig/TestConfig.py @@ -22,7 +22,7 @@ # # -------------------------------------------------------------------------------------------------------------- # -# 16.01.2024 +# 24.01.2024 # # !!! Temporarily tests are deactivated by the following line commented out: # # # listofdictUsecases.append(dictUsecase) @@ -1178,9 +1178,9 @@ dictUsecase['HINT'] = None dictUsecase['COMMENT'] = None dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0260.jsonp" -dictUsecase['EXPECTEDEXCEPTION'] = "composite data types not allowed in names (placeholder)" +dictUsecase['EXPECTEDEXCEPTION'] = "Found expression '${param}' with at least one parameter of composite data type ('${param}' is of type ). Because of this expression is the name of a parameter, only simple data types are allowed to be substituted inside." dictUsecase['EXPECTEDRETURN'] = None -# # # listofdictUsecases.append(dictUsecase) +listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} @@ -1206,9 +1206,9 @@ dictUsecase['HINT'] = None dictUsecase['COMMENT'] = None dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0262.jsonp" -dictUsecase['EXPECTEDEXCEPTION'] = "composite data types not allowed in names (placeholder)" +dictUsecase['EXPECTEDEXCEPTION'] = "Found expression '${param}' with at least one parameter of composite data type ('${param}' is of type ). Because of this expression is the name of a parameter, only simple data types are allowed to be substituted inside." dictUsecase['EXPECTEDRETURN'] = None -# # # listofdictUsecases.append(dictUsecase) +listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} @@ -1379,18 +1379,15 @@ dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0303.jsonp" dictUsecase['EXPECTEDEXCEPTION'] = None dictUsecase['EXPECTEDRETURN'] = """ -[DICT] (10/1) > {ara} [STR] : 'ara' -[DICT] (10/2) > {lara} [LIST] (1/1) > [STR] : 'ara' -[DICT] (10/3) > {param} [INT] : 123 -[DICT] (10/4) > {param} [LIST] (1/1) > [FLOAT] : 4.56 -[DICT] (10/5) > {val1} [INT] : 123 -[DICT] (10/6) > {val2} [STR] : '123' -[DICT] (10/7) > {val3} [STR] : [FLOAT] : 4.56 -[DICT] (10/8) > {val4} [STR] : [STR] : '4.56' -[DICT] (10/9) > {val5} [STR] : [FLOAT] : 4.56 -[DICT] (10/10) > {val6} [STR] : [STR] : '4.56' +[DICT] (7/1) > {ara} [STR] : 'ara' +[DICT] (7/2) > {lara} [LIST] (1/1) > [STR] : 'ara' +[DICT] (7/3) > {param} [INT] : 123 +[DICT] (7/4) > {param1} [LIST] (1/1) > [FLOAT] : 4.56 +[DICT] (7/5) > {val1} [STR] : '123' +[DICT] (7/6) > {val2} [STR] : '4.56' +[DICT] (7/7) > {val3} [STR] : '4.56' """ -# # # listofdictUsecases.append(dictUsecase) +listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} @@ -2102,9 +2099,9 @@ dictUsecase['HINT'] = "List indices must be of type 'int'" dictUsecase['COMMENT'] = None dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0551.jsonp" -dictUsecase['EXPECTEDEXCEPTION'] = "List indices must be of type 'int' (error message placeholder)" +dictUsecase['EXPECTEDEXCEPTION'] = "Could not set variable '${listval}['${intval}']' with value '4'! Reason: list indices must be integers" dictUsecase['EXPECTEDRETURN'] = None -# # # listofdictUsecases.append(dictUsecase) +listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} @@ -2116,9 +2113,9 @@ dictUsecase['HINT'] = None dictUsecase['COMMENT'] = None dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0552.jsonp" -dictUsecase['EXPECTEDEXCEPTION'] = "Invalid syntax: Found index" +dictUsecase['EXPECTEDEXCEPTION'] = "Invalid syntax: Found index or sub-element inside curly brackets in the parameter '${listval[${intval}]}'" dictUsecase['EXPECTEDRETURN'] = None -# # # listofdictUsecases.append(dictUsecase) +listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} @@ -2130,9 +2127,9 @@ dictUsecase['HINT'] = None dictUsecase['COMMENT'] = None dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0553.jsonp" -dictUsecase['EXPECTEDEXCEPTION'] = "Invalid syntax: Found index" +dictUsecase['EXPECTEDEXCEPTION'] = "Invalid syntax: Found index or sub-element inside curly brackets in the parameter '${listval['${intval}']}'" dictUsecase['EXPECTEDRETURN'] = None -# # # listofdictUsecases.append(dictUsecase) +listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- # -------------------------------------------------------------------------------------------------------------- diff --git a/test/testfiles/jpp-test_config_0303.jsonp b/test/testfiles/jpp-test_config_0303.jsonp index 8aab29d4..63815b92 100644 --- a/test/testfiles/jpp-test_config_0303.jsonp +++ b/test/testfiles/jpp-test_config_0303.jsonp @@ -18,10 +18,7 @@ "param" : 123, "param1" : [4.56], // - "val1" : ${p${ara}m}, - "val2" : "${p${ara}m}", - "val3" : ${p${lara}[0]m1}[0], - "val4" : "${p${lara}[0]m1}[0]", - "val5" : ${p${lara.0}m1.0}, - "val6" : "${p${lara.0}m1.0}" + "val1" : "${p${ara}m}", + "val2" : "${p${lara}[0]m1}[0]", + "val3" : "${p${lara.0}m1.0}" } diff --git a/test/testfiles/jpp-test_config_0450.jsonp b/test/testfiles/jpp-test_config_0450.jsonp index 0afe695c..547eea06 100644 --- a/test/testfiles/jpp-test_config_0450.jsonp +++ b/test/testfiles/jpp-test_config_0450.jsonp @@ -13,5 +13,5 @@ // limitations under the License. //************************************************************************** { - "$/{/}/[/]/&/#/,/;" : "string" + "$/{/}/[/]/&/#/,/;/:" : "string" }