Commit ffd9fd68 authored by Christoph Richter's avatar Christoph Richter
Browse files

Fixed failing tests

parent ec21b927
......@@ -83,7 +83,7 @@ grammar EmbeddedMontiArc extends de.monticore.lang.monticar.Common2 {
symbol scope Component implements Element =
"component" Name
genericTypeParameters:TypeParameters?
genericTypeParameters:TypeParameters2?
( "(" (Parameter || ",")+ ")" )?
("implements" superComponent:ReferenceType)?
body:ComponentBody;
......
......@@ -38,7 +38,7 @@ public class ConnectorEndPointCorrectlyQualified
private void checkEndpointCorrectlyQualified(ASTQualifiedNameWithArray name,
Predicate<Integer> predicate, String errorMessage) {
int i = 0;
if (name.getCompName() != null)
if (name.getCompNameOpt().isPresent())
++i;
if (name.getPortName() != null)
++i;
......
......@@ -22,8 +22,8 @@ package de.monticore.lang.embeddedmontiarc.cocos;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._ast.ASTComponent;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._cocos.EmbeddedMontiArcASTComponentCoCo;
import de.monticore.types.types._ast.ASTTypeParameters;
import de.monticore.types.types._ast.ASTTypeVariableDeclaration;
import de.monticore.lang.monticar.types2._ast.ASTTypeParameters2;
import de.monticore.lang.monticar.types2._ast.ASTTypeVariableDeclaration2;
import de.se_rwth.commons.logging.Log;
import java.util.ArrayList;
......@@ -40,14 +40,14 @@ public class TypeParameterNamesUnique implements EmbeddedMontiArcASTComponentCoC
@Override
public void check(ASTComponent node) {
if (node.getGenericTypeParametersOpt().isPresent()) {
ASTTypeParameters typeParameters = node.getGenericTypeParametersOpt().get();
ASTTypeParameters2 typeParameters = node.getGenericTypeParametersOpt().get();
List<String> typeParameterNames = new ArrayList<>();
for (ASTTypeVariableDeclaration typeParameter : typeParameters.getTypeVariableDeclarationList()) {
for (ASTTypeVariableDeclaration2 typeParameter : typeParameters.getTypeVariableDeclaration2List()) {
if (typeParameterNames.contains(typeParameter.getName())) {
if (typeParameter.getNamingResolutionOpt().isPresent() && typeParameterNames.contains(typeParameter.getNamingResolution().getName())) {
Log.error(String.format(
"0x35F1A The formal type parameter name \"%s\" is not unique",
typeParameter.getName()), typeParameter.get_SourcePositionStart());
typeParameter.getNamingResolution().getName()), typeParameter.get_SourcePositionStart());
} else {
//typeParameterNames.add(typeParameter.getNamingResolution().get().getName());
}
......
......@@ -22,7 +22,7 @@ package de.monticore.lang.embeddedmontiarc.embeddedmontiarc._ast;
import de.monticore.lang.monticar.common2._ast.ASTParameter;
import de.monticore.types.types._ast.ASTReferenceType;
import de.monticore.types.types._ast.ASTTypeParameters;
import de.monticore.lang.monticar.types2._ast.ASTTypeParameters2;
import java.util.ArrayList;
import java.util.List;
......@@ -40,7 +40,7 @@ public class ASTComponent extends ASTComponentTOP {
super();
}
public ASTComponent(String name, Optional<ASTTypeParameters> genericTypeParameters, List<ASTParameter> parameters, Optional<ASTReferenceType> superComponent, ASTComponentBody body) {
public ASTComponent(String name, Optional<ASTTypeParameters2> genericTypeParameters, List<ASTParameter> parameters, Optional<ASTReferenceType> superComponent, ASTComponentBody body) {
super(name, genericTypeParameters, parameters, superComponent, body);
}
......
......@@ -21,15 +21,19 @@
package de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc.types.TypesPrinter;
import de.monticore.lang.monticar.resolution._ast.ASTNamingResolution;
import de.monticore.lang.monticar.ts.MCTypeSymbol;
import de.monticore.lang.monticar.ts.MontiCarSymbolFactory;
import de.monticore.lang.monticar.ts.MontiCarTypeSymbol;
import de.monticore.lang.monticar.ts.references.MontiCarTypeSymbolReference;
import de.monticore.lang.monticar.types2._ast.ASTTypeParameters2;
import de.monticore.lang.monticar.types2._ast.ASTTypeVariableDeclaration2;
import de.monticore.symboltable.GlobalScope;
import de.monticore.symboltable.ImportStatement;
import de.monticore.symboltable.Scope;
import de.monticore.symboltable.types.references.ActualTypeArgument;
import de.monticore.types.types._ast.*;
import de.se_rwth.commons.logging.Log;
import javax.annotation.Nullable;
import java.util.ArrayList;
......@@ -61,17 +65,39 @@ public class EMAJavaHelper {
// see ComponentSymbol addFormalTypeParameters etc.
protected static List<MCTypeSymbol> addTypeParametersToType(
ComponentSymbol typeSymbol,
ASTTypeParameters optionalTypeParameters, Scope currentScope) {
ASTTypeParameters astTypeParameters = optionalTypeParameters;
for (ASTTypeVariableDeclaration astTypeParameter : astTypeParameters.getTypeVariableDeclarationList()) {
final String typeVariableName = astTypeParameter.getName();
addFormalTypeParameter(typeVariableName, astTypeParameter, currentScope, typeSymbol);
ASTTypeParameters2 optionalTypeParameters, Scope currentScope) {
ASTTypeParameters2 astTypeParameters = optionalTypeParameters;
for (ASTTypeVariableDeclaration2 astTypeParameter : astTypeParameters.getTypeVariableDeclaration2List()) {
if (astTypeParameter.getResolutionDeclarationOpt().isPresent()) {
//Not handled here
// new type parameter
// TypeParameters/TypeVariables are seen as type declarations.
// For each variable instantiate a MontiCarTypeSymbol.
//TODO FIX if not present
if (astTypeParameter.getResolutionDeclaration().getTypeName() != null) {
final String typeVariableName = astTypeParameter.getResolutionDeclaration().getTypeName();
addFormalTypeParameter(typeVariableName, astTypeParameter, currentScope, typeSymbol);
} else if (astTypeParameter.getResolutionDeclaration() instanceof ASTNamingResolution) {
final String typeVariableName = astTypeParameter.getResolutionDeclaration().getName();
addFormalTypeParameter(typeVariableName, astTypeParameter, currentScope, typeSymbol);
} else {
Log.debug(astTypeParameter.getResolutionDeclaration().toString(), "Resolution Declaration");
Log.debug("0xADTYPA Case not handled", "Implementation Missing");
}
} else {
final String typeVariableName = astTypeParameter.getNamingResolution().getName();
addFormalTypeParameter(typeVariableName, astTypeParameter, currentScope, typeSymbol);
}
}
return typeSymbol.getFormalTypeParameters();
}
private static void addFormalTypeParameter(String typeVariableName, ASTTypeVariableDeclaration astTypeParameter, Scope currentScope, ComponentSymbol typeSymbol) {
private static void addFormalTypeParameter(String typeVariableName, ASTTypeVariableDeclaration2
astTypeParameter, Scope currentScope, ComponentSymbol typeSymbol) {
MontiCarTypeSymbol javaTypeVariableSymbol = jSymbolFactory.createTypeVariable(typeVariableName);
// TODO implement
// // init type parameter
......@@ -83,7 +109,7 @@ public class EMAJavaHelper {
// }
// Treat type bounds are implemented interfaces, even though the
// first bound might be a class. See also JLS7.
List<ASTType> types = new ArrayList<ASTType>(astTypeParameter.getUpperBoundList());
List<ASTType> types = new ArrayList<ASTType>(astTypeParameter.getUpperBoundsList());
addInterfacesToTypeEMA(javaTypeVariableSymbol, types, currentScope);
......
......@@ -25,15 +25,15 @@ import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._ast.ASTPort;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._ast.ASTSubComponent;
import de.monticore.lang.monticar.common2._ast.ASTArrayAccess;
import de.monticore.lang.monticar.common2._ast.ASTQualifiedNameWithArray;
import de.monticore.types.types._ast.ASTTypeArgument;
import de.monticore.lang.monticar.resolution._ast.ASTUnitNumberResolution;
import de.monticore.lang.monticar.resolution._ast.ASTUnitNumberTypeArgument;
import de.monticore.lang.monticar.si._symboltable.ResolutionDeclarationSymbol;
import de.monticore.lang.monticar.ts.MCTypeSymbol;
import de.monticore.lang.monticar.ts.references.MCTypeReference;
import de.monticore.types.types._ast.ASTSimpleReferenceType;
import de.monticore.lang.monticar.resolution._ast.ASTUnitNumberResolution;
import de.monticore.lang.monticar.types2._ast.ASTUnitNumberTypeArgument;
import de.monticore.numberunit._ast.ASTNumberWithUnit;
import de.monticore.symboltable.MutableScope;
import de.monticore.types.types._ast.ASTSimpleReferenceType;
import de.monticore.types.types._ast.ASTTypeArgument;
import de.se_rwth.commons.logging.Log;
import java.util.ArrayList;
......@@ -111,7 +111,7 @@ public class EMAPortHelper {
if (node.getUnitNumberResolutionOpt().isPresent()) {
ASTUnitNumberResolution unitNumberResolution = node.getUnitNumberResolution();
name = unitNumberResolution.doResolution(symbolTableCreator.componentStack.
peek().getResolutionDeclarationSymbols());
peek().getResolutionDeclarationSymbols());
}
return name;
......@@ -233,7 +233,7 @@ public class EMAPortHelper {
}
return names;
}
public static String getNameArrayPart(ASTArrayAccess arrayPart) {
String result = "";
......@@ -398,7 +398,6 @@ public class EMAPortHelper {
}
}
}
return -1;
}
}
......@@ -26,7 +26,8 @@ import de.monticore.lang.embeddedmontiarc.helper.ArcTypePrinter;
import de.monticore.lang.embeddedmontiarc.trafos.AutoConnection;
import de.monticore.lang.monticar.ValueSymbol;
import de.monticore.lang.monticar.common2._ast.ASTQualifiedNameWithArray;
import de.monticore.lang.monticar.ranges._ast.ASTUnitNumberExpression;
import de.monticore.lang.monticar.resolution._ast.ASTUnitNumberExpression;
import de.monticore.lang.monticar.resolution._ast.ASTUnitNumberResolutionExpression;
import de.monticore.lang.monticar.ts.MCTypeSymbol;
import de.monticore.lang.monticar.ts.MontiCarSymbolFactory;
import de.monticore.lang.monticar.ts.references.MCTypeReference;
......
......@@ -30,27 +30,27 @@ import de.monticore.lang.monticar.ValueSymbol;
import de.monticore.lang.monticar.common2._ast.ASTAdaptableKeyword;
import de.monticore.lang.monticar.common2._ast.ASTParameter;
import de.monticore.lang.monticar.resolution._ast.ASTResolutionDeclaration;
import de.monticore.lang.monticar.resolution._parser.ResolutionParser;
import de.monticore.lang.monticar.resolution._ast.ASTTypeNameResolutionDeclaration;
import de.monticore.lang.monticar.resolution._ast.ASTUnitNumberResolution;
import de.monticore.lang.monticar.si._symboltable.ResolutionDeclarationSymbol;
import de.monticore.lang.monticar.si._symboltable.ResolutionDeclarationSymbolReference;
import de.monticore.lang.monticar.ts.MCFieldSymbol;
import de.monticore.lang.monticar.ts.MCTypeSymbol;
import de.monticore.lang.monticar.ts.references.MCTypeReference;
import de.monticore.lang.monticar.ts.references.MontiCarTypeSymbolReference;
import de.monticore.lang.monticar.resolution._ast.ASTTypeNameResolutionDeclaration;
import de.monticore.lang.monticar.resolution._ast.ASTUnitNumberResolution;
import de.monticore.lang.monticar.types2._ast.ASTTypeParameters2;
import de.monticore.lang.monticar.types2._ast.ASTTypeVariableDeclaration2;
import de.monticore.numberunit._ast.ASTNumberWithUnit;
import de.monticore.lang.monticar.types2._ast.ASTUnitNumberResolution;
import de.monticore.symboltable.Scope;
import de.monticore.symboltable.types.TypeSymbol;
import de.monticore.symboltable.types.references.TypeReference;
import de.monticore.types.types._ast.ASTTypeParameters;
import de.monticore.types.types._ast.ASTTypeVariableDeclaration;
import de.se_rwth.commons.logging.Log;
import org.jscience.mathematics.number.Rational;
import java.io.IOException;
import java.util.List;
import java.util.Optional;
import static de.monticore.numberunit.Rationals.doubleToRational;
/**
......@@ -100,11 +100,11 @@ public class EmbeddedMontiArcSymbolTableHelper {
}
} else {
for (int i = 0; i < componentSymbolReference.getResolutionDeclarationSymbols().size(); ++i) {
Double numberToSetTo = ((ASTUnitNumberResolution) componentSymbolReference
Rational numberToSetTo = doubleToRational(((ASTUnitNumberResolution) componentSymbolReference
.getReferencedSymbol().getResolutionDeclarationSymbols().get(i).getASTResolution())
.getNumber().get();
.getNumber().get());
((ASTUnitNumberResolution) componentSymbolReference.getResolutionDeclarationSymbols().get(i)
.getASTResolution()).setNumber(numberToSetTo);
.getASTResolution()).setNumber(numberToSetTo.doubleValue());
}
}
}
......@@ -144,32 +144,27 @@ public class EmbeddedMontiArcSymbolTableHelper {
public static void handleResolutionDeclaration(ComponentSymbol typeSymbol,
ASTTypeParameters astTypeParameters, Scope currentScope,
ASTTypeParameters2 astTypeParameters, Scope currentScope,
ASTComponent node,
EmbeddedMontiArcSymbolTableCreator symbolTableCreator) {
for (ASTTypeVariableDeclaration astTypeParameter : astTypeParameters.getTypeVariableDeclarationList()) {
ResolutionParser parser = new ResolutionParser();
try {
Optional<ASTResolutionDeclaration> astResDeclOpt = parser.parse_StringResolutionDeclaration(astTypeParameter.getName());
if (astResDeclOpt.isPresent()) {
Log.debug(astTypeParameter.toString(), "Resolution Declaration:");
ASTResolutionDeclaration astResDecl = astResDeclOpt.get();
ResolutionDeclarationSymbolReference resDeclSymRef;
resDeclSymRef = ResolutionDeclarationSymbolReference.constructResolutionDeclSymbolRef(
((ASTTypeNameResolutionDeclaration) astResDecl).getName(),
((ASTTypeNameResolutionDeclaration) astResDecl).getResolution());
Log.debug(resDeclSymRef.getNameToResolve(),
"Added ResolutionDeclarationSymbol with name: ");
typeSymbol.addResolutionDeclarationSymbol(resDeclSymRef);
// TODO Resolution maybe link with node
symbolTableCreator.addToScopeAndLinkWithNode(resDeclSymRef,
astTypeParameter);
}
} catch (IOException e) {
// handle silently -> do nothing
for (ASTTypeVariableDeclaration2 astTypeParameter : astTypeParameters.getTypeVariableDeclaration2List()) {
if (astTypeParameter.getResolutionDeclarationOpt().isPresent() && astTypeParameter
.getResolutionDeclaration() instanceof ASTTypeNameResolutionDeclaration) {
Log.debug(astTypeParameter.toString(), "Resolution Declaration:");
ASTResolutionDeclaration astResDecl = astTypeParameter.getResolutionDeclaration();
ResolutionDeclarationSymbolReference resDeclSymRef;
resDeclSymRef = ResolutionDeclarationSymbolReference.constructResolutionDeclSymbolRef(
astResDecl.getName(),
((ASTTypeNameResolutionDeclaration) astResDecl).getResolution());
Log.debug(resDeclSymRef.getNameToResolve(),
"Added ResolutionDeclarationSymbol with name: ");
typeSymbol.addResolutionDeclarationSymbol(resDeclSymRef);
// TODO Resolution maybe link with node
symbolTableCreator.addToScopeAndLinkWithNode(resDeclSymRef,
astTypeParameter);
}
}
}
......
......@@ -224,7 +224,7 @@ public class ExpandedComponentInstanceBuilder {
// 1) replace port generics
inst.getPortsList().stream()
// .filter(p -> p.getTypeReference().getReferencedSymbol().getFullName().equals(k.getFullName()))
.filter(p -> p.getTypeReference().getReferencedSymbol().getName().equals(k.getName()))
.filter( p -> p.getTypeReference().existsReferencedSymbol() ? p.getTypeReference().getReferencedSymbol().getName().equals(k.getName()) : false)
.forEachOrdered(p -> p.setTypeReference((MCTypeReference<? extends MCTypeSymbol>) v.getType()));
// 2) propagate component instance definition generics
......
......@@ -24,7 +24,7 @@ import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._ast.ASTSubComponent;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._ast.ASTSubComponentInstance;
import de.monticore.lang.monticar.si._symboltable.ResolutionDeclarationSymbol;
import de.monticore.lang.monticar.resolution._ast.ASTUnitNumberResolution;
import de.monticore.lang.monticar.types2._ast.ASTUnitNumberTypeArgument;
import de.monticore.lang.monticar.resolution._ast.ASTUnitNumberTypeArgument;
import de.monticore.symboltable.Symbol;
import de.monticore.types.types._ast.ASTSimpleReferenceType;
import de.monticore.types.types._ast.ASTTypeArgument;
......
......@@ -21,11 +21,13 @@
package de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable;
import de.monticore.lang.monticar.interfaces.TextualExpression;
import de.monticore.lang.monticar.ranges._ast.ASTUnitNumberExpression;
import de.monticore.lang.monticar.resolution._ast.ASTUnitNumberExpression;
import de.monticore.numberunit._ast.ASTNumberWithUnit;
import de.monticore.symboltable.CommonSymbol;
import de.monticore.symboltable.SymbolKind;
import java.text.DecimalFormat;
/**
* Only used for getting expression value
*
......@@ -51,7 +53,8 @@ public class UnitNumberExpressionSymbol extends CommonSymbol implements TextualE
if (num.getComplexNumber().isPresent()) {
result += String.format("%si%s", num.getComplexNumber().get().getRealNumber(), num.getComplexNumber().get().getImagineNumber());
} else if (num.getNumber().isPresent()) {
result += Double.toString(num.getNumber().get());
DecimalFormat format = new DecimalFormat("0.#");
result += format.format(num.getNumber().get());
} else {
result += num.toString();
}
......
......@@ -20,12 +20,11 @@
*/
package de.monticore.lang.embeddedmontiarc.embeddedmontiarc.types;
import de.monticore.lang.monticar.types2._ast.ASTTypeParameters2;
import de.monticore.lang.monticar.types2._ast.ASTTypeVariableDeclaration2;
import de.monticore.types.types._ast.*;
import de.monticore.lang.monticar.types2._ast.*;
import de.se_rwth.commons.Names;
import de.se_rwth.commons.logging.Log;
import java.util.Iterator;
import java.util.List;
/**
......@@ -69,16 +68,16 @@ public class TypesPrinter {
return getInstance().doPrintTypeWithoutTypeArguments(type);
}
public static String printTypeParameters(ASTTypeParameters params) {
public static String printTypeParameters(ASTTypeParameters2 params) {
return getInstance().doPrintTypeParameters(params);
}
public static String printTypeVariableDeclarationList(List<ASTTypeVariableDeclaration> decl) {
public static String printTypeVariableDeclarationList(List<ASTTypeVariableDeclaration2> decl) {
return getInstance().doPrintTypeVariableDeclarationList(decl);
}
public static String printTypeVariableDeclaration(ASTTypeVariableDeclaration decl) {
public static String printTypeVariableDeclaration(ASTTypeVariableDeclaration2 decl) {
return getInstance().doPrintTypeVariableDeclaration(decl);
}
......
......@@ -21,8 +21,10 @@
package de.monticore.lang.embeddedmontiarc.embeddedmontiarc.types;
import de.monticore.lang.monticar.printtype._ast.ASTPrintType;
import de.monticore.lang.monticar.types2._ast.ASTElementType;
import de.monticore.lang.monticar.types2._ast.ASTTypeParameters2;
import de.monticore.lang.monticar.types2._ast.ASTTypeVariableDeclaration2;
import de.monticore.types.types._ast.*;
import de.monticore.lang.monticar.types2._ast.*;
import de.se_rwth.commons.Names;
import de.se_rwth.commons.logging.Log;
......@@ -73,18 +75,18 @@ public class TypesPrinterImpl {
}
protected String doPrintTypeParameters(ASTTypeParameters params) {
return params != null && params.getTypeVariableDeclarationList() != null && !params.getTypeVariableDeclarationList().isEmpty() ? "<" + this.doPrintTypeVariableDeclarationList(params.getTypeVariableDeclarationList()) + ">" : "";
protected String doPrintTypeParameters(ASTTypeParameters2 params) {
return params != null && params.getTypeVariableDeclaration2List() != null && !params.getTypeVariableDeclaration2List().isEmpty() ? "<" + this.doPrintTypeVariableDeclarationList(params.getTypeVariableDeclaration2List()) + ">" : "";
}
protected String doPrintTypeVariableDeclarationList(List<ASTTypeVariableDeclaration> decl) {
protected String doPrintTypeVariableDeclarationList(List<ASTTypeVariableDeclaration2> decl) {
StringBuilder ret = new StringBuilder();
if (decl != null) {
String sep = "";
for (Iterator var4 = decl.iterator(); var4.hasNext(); sep = ", ") {
ASTTypeVariableDeclaration d = (ASTTypeVariableDeclaration) var4.next();
ASTTypeVariableDeclaration2 d = (ASTTypeVariableDeclaration2) var4.next();
ret.append(sep + this.doPrintTypeVariableDeclaration(d));
}
}
......@@ -92,14 +94,14 @@ public class TypesPrinterImpl {
return ret.toString();
}
protected String doPrintTypeVariableDeclaration(ASTTypeVariableDeclaration decl) {
protected String doPrintTypeVariableDeclaration(ASTTypeVariableDeclaration2 decl) {
StringBuilder ret = new StringBuilder();
if (decl != null) {
ret.append(decl.getName());
if (decl.getUpperBoundList() != null && !decl.getUpperBoundList().isEmpty()) {
ret.append(decl.getNamingResolution().getName());
if (decl.getUpperBoundsList() != null && !decl.getUpperBoundsList().isEmpty()) {
String sep = " extends ";
for (Iterator var4 = decl.getUpperBoundList().iterator(); var4.hasNext(); sep = " & ") {
for (Iterator var4 = decl.getUpperBoundsList().iterator(); var4.hasNext(); sep = " & ") {
ASTType type = (ASTType) var4.next();
ret.append(sep + this.doPrintType(type));
}
......
......@@ -22,7 +22,7 @@ package de.monticore.lang.embeddedmontiarc.helper;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._ast.ASTSubComponent;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc.types.TypesPrinter;
import de.monticore.lang.monticar.types2._ast.ASTUnitNumberTypeArgument;
import de.monticore.lang.monticar.resolution._ast.ASTUnitNumberTypeArgument;
import de.monticore.types.types._ast.ASTReferenceType;
import de.monticore.types.types._ast.ASTSimpleReferenceType;
import de.monticore.types.types._ast.ASTType;
......
......@@ -45,8 +45,8 @@ public class SymbolPrinter {
* help function for nested type arguments such as List<NewType<String, List<String>>>
*/
public static String printTypeParameters(ActualTypeArgument arg) {
String ret = arg.getType().getReferencedSymbol().getFullName();
// String ret = arg.getType().getName();
// String ret = arg.getType().getReferencedSymbol().getFullName();
String ret = arg.getType().getName();
if (arg.getType().getActualTypeArguments() != null && !arg.getType().getActualTypeArguments().isEmpty()) {
ret += "<" + arg.getType().getActualTypeArguments().stream().
map(a -> printWildCardPrefix(a) + printTypeParameters(a) + printArrayDimensions(a)).collect(Collectors.joining(",")) + ">";
......
......@@ -27,6 +27,7 @@ import de.monticore.lang.monticar.resolution._ast.ASTUnitNumberResolution;
import de.monticore.symboltable.Scope;
import de.monticore.symboltable.Symbol;
import de.se_rwth.commons.logging.Log;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
......@@ -41,6 +42,13 @@ import static org.junit.Assert.*;
*/
public class ExpandedComponentInstanceTest extends AbstractSymtabTest {
@BeforeClass
public static void setUp() {
// ensure an empty log
Log.getFindings().clear();
Log.enableFailQuick(false);
}
@Test
public void testFAS() throws Exception {
Scope symTab = createSymTab("src/test/resources");
......
......@@ -183,4 +183,7 @@ public class ParserTest {
return FileVisitResult.CONTINUE;
}
}
}
......@@ -52,6 +52,7 @@ public class SymtabTest extends AbstractSymtabTest {
public static void setUp() {
// ensure an empty log
Log.getFindings().clear();
Log.enableFailQuick(false);
}
/**
......
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