Commit 33f1f1e9 authored by balaskoa's avatar balaskoa
Browse files

Bug 499887 - Update regression test and make stricter checks + update expeced lists


Signed-off-by: default avatarbalaskoa <jeno.balasko@ericsson.com>
parent 9bc85d15
......@@ -9,14 +9,12 @@ package org.eclipse.titan.regressiontests.common;
import org.eclipse.titan.regressiontests.common.actions.FormatLogTest;
import org.eclipse.titan.regressiontests.common.actions.MergeLogTest;
import org.eclipse.titan.regressiontests.common.cfg.ConfigFileTest;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
@RunWith(Suite.class)
@SuiteClasses({
ConfigFileTest.class,
FormatLogTest.class,
MergeLogTest.class
})
......
......@@ -33,6 +33,7 @@ import org.eclipse.titan.regressiontests.library.MarkerHandlingLibrary;
import org.eclipse.titan.regressiontests.library.MarkerToCheck;
import org.eclipse.titan.regressiontests.library.ProjectHandlingLibrary;
import org.eclipse.titan.regressiontests.library.WorkspaceHandlingLibrary;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
......@@ -61,10 +62,10 @@ public class Designer_plugin_tests {
@BeforeClass
public static void setUp() throws Exception {
Locale.setDefault(new Locale("en", "EN")); // the number format used is the english one
Locale.setDefault(new Locale("en", "EN")); // the number format used is the English one
/**
* The options that could be set can be fount in the Designer plug-in.
* The options that could be set can be found in the Designer plug-in.
* Those options which would be assigned their default value, should not be set, but left as they are initialized.
* */
Activator.getDefault().getPreferenceStore().setValue(PreferenceConstants.LICENSE_FILE_PATH, MainTestSuite.LICENSE_FILE);
......@@ -101,7 +102,8 @@ public class Designer_plugin_tests {
Designer_plugin_tests.collectorTransformator();
}
public void unProcessedMarkerCheck() throws Exception {
@AfterClass
public static void unProcessedMarkerCheck() throws Exception {
int sum = 0;
for (IResource resource : syntacticMarkers.keySet()) {
List<Map<?, ?>> temp = syntacticMarkers.get(resource);
......@@ -190,9 +192,6 @@ public class Designer_plugin_tests {
for (int i = expected.size() - 1; i >= 0; i--) {
MarkerHandlingLibrary.searchNDestroyFittingMarker(fileMarkerList, expected.get(i).getMarkerMap(), true);
}
//TODO: modify the expected marker lists to execute the next function without AssertionError!
//assertEquals("Not checked semantic markers on file:" + file.getName(), 0, fileMarkerList.size());
expected.clear();
}
......
......@@ -15,6 +15,7 @@ import org.eclipse.titan.regressiontests.library.MarkerToCheck;
import org.junit.Test;
 
public class AST_tests {
//ASNValues_asn
//attribute_tests_ttcn
//expression_tests_ttcn
//specificValue_template_tests_ttcn
......@@ -28,7 +29,12 @@ public class AST_tests {
//value_tests2_ttcn
//negativeTesting_ttcn
//ttcnpp_marker_test_with_syntax_errors_ttcnpp
//assignment_ttcn
 
@Test
public void ASNValues_asn() throws Exception {
Designer_plugin_tests.checkSemanticMarkersOnFile(ASNValues_asn_initializer(), "src/Basic_tests/ASNValues.asn");
}
 
@Test
public void attribute_tests_ttcn() throws Exception {
......@@ -78,9 +84,9 @@ public class AST_tests {
@Test
public void value_tests_ttcn() throws Exception {
Designer_plugin_tests.checkSemanticMarkersOnFile(value_tests_ttcn_initializer(), "src/Basic_tests/value_tests.ttcn");
}
@Test
public void value_tests2_ttcn() throws Exception {
Designer_plugin_tests.checkSemanticMarkersOnFile(value_tests2_ttcn_initializer(), "src/Basic_tests/value_tests2.ttcn");
......@@ -97,6 +103,20 @@ public class AST_tests {
Designer_plugin_tests.checkSemanticMarkersOnFile(ttcnpp_marker_test_with_syntax_errors_ttcnpp_initializer_semantic(), "src/Basic_tests/preprocessor_test/ttcnpp_marker_test_with_syntax_errors.ttcnpp");
}
 
@Test
public void assignment_ttcn() throws Exception {
Designer_plugin_tests.checkSemanticMarkersOnFile(assignment_ttcn_initializer(), "cfgFile/module_parameters/assignment/assignment.ttcn");
}
private ArrayList<MarkerToCheck> ASNValues_asn_initializer() {
//ASNValues.asn
ArrayList<MarkerToCheck> markersToCheck = new ArrayList<MarkerToCheck>(1);
int lineNum = 66;
markersToCheck.add(new MarkerToCheck("There is no assignment or imported symbol with name `myObjectIdentifierValue1' in module `ASNValues'", lineNum, IMarker.SEVERITY_ERROR));
return markersToCheck;
}
private ArrayList<MarkerToCheck> attribute_tests_ttcn_initializer() {
//attribute_tests.ttcn
ArrayList<MarkerToCheck> markersToCheck = new ArrayList<MarkerToCheck>(165);
......@@ -11429,7 +11449,7 @@ public class AST_tests {
 
return markersToCheck;
}
private ArrayList<MarkerToCheck> value_tests2_ttcn_initializer() {
//value_tests2.ttcn
ArrayList<MarkerToCheck> markersToCheck = new ArrayList<MarkerToCheck>(44);
......@@ -11447,6 +11467,7 @@ public class AST_tests {
}
markersToCheck.add(new MarkerToCheck("INTEGER value was expected", ++lineNum, IMarker.SEVERITY_ERROR));
lineNum += 10;
markersToCheck.add(new MarkerToCheck("Reference to a value was expected instead of template `@value_tests2.t_f'", lineNum, IMarker.SEVERITY_ERROR));
markersToCheck.add(new MarkerToCheck("Type mismatch: a value of type `integer' was expected instead of `float'", lineNum, IMarker.SEVERITY_ERROR));
lineNum += 2;
markersToCheck.add(new MarkerToCheck("The lower boundary cannot be +infinity", lineNum, IMarker.SEVERITY_ERROR));
......@@ -11455,6 +11476,7 @@ public class AST_tests {
}
markersToCheck.add(new MarkerToCheck("The lower boundary is higher than the upper boundary", ++lineNum, IMarker.SEVERITY_ERROR));
lineNum += 7;
markersToCheck.add(new MarkerToCheck("Reference to a value was expected instead of template `@value_tests2.t_f'", lineNum, IMarker.SEVERITY_ERROR));
markersToCheck.add(new MarkerToCheck("Type mismatch: a value of type `integer' was expected instead of `float'", lineNum, IMarker.SEVERITY_ERROR));
lineNum += 2;
markersToCheck.add(new MarkerToCheck("The lower boundary cannot be +infinity", lineNum, IMarker.SEVERITY_ERROR));
......@@ -11462,8 +11484,8 @@ public class AST_tests {
markersToCheck.add(new MarkerToCheck("The upper boundary cannot be -infinity", lineNum++, IMarker.SEVERITY_ERROR));
}
markersToCheck.add(new MarkerToCheck("The lower boundary is higher than the upper boundary", ++lineNum, IMarker.SEVERITY_ERROR));
lineNum += 5;
markersToCheck.add(new MarkerToCheck("INTEGER value was expected", ++lineNum, IMarker.SEVERITY_ERROR));
lineNum += 6;
markersToCheck.add(new MarkerToCheck("INTEGER value was expected", lineNum, IMarker.SEVERITY_ERROR));
markersToCheck.add(new MarkerToCheck("`omit' value is not allowed in this context", ++lineNum, IMarker.SEVERITY_ERROR));
for (i = 0; i < 7; i++) {
markersToCheck.add(new MarkerToCheck("INTEGER value was expected", lineNum, IMarker.SEVERITY_ERROR));
......@@ -11480,7 +11502,7 @@ public class AST_tests {
 
return markersToCheck;
}
private ArrayList<MarkerToCheck> ttcnpp_marker_test_with_syntax_errors_ttcnpp_initializer() {
//ttcnpp_marker_test_with_syntax_errors.ttcnpp
// !! Only syntax errors !!
......@@ -11635,8 +11657,8 @@ public class AST_tests {
 
return markersToCheck;
}
private ArrayList<MarkerToCheck> ttcnpp_marker_test_with_syntax_errors_ttcnpp_initializer_semantic() {
//ttcnpp_marker_test_with_syntax_errors.ttcnpp
ArrayList<MarkerToCheck> markersToCheck = new ArrayList<MarkerToCheck>(2);
......@@ -11647,4 +11669,17 @@ public class AST_tests {
 
return markersToCheck;
}
//assignment_ttcn
private ArrayList<MarkerToCheck> assignment_ttcn_initializer() {
//assignment.ttcn
ArrayList<MarkerToCheck> markersToCheck = new ArrayList<MarkerToCheck>(2);
int lineNum = 381;
markersToCheck.add(new MarkerToCheck("Field `field2' is missing from record value", lineNum, IMarker.SEVERITY_ERROR));
lineNum += 29;
markersToCheck.add(new MarkerToCheck("Field `field2' is missing from record value", lineNum, IMarker.SEVERITY_ERROR));
return markersToCheck;
}
}
......@@ -1429,31 +1429,32 @@ public class AST_warnings_tests {
lineNum += 152;
int i = 0;
for (i = 0; i < 2; i++) {
markersToCheck.add(new MarkerToCheck("The name of the 0th parameter is not the same: `pl_parameterName' was expected instead of `i'", lineNum++, IMarker.SEVERITY_WARNING));
}
markersToCheck.add(new MarkerToCheck("The name of the 0th parameter is not the same: `pl_parameterName1' was expected instead of `i'", lineNum, IMarker.SEVERITY_WARNING));
markersToCheck.add(new MarkerToCheck("The name of the 1th parameter is not the same: `pl_parameterName2' was expected instead of `j'", lineNum, IMarker.SEVERITY_WARNING));
markersToCheck.add(new MarkerToCheck("The name of the 0th parameter is not the same: `pl_parameterName1' was expected instead of `i'", ++lineNum, IMarker.SEVERITY_WARNING));
markersToCheck.add(new MarkerToCheck("The name of the 1th parameter is not the same: `pl_parameterName2' was expected instead of `j'", lineNum, IMarker.SEVERITY_WARNING));
markersToCheck.add(new MarkerToCheck("The name of the 0th parameter is not the same: `pl_parameterName1' was expected instead of `i'", ++lineNum, IMarker.SEVERITY_WARNING));
markersToCheck.add(new MarkerToCheck("The name of the 1th parameter is not the same: `pl_parameterName2' was expected instead of `j'", lineNum, IMarker.SEVERITY_WARNING));
markersToCheck.add(new MarkerToCheck("The name of the 0th parameter is not the same: `pl_parameterName1' was expected instead of `i'", ++lineNum, IMarker.SEVERITY_WARNING));
markersToCheck.add(new MarkerToCheck("The name of the 1th parameter is not the same: `pl_parameterName2' was expected instead of `j'", lineNum, IMarker.SEVERITY_WARNING));
markersToCheck.add(new MarkerToCheck("The name of the 0th parameter is not the same: `pl_parameterName1' was expected instead of `i'", ++lineNum, IMarker.SEVERITY_WARNING));
markersToCheck.add(new MarkerToCheck("The name of the 0th parameter is not the same: `pl_parameterName' was expected instead of `pl_i'", lineNum++, IMarker.SEVERITY_WARNING));
}
markersToCheck.add(new MarkerToCheck("The name of the 0th parameter is not the same: `pl_parameterName1' was expected instead of `pl_i'", lineNum, IMarker.SEVERITY_WARNING));
markersToCheck.add(new MarkerToCheck("The name of the 1th parameter is not the same: `pl_parameterName2' was expected instead of `pl_j'", lineNum, IMarker.SEVERITY_WARNING));
markersToCheck.add(new MarkerToCheck("The name of the 0th parameter is not the same: `pl_parameterName1' was expected instead of `pl_i'", ++lineNum, IMarker.SEVERITY_WARNING));
markersToCheck.add(new MarkerToCheck("The name of the 1th parameter is not the same: `pl_parameterName2' was expected instead of `pl_j'", lineNum, IMarker.SEVERITY_WARNING));
markersToCheck.add(new MarkerToCheck("The name of the 0th parameter is not the same: `pl_parameterName1' was expected instead of `pl_i'", ++lineNum, IMarker.SEVERITY_WARNING));
markersToCheck.add(new MarkerToCheck("The name of the 1th parameter is not the same: `pl_parameterName2' was expected instead of `pl_j'", lineNum, IMarker.SEVERITY_WARNING));
markersToCheck.add(new MarkerToCheck("The name of the 0th parameter is not the same: `pl_parameterName1' was expected instead of `pl_i'", ++lineNum, IMarker.SEVERITY_WARNING));
markersToCheck.add(new MarkerToCheck("The name of the 1th parameter is not the same: `pl_parameterName2' was expected instead of `pl_j'", lineNum, IMarker.SEVERITY_WARNING));
markersToCheck.add(new MarkerToCheck("The name of the 0th parameter is not the same: `pl_parameterName1' was expected instead of `pl_i'", ++lineNum, IMarker.SEVERITY_WARNING));
lineNum += 2;
for (i = 0; i < 2; i++) {
markersToCheck.add(new MarkerToCheck("The name of the 0th parameter is not the same: `pl_parameterName' was expected instead of `i'", lineNum++, IMarker.SEVERITY_WARNING));
}
markersToCheck.add(new MarkerToCheck("The name of the 0th parameter is not the same: `pl_parameterName1' was expected instead of `i'", lineNum, IMarker.SEVERITY_WARNING));
markersToCheck.add(new MarkerToCheck("The name of the 1th parameter is not the same: `pl_parameterName2' was expected instead of `j'", lineNum, IMarker.SEVERITY_WARNING));
markersToCheck.add(new MarkerToCheck("The name of the 0th parameter is not the same: `pl_parameterName1' was expected instead of `i'", ++lineNum, IMarker.SEVERITY_WARNING));
markersToCheck.add(new MarkerToCheck("The name of the 1th parameter is not the same: `pl_parameterName2' was expected instead of `j'", lineNum, IMarker.SEVERITY_WARNING));
markersToCheck.add(new MarkerToCheck("The name of the 0th parameter is not the same: `pl_parameterName1' was expected instead of `i'", ++lineNum, IMarker.SEVERITY_WARNING));
markersToCheck.add(new MarkerToCheck("The name of the 1th parameter is not the same: `pl_parameterName2' was expected instead of `j'", lineNum, IMarker.SEVERITY_WARNING));
markersToCheck.add(new MarkerToCheck("The name of the 0th parameter is not the same: `pl_parameterName1' was expected instead of `i'", ++lineNum, IMarker.SEVERITY_WARNING));
markersToCheck.add(new MarkerToCheck("The name of the 1th parameter is not the same: `pl_parameterName2' was expected instead of `j'", lineNum, IMarker.SEVERITY_WARNING));
markersToCheck.add(new MarkerToCheck("The name of the 0th parameter is not the same: `pl_parameterName1' was expected instead of `i'", ++lineNum, IMarker.SEVERITY_WARNING));
markersToCheck.add(new MarkerToCheck("The name of the 0th parameter is not the same: `pl_parameterName' was expected instead of `pl_i'", lineNum++, IMarker.SEVERITY_WARNING));
}
markersToCheck.add(new MarkerToCheck("The name of the 0th parameter is not the same: `pl_parameterName1' was expected instead of `pl_i'", lineNum, IMarker.SEVERITY_WARNING));
markersToCheck.add(new MarkerToCheck("The name of the 1th parameter is not the same: `pl_parameterName2' was expected instead of `pl_j'", lineNum, IMarker.SEVERITY_WARNING));
markersToCheck.add(new MarkerToCheck("The name of the 0th parameter is not the same: `pl_parameterName1' was expected instead of `pl_i'", ++lineNum, IMarker.SEVERITY_WARNING));
markersToCheck.add(new MarkerToCheck("The name of the 1th parameter is not the same: `pl_parameterName2' was expected instead of `pl_j'", lineNum, IMarker.SEVERITY_WARNING));
markersToCheck.add(new MarkerToCheck("The name of the 0th parameter is not the same: `pl_parameterName1' was expected instead of `pl_i'", ++lineNum, IMarker.SEVERITY_WARNING));
markersToCheck.add(new MarkerToCheck("The name of the 1th parameter is not the same: `pl_parameterName2' was expected instead of `pl_j'", lineNum, IMarker.SEVERITY_WARNING));
markersToCheck.add(new MarkerToCheck("The name of the 0th parameter is not the same: `pl_parameterName1' was expected instead of `pl_i'", ++lineNum, IMarker.SEVERITY_WARNING));
markersToCheck.add(new MarkerToCheck("The name of the 1th parameter is not the same: `pl_parameterName2' was expected instead of `pl_j'", lineNum, IMarker.SEVERITY_WARNING));
markersToCheck.add(new MarkerToCheck("The name of the 0th parameter is not the same: `pl_parameterName1' was expected instead of `pl_i'", ++lineNum, IMarker.SEVERITY_WARNING));
return markersToCheck;
}
}
......@@ -18,6 +18,9 @@ import org.junit.runners.Suite.SuiteClasses;
AST_tests.class,
TemplateTestSuite.class,
LazyTryCatchTest.class,
ExpectedValueTypeTest.class })
ExpectedValueTypeTest.class,
Structured.class,
ConfigFileTest.class
})
public class Basic_tests {
}
/******************************************************************************
* Copyright (c) 2000-2015 Ericsson Telecom AB
* Copyright (c) 2000-2016 Ericsson Telecom AB
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
******************************************************************************/
package org.eclipse.titan.regressiontests.common.cfg;
package org.eclipse.titan.regressiontests.designer.statictests.Basic_tests;
import java.util.ArrayList;
......@@ -17,14 +17,30 @@ import org.junit.Test;
public class ConfigFileTest {
@Test
public void configFileParserTest() {
Designer_plugin_tests.checkSyntaxMarkersOnFile(config_cfg_initializer(), "cfg/config.cfg");
public void configFileParserTest() throws Exception {
Designer_plugin_tests.checkSyntaxMarkersOnFile(config_cfg_initializer_errors(), "cfgFile/config.cfg");
Designer_plugin_tests.checkSyntaxMarkersOnFile(config_cfg_initializer_warnings(), "cfgFile/config.cfg");
}
private ArrayList<MarkerToCheck> config_cfg_initializer() {
//config_cfg
private ArrayList<MarkerToCheck> config_cfg_initializer_errors() {
//config.cfg
ArrayList<MarkerToCheck> markersToCheck = new ArrayList<MarkerToCheck>();
int lineNum = 274;
ArrayList<MarkerToCheck> markersToCheck = new ArrayList<MarkerToCheck>(3);
int lineNum = 329;
markersToCheck.add(new MarkerToCheck("Could not resolve integer definition: d_integer_nonexi using 0 as replacement.", lineNum, IMarker.SEVERITY_ERROR));
lineNum += 37;
markersToCheck.add(new MarkerToCheck("Could not resolve definition: d_boolean_nonexi using \"true\" as a replacement.", lineNum, IMarker.SEVERITY_ERROR));
lineNum += 238;
markersToCheck.add(new MarkerToCheck("Could not resolve definition: d_hostname_nonexi using \"\" as a replacement.", lineNum, IMarker.SEVERITY_ERROR));
return markersToCheck;
}
private ArrayList<MarkerToCheck> config_cfg_initializer_warnings() {
//config.cfg
ArrayList<MarkerToCheck> markersToCheck = new ArrayList<MarkerToCheck>(30);
int lineNum = 277;
markersToCheck.add(new MarkerToCheck("Deprecated logging option TTCN_ACTION", lineNum, IMarker.SEVERITY_WARNING));
markersToCheck.add(new MarkerToCheck("Deprecated logging option TTCN_DEBUG", lineNum, IMarker.SEVERITY_WARNING));
markersToCheck.add(new MarkerToCheck("Deprecated logging option TTCN_DEFAULTOP", lineNum, IMarker.SEVERITY_WARNING));
......
......@@ -27,7 +27,7 @@ public class ExpectedValueTypeTest {
}
//ExpectedValueTypeTest_ttcn
private ArrayList<MarkerToCheck> ExpectedValueTypeTest_ttcn_initializer() {
//ExpectedValueTypeTest.ttcn
ArrayList<MarkerToCheck> markersToCheck = new ArrayList<MarkerToCheck>(26);
......@@ -51,36 +51,35 @@ public class ExpectedValueTypeTest {
markersToCheck.add(new MarkerToCheck("Type mismatch: a value or template of type `charstring' was expected instead of `integer'", lineNum++, IMarker.SEVERITY_ERROR));
}
lineNum += 4;
markersToCheck.add(new MarkerToCheck("Reference to a value was expected instead of template parameter `tpl_rec'", lineNum, IMarker.SEVERITY_ERROR));
markersToCheck.add(new MarkerToCheck("Reference to a value was expected instead of template parameter `pl_rec'", lineNum, IMarker.SEVERITY_ERROR));
lineNum += 4;
markersToCheck.add(new MarkerToCheck("Reference to a value was expected instead of template parameter `tpl_rec'", lineNum, IMarker.SEVERITY_ERROR));
markersToCheck.add(new MarkerToCheck("Reference to a value was expected instead of template parameter `pl_rec'", lineNum, IMarker.SEVERITY_ERROR));
lineNum += 4;
markersToCheck.add(new MarkerToCheck("Reference to a value was expected instead of `out' template parameter `tpl_rec'", lineNum, IMarker.SEVERITY_ERROR));
markersToCheck.add(new MarkerToCheck("Reference to a value was expected instead of `out' template parameter `pl_rec'", lineNum, IMarker.SEVERITY_ERROR));
lineNum += 4;
markersToCheck.add(new MarkerToCheck("Reference to a value was expected instead of `inout' template parameter `tpl_rec'", lineNum, IMarker.SEVERITY_ERROR));
markersToCheck.add(new MarkerToCheck("Reference to a value was expected instead of `inout' template parameter `pl_rec'", lineNum, IMarker.SEVERITY_ERROR));
lineNum += 5;
markersToCheck.add(new MarkerToCheck("Reference to a value was expected instead of template variable `vt_rec_'", lineNum, IMarker.SEVERITY_ERROR));
lineNum += 5;
markersToCheck.add(new MarkerToCheck("Reference to a value was expected instead of template `vt_rec'", lineNum, IMarker.SEVERITY_ERROR));
markersToCheck.add(new MarkerToCheck("Reference to a value was expected instead of template `t_rec_'", lineNum, IMarker.SEVERITY_ERROR));
lineNum += 4;
markersToCheck.add(new MarkerToCheck("The second operand of the `&' operation should be a string, `record of', or a `set of' value", lineNum, IMarker.SEVERITY_ERROR));
markersToCheck.add(new MarkerToCheck("Reference to a value was expected instead of template variable `vt_cs'", ++lineNum, IMarker.SEVERITY_ERROR));
lineNum += 9;
markersToCheck.add(new MarkerToCheck("Reference to a value was expected instead of template parameter `tpl_rec'", lineNum, IMarker.SEVERITY_ERROR));
markersToCheck.add(new MarkerToCheck("Reference to a value was expected instead of template parameter `pl_rec'", lineNum, IMarker.SEVERITY_ERROR));
markersToCheck.add(new MarkerToCheck("Reference to a value was expected instead of template module parameter `@ExpectedValueTypeTest.tsp_trec'", ++lineNum, IMarker.SEVERITY_ERROR));
markersToCheck.add(new MarkerToCheck("Reference to a value was expected instead of template parameter `tpl_recin'", ++lineNum, IMarker.SEVERITY_ERROR));
markersToCheck.add(new MarkerToCheck("Reference to a value was expected instead of `inout' template parameter `tpl_recinout'", ++lineNum, IMarker.SEVERITY_ERROR));
markersToCheck.add(new MarkerToCheck("Reference to a value was expected instead of `out' template parameter `tpl_recout'", ++lineNum, IMarker.SEVERITY_ERROR));
markersToCheck.add(new MarkerToCheck("Reference to a value was expected instead of a call of function `@ExpectedValueTypeTest.frt', which return a template", ++lineNum, IMarker.SEVERITY_ERROR));
markersToCheck.add(new MarkerToCheck("Reference to a value was expected instead of template parameter `pl_recin'", ++lineNum, IMarker.SEVERITY_ERROR));
markersToCheck.add(new MarkerToCheck("Reference to a value was expected instead of `inout' template parameter `pl_recinout'", ++lineNum, IMarker.SEVERITY_ERROR));
markersToCheck.add(new MarkerToCheck("Reference to a value was expected instead of `out' template parameter `pl_recout'", ++lineNum, IMarker.SEVERITY_ERROR));
markersToCheck.add(new MarkerToCheck("Reference to a value was expected instead of a call of function `@ExpectedValueTypeTest.f_rt', which return a template", ++lineNum, IMarker.SEVERITY_ERROR));
lineNum += 5;
markersToCheck.add(new MarkerToCheck("Reference to a value was expected instead of template variable `vl_rec9'", lineNum, IMarker.SEVERITY_ERROR));
markersToCheck.add(new MarkerToCheck("Reference to a value was expected instead of template variable `vt_rec9'", lineNum, IMarker.SEVERITY_ERROR));
lineNum += 17;
markersToCheck.add(new MarkerToCheck("Reference to a value was expected instead of template module parameter `@ExpectedValueTypeTest.tsp_i'", lineNum, IMarker.SEVERITY_ERROR));
lineNum += 19;
markersToCheck.add(new MarkerToCheck("Reference to a template variable or template parameter was expected for an `out' template parameter instead of template `vlt_trec3'", lineNum, IMarker.SEVERITY_ERROR));
markersToCheck.add(new MarkerToCheck("Reference to a template variable or template parameter was expected for an `out' template parameter instead of template `t_trec3'", lineNum, IMarker.SEVERITY_ERROR));
return markersToCheck;
}
}
package org.eclipse.titan.regressiontests.designer.statictests.Basic_tests;
import java.util.ArrayList;
import org.eclipse.core.resources.IMarker;
import org.eclipse.titan.regressiontests.designer.Designer_plugin_tests;
import org.eclipse.titan.regressiontests.library.MarkerToCheck;
import org.junit.Test;
public class Structured {
@Test
public void structured_ttcn() throws Exception {
Designer_plugin_tests.checkSemanticMarkersOnFile( structured_ttcn_initializer(), "cfgFile/define/structured/structured.ttcn");
Designer_plugin_tests.checkSyntaxMarkersOnFile(structured_cfg_initializer(), "cfgFile/define/structured/structured.cfg");
}
private ArrayList<MarkerToCheck> structured_ttcn_initializer() {
//structured.ttcn
ArrayList<MarkerToCheck> markersToCheck = new ArrayList<MarkerToCheck>(35);
int lineNum = 107;
markersToCheck.add(new MarkerToCheck("The constant `@structured.CLASSMARK2_GSM_ONLY' with name CLASSMARK2_GSM_ONLY breaks the naming convention `cg_.*'", lineNum, IMarker.SEVERITY_WARNING));
lineNum += 26;
markersToCheck.add(new MarkerToCheck("The constant `@structured.CR_DEFAULT' with name CR_DEFAULT breaks the naming convention `cg_.*'", lineNum, IMarker.SEVERITY_WARNING));
lineNum += 85;
markersToCheck.add(new MarkerToCheck("The template variable `vl_expected' with name vl_expected breaks the naming convention `vt.*'", lineNum, IMarker.SEVERITY_WARNING));
lineNum += 5;
markersToCheck.add(new MarkerToCheck("The template variable `vl_expected' with name vl_expected breaks the naming convention `vt.*'", lineNum, IMarker.SEVERITY_WARNING));
lineNum += 5;
markersToCheck.add(new MarkerToCheck("The template variable `vl_expected' with name vl_expected breaks the naming convention `vt.*'", lineNum, IMarker.SEVERITY_WARNING));
lineNum += 5;
markersToCheck.add(new MarkerToCheck("The template variable `vl_expected' with name vl_expected breaks the naming convention `vt.*'", lineNum, IMarker.SEVERITY_WARNING));
lineNum += 5;
markersToCheck.add(new MarkerToCheck("The template variable `vl_expected' with name vl_expected breaks the naming convention `vt.*'", lineNum, IMarker.SEVERITY_WARNING));
lineNum += 5;
markersToCheck.add(new MarkerToCheck("The template variable `vl_expected' with name vl_expected breaks the naming convention `vt.*'", lineNum, IMarker.SEVERITY_WARNING));
lineNum += 5;
markersToCheck.add(new MarkerToCheck("The template variable `vl_expected' with name vl_expected breaks the naming convention `vt.*'", lineNum, IMarker.SEVERITY_WARNING));
lineNum += 6;
markersToCheck.add(new MarkerToCheck("The template variable `vl_expected' with name vl_expected breaks the naming convention `vt.*'", lineNum, IMarker.SEVERITY_WARNING));
lineNum += 5;
markersToCheck.add(new MarkerToCheck("The template variable `vl_expected' with name vl_expected breaks the naming convention `vt.*'", lineNum, IMarker.SEVERITY_WARNING));
lineNum += 5;
markersToCheck.add(new MarkerToCheck("The template variable `vl_expected' with name vl_expected breaks the naming convention `vt.*'", lineNum, IMarker.SEVERITY_WARNING));
lineNum += 5;
markersToCheck.add(new MarkerToCheck("The template variable `vl_expected' with name vl_expected breaks the naming convention `vt.*'", lineNum, IMarker.SEVERITY_WARNING));
lineNum += 5;
markersToCheck.add(new MarkerToCheck("The template variable `vl_expected' with name vl_expected breaks the naming convention `vt.*'", lineNum, IMarker.SEVERITY_WARNING));
lineNum += 4;
markersToCheck.add(new MarkerToCheck("The template variable `vl_expected' with name vl_expected breaks the naming convention `vt.*'", lineNum, IMarker.SEVERITY_WARNING));
lineNum += 5;
markersToCheck.add(new MarkerToCheck("The template variable `vl_expected' with name vl_expected breaks the naming convention `vt.*'", lineNum, IMarker.SEVERITY_WARNING));
lineNum += 5;
markersToCheck.add(new MarkerToCheck("The template variable `vl_expected' with name vl_expected breaks the naming convention `vt.*'", lineNum, IMarker.SEVERITY_WARNING));
lineNum += 4;
markersToCheck.add(new MarkerToCheck("The template variable `vl_expected' with name vl_expected breaks the naming convention `vt.*'", lineNum, IMarker.SEVERITY_WARNING));
lineNum += 5;
markersToCheck.add(new MarkerToCheck("The template variable `vl_expected' with name vl_expected breaks the naming convention `vt.*'", lineNum, IMarker.SEVERITY_WARNING));
lineNum += 4;
markersToCheck.add(new MarkerToCheck("The template variable `vl_expected' with name vl_expected breaks the naming convention `vt.*'", lineNum, IMarker.SEVERITY_WARNING));
lineNum += 5;
markersToCheck.add(new MarkerToCheck("The template variable `vl_expected' with name vl_expected breaks the naming convention `vt.*'", lineNum, IMarker.SEVERITY_WARNING));
lineNum += 7;
markersToCheck.add(new MarkerToCheck("The template variable `vl_expected' with name vl_expected breaks the naming convention `vt.*'", lineNum, IMarker.SEVERITY_WARNING));
lineNum += 12;
markersToCheck.add(new MarkerToCheck("The template variable `vl_expected' with name vl_expected breaks the naming convention `vt.*'", lineNum, IMarker.SEVERITY_WARNING));
lineNum += 6;
markersToCheck.add(new MarkerToCheck("The template variable `vl_expected' with name vl_expected breaks the naming convention `vt.*'", lineNum, IMarker.SEVERITY_WARNING));
lineNum += 6;
markersToCheck.add(new MarkerToCheck("The template variable `vl_expected' with name vl_expected breaks the naming convention `vt.*'", lineNum, IMarker.SEVERITY_WARNING));
lineNum += 6;
markersToCheck.add(new MarkerToCheck("The template variable `vl_expected' with name vl_expected breaks the naming convention `vt.*'", lineNum, IMarker.SEVERITY_WARNING));
lineNum += 6;
markersToCheck.add(new MarkerToCheck("The template variable `vl_expected' with name vl_expected breaks the naming convention `vt.*'", lineNum, IMarker.SEVERITY_WARNING));
lineNum += 6;
markersToCheck.add(new MarkerToCheck("The template variable `vl_expected' with name vl_expected breaks the naming convention `vt.*'", lineNum, IMarker.SEVERITY_WARNING));
lineNum += 6;
markersToCheck.add(new MarkerToCheck("The template variable `vl_expected' with name vl_expected breaks the naming convention `vt.*'", lineNum, IMarker.SEVERITY_WARNING));
lineNum += 6;
markersToCheck.add(new MarkerToCheck("The template variable `vl_expected' with name vl_expected breaks the naming convention `vt.*'", lineNum, IMarker.SEVERITY_WARNING));
lineNum += 6;
markersToCheck.add(new MarkerToCheck("The template variable `vl_expected' with name vl_expected breaks the naming convention `vt.*'", lineNum, IMarker.SEVERITY_WARNING));
lineNum += 6;
markersToCheck.add(new MarkerToCheck("The template variable `vl_expected' with name vl_expected breaks the naming convention `vt.*'", lineNum, IMarker.SEVERITY_WARNING));
lineNum += 6;
markersToCheck.add(new MarkerToCheck("The template variable `vl_expected' with name vl_expected breaks the naming convention `vt.*'", lineNum, IMarker.SEVERITY_WARNING));
lineNum += 5;
markersToCheck.add(new MarkerToCheck("The template variable `vl_expected' with name vl_expected breaks the naming convention `vt.*'", lineNum, IMarker.SEVERITY_WARNING));
lineNum += 5;
markersToCheck.add(new MarkerToCheck("The template variable `vl_expected' with name vl_expected breaks the naming convention `vt.*'", lineNum, IMarker.SEVERITY_WARNING));
return markersToCheck;
}
//structured_cfg
//FIXME: These are not the normal markers, there are faulty!!! Plugin shall be repaired !!!
private ArrayList<MarkerToCheck> structured_cfg_initializer() {
//structured.cfg
ArrayList<MarkerToCheck> markersToCheck = new ArrayList<MarkerToCheck>(101);
int lineNum = 55;
markersToCheck.add(new MarkerToCheck("extraneous input '}' expecting {<EOF>, MAIN_CONTROLLER_SECTION, INCLUDE_SECTION, ORDERED_INCLUDE_SECTION, EXECUTE_SECTION, DEFINE_SECTION, EXTERNAL_COMMANDS_SECTION, TESTPORT_PARAMETERS_SECTION, GROUPS_SECTION, MODULE_PARAMETERS_SECTION, COMPONENTS_SECTION, LOGGING_SECTION, PROFILER_SECTION, TTCN3IDENTIFIER5}", lineNum, IMarker.SEVERITY_WARNING));
markersToCheck.add(new MarkerToCheck("mismatched input '{' expecting ENDCHAR5", lineNum, IMarker.SEVERITY_WARNING));
markersToCheck.add(new MarkerToCheck("token recognition error at: '/$'", lineNum, IMarker.SEVERITY_WARNING));
lineNum += 16;
markersToCheck.add(new MarkerToCheck("token recognition error at: '\\a'", lineNum, IMarker.SEVERITY_WARNING));
lineNum += 24;
markersToCheck.add(new MarkerToCheck("extraneous input '{' expecting {<EOF>, MAIN_CONTROLLER_SECTION, INCLUDE_SECTION, ORDERED_INCLUDE_SECTION, EXECUTE_SECTION, DEFINE_SECTION, EXTERNAL_COMMANDS_SECTION, TESTPORT_PARAMETERS_SECTION, GROUPS_SECTION, MODULE_PARAMETERS_SECTION, COMPONENTS_SECTION, LOGGING_SECTION, PROFILER_SECTION, TTCN3IDENTIFIER5}", lineNum, IMarker.SEVERITY_WARNING));
markersToCheck.add(new MarkerToCheck("extraneous input '{' expecting ENDCHAR5", lineNum, IMarker.SEVERITY_WARNING));
int i = 0;
for (i = 0; i < 4; i++) {
markersToCheck.add(new MarkerToCheck("token recognition error at: ','", lineNum, IMarker.SEVERITY_WARNING));
}
lineNum += 2;
markersToCheck.add(new MarkerToCheck("mismatched input '${DEF_41}' expecting ENDCHAR5", lineNum, IMarker.SEVERITY_WARNING));
for (i = 0; i < 3; i++) {
markersToCheck.add(new MarkerToCheck("token recognition error at: ','", lineNum, IMarker.SEVERITY_WARNING));
}
lineNum += 3;
markersToCheck.add(new MarkerToCheck("token recognition error at: ','", lineNum, IMarker.SEVERITY_WARNING));
markersToCheck.add(new MarkerToCheck("missing ENDCHAR5 at 'f'", ++lineNum, IMarker.SEVERITY_WARNING));
for (i = 0; i < 4; i++) {
markersToCheck.add(new MarkerToCheck("token recognition error at: ','", lineNum++, IMarker.SEVERITY_WARNING));
}
markersToCheck.add(new MarkerToCheck("extraneous input '}' expecting {<EOF>, MAIN_CONTROLLER_SECTION, INCLUDE_SECTION, ORDERED_INCLUDE_SECTION, EXECUTE_SECTION, DEFINE_SECTION, EXTERNAL_COMMANDS_SECTION, TESTPORT_PARAMETERS_SECTION, GROUPS_SECTION, MODULE_PARAMETERS_SECTION, COMPONENTS_SECTION, LOGGING_SECTION, PROFILER_SECTION, IPV6_5, TTCN3IDENTIFIER5, MACRORVALUE5, STRING5, MACRO_ID5, MACRO_INT5, MACRO_BOOL5, MACRO_FLOAT5, MACRO_EXP_CSTR5, MACRO_BSTR5, MACRO_HSTR5, MACRO_OSTR5, MACRO_BINARY5, MACRO_HOSTNAME5, MACRO5, BITSTRING5, HEXSTRING5, OCTETSTRING5, BITSTRINGMATCH5, HEXSTRINGMATCH5, OCTETSTRINGMATCH5}", ++lineNum, IMarker.SEVERITY_WARNING));
lineNum += 9;
markersToCheck.add(new MarkerToCheck("token recognition error at: ','", lineNum, IMarker.SEVERITY_WARNING));
markersToCheck.add(new MarkerToCheck("missing ENDCHAR5 at 'f'", ++lineNum, IMarker.SEVERITY_WARNING));
for (i = 0; i < 4; i++) {
markersToCheck.add(new MarkerToCheck("token recognition error at: ','", lineNum++, IMarker.SEVERITY_WARNING));
}
markersToCheck.add(new MarkerToCheck("extraneous input '}' expecting {<EOF>, MAIN_CONTROLLER_SECTION, INCLUDE_SECTION, ORDERED_INCLUDE_SECTION, EXECUTE_SECTION, DEFINE_SECTION, EXTERNAL_COMMANDS_SECTION, TESTPORT_PARAMETERS_SECTION, GROUPS_SECTION, MODULE_PARAMETERS_SECTION, COMPONENTS_SECTION, LOGGING_SECTION, PROFILER_SECTION, IPV6_5, TTCN3IDENTIFIER5, MACRORVALUE5, STRING5, MACRO_ID5, MACRO_INT5, MACRO_BOOL5, MACRO_FLOAT5, MACRO_EXP_CSTR5, MACRO_BSTR5, MACRO_HSTR5, MACRO_OSTR5, MACRO_BINARY5, MACRO_HOSTNAME5, MACRO5, BITSTRING5, HEXSTRING5, OCTETSTRING5, BITSTRINGMATCH5, HEXSTRINGMATCH5, OCTETSTRINGMATCH5}", ++lineNum, IMarker.SEVERITY_WARNING));
lineNum += 3;
markersToCheck.add(new MarkerToCheck("token recognition error at: ','", lineNum, IMarker.SEVERITY_WARNING));
markersToCheck.add(new MarkerToCheck("missing ENDCHAR5 at 'f'", ++lineNum, IMarker.SEVERITY_WARNING));
for (i = 0; i < 4; i++) {
markersToCheck.add(new MarkerToCheck("token recognition error at: ','", lineNum++, IMarker.SEVERITY_WARNING));
}
markersToCheck.add(new MarkerToCheck("extraneous input '}' expecting {<EOF>, MAIN_CONTROLLER_SECTION, INCLUDE_SECTION, ORDERED_INCLUDE_SECTION, EXECUTE_SECTION, DEFINE_SECTION, EXTERNAL_COMMANDS_SECTION, TESTPORT_PARAMETERS_SECTION, GROUPS_SECTION, MODULE_PARAMETERS_SECTION, COMPONENTS_SECTION, LOGGING_SECTION, PROFILER_SECTION, IPV6_5, TTCN3IDENTIFIER5, MACRORVALUE5, STRING5, MACRO_ID5, MACRO_INT5, MACRO_BOOL5, MACRO_FLOAT5, MACRO_EXP_CSTR5, MACRO_BSTR5, MACRO_HSTR5, MACRO_OSTR5, MACRO_BINARY5, MACRO_HOSTNAME5, MACRO5, BITSTRING5, HEXSTRING5, OCTETSTRING5, BITSTRINGMATCH5, HEXSTRINGMATCH5, OCTETSTRINGMATCH5}", ++lineNum, IMarker.SEVERITY_WARNING));
lineNum += 4;
markersToCheck.add(new MarkerToCheck("token recognition error at: ','", lineNum, IMarker.SEVERITY_WARNING));
markersToCheck.add(new MarkerToCheck("missing ENDCHAR5 at 'f'", ++lineNum, IMarker.SEVERITY_WARNING));
for (i = 0; i < 4; i++) {
markersToCheck.add(new MarkerToCheck("token recognition error at: ','", lineNum++, IMarker.SEVERITY_WARNING));
}
markersToCheck.add(new MarkerToCheck("extraneous input '}' expecting {<EOF>, MAIN_CONTROLLER_SECTION, INCLUDE_SECTION, ORDERED_INCLUDE_SECTION, EXECUTE_SECTION, DEFINE_SECTION, EXTERNAL_COMMANDS_SECTION, TESTPORT_PARAMETERS_SECTION, GROUPS_SECTION, MODULE_PARAMETERS_SECTION, COMPONENTS_SECTION, LOGGING_SECTION, PROFILER_SECTION, IPV6_5, TTCN3IDENTIFIER5, MACRORVALUE5, STRING5, MACRO_ID5, MACRO_INT5, MACRO_BOOL5, MACRO_FLOAT5, MACRO_EXP_CSTR5, MACRO_BSTR5, MACRO_HSTR5, MACRO_OSTR5, MACRO_BINARY5, MACRO_HOSTNAME5, MACRO5, BITSTRING5, HEXSTRING5, OCTETSTRING5, BITSTRINGMATCH5, HEXSTRINGMATCH5, OCTETSTRINGMATCH5}", ++lineNum, IMarker.SEVERITY_WARNING));
lineNum += 12;
markersToCheck.add(new MarkerToCheck("token recognition error at: ','", lineNum, IMarker.SEVERITY_WARNING));
markersToCheck.add(new MarkerToCheck("missing ENDCHAR5 at 'a5_1'", ++lineNum, IMarker.SEVERITY_WARNING));
for (i = 0; i < 11; i++) {
markersToCheck.add(new MarkerToCheck("token recognition error at: ','", lineNum++, IMarker.SEVERITY_WARNING));
}
markersToCheck.add(new MarkerToCheck("token recognition error at: ','", ++lineNum, IMarker.SEVERITY_WARNING));
markersToCheck.add(new MarkerToCheck("missing ENDCHAR5 at 'a5_3'", ++lineNum, IMarker.SEVERITY_WARNING));
for (i = 0; i < 6; i++) {
markersToCheck.add(new MarkerToCheck("token recognition error at: ','", lineNum++, IMarker.SEVERITY_WARNING));
}
markersToCheck.add(new MarkerToCheck("extraneous input '}' expecting {<EOF>, MAIN_CONTROLLER_SECTION, INCLUDE_SECTION, ORDERED_INCLUDE_SECTION, EXECUTE_SECTION, DEFINE_SECTION, EXTERNAL_COMMANDS_SECTION, TESTPORT_PARAMETERS_SECTION, GROUPS_SECTION, MODULE_PARAMETERS_SECTION, COMPONENTS_SECTION, LOGGING_SECTION, PROFILER_SECTION, IPV6_5, TTCN3IDENTIFIER5, MACRORVALUE5, STRING5, MACRO_ID5, MACRO_INT5, MACRO_BOOL5, MACRO_FLOAT5, MACRO_EXP_CSTR5, MACRO_BSTR5, MACRO_HSTR5, MACRO_OSTR5, MACRO_BINARY5, MACRO_HOSTNAME5, MACRO5, BITSTRING5, HEXSTRING5, OCTETSTRING5, BITSTRINGMATCH5, HEXSTRINGMATCH5, OCTETSTRINGMATCH5}", ++lineNum, IMarker.SEVERITY_WARNING));
lineNum += 4;
markersToCheck.add(new MarkerToCheck("token recognition error at: ','", lineNum, IMarker.SEVERITY_WARNING));
markersToCheck.add(new MarkerToCheck("missing ENDCHAR5 at 'a5_3'", ++lineNum, IMarker.SEVERITY_WARNING));
for (i = 0; i < 6; i++) {
markersToCheck.add(new MarkerToCheck("token recognition error at: ','", lineNum++, IMarker.SEVERITY_WARNING));
}
markersToCheck.add(new MarkerToCheck("extraneous input '}' expecting {<EOF>, MAIN_CONTROLLER_SECTION, INCLUDE_SECTION, ORDERED_INCLUDE_SECTION, EXECUTE_SECTION, DEFINE_SECTION, EXTERNAL_COMMANDS_SECTION, TESTPORT_PARAMETERS_SECTION, GROUPS_SECTION, MODULE_PARAMETERS_SECTION, COMPONENTS_SECTION, LOGGING_SECTION, PROFILER_SECTION, IPV6_5, TTCN3IDENTIFIER5, MACRORVALUE5, STRING5, MACRO_ID5, MACRO_INT5, MACRO_BOOL5, MACRO_FLOAT5, MACRO_EXP_CSTR5, MACRO_BSTR5, MACRO_HSTR5, MACRO_OSTR5, MACRO_BINARY5, MACRO_HOSTNAME5, MACRO5, BITSTRING5, HEXSTRING5, OCTETSTRING5, BITSTRINGMATCH5, HEXSTRINGMATCH5, OCTETSTRINGMATCH5}", ++lineNum, IMarker.SEVERITY_WARNING));
lineNum += 3;
markersToCheck.add(new MarkerToCheck("token recognition error at: ','", lineNum, IMarker.SEVERITY_WARNING));
markersToCheck.add(new MarkerToCheck("missing ENDCHAR5 at 'a5_1'", ++lineNum, IMarker.SEVERITY_WARNING));
for (i = 0; i < 11; i++) {
markersToCheck.add(new MarkerToCheck("token recognition error at: ','", lineNum++, IMarker.