Commit dac59fbf authored by Miklos Magyari's avatar Miklos Magyari

OOP: added a skeleton for negative oop regression tests

Signed-off-by: Miklos Magyari's avatarMiklos Magyari <miklos.magyari@sigmatechnology.se>
parent 9cce1ae4
/******************************************************************************
* Copyright (c) 2000-2021 Ericsson Telecom AB
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html
*
* Contributors:
* Magyari, Miklos
*
******************************************************************************/
module classesNegative {
type component CT {
port PT pt_PT;
}
type port PT message { inout integer; } with { extension "internal" }
type class BrokenClass1;
type class CorrectClass1 { }
}
......@@ -8,16 +8,25 @@
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 OOP_Syntax_tests {
private static final String DIR_PATH = "src/Basic_tests/";
@Test
public void OOPSytax_Test() throws Exception {
public void OOPSyntax_Test() throws Exception {
checkZeroMarkersOnFile("OopPositiveBasicSyntax.ttcn");
}
@Test
public void OOPSyntaxNegative_Test() throws Exception {
Designer_plugin_tests.checkSyntaxMarkersOnFile(oopNegative_ttcn_initializer(), "src/Basic_tests/OopNegativeBasicSyntax.ttcn");
}
private static void checkZeroMarkersOnFile(final String fileName) {
final String filePath = DIR_PATH + fileName;
......@@ -25,4 +34,12 @@ public class OOP_Syntax_tests {
Designer_plugin_tests.checkRealZeroSemanticMarkersOnFile(filePath);
}
private ArrayList<MarkerToCheck> oopNegative_ttcn_initializer() {
//oopNegative.ttcn
ArrayList<MarkerToCheck> markersToCheck = new ArrayList<MarkerToCheck>(1);
int lineNum = 21;
markersToCheck.add(new MarkerToCheck("mismatched input ';' expecting '{'", lineNum, IMarker.SEVERITY_ERROR));
return markersToCheck;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment