Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Rentz-Reichert2019-11-13 06:26:41 +0000
committerHenrik Rentz-Reichert2019-11-13 06:26:41 +0000
commit575610044f25e682bdac0554831c1ba005fa8fd6 (patch)
tree2ba4cab718ebc1ce3d7b9efb82860bb152801324
parente2f895dbb076899677cc8f1f923973dcd90141db (diff)
downloadorg.eclipse.etrice-575610044f25e682bdac0554831c1ba005fa8fd6.tar.gz
org.eclipse.etrice-575610044f25e682bdac0554831c1ba005fa8fd6.tar.xz
org.eclipse.etrice-575610044f25e682bdac0554831c1ba005fa8fd6.zip
Bug 551083 - [gen] NPE in DetailCodeTranslator
Skipping string literals. Added unit test. Change-Id: I5ccb5ea3208ec5ad49716a2d57ea4b9cb8f999ea
-rw-r--r--tests/org.eclipse.etrice.generator.tests/src/org/eclipse/etrice/generator/base/TestDetailCodeTranslator.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/org.eclipse.etrice.generator.tests/src/org/eclipse/etrice/generator/base/TestDetailCodeTranslator.java b/tests/org.eclipse.etrice.generator.tests/src/org/eclipse/etrice/generator/base/TestDetailCodeTranslator.java
index 6ca28bee2..824255b3e 100644
--- a/tests/org.eclipse.etrice.generator.tests/src/org/eclipse/etrice/generator/base/TestDetailCodeTranslator.java
+++ b/tests/org.eclipse.etrice.generator.tests/src/org/eclipse/etrice/generator/base/TestDetailCodeTranslator.java
@@ -490,6 +490,16 @@ public class TestDetailCodeTranslator {
}
@Test
+ public void testOperation1_bug551083() {
+ DetailCode dc = FSMFactory.eINSTANCE.createDetailCode();
+ dc.getLines().add("bar1(\"(()\");");
+
+ String result = translator.translateDetailCode(dc);
+
+ assertEquals("bar1(\"(()\") replacement", ">bar1(\"(()\")<;", result);
+ }
+
+ @Test
public void testOperation2() {
DetailCode dc = FSMFactory.eINSTANCE.createDetailCode();
dc.getLines().add("bar2(123, 456);");

Back to the top