Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
monticore
EmbeddedMontiArc
languages
EmbeddedMontiArc
Commits
db0f8400
Commit
db0f8400
authored
Sep 21, 2019
by
Markus Georg Bendel
Browse files
Fix TaggingTest, use old reg ex
parent
6dfd6489
Pipeline
#185835
failed with stage
in 2 minutes and 12 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
src/main/java/de/monticore/lang/embeddedmontiarc/tagging/middleware/someip/SomeIPConnectionSymbolCreator.java
View file @
db0f8400
...
...
@@ -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
;
...
...
src/test/java/de/monticore/lang/embeddedmontiarc/middleware/someip/TaggingTest.java
View file @
db0f8400
/**
* (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
(
"some
ip
In"
).
orElse
(
null
);
EMAPortSymbol
someIPIn
=
component
.
getPortInstance
(
"some
IP
In"
).
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
(
"some
ip
Out"
).
orElse
(
null
);
EMAPortSymbol
someIPOut
=
component
.
getPortInstance
(
"some
IP
Out"
).
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
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment