Commit db0f8400 authored by Markus Georg Bendel's avatar Markus Georg Bendel
Browse files

Fix TaggingTest, use old reg ex

parent 6dfd6489
Pipeline #185835 failed with stage
in 2 minutes and 12 seconds
......@@ -34,7 +34,7 @@ public class SomeIPConnectionSymbolCreator implements TagSymbolCreator {
* at http://www.regexplanet.com/advanced/java/index.html
*/
public static final Pattern pattern = Pattern.compile("\\s*\\{\\s*serviceID\\s*=\\s*[0-9]*,\\s*instanceID\\s*=\\s*[0-9]*,\\s*eventgroupID\\s*=\\s*[0-9]*\\}\\s*");
public static final Pattern pattern = Pattern.compile("\\s*\\{\\s*topic\\s*=\\s*\\(\\s*([a-z|A-Z|~|/][0-9|a-z|A-Z|_|/]*)\\s*,\\s*([a-z|A-Z][0-9|a-z|A-Z|_|/]*)\\s*\\)\\s*(s*,\\s*msgField\\s*=\\s*([a-z|A-Z][a-z|A-Z|1-9|_|\\.|::|\\(|\\)]*)\\s*)?\\s*\\}\\s*");
public static Scope getGlobalScope(final Scope scope) {
Scope s = scope;
......
/**
* (c) https://github.com/MontiCore/monticore
*
* ******************************************************************************
* MontiCAR Modeling Family, www.se-rwth.de
* Copyright (c) 2017, Software Engineering Group at RWTH Aachen,
* All rights reserved.
*
* This project is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this project. If not, see <http://www.gnu.org/licenses/>.
* *******************************************************************************
* The license generally applicable for this project
* can be found under https://github.com/MontiCore/monticore.
*/
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.embeddedmontiarc.middleware.someip;
......@@ -45,28 +31,28 @@ public class TaggingTest extends AbstractTaggingResolverTest {
assertNotNull(component);
//someipIn
EMAPortSymbol someIPIn = component.getPortInstance("someipIn").orElse(null);
EMAPortSymbol someIPIn = component.getPortInstance("someIPIn").orElse(null);
assertNotNull(someIPIn);
Collection<TagSymbol> tags = symtab.getTags(someIPIn, SomeIPConnectionSymbol.KIND);
assertTrue(tags.size() == 1);
SomeIPConnectionSymbol tag = (SomeIPConnectionSymbol) tags.iterator().next();
assertEquals(tag.getserviceID().get(), 1);
assertEquals(tag.getinstanceID().get(), 2);
assertEquals(tag.geteventgroupID().get(), 3);
assertEquals((int)tag.getserviceID().get(), 1);
assertEquals((int)tag.getinstanceID().get(), 2);
assertEquals((int)tag.geteventgroupID().get(), 3);
//someipOut
EMAPortSymbol someIPOut = component.getPortInstance("someipOut").orElse(null);
EMAPortSymbol someIPOut = component.getPortInstance("someIPOut").orElse(null);
assertNotNull(someIPOut);
tags = symtab.getTags(someIPOut, SomeIPConnectionSymbol.KIND);
assertTrue(tags.size() == 1);
tag = (SomeIPConnectionSymbol) tags.iterator().next();
assertEquals(tag.getserviceID().get(), 1);
assertEquals(tag.getinstanceID().get(), 2);
assertEquals(tag.geteventgroupID().get(), 3);
assertEquals((int)tag.getserviceID().get(), 1);
assertEquals((int)tag.getinstanceID().get(), 2);
assertEquals((int)tag.geteventgroupID().get(), 3);
//emptyTagIn
EMAPortSymbol emptyTagIn = component.getPortInstance("emptyTagIn").orElse(null);
......
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