Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/org.eclipse.etrice.core.common.tests/xtend-gen/org/eclipse/etrice/core/common/tests/CCStringTest.java585
-rw-r--r--tests/org.eclipse.etrice.core.common.tests/xtend-gen/org/eclipse/etrice/core/common/tests/RelativeFileURITest.java140
-rw-r--r--tests/org.eclipse.etrice.core.genmodel.fsm.tests/xtend-gen/org/eclipse/etrice/core/genmodel/fsm/tests/TestHierInheritedFSM.java115
-rw-r--r--tests/org.eclipse.etrice.core.room.tests/build.properties3
-rw-r--r--tests/org.eclipse.etrice.core.room.tests/xtend-gen/org/eclipse/etrice/core/FormatterTest.java187
-rw-r--r--tests/org.eclipse.etrice.core.room.tests/xtend-gen/org/eclipse/etrice/core/TestNames.java200
-rw-r--r--tests/org.eclipse.etrice.generator.c.tests/.gitignore7
-rw-r--r--tests/org.eclipse.etrice.generator.c.tests/Makefile14
-rw-r--r--tests/org.eclipse.etrice.generator.c.tests/buckminster.cspec10
-rw-r--r--tests/org.eclipse.etrice.generator.c.tests/build.gradle10
-rw-r--r--tests/org.eclipse.etrice.generator.c.tests/make.xml100
-rw-r--r--tests/org.eclipse.etrice.generator.c.tests/models/SendingDataTest.room (renamed from tests/org.eclipse.etrice.generator.common.tests/models/sendingData/SendingDataTestC.room)10
-rw-r--r--tests/org.eclipse.etrice.generator.c.tests/models/StaticConfigTest.config (renamed from tests/org.eclipse.etrice.generator.common.tests/models/staticConfig/StaticConfigTest.config)0
-rw-r--r--tests/org.eclipse.etrice.generator.c.tests/models/StaticConfigTest.etmap (renamed from tests/org.eclipse.etrice.generator.common.tests/models/staticConfig/StaticConfigTest.etmap)2
-rw-r--r--tests/org.eclipse.etrice.generator.c.tests/models/StaticConfigTest.room (renamed from tests/org.eclipse.etrice.generator.common.tests/models/staticConfig/StaticConfigTest_C.room)8
-rw-r--r--tests/org.eclipse.etrice.generator.c.tests/org.eclipse.etrice.generator.c.tests make.xml.launch42
-rw-r--r--tests/org.eclipse.etrice.generator.c.tests/targetModels/empty.txt0
-rw-r--r--tests/org.eclipse.etrice.generator.common.tests/.gitignore1
-rw-r--r--tests/org.eclipse.etrice.generator.common.tests/buckminster.cspec1
-rw-r--r--tests/org.eclipse.etrice.generator.common.tests/build.gradle32
-rw-r--r--tests/org.eclipse.etrice.generator.common.tests/common.xml217
-rw-r--r--tests/org.eclipse.etrice.generator.common.tests/models/ActorCommunicationTest.room10
-rw-r--r--tests/org.eclipse.etrice.generator.common.tests/models/ChoicePointTest.room6
-rw-r--r--tests/org.eclipse.etrice.generator.common.tests/models/ChoicePointTestExtended.room8
-rw-r--r--tests/org.eclipse.etrice.generator.common.tests/models/CompileTests.room8
-rw-r--r--tests/org.eclipse.etrice.generator.common.tests/models/ContinuationTransitionTest.room4
-rw-r--r--tests/org.eclipse.etrice.generator.common.tests/models/DataDrivenTest.room10
-rw-r--r--tests/org.eclipse.etrice.generator.common.tests/models/DetailExpressionTest.room6
-rw-r--r--tests/org.eclipse.etrice.generator.common.tests/models/EnumTest.room6
-rw-r--r--tests/org.eclipse.etrice.generator.common.tests/models/GenericPhysical.etphys43
-rw-r--r--tests/org.eclipse.etrice.generator.common.tests/models/HandlerTest.room7
-rw-r--r--tests/org.eclipse.etrice.generator.common.tests/models/OperationInheritanceTest.room7
-rw-r--r--tests/org.eclipse.etrice.generator.common.tests/models/PingPongThreadReplPortTest.room6
-rw-r--r--tests/org.eclipse.etrice.generator.common.tests/models/PingPongThreadTest.room6
-rw-r--r--tests/org.eclipse.etrice.generator.common.tests/models/StatemachineInterfaceInheritedTest.room2
-rw-r--r--tests/org.eclipse.etrice.generator.common.tests/models/StatemachineInterfaceTest.room2
-rw-r--r--tests/org.eclipse.etrice.generator.cpp.tests/.gitignore7
-rw-r--r--tests/org.eclipse.etrice.generator.cpp.tests/Makefile16
-rw-r--r--tests/org.eclipse.etrice.generator.cpp.tests/buckminster.cspec10
-rw-r--r--tests/org.eclipse.etrice.generator.cpp.tests/build.gradle10
-rw-r--r--tests/org.eclipse.etrice.generator.cpp.tests/make.xml122
-rw-r--r--tests/org.eclipse.etrice.generator.cpp.tests/models/InitializationTest.room (renamed from tests/org.eclipse.etrice.generator.cpp.tests/targetModels/InitializationTest.room)7
-rw-r--r--tests/org.eclipse.etrice.generator.cpp.tests/models/SendingDataTest.room (renamed from tests/org.eclipse.etrice.generator.common.tests/models/sendingData/SendingDataTestCpp.room)10
-rw-r--r--tests/org.eclipse.etrice.generator.cpp.tests/org.eclipse.etrice.generator.cpp.tests make.xml.launch36
-rw-r--r--tests/org.eclipse.etrice.generator.cpp.tests/targetModels/empty.txt0
-rw-r--r--tests/org.eclipse.etrice.generator.java.tests/.classpath8
-rw-r--r--tests/org.eclipse.etrice.generator.java.tests/.gitignore9
-rw-r--r--tests/org.eclipse.etrice.generator.java.tests/.project4
-rw-r--r--tests/org.eclipse.etrice.generator.java.tests/buckminster.cspec10
-rw-r--r--tests/org.eclipse.etrice.generator.java.tests/build.gradle29
-rw-r--r--tests/org.eclipse.etrice.generator.java.tests/make.xml129
-rw-r--r--tests/org.eclipse.etrice.generator.java.tests/models/DynamicActorTest1.etmap (renamed from tests/org.eclipse.etrice.generator.java.tests/targetModels/DynamicActorTest1.etmap)2
-rw-r--r--tests/org.eclipse.etrice.generator.java.tests/models/DynamicActorTest1.room (renamed from tests/org.eclipse.etrice.generator.java.tests/targetModels/DynamicActorTest1.room)6
-rw-r--r--tests/org.eclipse.etrice.generator.java.tests/models/DynamicActorTest2.etmap (renamed from tests/org.eclipse.etrice.generator.java.tests/targetModels/DynamicActorTest2.etmap)2
-rw-r--r--tests/org.eclipse.etrice.generator.java.tests/models/DynamicActorTest2.room (renamed from tests/org.eclipse.etrice.generator.java.tests/targetModels/DynamicActorTest2.room)6
-rw-r--r--tests/org.eclipse.etrice.generator.java.tests/models/DynamicActorTest3.room (renamed from tests/org.eclipse.etrice.generator.java.tests/targetModels/DynamicActorTest3.room)6
-rw-r--r--tests/org.eclipse.etrice.generator.java.tests/models/DynamicActorTest4.room (renamed from tests/org.eclipse.etrice.generator.java.tests/targetModels/DynamicActorTest4.room)6
-rw-r--r--tests/org.eclipse.etrice.generator.java.tests/models/DynamicActorTest5.room (renamed from tests/org.eclipse.etrice.generator.java.tests/targetModels/DynamicActorTest5.room)6
-rw-r--r--tests/org.eclipse.etrice.generator.java.tests/models/DynamicActorTest6.room (renamed from tests/org.eclipse.etrice.generator.java.tests/targetModels/DynamicActorTest6.room)6
-rw-r--r--tests/org.eclipse.etrice.generator.java.tests/models/DynamicActorTest7.etmap (renamed from tests/org.eclipse.etrice.generator.java.tests/targetModels/DynamicActorTest7.etmap)2
-rw-r--r--tests/org.eclipse.etrice.generator.java.tests/models/DynamicActorTest7.room (renamed from tests/org.eclipse.etrice.generator.java.tests/targetModels/DynamicActorTest7.room)6
-rw-r--r--tests/org.eclipse.etrice.generator.java.tests/models/DynamicConfigTest.config (renamed from tests/org.eclipse.etrice.generator.java.tests/targetModels/DynamicConfigTest.config)0
-rw-r--r--tests/org.eclipse.etrice.generator.java.tests/models/DynamicConfigTest.etmap (renamed from tests/org.eclipse.etrice.generator.java.tests/targetModels/DynamicConfigTest.etmap)0
-rw-r--r--tests/org.eclipse.etrice.generator.java.tests/models/DynamicConfigTest.room (renamed from tests/org.eclipse.etrice.generator.java.tests/targetModels/DynamicConfigTest.room)9
-rw-r--r--tests/org.eclipse.etrice.generator.java.tests/models/DynamicConfigTest.rt-config (renamed from tests/org.eclipse.etrice.generator.java.tests/targetModels/DynamicConfigTest.rt-config)0
-rw-r--r--tests/org.eclipse.etrice.generator.java.tests/models/SendingDataTest.room (renamed from tests/org.eclipse.etrice.generator.common.tests/models/sendingData/SendingDataTestJava.room)12
-rw-r--r--tests/org.eclipse.etrice.generator.java.tests/models/StaticConfigTest.config141
-rw-r--r--tests/org.eclipse.etrice.generator.java.tests/models/StaticConfigTest.etmap10
-rw-r--r--tests/org.eclipse.etrice.generator.java.tests/models/StaticConfigTest.room (renamed from tests/org.eclipse.etrice.generator.common.tests/models/staticConfig/StaticConfigTest_Java.room)8
-rw-r--r--tests/org.eclipse.etrice.generator.java.tests/models/StoreRestoreTest.room (renamed from tests/org.eclipse.etrice.generator.java.tests/targetModels/StoreRestore.room)8
-rw-r--r--tests/org.eclipse.etrice.generator.java.tests/models/TCPTest.room (renamed from tests/org.eclipse.etrice.generator.java.tests/targetModels/TCPTest.room)318
-rw-r--r--tests/org.eclipse.etrice.generator.java.tests/org.eclipse.etrice.generator.java.tests make.xml.launch42
-rw-r--r--tests/org.eclipse.etrice.generator.java.tests/src/dynamicActorTest7/DynamicActorTest7/FilePersistor.java (renamed from tests/org.eclipse.etrice.generator.java.tests/src/DynamicActorTest7/FilePersistor.java)0
-rw-r--r--tests/org.eclipse.etrice.generator.java.tests/src/dynamicConfigTest/DynamicConfigTest/ConfigSourceTestInstance.java (renamed from tests/org.eclipse.etrice.generator.java.tests/src/DynamicConfigTest/ConfigSourceTestInstance.java)0
-rw-r--r--tests/org.eclipse.etrice.generator.java.tests/src/staticConfigTest/StaticConfigTest/External_Type_Test.java (renamed from tests/org.eclipse.etrice.generator.java.tests/src/StaticConfigTest/External_Type_Test.java)0
-rw-r--r--tests/org.eclipse.etrice.generator.java.tests/src/storeRestoreTest/StoreRestoreTest/ObjectHolder.java (renamed from tests/org.eclipse.etrice.generator.java.tests/src/StoreRestore/ObjectHolder.java)4
-rw-r--r--tests/org.eclipse.etrice.runtime.c.tests/Makefile13
-rw-r--r--tests/org.eclipse.etrice.runtime.c.tests/buckminster.cspec10
-rw-r--r--tests/org.eclipse.etrice.runtime.c.tests/build.gradle49
-rw-r--r--tests/org.eclipse.etrice.runtime.c.tests/make.xml68
-rw-r--r--tests/org.eclipse.etrice.runtime.c.tests/org.eclipse.etrice.runtime.c.tests make.xml.launch41
-rw-r--r--tests/org.eclipse.etrice.runtime.c.tests/src/runtime/RunCRuntimeTestcases.c6
-rw-r--r--tests/org.eclipse.etrice.runtime.c.tests/src/runtime/TestEtDatatypes.c2
-rw-r--r--tests/org.eclipse.etrice.runtime.c.tests/src/runtime/TestEtMemory.c2
-rw-r--r--tests/org.eclipse.etrice.runtime.c.tests/src/runtime/TestEtMessage.c2
-rw-r--r--tests/org.eclipse.etrice.runtime.c.tests/src/runtime/TestEtMessageQueue.c2
-rw-r--r--tests/org.eclipse.etrice.runtime.c.tests/src/runtime/TestEtMessageService.c2
-rw-r--r--tests/org.eclipse.etrice.runtime.c.tests/src/runtime/TestEtQueue.c2
-rw-r--r--tests/org.eclipse.etrice.runtime.c.tests/src/runtime/TestEtTimer.c2
-rw-r--r--tests/org.eclipse.etrice.runtime.c.tests/src/runtime/TestEtUnit.c2
-rw-r--r--tests/org.eclipse.etrice.runtime.c.tests/src/runtime/helpers/TestEtTimeHelpers.c2
-rw-r--r--tests/org.eclipse.etrice.runtime.c.tests/src/runtime/util/TestUtil.c2
-rw-r--r--tests/org.eclipse.etrice.runtime.cpp.tests/Makefile14
-rw-r--r--tests/org.eclipse.etrice.runtime.cpp.tests/buckminster.cspec10
-rw-r--r--tests/org.eclipse.etrice.runtime.cpp.tests/build.gradle49
-rw-r--r--tests/org.eclipse.etrice.runtime.cpp.tests/make.xml68
-rw-r--r--tests/org.eclipse.etrice.runtime.cpp.tests/org.eclipse.etrice.runtime.cpp.tests make.xml.launch38
-rw-r--r--tests/org.eclipse.etrice.runtime.cpp.tests/src/RunAllTestCases.cpp2
-rw-r--r--tests/org.eclipse.etrice.runtime.cpp.tests/src/containers/MapTest.h2
-rw-r--r--tests/org.eclipse.etrice.runtime.cpp.tests/src/containers/PairTest.h2
-rw-r--r--tests/org.eclipse.etrice.runtime.cpp.tests/src/containers/SetTest.h2
-rw-r--r--tests/org.eclipse.etrice.runtime.cpp.tests/src/containers/StaticArrayTest.h2
-rw-r--r--tests/org.eclipse.etrice.runtime.cpp.tests/src/containers/StaticDequeTest.h2
-rw-r--r--tests/org.eclipse.etrice.runtime.cpp.tests/src/containers/StaticStringTest.h2
-rw-r--r--tests/org.eclipse.etrice.runtime.cpp.tests/src/containers/StringTest.h2
-rw-r--r--tests/org.eclipse.etrice.runtime.cpp.tests/src/containers/VectorTest.h2
-rw-r--r--tests/org.eclipse.etrice.runtime.cpp.tests/src/debugging/DebuggingServiceTest.cpp11
-rw-r--r--tests/org.eclipse.etrice.runtime.cpp.tests/src/debugging/DebuggingServiceTest.h2
-rw-r--r--tests/org.eclipse.etrice.runtime.cpp.tests/src/debugging/MSCFilterTest.h2
-rw-r--r--tests/org.eclipse.etrice.runtime.cpp.tests/src/debugging/MSCFunctionObjectTest.cpp2
-rw-r--r--tests/org.eclipse.etrice.runtime.cpp.tests/src/debugging/MSCFunctionObjectTest.h2
-rw-r--r--tests/org.eclipse.etrice.runtime.cpp.tests/src/debugging/MSCLoggerTest.cpp2
-rw-r--r--tests/org.eclipse.etrice.runtime.cpp.tests/src/debugging/MSCLoggerTest.h2
-rw-r--r--tests/org.eclipse.etrice.runtime.cpp.tests/src/messaging/AddressTest.h2
-rw-r--r--tests/org.eclipse.etrice.runtime.cpp.tests/src/messaging/MessageDispatcherTest.cpp7
-rw-r--r--tests/org.eclipse.etrice.runtime.cpp.tests/src/messaging/MessageDispatcherTest.h2
-rw-r--r--tests/org.eclipse.etrice.runtime.cpp.tests/src/messaging/MessageSeQueueTest.h2
-rw-r--r--tests/org.eclipse.etrice.runtime.cpp.tests/src/messaging/MessageServiceControllerTest.cpp2
-rw-r--r--tests/org.eclipse.etrice.runtime.cpp.tests/src/messaging/MessageServiceTest.cpp2
-rw-r--r--tests/org.eclipse.etrice.runtime.cpp.tests/src/messaging/MessageTest.h2
-rw-r--r--tests/org.eclipse.etrice.runtime.cpp.tests/src/messaging/RTObjectTest.h2
-rw-r--r--tests/org.eclipse.etrice.runtime.cpp.tests/src/messaging/StaticMessageMemoryTest.h2
-rw-r--r--tests/org.eclipse.etrice.runtime.java.tests/buckminster.cspec6
-rw-r--r--tests/org.eclipse.etrice.runtime.java.tests/build.gradle15
-rw-r--r--tests/org.eclipse.etrice.runtime.java.tests/src/org/eclipse/etrice/runtime/java/debugging/MSCLoggerTest.java2
-rw-r--r--tests/org.eclipse.etrice.runtime.java.tests/src/org/eclipse/etrice/runtime/java/etunit/EtUnitTest.java4
-rw-r--r--tests/org.eclipse.etrice.ui.base.tests/.classpath (renamed from tests/org.eclipse.etrice.ui.tests.base/.classpath)0
-rw-r--r--tests/org.eclipse.etrice.ui.base.tests/.gitignore (renamed from tests/org.eclipse.etrice.ui.tests.base/.gitignore)0
-rw-r--r--tests/org.eclipse.etrice.ui.base.tests/.project (renamed from tests/org.eclipse.etrice.ui.tests.base/.project)2
-rw-r--r--tests/org.eclipse.etrice.ui.base.tests/META-INF/MANIFEST.MF (renamed from tests/org.eclipse.etrice.ui.tests.base/META-INF/MANIFEST.MF)2
-rw-r--r--tests/org.eclipse.etrice.ui.base.tests/about.html (renamed from tests/org.eclipse.etrice.ui.tests.base/about.html)0
-rw-r--r--tests/org.eclipse.etrice.ui.base.tests/build.properties (renamed from tests/org.eclipse.etrice.ui.tests.base/build.properties)0
-rw-r--r--tests/org.eclipse.etrice.ui.base.tests/src/org/eclipse/etrice/tests/base/TestBase.java (renamed from tests/org.eclipse.etrice.ui.tests.base/src/org/eclipse/etrice/tests/base/TestBase.java)0
-rw-r--r--tests/org.eclipse.etrice.ui.behavior.tests/META-INF/MANIFEST.MF3
-rw-r--r--tests/org.eclipse.etrice.ui.behavior.tests/build.properties3
-rw-r--r--tests/org.eclipse.etrice.ui.behavior.tests/xtend-gen/org/eclipse/etrice/ui/launch/TestGeneratorLaunchHelper.java94
-rw-r--r--tests/org.eclipse.etrice.ui.structure.tests/META-INF/MANIFEST.MF2
-rw-r--r--tests/pom.xml29
138 files changed, 756 insertions, 2678 deletions
diff --git a/tests/org.eclipse.etrice.core.common.tests/xtend-gen/org/eclipse/etrice/core/common/tests/CCStringTest.java b/tests/org.eclipse.etrice.core.common.tests/xtend-gen/org/eclipse/etrice/core/common/tests/CCStringTest.java
deleted file mode 100644
index 23a9ad1a7..000000000
--- a/tests/org.eclipse.etrice.core.common.tests/xtend-gen/org/eclipse/etrice/core/common/tests/CCStringTest.java
+++ /dev/null
@@ -1,585 +0,0 @@
-/**
- * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Juergen Haug (initial contribution)
- */
-package org.eclipse.etrice.core.common.tests;
-
-import com.google.common.base.Objects;
-import com.google.inject.Inject;
-import java.util.Collections;
-import org.eclipse.etrice.core.common.BaseTestInjectorProvider;
-import org.eclipse.etrice.core.common.converter.BaseConverterService;
-import org.eclipse.etrice.core.common.converter.CCStringConverter;
-import org.eclipse.etrice.core.common.converter.CCStringIndentation;
-import org.eclipse.xtend2.lib.StringConcatenation;
-import org.eclipse.xtext.junit4.InjectWith;
-import org.eclipse.xtext.junit4.XtextRunner;
-import org.eclipse.xtext.util.Strings;
-import org.eclipse.xtext.xbase.lib.CollectionLiterals;
-import org.eclipse.xtext.xbase.lib.Functions.Function1;
-import org.eclipse.xtext.xbase.lib.IterableExtensions;
-import org.eclipse.xtext.xbase.lib.ObjectExtensions;
-import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;
-import org.junit.Assert;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-@RunWith(XtextRunner.class)
-@InjectWith(BaseTestInjectorProvider.class)
-@SuppressWarnings("all")
-public class CCStringTest {
- private final String JAVA_NL = Strings.newLine();
-
- private final String CRLF = "\r\n";
-
- private final String LF = "\n";
-
- private final String CR = "\r";
-
- private final String NL = this.JAVA_NL;
-
- private final String DELIM = "\'\'\'";
-
- @Inject
- private BaseConverterService baseConverterService;
-
- protected String toValue(final String withoutDelim) {
- CCStringConverter _cC_StringConverter = this.baseConverterService.getCC_StringConverter();
- String _value = _cC_StringConverter.toValue(withoutDelim, null);
- final Procedure1<String> _function = new Procedure1<String>() {
- @Override
- public void apply(final String convertedWithoutDelim) {
- CCStringConverter _cC_StringConverter = CCStringTest.this.baseConverterService.getCC_StringConverter();
- final String convertedWithDelim = _cC_StringConverter.toValue(((CCStringTest.this.DELIM + withoutDelim) + CCStringTest.this.DELIM), null);
- Assert.assertEquals(convertedWithoutDelim, convertedWithDelim);
- }
- };
- return ObjectExtensions.<String>operator_doubleArrow(_value, _function);
- }
-
- @Test
- public void noLineBreak() {
- StringConcatenation _builder = new StringConcatenation();
- String _value = this.toValue(_builder.toString());
- Assert.assertEquals("", _value);
- StringConcatenation _builder_1 = new StringConcatenation();
- String _string = _builder_1.toString();
- StringConcatenation _builder_2 = new StringConcatenation();
- String _value_1 = this.toValue(_builder_2.toString());
- Assert.assertEquals(_string, _value_1);
- StringConcatenation _builder_3 = new StringConcatenation();
- _builder_3.append(" ");
- String _value_2 = this.toValue(_builder_3.toString());
- Assert.assertEquals(" ", _value_2);
- StringConcatenation _builder_4 = new StringConcatenation();
- _builder_4.append(" ");
- String _string_1 = _builder_4.toString();
- StringConcatenation _builder_5 = new StringConcatenation();
- _builder_5.append(" ");
- String _value_3 = this.toValue(_builder_5.toString());
- Assert.assertEquals(_string_1, _value_3);
- StringConcatenation _builder_6 = new StringConcatenation();
- _builder_6.append("\t");
- String _value_4 = this.toValue(_builder_6.toString());
- Assert.assertEquals("\t", _value_4);
- StringConcatenation _builder_7 = new StringConcatenation();
- _builder_7.append("\t");
- String _string_2 = _builder_7.toString();
- StringConcatenation _builder_8 = new StringConcatenation();
- _builder_8.append("\t");
- String _value_5 = this.toValue(_builder_8.toString());
- Assert.assertEquals(_string_2, _value_5);
- StringConcatenation _builder_9 = new StringConcatenation();
- _builder_9.append(" ");
- _builder_9.append("text ");
- String _value_6 = this.toValue(_builder_9.toString());
- Assert.assertEquals(" text ", _value_6);
- StringConcatenation _builder_10 = new StringConcatenation();
- _builder_10.append(" ");
- _builder_10.append("text ");
- String _string_3 = _builder_10.toString();
- StringConcatenation _builder_11 = new StringConcatenation();
- _builder_11.append(" ");
- _builder_11.append("text ");
- String _value_7 = this.toValue(_builder_11.toString());
- Assert.assertEquals(_string_3, _value_7);
- String _value_8 = this.toValue("\'");
- Assert.assertEquals("\'", _value_8);
- String _value_9 = this.toValue("\'\'");
- Assert.assertEquals("\'\'", _value_9);
- String _value_10 = this.toValue("\"");
- Assert.assertEquals("\"", _value_10);
- CCStringIndentation _cCStringIndentation = new CCStringIndentation(" \t");
- boolean _hasConsistentIndentation = _cCStringIndentation.hasConsistentIndentation();
- Assert.assertTrue(_hasConsistentIndentation);
- }
-
- @Test
- public void singleLineBreak() {
- String _value = this.toValue("\r");
- Assert.assertEquals("", _value);
- String _value_1 = this.toValue("\r\n");
- Assert.assertEquals("", _value_1);
- String _value_2 = this.toValue("\n");
- Assert.assertEquals("", _value_2);
- StringConcatenation _builder = new StringConcatenation();
- String _string = _builder.toString();
- String _value_3 = this.toValue(this.NL);
- Assert.assertEquals(_string, _value_3);
- final Procedure1<String> _function = new Procedure1<String>() {
- @Override
- public void apply(final String text) {
- String _value = CCStringTest.this.toValue(text);
- Assert.assertEquals("", _value);
- StringConcatenation _builder = new StringConcatenation();
- String _string = _builder.toString();
- String _value_1 = CCStringTest.this.toValue(text);
- Assert.assertEquals(_string, _value_1);
- CCStringIndentation _cCStringIndentation = new CCStringIndentation(text);
- boolean _hasConsistentIndentation = _cCStringIndentation.hasConsistentIndentation();
- Assert.assertTrue(_hasConsistentIndentation);
- }
- };
- ObjectExtensions.<String>operator_doubleArrow(
- ("\t" + this.NL), _function);
- final Procedure1<String> _function_1 = new Procedure1<String>() {
- @Override
- public void apply(final String text) {
- String _value = CCStringTest.this.toValue(text);
- Assert.assertEquals(("text" + CCStringTest.this.NL), _value);
- StringConcatenation _builder = new StringConcatenation();
- _builder.append("text");
- _builder.newLine();
- String _string = _builder.toString();
- String _value_1 = CCStringTest.this.toValue(text);
- Assert.assertEquals(_string, _value_1);
- CCStringIndentation _cCStringIndentation = new CCStringIndentation(text);
- boolean _hasConsistentIndentation = _cCStringIndentation.hasConsistentIndentation();
- Assert.assertTrue(_hasConsistentIndentation);
- }
- };
- ObjectExtensions.<String>operator_doubleArrow(
- ("text" + this.NL), _function_1);
- final Procedure1<String> _function_2 = new Procedure1<String>() {
- @Override
- public void apply(final String text) {
- String _value = CCStringTest.this.toValue(text);
- Assert.assertEquals((" text\t" + CCStringTest.this.NL), _value);
- StringConcatenation _builder = new StringConcatenation();
- _builder.append(" ");
- _builder.append("text\t");
- _builder.newLine();
- String _string = _builder.toString();
- String _value_1 = CCStringTest.this.toValue(text);
- Assert.assertEquals(_string, _value_1);
- CCStringIndentation _cCStringIndentation = new CCStringIndentation(text);
- boolean _hasConsistentIndentation = _cCStringIndentation.hasConsistentIndentation();
- Assert.assertTrue(_hasConsistentIndentation);
- }
- };
- ObjectExtensions.<String>operator_doubleArrow(
- (" text\t" + this.NL), _function_2);
- final Procedure1<String> _function_3 = new Procedure1<String>() {
- @Override
- public void apply(final String text) {
- String _value = CCStringTest.this.toValue(text);
- Assert.assertEquals(("text\\n" + CCStringTest.this.NL), _value);
- StringConcatenation _builder = new StringConcatenation();
- _builder.append("text\\n");
- _builder.newLine();
- String _string = _builder.toString();
- String _value_1 = CCStringTest.this.toValue(text);
- Assert.assertEquals(_string, _value_1);
- CCStringIndentation _cCStringIndentation = new CCStringIndentation(text);
- boolean _hasConsistentIndentation = _cCStringIndentation.hasConsistentIndentation();
- Assert.assertTrue(_hasConsistentIndentation);
- }
- };
- ObjectExtensions.<String>operator_doubleArrow(
- (("text\\n" + this.NL) + "\t"), _function_3);
- final Procedure1<String> _function_4 = new Procedure1<String>() {
- @Override
- public void apply(final String text) {
- String _value = CCStringTest.this.toValue(text);
- Assert.assertEquals("text ", _value);
- StringConcatenation _builder = new StringConcatenation();
- _builder.append("text ");
- String _string = _builder.toString();
- String _value_1 = CCStringTest.this.toValue(text);
- Assert.assertEquals(_string, _value_1);
- CCStringIndentation _cCStringIndentation = new CCStringIndentation(text);
- boolean _hasConsistentIndentation = _cCStringIndentation.hasConsistentIndentation();
- Assert.assertTrue(_hasConsistentIndentation);
- }
- };
- ObjectExtensions.<String>operator_doubleArrow(
- (this.NL + "text "), _function_4);
- final Procedure1<String> _function_5 = new Procedure1<String>() {
- @Override
- public void apply(final String text) {
- String _value = CCStringTest.this.toValue(text);
- Assert.assertEquals("text", _value);
- StringConcatenation _builder = new StringConcatenation();
- _builder.append("text");
- String _string = _builder.toString();
- String _value_1 = CCStringTest.this.toValue(text);
- Assert.assertEquals(_string, _value_1);
- CCStringIndentation _cCStringIndentation = new CCStringIndentation(text);
- boolean _hasConsistentIndentation = _cCStringIndentation.hasConsistentIndentation();
- Assert.assertTrue(_hasConsistentIndentation);
- }
- };
- ObjectExtensions.<String>operator_doubleArrow(
- ((" " + this.NL) + "text"), _function_5);
- final Procedure1<String> _function_6 = new Procedure1<String>() {
- @Override
- public void apply(final String text) {
- String _value = CCStringTest.this.toValue(text);
- Assert.assertEquals("text ", _value);
- StringConcatenation _builder = new StringConcatenation();
- _builder.append("text ");
- String _string = _builder.toString();
- String _value_1 = CCStringTest.this.toValue(text);
- Assert.assertEquals(_string, _value_1);
- CCStringIndentation _cCStringIndentation = new CCStringIndentation(text);
- boolean _hasConsistentIndentation = _cCStringIndentation.hasConsistentIndentation();
- Assert.assertTrue(_hasConsistentIndentation);
- }
- };
- ObjectExtensions.<String>operator_doubleArrow(
- (this.NL + " text "), _function_6);
- }
-
- @Test
- public void twoLineBreaks() {
- final Procedure1<String> _function = new Procedure1<String>() {
- @Override
- public void apply(final String text) {
- String _value = CCStringTest.this.toValue(text);
- Assert.assertEquals(CCStringTest.this.NL, _value);
- StringConcatenation _builder = new StringConcatenation();
- _builder.newLine();
- String _string = _builder.toString();
- String _value_1 = CCStringTest.this.toValue(text);
- Assert.assertEquals(_string, _value_1);
- CCStringIndentation _cCStringIndentation = new CCStringIndentation(text);
- boolean _hasConsistentIndentation = _cCStringIndentation.hasConsistentIndentation();
- Assert.assertTrue(_hasConsistentIndentation);
- }
- };
- ObjectExtensions.<String>operator_doubleArrow(
- (this.NL + this.NL), _function);
- final Procedure1<String> _function_1 = new Procedure1<String>() {
- @Override
- public void apply(final String text) {
- String _value = CCStringTest.this.toValue(text);
- Assert.assertEquals((("text" + CCStringTest.this.NL) + CCStringTest.this.NL), _value);
- StringConcatenation _builder = new StringConcatenation();
- _builder.append("text");
- _builder.newLine();
- _builder.newLine();
- String _string = _builder.toString();
- String _value_1 = CCStringTest.this.toValue(text);
- Assert.assertEquals(_string, _value_1);
- CCStringIndentation _cCStringIndentation = new CCStringIndentation(text);
- boolean _hasConsistentIndentation = _cCStringIndentation.hasConsistentIndentation();
- Assert.assertTrue(_hasConsistentIndentation);
- }
- };
- ObjectExtensions.<String>operator_doubleArrow(
- (("text" + this.NL) + this.NL), _function_1);
- final Procedure1<String> _function_2 = new Procedure1<String>() {
- @Override
- public void apply(final String text) {
- String _value = CCStringTest.this.toValue(text);
- Assert.assertEquals(((("text" + CCStringTest.this.NL) + "\t\t\t\tindent") + CCStringTest.this.NL), _value);
- StringConcatenation _builder = new StringConcatenation();
- _builder.append("text");
- _builder.newLine();
- _builder.append("\t\t\t\t");
- _builder.append("indent");
- _builder.newLine();
- String _string = _builder.toString();
- String _value_1 = CCStringTest.this.toValue(text);
- Assert.assertEquals(_string, _value_1);
- CCStringIndentation _cCStringIndentation = new CCStringIndentation(text);
- boolean _hasConsistentIndentation = _cCStringIndentation.hasConsistentIndentation();
- Assert.assertTrue(_hasConsistentIndentation);
- }
- };
- ObjectExtensions.<String>operator_doubleArrow(
- ((("text" + this.NL) + "\t\t\t\tindent") + this.NL), _function_2);
- final Procedure1<String> _function_3 = new Procedure1<String>() {
- @Override
- public void apply(final String text) {
- String _value = CCStringTest.this.toValue(text);
- Assert.assertEquals(("text" + CCStringTest.this.NL), _value);
- StringConcatenation _builder = new StringConcatenation();
- _builder.append("text");
- _builder.newLine();
- String _string = _builder.toString();
- String _value_1 = CCStringTest.this.toValue(text);
- Assert.assertEquals(_string, _value_1);
- CCStringIndentation _cCStringIndentation = new CCStringIndentation(text);
- boolean _hasConsistentIndentation = _cCStringIndentation.hasConsistentIndentation();
- Assert.assertTrue(_hasConsistentIndentation);
- }
- };
- ObjectExtensions.<String>operator_doubleArrow(
- ((this.NL + "text") + this.NL), _function_3);
- final Procedure1<String> _function_4 = new Procedure1<String>() {
- @Override
- public void apply(final String text) {
- String _value = CCStringTest.this.toValue(text);
- Assert.assertEquals(("text\t" + CCStringTest.this.NL), _value);
- StringConcatenation _builder = new StringConcatenation();
- _builder.append("text\t");
- _builder.newLine();
- String _string = _builder.toString();
- String _value_1 = CCStringTest.this.toValue(text);
- Assert.assertEquals(_string, _value_1);
- CCStringIndentation _cCStringIndentation = new CCStringIndentation(text);
- boolean _hasConsistentIndentation = _cCStringIndentation.hasConsistentIndentation();
- Assert.assertTrue(_hasConsistentIndentation);
- }
- };
- ObjectExtensions.<String>operator_doubleArrow(
- ((this.NL + "\t\t\t\ttext\t") + this.NL), _function_4);
- final Procedure1<String> _function_5 = new Procedure1<String>() {
- @Override
- public void apply(final String text) {
- String _value = CCStringTest.this.toValue(text);
- Assert.assertEquals((("text" + CCStringTest.this.NL) + "text2 "), _value);
- StringConcatenation _builder = new StringConcatenation();
- _builder.append("text");
- _builder.newLine();
- _builder.append("text2 ");
- String _string = _builder.toString();
- String _value_1 = CCStringTest.this.toValue(text);
- Assert.assertEquals(_string, _value_1);
- CCStringIndentation _cCStringIndentation = new CCStringIndentation(text);
- boolean _hasConsistentIndentation = _cCStringIndentation.hasConsistentIndentation();
- Assert.assertTrue(_hasConsistentIndentation);
- }
- };
- ObjectExtensions.<String>operator_doubleArrow(
- (((this.NL + "text") + this.NL) + "text2 "), _function_5);
- final Procedure1<String> _function_6 = new Procedure1<String>() {
- @Override
- public void apply(final String text) {
- String _value = CCStringTest.this.toValue(text);
- Assert.assertEquals((("text\\r" + CCStringTest.this.LF) + "text2 "), _value);
- CCStringIndentation _cCStringIndentation = new CCStringIndentation(text);
- boolean _hasConsistentIndentation = _cCStringIndentation.hasConsistentIndentation();
- Assert.assertTrue(_hasConsistentIndentation);
- }
- };
- ObjectExtensions.<String>operator_doubleArrow(
- (((this.CRLF + "text\\r") + this.LF) + "text2 "), _function_6);
- final Procedure1<String> _function_7 = new Procedure1<String>() {
- @Override
- public void apply(final String text) {
- String _value = CCStringTest.this.toValue(text);
- Assert.assertEquals((("text" + CCStringTest.this.CR) + "text2 "), _value);
- CCStringIndentation _cCStringIndentation = new CCStringIndentation(text);
- boolean _hasConsistentIndentation = _cCStringIndentation.hasConsistentIndentation();
- Assert.assertTrue(_hasConsistentIndentation);
- }
- };
- ObjectExtensions.<String>operator_doubleArrow(
- (((this.LF + "text") + this.CR) + "text2 "), _function_7);
- final Procedure1<String> _function_8 = new Procedure1<String>() {
- @Override
- public void apply(final String text) {
- String _value = CCStringTest.this.toValue(text);
- Assert.assertEquals((("text" + CCStringTest.this.CRLF) + "text2 "), _value);
- CCStringIndentation _cCStringIndentation = new CCStringIndentation(text);
- boolean _hasConsistentIndentation = _cCStringIndentation.hasConsistentIndentation();
- Assert.assertTrue(_hasConsistentIndentation);
- }
- };
- ObjectExtensions.<String>operator_doubleArrow(
- (((this.LF + "text") + this.CRLF) + "text2 "), _function_8);
- final Procedure1<String> _function_9 = new Procedure1<String>() {
- @Override
- public void apply(final String text) {
- String _value = CCStringTest.this.toValue(text);
- Assert.assertEquals((("\ttext" + CCStringTest.this.NL) + "text2 "), _value);
- StringConcatenation _builder = new StringConcatenation();
- _builder.append("\t");
- _builder.append("text");
- _builder.newLine();
- _builder.append("text2 ");
- String _string = _builder.toString();
- String _value_1 = CCStringTest.this.toValue(text);
- Assert.assertEquals(_string, _value_1);
- CCStringIndentation _cCStringIndentation = new CCStringIndentation(text);
- boolean _hasConsistentIndentation = _cCStringIndentation.hasConsistentIndentation();
- Assert.assertTrue(_hasConsistentIndentation);
- }
- };
- ObjectExtensions.<String>operator_doubleArrow(
- (((this.NL + "\ttext") + this.NL) + "text2 "), _function_9);
- final Procedure1<String> _function_10 = new Procedure1<String>() {
- @Override
- public void apply(final String text) {
- String _value = CCStringTest.this.toValue(text);
- Assert.assertEquals((("text" + CCStringTest.this.NL) + "\t\t\tindent"), _value);
- StringConcatenation _builder = new StringConcatenation();
- _builder.append("text");
- _builder.newLine();
- _builder.append("\t\t\t");
- _builder.append("indent");
- String _string = _builder.toString();
- String _value_1 = CCStringTest.this.toValue(text);
- Assert.assertEquals(_string, _value_1);
- CCStringIndentation _cCStringIndentation = new CCStringIndentation(text);
- boolean _hasConsistentIndentation = _cCStringIndentation.hasConsistentIndentation();
- Assert.assertTrue(_hasConsistentIndentation);
- }
- };
- ObjectExtensions.<String>operator_doubleArrow(
- (((this.NL + "text") + this.NL) + "\t\t\tindent"), _function_10);
- CCStringIndentation _cCStringIndentation = new CCStringIndentation("\r \r\t\n");
- boolean _hasConsistentIndentation = _cCStringIndentation.hasConsistentIndentation();
- Assert.assertTrue(_hasConsistentIndentation);
- CCStringIndentation _cCStringIndentation_1 = new CCStringIndentation("\r Text\r\tText\n");
- boolean _hasConsistentIndentation_1 = _cCStringIndentation_1.hasConsistentIndentation();
- Assert.assertFalse(_hasConsistentIndentation_1);
- }
-
- @Test
- public void multiLineBreaks() {
- final Procedure1<String> _function = new Procedure1<String>() {
- @Override
- public void apply(final String text) {
- String _value = CCStringTest.this.toValue(text);
- Assert.assertEquals(((((((" " + CCStringTest.this.NL) + CCStringTest.this.NL) + "\t\t ") + CCStringTest.this.NL) + "text") + CCStringTest.this.NL), _value);
- StringConcatenation _builder = new StringConcatenation();
- _builder.append(" ");
- _builder.newLine();
- _builder.newLine();
- _builder.append("\t\t ");
- _builder.newLine();
- _builder.append("text");
- _builder.newLine();
- String _string = _builder.toString();
- String _value_1 = CCStringTest.this.toValue(text);
- Assert.assertEquals(_string, _value_1);
- CCStringIndentation _cCStringIndentation = new CCStringIndentation(text);
- boolean _hasConsistentIndentation = _cCStringIndentation.hasConsistentIndentation();
- Assert.assertFalse(_hasConsistentIndentation);
- }
- };
- ObjectExtensions.<String>operator_doubleArrow(
- (((((((this.NL + "\t\t\t ") + this.NL) + this.NL) + "\t\t ") + this.NL) + "\t\t\ttext") + this.NL), _function);
- }
-
- @Test
- public void testReplaceEditorIndentation() {
- CCStringIndentation _cCStringIndentation = new CCStringIndentation("\r\t\t\tText\r\n\t\t\t\n");
- final Procedure1<CCStringIndentation> _function = new Procedure1<CCStringIndentation>() {
- @Override
- public void apply(final CCStringIndentation it) {
- final Procedure1<String> _function = new Procedure1<String>() {
- @Override
- public void apply(final String indent) {
- final Procedure1<String> _function = new Procedure1<String>() {
- @Override
- public void apply(final String lineSep) {
- final String replaced = it.replaceEditorIndentation(indent, lineSep);
- int _countLineBreaks = Strings.countLineBreaks(replaced);
- Assert.assertEquals(3, _countLineBreaks);
- final Function1<String, Boolean> _function = new Function1<String, Boolean>() {
- @Override
- public Boolean apply(final String it) {
- return Boolean.valueOf((!Objects.equal(it, lineSep)));
- }
- };
- Iterable<String> _filter = IterableExtensions.<String>filter(Collections.<String>unmodifiableList(CollectionLiterals.<String>newArrayList(CCStringTest.this.CRLF, CCStringTest.this.LF, CCStringTest.this.CR)), _function);
- final Procedure1<String> _function_1 = new Procedure1<String>() {
- @Override
- public void apply(final String otherLineSep) {
- boolean _matches = replaced.matches(otherLineSep);
- Assert.assertFalse(_matches);
- }
- };
- IterableExtensions.<String>forEach(_filter, _function_1);
- int _indexOf = replaced.indexOf("\t\t\t");
- Assert.assertEquals((-1), _indexOf);
- int _indexOf_1 = replaced.indexOf(indent);
- boolean _greaterThan = (_indexOf_1 > 0);
- Assert.assertTrue(_greaterThan);
- }
- };
- IterableExtensions.<String>forEach(Collections.<String>unmodifiableList(CollectionLiterals.<String>newArrayList(CCStringTest.this.CRLF, CCStringTest.this.LF, CCStringTest.this.CR)), _function);
- }
- };
- IterableExtensions.<String>forEach(Collections.<String>unmodifiableList(CollectionLiterals.<String>newArrayList("\t", " ")), _function);
- }
- };
- ObjectExtensions.<CCStringIndentation>operator_doubleArrow(_cCStringIndentation, _function);
- CCStringIndentation _cCStringIndentation_1 = new CCStringIndentation("\r\t\t\tText\r\n\t\t\t\n");
- final Procedure1<CCStringIndentation> _function_1 = new Procedure1<CCStringIndentation>() {
- @Override
- public void apply(final CCStringIndentation it) {
- final Procedure1<String> _function = new Procedure1<String>() {
- @Override
- public void apply(final String lineSep) {
- final String replaced = it.replaceEditorIndentation(null, lineSep);
- int _countLineBreaks = Strings.countLineBreaks(replaced);
- Assert.assertEquals(3, _countLineBreaks);
- final Function1<String, Boolean> _function = new Function1<String, Boolean>() {
- @Override
- public Boolean apply(final String it) {
- return Boolean.valueOf((!Objects.equal(it, lineSep)));
- }
- };
- Iterable<String> _filter = IterableExtensions.<String>filter(Collections.<String>unmodifiableList(CollectionLiterals.<String>newArrayList(CCStringTest.this.CRLF, CCStringTest.this.LF, CCStringTest.this.CR)), _function);
- final Procedure1<String> _function_1 = new Procedure1<String>() {
- @Override
- public void apply(final String otherLineSep) {
- boolean _matches = replaced.matches(otherLineSep);
- Assert.assertFalse(_matches);
- }
- };
- IterableExtensions.<String>forEach(_filter, _function_1);
- int _indexOf = replaced.indexOf("\t\t\t");
- boolean _greaterThan = (_indexOf > 0);
- Assert.assertTrue(_greaterThan);
- }
- };
- IterableExtensions.<String>forEach(Collections.<String>unmodifiableList(CollectionLiterals.<String>newArrayList(CCStringTest.this.CRLF, CCStringTest.this.LF, CCStringTest.this.CR)), _function);
- }
- };
- ObjectExtensions.<CCStringIndentation>operator_doubleArrow(_cCStringIndentation_1, _function_1);
- CCStringIndentation _cCStringIndentation_2 = new CCStringIndentation("\r\t\t\tText\r\n\t\t\t\n");
- final Procedure1<CCStringIndentation> _function_2 = new Procedure1<CCStringIndentation>() {
- @Override
- public void apply(final CCStringIndentation it) {
- final Procedure1<String> _function = new Procedure1<String>() {
- @Override
- public void apply(final String indent) {
- final String replaced = it.replaceEditorIndentation(indent, null);
- int _indexOf = replaced.indexOf("\t\t\t");
- Assert.assertEquals((-1), _indexOf);
- int _indexOf_1 = replaced.indexOf(indent);
- boolean _greaterThan = (_indexOf_1 > 0);
- Assert.assertTrue(_greaterThan);
- }
- };
- IterableExtensions.<String>forEach(Collections.<String>unmodifiableList(CollectionLiterals.<String>newArrayList("\t", " ")), _function);
- }
- };
- ObjectExtensions.<CCStringIndentation>operator_doubleArrow(_cCStringIndentation_2, _function_2);
- CCStringIndentation _cCStringIndentation_3 = new CCStringIndentation("\r\tText\n\r\t\n");
- String _replaceEditorIndentation = _cCStringIndentation_3.replaceEditorIndentation(null, null);
- Assert.assertEquals("\r\tText\n\r\t\n", _replaceEditorIndentation);
- }
-}
diff --git a/tests/org.eclipse.etrice.core.common.tests/xtend-gen/org/eclipse/etrice/core/common/tests/RelativeFileURITest.java b/tests/org.eclipse.etrice.core.common.tests/xtend-gen/org/eclipse/etrice/core/common/tests/RelativeFileURITest.java
deleted file mode 100644
index 7d8f96e77..000000000
--- a/tests/org.eclipse.etrice.core.common.tests/xtend-gen/org/eclipse/etrice/core/common/tests/RelativeFileURITest.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/**
- * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Juergen Haug (initial contribution)
- */
-package org.eclipse.etrice.core.common.tests;
-
-import com.google.common.collect.Iterables;
-import java.util.Collections;
-import java.util.List;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.etrice.core.common.scoping.RelativeFileURIHandler;
-import org.eclipse.xtext.xbase.lib.CollectionLiterals;
-import org.eclipse.xtext.xbase.lib.Functions.Function1;
-import org.eclipse.xtext.xbase.lib.IterableExtensions;
-import org.eclipse.xtext.xbase.lib.ListExtensions;
-import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;
-import org.junit.Assert;
-import org.junit.Test;
-
-@SuppressWarnings("all")
-public class RelativeFileURITest {
- private final static List<String> ABSOLUTE_URLS = Collections.<String>unmodifiableList(CollectionLiterals.<String>newArrayList("file:/", "file:/bar", "file:/bar/", "file:/bar/baz", "file:/bar/baz/", "file:/c:", "file:/c:/", "file:/c:/bar", "file:/c:/bar/", "file:/c:/bar/baz", "file:/c:/bar/baz/", "file://foo", "file://foo/", "file://foo/bar", "file://foo/bar/", "file://foo/bar/baz", "file://foo/bar/baz/", "file://foo/c:", "file://foo/c:/", "file://foo/c:/bar", "file://foo/c:/bar/", "file://foo/c:/bar/baz", "file://foo/c:/bar/baz/"));
-
- private final static List<String> RESOLVED_PRESERVE_ABOVE_ROOT_URIS = Collections.<String>unmodifiableList(CollectionLiterals.<String>newArrayList("file:/a/../g", "file:/a/../../g"));
-
- private final static List<String> RESOLVED_NO_PRESERVE_ABOVE_ROOT_URIS = Collections.<String>unmodifiableList(CollectionLiterals.<String>newArrayList("file:/a/g", "file:/a/g/e"));
-
- private final static List<String> ENCODED_URIS = Collections.<String>unmodifiableList(CollectionLiterals.<String>newArrayList("http://www.eclipse.org/foo", "http://server%231.eclipse.org/foo%20bar/baz#toc", "myscheme:my%20name", "file:/C:/My%20Documents/me/50%25+1.txt"));
-
- private final static List<String> ENCODED_PLATFORM_PATH_URIS = Collections.<String>unmodifiableList(CollectionLiterals.<String>newArrayList("platform:/resource/project/myfile.txt", "platform:/resource/My%20Project%20%231/My%20File.txt", "platform:/resource/are%20you%20there%3F", "platform:/resource/are%20you%20there%3F.txt", "platform:/resource"));
-
- private final static List<String> QUERIES = Collections.<String>unmodifiableList(CollectionLiterals.<String>newArrayList("", "?q=huh"));
-
- private final static List<String> FRAGMENTS = Collections.<String>unmodifiableList(CollectionLiterals.<String>newArrayList("", "#toc", "#/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p", "#1:2:3"));
-
- private final static URI TEST_URI = URI.createURI("file:/a/b/c/d");
-
- public Iterable<URI> allURIs() {
- Iterable<String> _plus = Iterables.<String>concat(RelativeFileURITest.ABSOLUTE_URLS, RelativeFileURITest.RESOLVED_PRESERVE_ABOVE_ROOT_URIS);
- Iterable<String> _plus_1 = Iterables.<String>concat(_plus, RelativeFileURITest.RESOLVED_NO_PRESERVE_ABOVE_ROOT_URIS);
- Iterable<String> _plus_2 = Iterables.<String>concat(_plus_1, RelativeFileURITest.ENCODED_URIS);
- final Function1<String, List<List<String>>> _function = new Function1<String, List<List<String>>>() {
- @Override
- public List<List<String>> apply(final String uri) {
- final Function1<String, List<String>> _function = new Function1<String, List<String>>() {
- @Override
- public List<String> apply(final String query) {
- final Function1<String, String> _function = new Function1<String, String>() {
- @Override
- public String apply(final String fragment) {
- return ((uri + query) + fragment);
- }
- };
- return ListExtensions.<String, String>map(RelativeFileURITest.FRAGMENTS, _function);
- }
- };
- return ListExtensions.<String, List<String>>map(RelativeFileURITest.QUERIES, _function);
- }
- };
- Iterable<List<List<String>>> _map = IterableExtensions.<String, List<List<String>>>map(_plus_2, _function);
- Iterable<List<String>> _flatten = Iterables.<List<String>>concat(_map);
- Iterable<String> _flatten_1 = Iterables.<String>concat(_flatten);
- final Function1<String, URI> _function_1 = new Function1<String, URI>() {
- @Override
- public URI apply(final String it) {
- return URI.createURI(it);
- }
- };
- return IterableExtensions.<String, URI>map(_flatten_1, _function_1);
- }
-
- private final RelativeFileURIHandler handler = new RelativeFileURIHandler();
-
- @Test
- public void resolveSelf() {
- Iterable<URI> _allURIs = this.allURIs();
- final Procedure1<URI> _function = new Procedure1<URI>() {
- @Override
- public void apply(final URI uri) {
- RelativeFileURITest.this.handler.setBaseURI(RelativeFileURITest.TEST_URI);
- URI _resolve = RelativeFileURITest.this.handler.resolve(uri);
- Assert.assertEquals(uri, _resolve);
- }
- };
- IterableExtensions.<URI>forEach(_allURIs, _function);
- }
-
- @Test
- public void roundtripResolve() {
- Iterable<URI> _allURIs = this.allURIs();
- final Procedure1<URI> _function = new Procedure1<URI>() {
- @Override
- public void apply(final URI uri) {
- URI _createURI = URI.createURI("file:/a/b/c/d");
- RelativeFileURITest.this.handler.setBaseURI(_createURI);
- URI _deresolve = RelativeFileURITest.this.handler.deresolve(uri);
- URI _resolve = RelativeFileURITest.this.handler.resolve(_deresolve);
- Assert.assertEquals(uri, _resolve);
- }
- };
- IterableExtensions.<URI>forEach(_allURIs, _function);
- }
-
- @Test
- public void deresolveBaseFile() {
- final URI testURI = RelativeFileURITest.TEST_URI.appendFragment("1:2:3");
- String _get = RelativeFileURITest.RESOLVED_NO_PRESERVE_ABOVE_ROOT_URIS.get(0);
- URI _createURI = URI.createURI(_get);
- this.handler.setBaseURI(_createURI);
- URI _deresolve = this.handler.deresolve(testURI);
- String _string = _deresolve.toString();
- Assert.assertEquals("b/c/d#1:2:3", _string);
- String _get_1 = RelativeFileURITest.RESOLVED_NO_PRESERVE_ABOVE_ROOT_URIS.get(1);
- URI _createURI_1 = URI.createURI(_get_1);
- this.handler.setBaseURI(_createURI_1);
- URI _deresolve_1 = this.handler.deresolve(testURI);
- String _string_1 = _deresolve_1.toString();
- Assert.assertEquals("../b/c/d#1:2:3", _string_1);
- }
-
- @Test
- public void interDocument() {
- final URI testURI = RelativeFileURITest.TEST_URI.appendFragment("1:2:3");
- this.handler.setBaseURI(RelativeFileURITest.TEST_URI);
- URI _deresolve = this.handler.deresolve(testURI);
- String _string = _deresolve.toString();
- Assert.assertEquals("#1:2:3", _string);
- URI _appendFragment = RelativeFileURITest.TEST_URI.appendFragment("some");
- this.handler.setBaseURI(_appendFragment);
- URI _deresolve_1 = this.handler.deresolve(testURI);
- String _string_1 = _deresolve_1.toString();
- Assert.assertEquals("#1:2:3", _string_1);
- }
-}
diff --git a/tests/org.eclipse.etrice.core.genmodel.fsm.tests/xtend-gen/org/eclipse/etrice/core/genmodel/fsm/tests/TestHierInheritedFSM.java b/tests/org.eclipse.etrice.core.genmodel.fsm.tests/xtend-gen/org/eclipse/etrice/core/genmodel/fsm/tests/TestHierInheritedFSM.java
deleted file mode 100644
index 38df45e96..000000000
--- a/tests/org.eclipse.etrice.core.genmodel.fsm.tests/xtend-gen/org/eclipse/etrice/core/genmodel/fsm/tests/TestHierInheritedFSM.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * Copyright (c) 2017 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Henrik Rentz-Reichert (initial contribution)
- */
-package org.eclipse.etrice.core.genmodel.fsm.tests;
-
-import java.util.Iterator;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.etrice.core.genmodel.fsm.FsmGenChecker;
-import org.eclipse.etrice.core.genmodel.fsm.FsmGenExtensions;
-import org.eclipse.etrice.core.genmodel.fsm.NullLogger;
-import org.eclipse.etrice.core.genmodel.fsm.fsmgen.Graph;
-import org.eclipse.etrice.core.genmodel.fsm.fsmgen.GraphContainer;
-import org.eclipse.etrice.core.genmodel.fsm.fsmgen.Link;
-import org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node;
-import org.eclipse.etrice.core.genmodel.fsm.tests.FsmGenTestBase;
-import org.eclipse.xtext.xbase.lib.Functions.Function1;
-import org.eclipse.xtext.xbase.lib.IterableExtensions;
-import org.eclipse.xtext.xbase.lib.IteratorExtensions;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-
-@SuppressWarnings("all")
-public class TestHierInheritedFSM extends FsmGenTestBase {
- private GraphContainer gc;
-
- @Before
- public void SetUp() {
- GraphContainer _graphContainer = this.getGraphContainer("HierInheritedFSMExample.room", "TestActor");
- this.gc = _graphContainer;
- Assert.assertNotNull("graph context was created", this.gc);
- final NullLogger logger = new NullLogger();
- FsmGenChecker.check(this.gc, logger);
- boolean _hasErrors = logger.hasErrors();
- Assert.assertFalse("logger has no errors", _hasErrors);
- this.save(this.gc, "HierInheritedFSMExample");
- }
-
- @Test
- public void testHierInheritedFSMItemCounts() {
- Graph _graph = this.gc.getGraph();
- EList<Node> _nodes = _graph.getNodes();
- int _size = _nodes.size();
- Assert.assertEquals("number of nodes", 4, _size);
- Graph _graph_1 = this.gc.getGraph();
- EList<Link> _links = _graph_1.getLinks();
- int _size_1 = _links.size();
- Assert.assertEquals("number of links", 6, _size_1);
- Graph _graph_2 = this.gc.getGraph();
- Iterable<Node> _stateNodes = FsmGenExtensions.getStateNodes(_graph_2);
- int _size_2 = IterableExtensions.size(_stateNodes);
- Assert.assertEquals("number of states", 4, _size_2);
- Graph _graph_3 = this.gc.getGraph();
- Iterable<Node> _trPointNodes = FsmGenExtensions.getTrPointNodes(_graph_3);
- int _size_3 = IterableExtensions.size(_trPointNodes);
- Assert.assertEquals("number of tr points", 0, _size_3);
- Graph _graph_4 = this.gc.getGraph();
- Iterable<Node> _choicePointNodes = FsmGenExtensions.getChoicePointNodes(_graph_4);
- int _size_4 = IterableExtensions.size(_choicePointNodes);
- Assert.assertEquals("number of choice points", 0, _size_4);
- }
-
- @Test
- public void testHierInheritedFSMDeepItemCounts() {
- Graph _graph = this.gc.getGraph();
- Iterator<Node> _allNodes = FsmGenExtensions.getAllNodes(_graph);
- int _size = IteratorExtensions.size(_allNodes);
- Assert.assertEquals("number of nodes", 12, _size);
- Graph _graph_1 = this.gc.getGraph();
- Iterator<Link> _allLinks = FsmGenExtensions.getAllLinks(_graph_1);
- int _size_1 = IteratorExtensions.size(_allLinks);
- Assert.assertEquals("number of links", 14, _size_1);
- Graph _graph_2 = this.gc.getGraph();
- Iterator<Node> _allStateNodes = FsmGenExtensions.getAllStateNodes(_graph_2);
- int _size_2 = IteratorExtensions.size(_allStateNodes);
- Assert.assertEquals("number of states", 10, _size_2);
- Graph _graph_3 = this.gc.getGraph();
- Iterator<Node> _allTrPointNodes = FsmGenExtensions.getAllTrPointNodes(_graph_3);
- int _size_3 = IteratorExtensions.size(_allTrPointNodes);
- Assert.assertEquals("number of tr points", 2, _size_3);
- Graph _graph_4 = this.gc.getGraph();
- Iterator<Node> _allChoicePointNodes = FsmGenExtensions.getAllChoicePointNodes(_graph_4);
- int _size_4 = IteratorExtensions.size(_allChoicePointNodes);
- Assert.assertEquals("number of choice points", 0, _size_4);
- }
-
- @Test
- public void testHierInheritedFSMLinks() {
- Graph _graph = this.gc.getGraph();
- Iterator<Node> _allStateNodes = FsmGenExtensions.getAllStateNodes(_graph);
- final Function1<Node, Boolean> _function = new Function1<Node, Boolean>() {
- @Override
- public Boolean apply(final Node it) {
- String _name = FsmGenExtensions.getName(it);
- return Boolean.valueOf(_name.equals("state1_0"));
- }
- };
- Iterator<Node> _filter = IteratorExtensions.<Node>filter(_allStateNodes, _function);
- final Node s = IteratorExtensions.<Node>head(_filter);
- Assert.assertNotNull("state found", s);
- EList<Link> _incoming = s.getIncoming();
- int _size = _incoming.size();
- Assert.assertEquals("incoming links", 2, _size);
- EList<Link> _outgoing = s.getOutgoing();
- int _size_1 = _outgoing.size();
- Assert.assertEquals("outgoing links", 1, _size_1);
- }
-}
diff --git a/tests/org.eclipse.etrice.core.room.tests/build.properties b/tests/org.eclipse.etrice.core.room.tests/build.properties
index 774ee5239..bd036ffc6 100644
--- a/tests/org.eclipse.etrice.core.room.tests/build.properties
+++ b/tests/org.eclipse.etrice.core.room.tests/build.properties
@@ -1,5 +1,6 @@
source.. = src/,\
- xtend-gen/
+ xtend-gen/,\
+ src-gen/
output.. = bin/
bin.includes = META-INF/,\
.,\
diff --git a/tests/org.eclipse.etrice.core.room.tests/xtend-gen/org/eclipse/etrice/core/FormatterTest.java b/tests/org.eclipse.etrice.core.room.tests/xtend-gen/org/eclipse/etrice/core/FormatterTest.java
deleted file mode 100644
index 29e7731a9..000000000
--- a/tests/org.eclipse.etrice.core.room.tests/xtend-gen/org/eclipse/etrice/core/FormatterTest.java
+++ /dev/null
@@ -1,187 +0,0 @@
-package org.eclipse.etrice.core;
-
-import com.google.common.base.Objects;
-import com.google.common.io.CharStreams;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.net.URI;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.etrice.core.CoreTestsActivator;
-import org.eclipse.etrice.core.room.tests.RoomInjectorProvider;
-import org.eclipse.xtend2.lib.StringConcatenation;
-import org.eclipse.xtext.junit4.InjectWith;
-import org.eclipse.xtext.junit4.XtextRunner;
-import org.eclipse.xtext.junit4.formatter.FormatterTestRequest;
-import org.eclipse.xtext.junit4.formatter.FormatterTester;
-import org.eclipse.xtext.xbase.lib.CollectionLiterals;
-import org.eclipse.xtext.xbase.lib.Exceptions;
-import org.eclipse.xtext.xbase.lib.Functions.Function0;
-import org.eclipse.xtext.xbase.lib.Functions.Function1;
-import org.eclipse.xtext.xbase.lib.Functions.Function2;
-import org.eclipse.xtext.xbase.lib.InputOutput;
-import org.eclipse.xtext.xbase.lib.IterableExtensions;
-import org.eclipse.xtext.xbase.lib.ObjectExtensions;
-import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;
-import org.junit.Assert;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.osgi.framework.Bundle;
-
-@RunWith(XtextRunner.class)
-@InjectWith(RoomInjectorProvider.class)
-@SuppressWarnings("all")
-public class FormatterTest extends FormatterTester {
- private final List<Pattern> patterns = new Function0<List<Pattern>>() {
- public List<Pattern> apply() {
- StringConcatenation _builder = new StringConcatenation();
- _builder.append("([^\\w\\s])\\s+(\\w)");
- Pattern _compile = Pattern.compile(_builder.toString());
- StringConcatenation _builder_1 = new StringConcatenation();
- _builder_1.append("([^\\w\\s])\\s+([^\\w\\s])");
- Pattern _compile_1 = Pattern.compile(_builder_1.toString());
- StringConcatenation _builder_2 = new StringConcatenation();
- _builder_2.append("(\\w)\\s+([^\\w\\s])");
- Pattern _compile_2 = Pattern.compile(_builder_2.toString());
- return Collections.<Pattern>unmodifiableList(CollectionLiterals.<Pattern>newArrayList(_compile, _compile_1, _compile_2));
- }
- }.apply();
-
- @Test
- public void unformatEqualsFormat() {
- ArrayList<String> _newArrayList = CollectionLiterals.<String>newArrayList();
- final Procedure1<ArrayList<String>> _function = new Procedure1<ArrayList<String>>() {
- @Override
- public void apply(final ArrayList<String> contents) {
- try {
- CoreTestsActivator _instance = CoreTestsActivator.getInstance();
- Bundle _bundle = _instance.getBundle();
- final Enumeration<URL> entries = _bundle.findEntries("models/formatting/unformatEqualsFormat/", "*.room", false);
- while (entries.hasMoreElements()) {
- URL _nextElement = entries.nextElement();
- URL _fileURL = FileLocator.toFileURL(_nextElement);
- InputStream _openStream = _fileURL.openStream();
- InputStreamReader _inputStreamReader = new InputStreamReader(_openStream);
- String _string = CharStreams.toString(_inputStreamReader);
- contents.add(_string);
- }
- } catch (Throwable _e) {
- throw Exceptions.sneakyThrow(_e);
- }
- }
- };
- final ArrayList<String> expectedContents = ObjectExtensions.<ArrayList<String>>operator_doubleArrow(_newArrayList, _function);
- boolean _isEmpty = expectedContents.isEmpty();
- boolean _not = (!_isEmpty);
- Assert.assertTrue(_not);
- final Function1<String, String> _function_1 = new Function1<String, String>() {
- @Override
- public String apply(final String content) {
- String _xblockexpression = null;
- {
- final Function2<String, Pattern, String> _function = new Function2<String, Pattern, String>() {
- @Override
- public String apply(final String replaced, final Pattern pattern) {
- Matcher _matcher = pattern.matcher(replaced);
- return _matcher.replaceAll("$1$2");
- }
- };
- final String unformatted = IterableExtensions.<Pattern, String>fold(FormatterTest.this.patterns, content, _function);
- Assert.assertNotEquals(content, unformatted);
- String _replace = unformatted.replace("\r\n", " ");
- _xblockexpression = _replace.replace("\n", " ");
- }
- return _xblockexpression;
- }
- };
- final Function1<? super String, ? extends String> unformatter = _function_1;
- final Procedure1<String> _function_2 = new Procedure1<String>() {
- @Override
- public void apply(final String expected) {
- String _apply = unformatter.apply(expected);
- InputOutput.<String>println(_apply);
- final Procedure1<FormatterTestRequest> _function = new Procedure1<FormatterTestRequest>() {
- @Override
- public void apply(final FormatterTestRequest it) {
- it.setExpectation(expected);
- String _apply = unformatter.apply(expected);
- it.setToBeFormatted(_apply);
- }
- };
- FormatterTest.this.assertFormatted(_function);
- }
- };
- IterableExtensions.<String>forEach(expectedContents, _function_2);
- }
-
- @Test
- public void testManual() {
- final Function1<String, Map<String, String>> _function = new Function1<String, Map<String, String>>() {
- @Override
- public Map<String, String> apply(final String path) {
- HashMap<String, String> _xblockexpression = null;
- {
- CoreTestsActivator _instance = CoreTestsActivator.getInstance();
- Bundle _bundle = _instance.getBundle();
- final Enumeration<URL> entries = _bundle.findEntries(path, "*.room", false);
- HashMap<String, String> _newHashMap = CollectionLiterals.<String, String>newHashMap();
- final Procedure1<HashMap<String, String>> _function = new Procedure1<HashMap<String, String>>() {
- @Override
- public void apply(final HashMap<String, String> contentMap) {
- try {
- while (entries.hasMoreElements()) {
- {
- final URL entry = entries.nextElement();
- URI _uRI = entry.toURI();
- String _string = _uRI.toString();
- org.eclipse.emf.common.util.URI _createURI = org.eclipse.emf.common.util.URI.createURI(_string);
- final String name = _createURI.lastSegment();
- URL _fileURL = FileLocator.toFileURL(entry);
- InputStream _openStream = _fileURL.openStream();
- InputStreamReader _inputStreamReader = new InputStreamReader(_openStream);
- String _string_1 = CharStreams.toString(_inputStreamReader);
- contentMap.put(name, _string_1);
- }
- }
- } catch (Throwable _e) {
- throw Exceptions.sneakyThrow(_e);
- }
- }
- };
- _xblockexpression = ObjectExtensions.<HashMap<String, String>>operator_doubleArrow(_newHashMap, _function);
- }
- return _xblockexpression;
- }
- };
- final Function1<? super String, ? extends Map<String, String>> collector = _function;
- final Map<String, String> unformattedContents = collector.apply("models/formatting/expected/");
- final Map<String, String> expectedContents = collector.apply("models/formatting/expected/");
- Assert.assertTrue(((!unformattedContents.isEmpty()) && Objects.equal(expectedContents.keySet(), unformattedContents.keySet())));
- Set<String> _keySet = expectedContents.keySet();
- final Procedure1<String> _function_1 = new Procedure1<String>() {
- @Override
- public void apply(final String fileName) {
- final Procedure1<FormatterTestRequest> _function = new Procedure1<FormatterTestRequest>() {
- @Override
- public void apply(final FormatterTestRequest it) {
- String _get = expectedContents.get(fileName);
- it.setExpectation(_get);
- String _get_1 = unformattedContents.get(fileName);
- it.setToBeFormatted(_get_1);
- }
- };
- FormatterTest.this.assertFormatted(_function);
- }
- };
- IterableExtensions.<String>forEach(_keySet, _function_1);
- }
-}
diff --git a/tests/org.eclipse.etrice.core.room.tests/xtend-gen/org/eclipse/etrice/core/TestNames.java b/tests/org.eclipse.etrice.core.room.tests/xtend-gen/org/eclipse/etrice/core/TestNames.java
deleted file mode 100644
index 645b5a78a..000000000
--- a/tests/org.eclipse.etrice.core.room.tests/xtend-gen/org/eclipse/etrice/core/TestNames.java
+++ /dev/null
@@ -1,200 +0,0 @@
-/**
- * Copyright (c) 2015 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Juergen Haug (initial contribution)
- */
-package org.eclipse.etrice.core;
-
-import com.google.common.base.Objects;
-import com.google.common.collect.Iterables;
-import com.google.common.collect.Maps;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import org.eclipse.emf.common.util.Diagnostic;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.etrice.core.TestBase;
-import org.eclipse.etrice.core.room.ExternalPort;
-import org.eclipse.xtext.validation.AbstractValidationDiagnostic;
-import org.eclipse.xtext.xbase.lib.CollectionLiterals;
-import org.eclipse.xtext.xbase.lib.Functions.Function1;
-import org.eclipse.xtext.xbase.lib.IterableExtensions;
-import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-
-@SuppressWarnings("all")
-public class TestNames extends TestBase {
- private final Map<EObject, Boolean> nameErrorMap = Maps.<EObject, Boolean>newHashMap();
-
- private Resource res;
-
- @Before
- public void SetUp() {
- this.prepare();
- Resource _resource = this.getResource("NamesAreUnique.room");
- this.res = _resource;
- EList<EObject> _contents = this.res.getContents();
- final EObject model = IterableExtensions.<EObject>head(_contents);
- final Diagnostic diag = this.getDiag(model);
- List<Diagnostic> _children = diag.getChildren();
- final Procedure1<Diagnostic> _function = new Procedure1<Diagnostic>() {
- @Override
- public void apply(final Diagnostic it) {
- if ((it instanceof AbstractValidationDiagnostic)) {
- final EObject obj = ((AbstractValidationDiagnostic)it).getSourceEObject();
- Boolean nameError = TestNames.this.nameErrorMap.get(obj);
- boolean _equals = Objects.equal(nameError, null);
- if (_equals) {
- nameError = Boolean.valueOf(false);
- }
- TestNames.this.nameErrorMap.put(obj, Boolean.valueOf(((nameError).booleanValue() || TestNames.this.isNameErrorMessage(it))));
- }
- }
- };
- IterableExtensions.<Diagnostic>forEach(_children, _function);
- }
-
- @Test
- public void RoomClassNames() {
- EObject _eObject = this.res.getEObject("ActorClass:ClassDuplicate1");
- boolean _hasNameErrorMessage = this.hasNameErrorMessage(_eObject);
- Assert.assertTrue(_hasNameErrorMessage);
- EObject _eObject_1 = this.res.getEObject("LogicalSystem:ClassDuplicate1");
- boolean _hasNameErrorMessage_1 = this.hasNameErrorMessage(_eObject_1);
- Assert.assertTrue(_hasNameErrorMessage_1);
- EObject _eObject_2 = this.res.getEObject("AnnotationType:ClassDuplicate1");
- boolean _hasNameErrorMessage_2 = this.hasNameErrorMessage(_eObject_2);
- Assert.assertTrue(_hasNameErrorMessage_2);
- EObject _eObject_3 = this.res.getEObject("EnumerationType:ClassDuplicate1");
- boolean _hasNameErrorMessage_3 = this.hasNameErrorMessage(_eObject_3);
- Assert.assertTrue(_hasNameErrorMessage_3);
- EObject _eObject_4 = this.res.getEObject("PrimitiveType:ClassDuplicate1");
- boolean _hasNameErrorMessage_4 = this.hasNameErrorMessage(_eObject_4);
- Assert.assertTrue(_hasNameErrorMessage_4);
- }
-
- @Test
- public void BaseClassNames() {
- final EObject ac = this.res.getEObject("ActorClass:Base");
- final EObject dc = this.res.getEObject("DataClass:DBase");
- final ArrayList<EObject> items = CollectionLiterals.<EObject>newArrayList(ac, dc);
- EList<EObject> _eContents = ac.eContents();
- Iterables.<EObject>addAll(items, _eContents);
- EList<EObject> _eContents_1 = dc.eContents();
- Iterables.<EObject>addAll(items, _eContents_1);
- int _size = items.size();
- Assert.assertEquals("Unexpected item count", 15, _size);
- final Procedure1<EObject> _function = new Procedure1<EObject>() {
- @Override
- public void apply(final EObject it) {
- boolean _hasNameErrorMessage = TestNames.this.hasNameErrorMessage(it);
- Assert.assertFalse(("expected no name error: " + it), _hasNameErrorMessage);
- }
- };
- IterableExtensions.<EObject>forEach(items, _function);
- }
-
- @Test
- public void OverrideNames() {
- final EObject ac = this.res.getEObject("ActorClass:Override");
- final EObject dc = this.res.getEObject("DataClass:DOverride");
- final ArrayList<EObject> items = CollectionLiterals.<EObject>newArrayList(ac, dc);
- EList<EObject> _eContents = ac.eContents();
- Iterables.<EObject>addAll(items, _eContents);
- EList<EObject> _eContents_1 = dc.eContents();
- Iterables.<EObject>addAll(items, _eContents_1);
- int _size = items.size();
- Assert.assertEquals("Unexpected item count", 9, _size);
- final Procedure1<EObject> _function = new Procedure1<EObject>() {
- @Override
- public void apply(final EObject it) {
- boolean _hasNameErrorMessage = TestNames.this.hasNameErrorMessage(it);
- Assert.assertFalse(("expected no name error: " + it), _hasNameErrorMessage);
- }
- };
- IterableExtensions.<EObject>forEach(items, _function);
- }
-
- @Test
- public void InheritedNames() {
- final EObject ac = this.res.getEObject("ActorClass:Sub");
- final EObject dc = this.res.getEObject("DataClass:DSub");
- final ArrayList<EObject> items = CollectionLiterals.<EObject>newArrayList();
- EList<EObject> _eContents = ac.eContents();
- final Function1<EObject, Boolean> _function = new Function1<EObject, Boolean>() {
- @Override
- public Boolean apply(final EObject it) {
- return Boolean.valueOf((!(it instanceof ExternalPort)));
- }
- };
- Iterable<EObject> _filter = IterableExtensions.<EObject>filter(_eContents, _function);
- Iterables.<EObject>addAll(items, _filter);
- EList<EObject> _eContents_1 = dc.eContents();
- Iterables.<EObject>addAll(items, _eContents_1);
- int _size = items.size();
- Assert.assertEquals("Unexpected item count", 13, _size);
- final Procedure1<EObject> _function_1 = new Procedure1<EObject>() {
- @Override
- public void apply(final EObject it) {
- boolean _hasNameErrorMessage = TestNames.this.hasNameErrorMessage(it);
- Assert.assertTrue(("expected name error: " + it), _hasNameErrorMessage);
- }
- };
- IterableExtensions.<EObject>forEach(items, _function_1);
- }
-
- @Test
- public void FlatNames() {
- final EObject ac = this.res.getEObject("ActorClass:Flat");
- final EObject dc = this.res.getEObject("DataClass:DFlat");
- final EObject lc = this.res.getEObject("DataClass:LFlat");
- final EObject sc = this.res.getEObject("DataClass:SFlat");
- final EObject enum_ = this.res.getEObject("DataClass:EnumFlat");
- final ArrayList<EObject> items = CollectionLiterals.<EObject>newArrayList();
- EList<EObject> _eContents = ac.eContents();
- final Function1<EObject, Boolean> _function = new Function1<EObject, Boolean>() {
- @Override
- public Boolean apply(final EObject it) {
- return Boolean.valueOf((!(it instanceof ExternalPort)));
- }
- };
- Iterable<EObject> _filter = IterableExtensions.<EObject>filter(_eContents, _function);
- Iterables.<EObject>addAll(items, _filter);
- EList<EObject> _eContents_1 = dc.eContents();
- Iterables.<EObject>addAll(items, _eContents_1);
- EList<EObject> _eContents_2 = lc.eContents();
- Iterables.<EObject>addAll(items, _eContents_2);
- EList<EObject> _eContents_3 = sc.eContents();
- Iterables.<EObject>addAll(items, _eContents_3);
- EList<EObject> _eContents_4 = enum_.eContents();
- Iterables.<EObject>addAll(items, _eContents_4);
- int _size = items.size();
- Assert.assertEquals("Unexpected item count", 16, _size);
- final Procedure1<EObject> _function_1 = new Procedure1<EObject>() {
- @Override
- public void apply(final EObject it) {
- boolean _hasNameErrorMessage = TestNames.this.hasNameErrorMessage(it);
- Assert.assertTrue(("expected name error: " + it), _hasNameErrorMessage);
- }
- };
- IterableExtensions.<EObject>forEach(items, _function_1);
- }
-
- private boolean hasNameErrorMessage(final EObject obj) {
- return (this.nameErrorMap.containsKey(obj) && (this.nameErrorMap.get(obj)).booleanValue());
- }
-
- protected boolean isNameErrorMessage(final Diagnostic diag) {
- final String message = diag.getMessage();
- return ((diag.getSeverity() >= Diagnostic.ERROR) && (message.contains("Duplicate name") || (message.contains("Name") && message.contains("is already assigned to"))));
- }
-}
diff --git a/tests/org.eclipse.etrice.generator.c.tests/.gitignore b/tests/org.eclipse.etrice.generator.c.tests/.gitignore
index 4f0e85af9..b45c5f774 100644
--- a/tests/org.eclipse.etrice.generator.c.tests/.gitignore
+++ b/tests/org.eclipse.etrice.generator.c.tests/.gitignore
@@ -1,6 +1 @@
-bin
-models
-output
-results
-src-gen
-log \ No newline at end of file
+src-gen/ \ No newline at end of file
diff --git a/tests/org.eclipse.etrice.generator.c.tests/Makefile b/tests/org.eclipse.etrice.generator.c.tests/Makefile
deleted file mode 100644
index 9a1750a43..000000000
--- a/tests/org.eclipse.etrice.generator.c.tests/Makefile
+++ /dev/null
@@ -1,14 +0,0 @@
-# for make.xml
-
-#include ${MODELLIB_ROOTDIR}/buildTools/modellib.mk
-include ${RUNTIME_ROOTDIR}/buildTools/runtime.mk
-
-# ---
-IN_TARGET := ${APP_TARGET}
-IN_BUILD_DIR := ${APP_BUILD_DIR}
-IN_INCDIRS += ${APP_SRCDIRS_REC}
-IN_SRCDIRS_REC += ${APP_SRCDIRS_REC}
-#---
-
-# Create rules
-include ${RUNTIME_ROOTDIR}/buildTools/Makefile.mk \ No newline at end of file
diff --git a/tests/org.eclipse.etrice.generator.c.tests/buckminster.cspec b/tests/org.eclipse.etrice.generator.c.tests/buckminster.cspec
deleted file mode 100644
index c3cb872da..000000000
--- a/tests/org.eclipse.etrice.generator.c.tests/buckminster.cspec
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><cs:cspec xmlns:cs="http://www.eclipse.org/buckminster/CSpec-1.0" name="org.eclipse.etrice.generator.c.tests" componentType="buckminster" version="0.5.0.qualifier">
- <cs:actions>
- <cs:public name="run_tests" actor="ant">
- <cs:actorProperties>
- <cs:property key="buildFile" value="make.xml"/>
- <cs:property key="targets" value="all"/>
- </cs:actorProperties>
- </cs:public>
- </cs:actions>
-</cs:cspec> \ No newline at end of file
diff --git a/tests/org.eclipse.etrice.generator.c.tests/build.gradle b/tests/org.eclipse.etrice.generator.c.tests/build.gradle
new file mode 100644
index 000000000..e5ed184c3
--- /dev/null
+++ b/tests/org.eclipse.etrice.generator.c.tests/build.gradle
@@ -0,0 +1,10 @@
+plugins {
+ id 'c'
+}
+
+apply from: "$rootDir/gradle/etTest.gradle"
+
+def genericPhysical = '../org.eclipse.etrice.generator.common.tests/models/GenericPhysical.etphys'
+
+createTest('c', 'sendingDataTest', ['models/SendingDataTest.room', genericPhysical])
+createTest('c', 'staticConfigTest', ['models/StaticConfigTest.etmap', 'models/StaticConfigTest.room', 'models/StaticConfigTest.config']) \ No newline at end of file
diff --git a/tests/org.eclipse.etrice.generator.c.tests/make.xml b/tests/org.eclipse.etrice.generator.c.tests/make.xml
deleted file mode 100644
index 07e2df06e..000000000
--- a/tests/org.eclipse.etrice.generator.c.tests/make.xml
+++ /dev/null
@@ -1,100 +0,0 @@
-<?xml version="1.0"?>
-<!--
- Ant makefile for building and running of tests.
-
- Includes common.xml from org.eclipse.etrice.generator.common.tests
--->
-<project name="org.eclipse.etrice.generator.c.tests" basedir="." default="all">
-
- <target name="testing" depends="common.testing">
-
- <!-- add test here, testid==testSuiteFileName -->
- <test testid="StaticConfigTest" models="${models.path}/staticConfig/StaticConfigTest.etmap ${models.path}/staticConfig/StaticConfigTest.room ${models.path}/staticConfig/StaticConfigTest.config ${models.path}/TimingService.room" />
-
- <!-- fail on build server -->
- <!--<test testid="SendingDataTestC" models="${models.path}/sendingData/SendingDataTestC.room ${models.path}/GenericPhysical.etphys" />-->
- <echo>done with ${ant.project.name}</echo>
- </target>
-
- <target name="copyModels" depends="common.copyModels">
- <copy todir="${models.path}">
- <fileset dir="./targetModels"/>
- </copy>
- <move file="${models.path}/staticConfig/StaticConfigTest_C.room" toFile="${models.path}/staticConfig//StaticConfigTest.room" />
- </target>
-
- <!-- ################################################################ -->
-
- <import file="../org.eclipse.etrice.generator.common.tests/common.xml" as="common"/>
-
- <property name="modellib.path" value="../../runtime/org.eclipse.etrice.modellib.c" />
- <property name="runtime.path" value="../../runtime/org.eclipse.etrice.runtime.c" />
-
- <target name="set_local_rt" unless="runtime.platform">
- <!-- <property name="runtime.platform" value="MT_POSIX_GENERIC_GCC"/> -->
- <property name="runtime.platform" value="MT_WIN_MinGW"/>
- <echo> runtime.platform = ${runtime.platform} </echo>
- </target>
- <target name="setVars" depends="set_local_rt,common.setVars"/>
-
- <target name="all" depends="clean,copyModels,testing"></target>
-
- <!-- test := generate 1 executable, build, run, process results -->
- <macrodef name="test">
- <attribute name="testId"/>
- <attribute name="models"/>
- <sequential>
- <standaloneGenerator testId="@{testId}" models="@{models}"/>
- <build testId="@{testId}"/>
- <run testId="@{testId}"/>
- <convert testId="@{testId}"/>
- <copyResult testId="@{testId}" targetId="C_${runtime.platform}_"/>
- </sequential>
- </macrodef>
-
- <macrodef name="standaloneGenerator">
- <attribute name="testId"/>
- <attribute name="models"/>
- <sequential>
- <mkdir dir="${output}"/>
- <java output="${output}/generate.txt" error="${output}/generate_err.txt" classname="org.eclipse.etrice.generator.c.Main" fork="true" failonerror="true">
- <arg line="@{models}"/>
- <arg value="-genDir"/><arg value="src-gen/@{testId}"/>
- <arg value="-msc_instr"/>
- <classpath refid="etrice.clspath"/>
- </java>
- </sequential>
- </macrodef>
-
- <!--
- build: compiles and links the generated C sources
- -->
- <macrodef name="build">
- <attribute name="testId"/>
- <sequential>
- <mkdir dir="${bin.path}"/>
- <mkdir dir="${output}"/>
- <exec executable="make" failonerror="true" output="${output}/build.txt">
- <arg line="all"/>
- <arg line="APP_TARGET=@{testId}.exe"/>
- <arg line="APP_BUILD_DIR=${bin.path}"/>
- <arg line="APP_SRCDIRS_REC='./src-gen/@{testId} ./src/@{testId}'"/>
- <arg line="RUNTIME_ROOTDIR=${runtime.path}"/>
- <arg line="MODELLIB_ROOTDIR=${modellib.path}"/>
- <arg line="TARGET_PLATFORM=${runtime.platform}"/>
- </exec>
- </sequential>
- </macrodef>
-
- <macrodef name="run">
- <attribute name="testId"/>
- <sequential>
- <mkdir dir="${output}"/>
- <mkdir dir="${testlog.path}"/>
- <exec dir="./" output="${output}/run.txt" resolveexecutable="true" executable="${bin.path}/@{testId}.exe" timeout="${run.msTimout}">
- <arg value="-run_as_test"/>
- </exec>
- </sequential>
- </macrodef>
-
-</project>
diff --git a/tests/org.eclipse.etrice.generator.common.tests/models/sendingData/SendingDataTestC.room b/tests/org.eclipse.etrice.generator.c.tests/models/SendingDataTest.room
index a44f54c1d..8091671e9 100644
--- a/tests/org.eclipse.etrice.generator.common.tests/models/sendingData/SendingDataTestC.room
+++ b/tests/org.eclipse.etrice.generator.c.tests/models/SendingDataTest.room
@@ -1,8 +1,8 @@
-RoomModel SendingDataTestC {
+RoomModel SendingDataTest {
- import room.basic.test.* from "../Tests.room"
- import room.basic.types.* from "../Types.room"
- import room.basic.language.* from "../Language.room"
+ import room.basic.test.* from "../../../runtime/org.eclipse.etrice.modellib.c/model/Tests.room"
+ import room.basic.types.* from "../../../runtime/org.eclipse.etrice.modellib.c/model/Types.room"
+ import room.basic.language.* from "../../../runtime/org.eclipse.etrice.modellib.c/model/Language.room"
ActorClass SendingDataTop {
@TestInstance
@@ -186,7 +186,7 @@ RoomModel SendingDataTestC {
StateMachine {
Transition init: initial -> tp0 of state0 {
action {
- "caseId = etUnit_openAll(\"log/testlog\", \"SendingDataTestC\", \"org.eclipse.etrice.generator.common.tests.SendingDataTest\", \"SendingDataTest_case\");"
+ "caseId = etUnit_openAll(\"log\", \"SendingDataTest\", \"org.eclipse.etrice.generator.c.tests.SendingDataTest\", \"SendingDataTest_case\");"
"EXPECT_ORDER_START(caseId,resultlist,23);"
"EXPECT_ORDER(caseId,\"<|MODEL_LOCATION|>\", 1);"
"/* send the default values */"
diff --git a/tests/org.eclipse.etrice.generator.common.tests/models/staticConfig/StaticConfigTest.config b/tests/org.eclipse.etrice.generator.c.tests/models/StaticConfigTest.config
index 426adc5e6..426adc5e6 100644
--- a/tests/org.eclipse.etrice.generator.common.tests/models/staticConfig/StaticConfigTest.config
+++ b/tests/org.eclipse.etrice.generator.c.tests/models/StaticConfigTest.config
diff --git a/tests/org.eclipse.etrice.generator.common.tests/models/staticConfig/StaticConfigTest.etmap b/tests/org.eclipse.etrice.generator.c.tests/models/StaticConfigTest.etmap
index e437b5710..c0f26f88d 100644
--- a/tests/org.eclipse.etrice.generator.common.tests/models/staticConfig/StaticConfigTest.etmap
+++ b/tests/org.eclipse.etrice.generator.c.tests/models/StaticConfigTest.etmap
@@ -1,7 +1,7 @@
MappingModel StaticConfigTest {
import StaticConfigTest.* from "StaticConfigTest.room"
- import room.generic.physical.* from "../GenericPhysical.etphys"
+ import room.generic.physical.* from "../../org.eclipse.etrice.generator.common.tests/models/GenericPhysical.etphys"
Mapping System_StaticConfigTest -> GenericPhysicalSystem {
SubSystemMapping main -> node {}
diff --git a/tests/org.eclipse.etrice.generator.common.tests/models/staticConfig/StaticConfigTest_C.room b/tests/org.eclipse.etrice.generator.c.tests/models/StaticConfigTest.room
index 5a1f04db5..484f8ac0e 100644
--- a/tests/org.eclipse.etrice.generator.common.tests/models/staticConfig/StaticConfigTest_C.room
+++ b/tests/org.eclipse.etrice.generator.c.tests/models/StaticConfigTest.room
@@ -1,7 +1,7 @@
RoomModel StaticConfigTest {
- import room.basic.types.* from "../Types.room"
- import room.basic.service.timing.* from "../TimingService.room"
+ import room.basic.types.* from "../../../runtime/org.eclipse.etrice.modellib.c/model/Types.room"
+ import room.basic.service.timing.* from "../../../runtime/org.eclipse.etrice.modellib.c/model/TimingService.room"
LogicalSystem System_StaticConfigTest {
SubSystemRef main : SubSystem_StaticConfigTest
@@ -22,8 +22,8 @@ RoomModel StaticConfigTest {
}
Behavior {
ctor {
- "etUnit_open(\"log/testlog\", \"StaticConfigTest\");"
- "etUnit_openTestSuite(\"org.eclipse.etrice.generator.common.tests.StaticConfigTest\");"
+ "etUnit_open(\"log\", \"StaticConfigTest\");"
+ "etUnit_openTestSuite(\"org.eclipse.etrice.generator.c.tests.StaticConfigTest\");"
}
dtor {
"etUnit_closeTestSuite();"
diff --git a/tests/org.eclipse.etrice.generator.c.tests/org.eclipse.etrice.generator.c.tests make.xml.launch b/tests/org.eclipse.etrice.generator.c.tests/org.eclipse.etrice.generator.c.tests make.xml.launch
deleted file mode 100644
index 92ce070b0..000000000
--- a/tests/org.eclipse.etrice.generator.c.tests/org.eclipse.etrice.generator.c.tests make.xml.launch
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.ant.AntLaunchConfigurationType">
-<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
-<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${project}"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.etrice.generator.c.tests/make.xml"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
-<listEntry value="org.eclipse.ui.externaltools.launchGroup"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.etrice.generator.c.tests"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
-<mapAttribute key="org.eclipse.ui.externaltools.ATTR_ANT_PROPERTIES">
-<mapEntry key="eclipse.home" value="${eclipse_home}"/>
-<mapEntry key="eclipse.pdebuild.home" value="${target_platform_plugin_location:org.eclipse.pde.build}"/>
-<mapEntry key="eclipse.pdebuild.scripts" value="${target_platform_plugin_location:org.eclipse.pde.build}/scripts/"/>
-<mapEntry key="eclipse.pdebuild.templates" value="${target_platform_plugin_location:org.eclipse.pde.build}/templates/"/>
-<mapEntry key="eclipse.running" value="true"/>
-<mapEntry key="com.google.guava" value="${target_platform_plugin_location:com.google.guava}"/>
-<mapEntry key="com.google.inject" value="${target_platform_plugin_location:com.google.inject}"/>
-<mapEntry key="javax.inject" value="${target_platform_plugin_location:javax.inject}"/>
-<mapEntry key="org.antlr.runtime" value="${target_platform_plugin_location:org.antlr.runtime}"/>
-<mapEntry key="org.apache.log4j" value="${target_platform_plugin_location:org.apache.log4j}"/>
-<mapEntry key="org.eclipse.emf.common" value="${target_platform_plugin_location:org.eclipse.emf.common}"/>
-<mapEntry key="org.eclipse.emf.ecore" value="${target_platform_plugin_location:org.eclipse.emf.ecore}"/>
-<mapEntry key="org.eclipse.emf.ecore.xmi" value="${target_platform_plugin_location:org.eclipse.emf.ecore.xmi}"/>
-<mapEntry key="org.eclipse.equinox.common" value="${target_platform_plugin_location:org.eclipse.equinox.common}"/>
-<mapEntry key="org.eclipse.xtend.lib" value="${target_platform_plugin_location:org.eclipse.xtend.lib}"/>
-<mapEntry key="org.eclipse.xtext" value="${target_platform_plugin_location:org.eclipse.xtext}"/>
-<mapEntry key="org.eclipse.xtext.common.types" value="${target_platform_plugin_location:org.eclipse.xtext.common.types}"/>
-<mapEntry key="org.eclipse.xtext.util" value="${target_platform_plugin_location:org.eclipse.xtext.util}"/>
-<mapEntry key="org.eclipse.xtext.xbase.lib" value="${target_platform_plugin_location:org.eclipse.xtext.xbase.lib}"/>
-</mapAttribute>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LAUNCH_CONFIGURATION_BUILD_SCOPE" value="${none}"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/org.eclipse.etrice.generator.c.tests/make.xml}"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="-v"/>
-<stringAttribute key="process_factory_id" value="org.eclipse.ant.ui.remoteAntProcessFactory"/>
-</launchConfiguration>
diff --git a/tests/org.eclipse.etrice.generator.c.tests/targetModels/empty.txt b/tests/org.eclipse.etrice.generator.c.tests/targetModels/empty.txt
deleted file mode 100644
index e69de29bb..000000000
--- a/tests/org.eclipse.etrice.generator.c.tests/targetModels/empty.txt
+++ /dev/null
diff --git a/tests/org.eclipse.etrice.generator.common.tests/.gitignore b/tests/org.eclipse.etrice.generator.common.tests/.gitignore
new file mode 100644
index 000000000..b45c5f774
--- /dev/null
+++ b/tests/org.eclipse.etrice.generator.common.tests/.gitignore
@@ -0,0 +1 @@
+src-gen/ \ No newline at end of file
diff --git a/tests/org.eclipse.etrice.generator.common.tests/buckminster.cspec b/tests/org.eclipse.etrice.generator.common.tests/buckminster.cspec
deleted file mode 100644
index b9bd37b93..000000000
--- a/tests/org.eclipse.etrice.generator.common.tests/buckminster.cspec
+++ /dev/null
@@ -1 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><cs:cspec xmlns:cs="http://www.eclipse.org/buckminster/CSpec-1.0" name="org.eclipse.etrice.generator.common.tests" componentType="buckminster" version="0.5.0.qualifier"/>
diff --git a/tests/org.eclipse.etrice.generator.common.tests/build.gradle b/tests/org.eclipse.etrice.generator.common.tests/build.gradle
new file mode 100644
index 000000000..9fd487354
--- /dev/null
+++ b/tests/org.eclipse.etrice.generator.common.tests/build.gradle
@@ -0,0 +1,32 @@
+plugins {
+ id 'c'
+ id 'cpp'
+ id 'java-base'
+}
+
+apply from: "$rootDir/gradle/etTest.gradle"
+
+def genericPhysical = 'models/GenericPhysical.etphys'
+
+def tests = [
+ actorCommunicationTest: ['models/ActorCommunicationTest.room', genericPhysical],
+ choicePointTest: ['models/ChoicePointTest.room', genericPhysical],
+ choicePointTestExtended: ['models/ChoicePointTestExtended.room', genericPhysical],
+ dataDrivenTest: ['models/DataDrivenTest.room', genericPhysical],
+ /* enumTest: ['models/EnumTest.room', genericPhysical], not supported in c++ */
+ compileTests: ['models/CompileTests.room', genericPhysical, 'models/DetailExpressionTest.room', 'models/StatemachineInterfaceTest.room', 'models/StatemachineInterfaceInheritedTest.room', 'models/StatemachineInterfaceTest.room', 'models/ContinuationTransitionTest.room'],
+ handlerTest: ['models/HandlerTest.room', genericPhysical],
+ operationInheritanceTest: ['models/OperationInheritanceTest.room', genericPhysical],
+ pingPongThreadTest: ['models/PingPongThreadTest.etmap', 'models/PingPongThreadTest.room'],
+ pingPongThreadReplPortTest: ['models/PingPongThreadReplPortTest.etmap', 'models/PingPongThreadReplPortTest.room']
+]
+
+tests.each { name, models ->
+ createTest('c', name, models)
+ createTest('cpp', name, models)
+ createTest('java', name, models)
+}
+
+// Enum Test
+createTest('c', 'enumTest', ['models/EnumTest.room', genericPhysical])
+createTest('java', 'enumTest', ['models/EnumTest.room', genericPhysical]) \ No newline at end of file
diff --git a/tests/org.eclipse.etrice.generator.common.tests/common.xml b/tests/org.eclipse.etrice.generator.common.tests/common.xml
deleted file mode 100644
index 63b4ab7d3..000000000
--- a/tests/org.eclipse.etrice.generator.common.tests/common.xml
+++ /dev/null
@@ -1,217 +0,0 @@
-<?xml version="1.0"?>
-<project name="org.eclipse.etrice.generator.common.tests">
-
- <target name="testing" depends="copyModels">
-
- <!-- add test here, testid==testSuiteFileName -->
- <test testid="ActorCommunicationTest" models="${models.path}/ActorCommunicationTest.room ${models.path}/GenericPhysical.etphys ${models.path}/TimingService.room" />
- <test testid="ChoicePointTest" models="${models.path}/ChoicePointTest.room ${models.path}/GenericPhysical.etphys" />
- <test testid="ChoicePointTestExtended" models="${models.path}/ChoicePointTestExtended.room ${models.path}/GenericPhysical.etphys" />
- <test testid="DataDrivenTest" models="${models.path}/DataDrivenTest.room ${models.path}/GenericPhysical.etphys ${models.path}/TimingService.room" />
- <test testid="EnumTest" models="${models.path}/EnumTest.room ${models.path}/GenericPhysical.etphys" />
- <test testid="CompileTests" models="${models.path}/CompileTests.room ${models.path}/GenericPhysical.etphys ${models.path}/DetailExpressionTest.room ${models.path}/StatemachineInterfaceTest.room ${models.path}/StatemachineInterfaceInheritedTest.room ${models.path}/StatemachineInterfaceTest.room ${models.path}/ContinuationTransitionTest.room ${models.path}/TimingService.room" />
- <test testid="HandlerTest" models="${models.path}/HandlerTest.room ${models.path}/GenericPhysical.etphys" />
- <test testid="OperationInheritanceTest" models="${models.path}/OperationInheritanceTest.room ${models.path}/GenericPhysical.etphys" />
- <test testid="PingPongThreadTest" models="${models.path}/PingPongThreadTest.etmap ${models.path}/PingPongThreadTest.room ${models.path}/TimingService.room" />
- <test testid="PingPongThreadReplPortTest" models="${models.path}/PingPongThreadReplPortTest.etmap ${models.path}/PingPongThreadReplPortTest.room ${models.path}/TimingService.room" />
-
-
- <echo>done with ${ant.project.name}</echo>
- </target>
-
- <target name="copyModels" depends="setVars">
- <copy todir="${models.path}">
- <fileset dir="../org.eclipse.etrice.generator.common.tests/models"/>
- </copy>
- <copy todir="${models.path}" >
- <fileset dir="${modellib.path}/model">
- <include name="*.room"/>
- <include name="*.etphys"/>
- </fileset>
- </copy>
- </target>
-
- <!-- ################################################################ -->
-
- <!-- global properties -->
- <!-- test.results, target.platform -->
-
- <!-- private properties-->
- <property name="models.path" value="./models"/>
- <property name="testlog.path" value="./log/testlog"/>
- <property name="output" value="./output"/>
- <property name="bin.path" value="./bin"/>
-
- <property name="run.msTimout" value="5000"/>
-
- <!-- show ALL used variables -->
- <target name="showVars">
- <echo> ant.project.name = ${ant.project.name} </echo>
- <echo> runtime.path = ${runtime.path} </echo>
- <echo> testlog.path = ${testlog.path} </echo>
- <echo> test.results = ${test.results} </echo>
- <echo> output = ${output} </echo>
- <echo> bin.path = ${bin.path} </echo>
- <echo> target.platform = ${target.platform} </echo>
- <echo> modellib.path = ${modellib.path} </echo>
- <echo> models.path = ${models.path} </echo>
- <echo> basedir = ${basedir} </echo>
-
- <echo> org.eclipse.emf.ecore = ${org.eclipse.emf.ecore} </echo>
- <echo> org.eclipse.emf.common = ${org.eclipse.emf.common} </echo>
- <echo> org.eclipse.emf.ecore.xmi = ${org.eclipse.emf.ecore.xmi} </echo>
- <echo> com.google.inject = ${com.google.inject} </echo>
- <echo> com.google.guava = ${com.google.guava} </echo>
- <echo> org.eclipse.equinox.common = ${org.eclipse.equinox.common} </echo>
- <echo> org.eclipse.xtext = ${org.eclipse.xtext} </echo>
- <echo> org.eclipse.xtext.util = ${org.eclipse.xtext.util} </echo>
- <echo> org.eclipse.xtext.common.types = ${org.eclipse.xtext.common.types} </echo>
- <echo> org.eclipse.xtend.lib = ${org.eclipse.xtend.lib} </echo>
- <echo> org.eclipse.xtext.xbase.lib = ${org.eclipse.xtext.xbase.lib} </echo>
- <echo> org.apache.log4j = ${org.apache.log4j} </echo>
- <echo> org.antlr.runtime = ${org.antlr.runtime} </echo>
- <echo> javax.inject = ${javax.inject} </echo>
-
- <pathconvert property="classpathProp" refid="etrice.clspath"/>
- <echo> etrice.clspath = ${classpathProp} </echo>
- </target>
-
- <!-- set global properties if not set-->
- <target name="set_local_tr" unless="test.results">
- <property name="test.results" value="./results"/>
- </target>
- <target name="set_local_tp" unless="target.platform">
- <property name="target.platform" value="${eclipse.home}"/>
- </target>
-
- <target name="setVars" depends="set_local_tp,set_local_tr,set_etrice_clspath,showVars"/>
-
- <target name="set_etrice_clspath">
- <path id="etrice.clspath">
- <pathelement location="../../plugins/org.eclipse.etrice.generator.c/bin"/>
- <pathelement location="../../plugins/org.eclipse.etrice.generator.java/bin"/>
- <pathelement location="../../plugins/org.eclipse.etrice.generator.cpp/bin"/>
- <pathelement location="../../plugins/org.eclipse.etrice.etunit.converter/bin"/>
- <pathelement location="../../plugins/org.eclipse.etrice.generator.config/bin"/>
- <pathelement location="../../plugins/org.eclipse.etrice.generator.doc/bin"/>
- <pathelement location="../../plugins/org.eclipse.etrice.generator.fsm/bin" />
- <pathelement location="../../plugins/org.eclipse.etrice.generator/bin"/>
- <pathelement location="../../plugins/org.eclipse.etrice.generator.gnuplot/bin"/>
- <pathelement location="../../plugins/org.eclipse.etrice.core.common/bin"/>
- <pathelement location="../../plugins/org.eclipse.etrice.core.fsm/bin" />
- <pathelement location="../../plugins/org.eclipse.etrice.core.room/bin"/>
- <pathelement location="../../plugins/org.eclipse.etrice.core.etphys/bin"/>
- <pathelement location="../../plugins/org.eclipse.etrice.core.etmap/bin"/>
- <pathelement location="../../plugins/org.eclipse.etrice.core.config/bin"/>
- <pathelement location="../../plugins/org.eclipse.etrice.core.genmodel.fsm/bin" />
- <pathelement location="../../plugins/org.eclipse.etrice.core.genmodel/bin"/>
-
- <!-- resolve dependencies using Oomph util in properties of launch config -->
- <pathelement location="${org.eclipse.emf.ecore}"/>
- <pathelement location="${org.eclipse.emf.common}"/>
- <pathelement location="${org.eclipse.emf.ecore.xmi}"/>
- <pathelement location="${com.google.inject}"/>
- <pathelement location="${com.google.guava}"/>
- <pathelement location="${org.eclipse.equinox.common}"/>
- <pathelement location="${org.eclipse.xtext}"/>
- <pathelement location="${org.eclipse.xtext.util}"/>
- <pathelement location="${org.eclipse.xtext.common.types}"/>
- <pathelement location="${org.eclipse.xtend.lib}"/>
- <pathelement location="${org.eclipse.xtext.xbase.lib}"/>
- <pathelement location="${org.apache.log4j}"/>
- <pathelement location="${org.antlr.runtime}"/>
- <pathelement location="${javax.inject}"/>
-
- <!-- resolve if used from Buckminster Ant task -->
- <fileset dir="${target.platform}/plugins/">
- <include name="org.eclipse.emf.ecore_2.1*.jar" />
- <include name="org.eclipse.emf.common_2.1*.jar" />
- <include name="org.eclipse.emf.ecore.xmi_2.1*.jar" />
- <include name="com.google.inject_*.jar" />
- <include name="com.google.guava_1*.jar" />
- <include name="org.eclipse.equinox.common_3.*.jar" />
- <include name="org.apache.log4j_1.2*.jar" />
- <include name="org.antlr.runtime_3.2*.jar" />
- <include name="javax.inject_1.0*.jar" />
-
- <!-- Xtext 2.6 -->
- <include name="org.eclipse.xtext_2.6*.jar" />
- <include name="org.eclipse.xtext.util_2.6*.jar" />
- <include name="org.eclipse.xtext.common.types_2.6*.jar" />
- <include name="org.eclipse.xtend.lib_2.6*.jar" />
- <include name="org.eclipse.xtext.xbase.lib_2.6*.jar" />
-
- <!-- Xtext 2.7 -->
- <include name="org.eclipse.xtext_2.7*.jar" />
- <include name="org.eclipse.xtext.util_2.7*.jar" />
- <include name="org.eclipse.xtext.common.types_2.7*.jar" />
- <include name="org.eclipse.xtend.lib_2.7*.jar" />
- <include name="org.eclipse.xtext.xbase.lib_2.7*.jar" />
-
- <!-- Xtext 2.8 -->
- <include name="org.eclipse.xtext_2.8*.jar" />
- <include name="org.eclipse.xtext.util_2.8*.jar" />
- <include name="org.eclipse.xtext.common.types_2.8*.jar" />
- <include name="org.eclipse.xtend.lib_2.8*.jar" />
- <include name="org.eclipse.xtext.xbase.lib_2.8*.jar" />
-
- <!-- Xtext 2.10 -->
- <include name="org.eclipse.xtext_2.10*.jar" />
- <include name="org.eclipse.xtext.util_2.10*.jar" />
- <include name="org.eclipse.xtext.common.types_2.10*.jar" />
- <include name="org.eclipse.xtend.lib_2.10*.jar" />
- <include name="org.eclipse.xtext.xbase.lib_2.10*.jar" />
- </fileset>
- </path>
- </target>
-
- <!--
- clean: deletes all folders created by this script
- -->
- <target name="clean" depends="setVars">
- <delete dir="${testlog.path}"/>
- <!--deletes resulst from other script on server <delete dir="${test.results}"/>-->
- <delete dir="${output}"/>
- <delete dir="${bin.path}"/>
- <delete dir="${models.path}"/>
- <delete dir="log"/>
- <delete dir="src-gen"/>
- </target>
-
- <macrodef name="convert">
- <attribute name="testId"/>
- <sequential>
- <java output="${output}/convert.txt" append="true" classname="org.eclipse.etrice.etunit.converter.EtUnitReportConverter" fork="true" failonerror="true">
- <arg value="-suite"/>
- <arg value="${ant.project.name}.@{testId}"/>
- <arg value="${testlog.path}/@{testId}.etu"/>
- <classpath refid="etrice.clspath"/>
- </java>
- </sequential>
- </macrodef>
-
- <macrodef name="convertPre">
- <attribute name="testId"/>
- <sequential>
- <java output="${output}/convert.txt" append="true" classname="org.eclipse.etrice.etunit.converter.EtUnitReportConverter" fork="true" failonerror="true">
- <arg value="-presuite"/>
- <arg value="${ant.project.name}."/>
- <arg value="${testlog.path}/@{testId}.etu"/>
- <classpath refid="etrice.clspath"/>
- </java>
- </sequential>
- </macrodef>
-
- <!--
- copy_results: copies the *.xml results to their final destination
- -->
- <macrodef name="copyResult">
- <attribute name="testId"/>
- <attribute name="targetId" default=""/>
- <sequential>
- <mkdir dir="${test.results}"/>
- <move file="${testlog.path}/@{testId}.xml" tofile="${test.results}/@{targetId}@{testId}.xml"/>
- </sequential>
- </macrodef>
-
-</project> \ No newline at end of file
diff --git a/tests/org.eclipse.etrice.generator.common.tests/models/ActorCommunicationTest.room b/tests/org.eclipse.etrice.generator.common.tests/models/ActorCommunicationTest.room
index ff81f30e0..9b51b0972 100644
--- a/tests/org.eclipse.etrice.generator.common.tests/models/ActorCommunicationTest.room
+++ b/tests/org.eclipse.etrice.generator.common.tests/models/ActorCommunicationTest.room
@@ -1,8 +1,8 @@
RoomModel ActorCommunicationTest {
- import room.basic.types.* from "Types.room"
- import room.basic.test.* from "Tests.room"
- import room.basic.service.timing.* from "TimingService.room"
+ import room.basic.types.* from "../../../runtime/${etModellib}/model/Types.room"
+ import room.basic.test.* from "../../../runtime/${etModellib}/model/Tests.room"
+ import room.basic.service.timing.* from "../../../runtime/${etModellib}/model/TimingService.room"
SubSystemClass SubSystem_ActorCommunicationTest {
@TestInstance
@@ -63,8 +63,8 @@ RoomModel ActorCommunicationTest {
}
Behavior {
ctor {
- "etUnit_open(\"log/testlog\", \"ActorCommunicationTest\");"
- "etUnit_openTestSuite(\"org.eclipse.etrice.generator.common.tests\");"
+ "etUnit_open(\"log\", \"ActorCommunicationTest\");"
+ "etUnit_openTestSuite(\"org.eclipse.etrice.generator.common.tests.ActorCommunicationTest\");"
}
dtor {
"etUnit_closeTestSuite();"
diff --git a/tests/org.eclipse.etrice.generator.common.tests/models/ChoicePointTest.room b/tests/org.eclipse.etrice.generator.common.tests/models/ChoicePointTest.room
index 3274047fe..92fc9fcbb 100644
--- a/tests/org.eclipse.etrice.generator.common.tests/models/ChoicePointTest.room
+++ b/tests/org.eclipse.etrice.generator.common.tests/models/ChoicePointTest.room
@@ -1,7 +1,7 @@
RoomModel ChoicePointTest {
- import room.basic.test.* from "Tests.room"
- import room.basic.types.* from "Types.room"
+ import room.basic.types.* from "../../../runtime/${etModellib}/model/Types.room"
+ import room.basic.test.* from "../../../runtime/${etModellib}/model/Tests.room"
ActorClass CPTest_Top {
@TestInstance
@@ -26,7 +26,7 @@ RoomModel ChoicePointTest {
}
Behavior {
ctor {
- "caseId = etUnit_openAll(\"log/testlog\", \"ChoicePointTest\", \"org.eclipse.etrice.generator.common.tests.ChoicePointTest\", \"ChoicePointTest_case\");"
+ "caseId = etUnit_openAll(\"log\", \"ChoicePointTest\", \"org.eclipse.etrice.generator.common.tests.ChoicePointTest\", \"ChoicePointTest_case\");"
}
dtor {
"etUnit_closeAll(caseId);"
diff --git a/tests/org.eclipse.etrice.generator.common.tests/models/ChoicePointTestExtended.room b/tests/org.eclipse.etrice.generator.common.tests/models/ChoicePointTestExtended.room
index fd23b8bde..fe184e51e 100644
--- a/tests/org.eclipse.etrice.generator.common.tests/models/ChoicePointTestExtended.room
+++ b/tests/org.eclipse.etrice.generator.common.tests/models/ChoicePointTestExtended.room
@@ -1,9 +1,9 @@
RoomModel ChoicePointTestExtended {
- import room.basic.test.* from "Tests.room"
- import room.basic.types.* from "Types.room"
+ import room.basic.types.* from "../../../runtime/${etModellib}/model/Types.room"
+ import room.basic.test.* from "../../../runtime/${etModellib}/model/Tests.room"
- SubSystemClass SubSystem_CPTestExtended {
+ SubSystemClass SubSystem_ChoicePointTestExtended {
@TestInstance
ActorRef tester_event: Tester_event
}
@@ -350,7 +350,7 @@ RoomModel ChoicePointTestExtended {
}
Behavior {
ctor {
- "caseId = etUnit_openAll(\"log/testlog\", \"ChoicePointTestExtended\", \"org.eclipse.etrice.generator.common.tests.ChoicePointTestExtended\", \"ChoicePointTest_case\");"
+ "caseId = etUnit_openAll(\"log\", \"ChoicePointTestExtended\", \"org.eclipse.etrice.generator.common.tests.ChoicePointTestExtended\", \"ChoicePointTest_case\");"
}
dtor {
"etUnit_closeAll(caseId);"
diff --git a/tests/org.eclipse.etrice.generator.common.tests/models/CompileTests.room b/tests/org.eclipse.etrice.generator.common.tests/models/CompileTests.room
index fe6547c4c..2819b53fd 100644
--- a/tests/org.eclipse.etrice.generator.common.tests/models/CompileTests.room
+++ b/tests/org.eclipse.etrice.generator.common.tests/models/CompileTests.room
@@ -1,7 +1,7 @@
-RoomModel CompileTestsModel {
+RoomModel CompileTests {
- import room.basic.types.* from "Types.room"
- import room.basic.test.* from "Tests.room"
+ import room.basic.types.* from "../../../runtime/${etModellib}/model/Types.room"
+ import room.basic.test.* from "../../../runtime/${etModellib}/model/Tests.room"
import DetailExpressionTestModel.DetailExpressionTest from "DetailExpressionTest.room"
import StatemachineInterfaceTestModel.StatemachineInterfaceTest from "StatemachineInterfaceTest.room"
import StatemachineInterfaceTestInheritedModel.StatemachineInterfaceInheritedTest from "StatemachineInterfaceInheritedTest.room"
@@ -20,7 +20,7 @@ RoomModel CompileTestsModel {
}
Behavior {
ctor {
- "caseId = etUnit_openAll(\"log/testlog\", \"CompileTests\", \"org.eclipse.etrice.generator.common.tests.CompileTests\", \"CompileTests_case\");"
+ "caseId = etUnit_openAll(\"log\", \"CompileTests\", \"org.eclipse.etrice.generator.common.tests.CompileTests\", \"CompileTests_case\");"
}
dtor {
"etUnit_closeAll(caseId);"
diff --git a/tests/org.eclipse.etrice.generator.common.tests/models/ContinuationTransitionTest.room b/tests/org.eclipse.etrice.generator.common.tests/models/ContinuationTransitionTest.room
index b5d4c79e5..e17ab03dd 100644
--- a/tests/org.eclipse.etrice.generator.common.tests/models/ContinuationTransitionTest.room
+++ b/tests/org.eclipse.etrice.generator.common.tests/models/ContinuationTransitionTest.room
@@ -1,7 +1,7 @@
RoomModel ContinuationTransitionTest {
- import room.basic.types.* from "Types.room"
- import room.basic.test.* from "Tests.room"
+ import room.basic.types.* from "../../../runtime/${etModellib}/model/Types.room"
+ import room.basic.test.* from "../../../runtime/${etModellib}/model/Tests.room"
ActorClass ContinuationTransitionTest {
Structure {
diff --git a/tests/org.eclipse.etrice.generator.common.tests/models/DataDrivenTest.room b/tests/org.eclipse.etrice.generator.common.tests/models/DataDrivenTest.room
index 2cd9b1aba..92141b100 100644
--- a/tests/org.eclipse.etrice.generator.common.tests/models/DataDrivenTest.room
+++ b/tests/org.eclipse.etrice.generator.common.tests/models/DataDrivenTest.room
@@ -1,10 +1,10 @@
RoomModel DataDrivenTest {
- import room.basic.test.* from "Tests.room"
- import room.basic.types.* from "Types.room"
- import room.basic.service.timing.* from "TimingService.room"
+ import room.basic.types.* from "../../../runtime/${etModellib}/model/Types.room"
+ import room.basic.test.* from "../../../runtime/${etModellib}/model/Tests.room"
+ import room.basic.service.timing.* from "../../../runtime/${etModellib}/model/TimingService.room"
- SubSystemClass SubSystem_DataDriven {
+ SubSystemClass SubSystem_DataDrivenTest {
@TestInstance
ActorRef appl: Appl
ActorRef timing: ATimingService
@@ -68,7 +68,7 @@ RoomModel DataDrivenTest {
}
Behavior {
ctor {
- "caseId = etUnit_openAll(\"log/testlog\", \"DataDrivenTest\", \"org.eclipse.etrice.generator.common.tests.DataDrivenTest\", \"DataDrivenTest_case\");"
+ "caseId = etUnit_openAll(\"log\", \"DataDrivenTest\", \"org.eclipse.etrice.generator.common.tests.DataDrivenTest\", \"DataDrivenTest_case\");"
}
dtor {
"etUnit_closeAll(caseId);"
diff --git a/tests/org.eclipse.etrice.generator.common.tests/models/DetailExpressionTest.room b/tests/org.eclipse.etrice.generator.common.tests/models/DetailExpressionTest.room
index ad1887cd4..a3297bce9 100644
--- a/tests/org.eclipse.etrice.generator.common.tests/models/DetailExpressionTest.room
+++ b/tests/org.eclipse.etrice.generator.common.tests/models/DetailExpressionTest.room
@@ -1,8 +1,8 @@
RoomModel DetailExpressionTestModel {
- import room.basic.types.* from "Types.room"
- import room.basic.test.* from "Tests.room"
- import room.basic.service.timing.* from "TimingService.room"
+ import room.basic.types.* from "../../../runtime/${etModellib}/model/Types.room"
+ import room.basic.test.* from "../../../runtime/${etModellib}/model/Tests.room"
+ import room.basic.service.timing.* from "../../../runtime/${etModellib}/model/TimingService.room"
async ActorClass DetailExpressionTest {
Interface {
diff --git a/tests/org.eclipse.etrice.generator.common.tests/models/EnumTest.room b/tests/org.eclipse.etrice.generator.common.tests/models/EnumTest.room
index f8d9f6b22..fa39886e8 100644
--- a/tests/org.eclipse.etrice.generator.common.tests/models/EnumTest.room
+++ b/tests/org.eclipse.etrice.generator.common.tests/models/EnumTest.room
@@ -1,7 +1,7 @@
RoomModel EnumTest {
- import room.basic.test.* from "Tests.room"
- import room.basic.types.* from "Types.room"
+ import room.basic.types.* from "../../../runtime/${etModellib}/model/Types.room"
+ import room.basic.test.* from "../../../runtime/${etModellib}/model/Tests.room"
ActorClass EnumTest_Top {
@TestInstance
@@ -32,7 +32,7 @@ RoomModel EnumTest {
}
Behavior {
ctor {
- "caseId = etUnit_openAll(\"log/testlog\", \"EnumTest\", \"org.eclipse.etrice.generator.common.tests.EnumTest\", \"EnumTest_case\");"
+ "caseId = etUnit_openAll(\"log\", \"EnumTest\", \"org.eclipse.etrice.generator.common.tests.EnumTest\", \"EnumTest_case\");"
}
dtor {
"etUnit_closeAll(caseId);"
diff --git a/tests/org.eclipse.etrice.generator.common.tests/models/GenericPhysical.etphys b/tests/org.eclipse.etrice.generator.common.tests/models/GenericPhysical.etphys
new file mode 100644
index 000000000..da38a218e
--- /dev/null
+++ b/tests/org.eclipse.etrice.generator.common.tests/models/GenericPhysical.etphys
@@ -0,0 +1,43 @@
+PhysicalModel room.generic.physical {
+
+ PhysicalSystem GenericPhysicalSystem {
+ NodeRef node : GenericNodeClass
+ }
+
+ NodeClass GenericNodeClass {
+ runtime = DefaultRuntimeClass
+ priomin = 1
+ priomax = 10
+
+ DefaultThread DefaultPhysicalThread {
+ execmode = mixed
+ interval = 100ms
+ prio = 5
+ stacksize = 1024
+ msgblocksize = 128
+ msgpoolsize = 100
+ }
+
+ Thread BlockedThread {
+ execmode = blocked
+ prio = 5
+ stacksize = 1024
+ msgblocksize = 128
+ msgpoolsize = 100
+ }
+
+ Thread PolledThread {
+ execmode = polled
+ interval = 100ms
+ prio = 5
+ stacksize = 1024
+ msgblocksize = 128
+ msgpoolsize = 100
+ }
+ }
+
+ RuntimeClass DefaultRuntimeClass {
+ model = multiThreaded
+ }
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.etrice.generator.common.tests/models/HandlerTest.room b/tests/org.eclipse.etrice.generator.common.tests/models/HandlerTest.room
index 3c4601bcd..381ad7633 100644
--- a/tests/org.eclipse.etrice.generator.common.tests/models/HandlerTest.room
+++ b/tests/org.eclipse.etrice.generator.common.tests/models/HandlerTest.room
@@ -1,8 +1,7 @@
RoomModel HandlerTest {
- import room.basic.types.* from "Types.room"
- import room.basic.test.* from "Tests.room"
-
+ import room.basic.types.* from "../../../runtime/${etModellib}/model/Types.room"
+ import room.basic.test.* from "../../../runtime/${etModellib}/model/Tests.room"
ActorClass HandlerTest_Top {
@TestInstance
@@ -27,7 +26,7 @@ RoomModel HandlerTest {
}
Behavior {
ctor {
- "caseId = etUnit_openAll(\"log/testlog\", \"HandlerTest\", \"org.eclipse.etrice.generator.common.tests.HandlerTest\", \"HandlerTest_case\");"
+ "caseId = etUnit_openAll(\"log\", \"HandlerTest\", \"org.eclipse.etrice.generator.common.tests.HandlerTest\", \"HandlerTest_case\");"
}
dtor {
"etUnit_closeAll(caseId);"
diff --git a/tests/org.eclipse.etrice.generator.common.tests/models/OperationInheritanceTest.room b/tests/org.eclipse.etrice.generator.common.tests/models/OperationInheritanceTest.room
index d59508a84..f98190fcc 100644
--- a/tests/org.eclipse.etrice.generator.common.tests/models/OperationInheritanceTest.room
+++ b/tests/org.eclipse.etrice.generator.common.tests/models/OperationInheritanceTest.room
@@ -1,8 +1,7 @@
RoomModel OperationInheritanceTest {
- import room.basic.types.* from "Types.room"
-
- import room.basic.test.* from "Tests.room"
+ import room.basic.types.* from "../../../runtime/${etModellib}/model/Types.room"
+ import room.basic.test.* from "../../../runtime/${etModellib}/model/Tests.room"
async ActorClass OperationInheritanceTest extends BaseActor {
@TestInstance
@@ -11,7 +10,7 @@ RoomModel OperationInheritanceTest {
}
Behavior {
ctor {
- "caseId = etUnit_openAll(\"log/testlog\", \"OperationInheritanceTest\", \"org.eclipse.etrice.generator.common.tests.OperationInheritanceTest\", \"OperationInheritanceTest_case\");"
+ "caseId = etUnit_openAll(\"log\", \"OperationInheritanceTest\", \"org.eclipse.etrice.generator.common.tests.OperationInheritanceTest\", \"OperationInheritanceTest_case\");"
"ctorRefine = 2;"
}
dtor {
diff --git a/tests/org.eclipse.etrice.generator.common.tests/models/PingPongThreadReplPortTest.room b/tests/org.eclipse.etrice.generator.common.tests/models/PingPongThreadReplPortTest.room
index 856ba8855..f0e904bdb 100644
--- a/tests/org.eclipse.etrice.generator.common.tests/models/PingPongThreadReplPortTest.room
+++ b/tests/org.eclipse.etrice.generator.common.tests/models/PingPongThreadReplPortTest.room
@@ -1,7 +1,7 @@
RoomModel PingPongThreadReplPortTest {
- import room.basic.service.timing.* from "TimingService.room"
- import room.basic.types.* from "Types.room"
+ import room.basic.service.timing.* from "../../../runtime/${etModellib}/model/TimingService.room"
+ import room.basic.types.* from "../../../runtime/${etModellib}/model/Types.room"
LogicalSystem System_PingPongReplPort{
SubSystemRef main : SubSystem_PingPongReplPort
@@ -54,7 +54,7 @@ RoomModel PingPongThreadReplPortTest {
}
Behavior {
ctor {
- "caseId = etUnit_openAll(\"log/testlog\", \"PingPongThreadReplPortTest\", \"org.eclipse.etrice.generator.common.tests.PingPongThreadTestReplPort\", \"PingPongThreadTestReplPort_case\");"
+ "caseId = etUnit_openAll(\"log\", \"PingPongThreadReplPortTest\", \"org.eclipse.etrice.generator.common.tests.PingPongThreadTestReplPort\", \"PingPongThreadTestReplPort_case\");"
}
dtor {
"etUnit_closeAll(caseId);"
diff --git a/tests/org.eclipse.etrice.generator.common.tests/models/PingPongThreadTest.room b/tests/org.eclipse.etrice.generator.common.tests/models/PingPongThreadTest.room
index 68ba1634d..8a4f147ab 100644
--- a/tests/org.eclipse.etrice.generator.common.tests/models/PingPongThreadTest.room
+++ b/tests/org.eclipse.etrice.generator.common.tests/models/PingPongThreadTest.room
@@ -1,7 +1,7 @@
RoomModel PingPongThreadTest {
- import room.basic.service.timing.* from "TimingService.room"
- import room.basic.types.* from "Types.room"
+ import room.basic.service.timing.* from "../../../runtime/${etModellib}/model/TimingService.room"
+ import room.basic.types.* from "../../../runtime/${etModellib}/model/Types.room"
LogicalSystem System_PingPong{
SubSystemRef main : SubSystem_PingPong
@@ -56,7 +56,7 @@ RoomModel PingPongThreadTest {
}
Behavior {
ctor {
- "caseId = etUnit_openAll(\"log/testlog\", \"PingPongThreadTest\", \"org.eclipse.etrice.generator.common.tests.PingPongThreadTest\", \"PingPongThreadTest_case\");"
+ "caseId = etUnit_openAll(\"log\", \"PingPongThreadTest\", \"org.eclipse.etrice.generator.common.tests.PingPongThreadTest\", \"PingPongThreadTest_case\");"
}
dtor {
"etUnit_closeAll(caseId);"
diff --git a/tests/org.eclipse.etrice.generator.common.tests/models/StatemachineInterfaceInheritedTest.room b/tests/org.eclipse.etrice.generator.common.tests/models/StatemachineInterfaceInheritedTest.room
index a32d0f09a..4a23a2d4c 100644
--- a/tests/org.eclipse.etrice.generator.common.tests/models/StatemachineInterfaceInheritedTest.room
+++ b/tests/org.eclipse.etrice.generator.common.tests/models/StatemachineInterfaceInheritedTest.room
@@ -1,6 +1,6 @@
RoomModel StatemachineInterfaceTestInheritedModel {
- import room.basic.types.* from "Types.room"
+ import room.basic.types.* from "../../../runtime/${etModellib}/model/Types.room"
import StatemachineInterfaceTestModel.* from "StatemachineInterfaceTest.room"
ActorClass StatemachineInterfaceInheritedTest {
diff --git a/tests/org.eclipse.etrice.generator.common.tests/models/StatemachineInterfaceTest.room b/tests/org.eclipse.etrice.generator.common.tests/models/StatemachineInterfaceTest.room
index 962ecaacf..c1e2e0b0f 100644
--- a/tests/org.eclipse.etrice.generator.common.tests/models/StatemachineInterfaceTest.room
+++ b/tests/org.eclipse.etrice.generator.common.tests/models/StatemachineInterfaceTest.room
@@ -1,6 +1,6 @@
RoomModel StatemachineInterfaceTestModel {
- import room.basic.types.* from "Types.room"
+ import room.basic.types.* from "../../../runtime/${etModellib}/model/Types.room"
ActorClass StatemachineInterfaceTest {
Structure {
diff --git a/tests/org.eclipse.etrice.generator.cpp.tests/.gitignore b/tests/org.eclipse.etrice.generator.cpp.tests/.gitignore
index 4f0e85af9..b45c5f774 100644
--- a/tests/org.eclipse.etrice.generator.cpp.tests/.gitignore
+++ b/tests/org.eclipse.etrice.generator.cpp.tests/.gitignore
@@ -1,6 +1 @@
-bin
-models
-output
-results
-src-gen
-log \ No newline at end of file
+src-gen/ \ No newline at end of file
diff --git a/tests/org.eclipse.etrice.generator.cpp.tests/Makefile b/tests/org.eclipse.etrice.generator.cpp.tests/Makefile
deleted file mode 100644
index b6b863770..000000000
--- a/tests/org.eclipse.etrice.generator.cpp.tests/Makefile
+++ /dev/null
@@ -1,16 +0,0 @@
-# for make.xml
-
-#include ${CPP_MODELLIB_ROOTDIR}/buildTools/modellib.mk
-include ${CPP_RUNTIME_ROOTDIR}/buildTools/runtime.mk
-
-# ---
-IN_TARGET := ${APP_TARGET}
-IN_BUILD_DIR := ${APP_BUILD_DIR}
-IN_INCDIRS += ${APP_SRCDIRS_REC}
-IN_SRCDIRS_REC += ${APP_SRCDIRS_REC}
-CC = ${CXX}
-IN_CFLAGS += -std=c++98 -O0 -g3 -pedantic -Wall
-#---
-
-# Create rules
-include ${RUNTIME_ROOTDIR}/buildTools/Makefile.mk \ No newline at end of file
diff --git a/tests/org.eclipse.etrice.generator.cpp.tests/buckminster.cspec b/tests/org.eclipse.etrice.generator.cpp.tests/buckminster.cspec
deleted file mode 100644
index 39f8c66f3..000000000
--- a/tests/org.eclipse.etrice.generator.cpp.tests/buckminster.cspec
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><cs:cspec xmlns:cs="http://www.eclipse.org/buckminster/CSpec-1.0" name="org.eclipse.etrice.generator.cpp.tests" componentType="buckminster" version="0.5.0.qualifier">
- <cs:actions>
- <cs:public name="run_tests" actor="ant">
- <cs:actorProperties>
- <cs:property key="buildFile" value="make.xml"/>
- <cs:property key="targets" value="all"/>
- </cs:actorProperties>
- </cs:public>
- </cs:actions>
-</cs:cspec>
diff --git a/tests/org.eclipse.etrice.generator.cpp.tests/build.gradle b/tests/org.eclipse.etrice.generator.cpp.tests/build.gradle
new file mode 100644
index 000000000..aede47920
--- /dev/null
+++ b/tests/org.eclipse.etrice.generator.cpp.tests/build.gradle
@@ -0,0 +1,10 @@
+plugins {
+ id 'cpp'
+}
+
+apply from: "$rootDir/gradle/etTest.gradle"
+
+def genericPhysical = '../org.eclipse.etrice.generator.common.tests/models/GenericPhysical.etphys'
+
+createTest('cpp', 'sendingDataTest', ['models/SendingDataTest.room', genericPhysical])
+createTest('cpp', 'initializationTest', ['models/InitializationTest.room', genericPhysical]) \ No newline at end of file
diff --git a/tests/org.eclipse.etrice.generator.cpp.tests/make.xml b/tests/org.eclipse.etrice.generator.cpp.tests/make.xml
deleted file mode 100644
index af3fe27d6..000000000
--- a/tests/org.eclipse.etrice.generator.cpp.tests/make.xml
+++ /dev/null
@@ -1,122 +0,0 @@
-<?xml version="1.0"?>
-<!--
- Ant makefile for building and running of tests.
-
- Includes common.xml from org.eclipse.etrice.generator.common.tests
--->
-<project name="org.eclipse.etrice.generator.cpp.tests" basedir="." default="all">
-
- <!-- <target name="testing" depends="setVars,common.testing">
-
- // add test here, testid==testSuiteFileName
- <echo>done with ${ant.project.name}</echo>
- </target> -->
-
- <target name="testing" depends="copyModels">
- <!-- modified target from common.xml because cpp is not complete yet -->
- <test testid="SendingDataTestCpp" models="${models.path}/sendingData/SendingDataTestCpp.room ${models.path}/GenericPhysical.etphys" />
- <test testid="CompileTests" models="${models.path}/CompileTests.room ${models.path}/GenericPhysical.etphys ${models.path}/DetailExpressionTest.room ${models.path}/StatemachineInterfaceTest.room ${models.path}/StatemachineInterfaceInheritedTest.room ${models.path}/StatemachineInterfaceTest.room ${models.path}/ContinuationTransitionTest.room ${models.path}/TimingService.room" />
- <test testid="ActorCommunicationTest" models="${models.path}/ActorCommunicationTest.room ${models.path}/GenericPhysical.etphys ${models.path}/TimingService.room" />
- <test testid="ChoicePointTest" models="${models.path}/ChoicePointTest.room ${models.path}/GenericPhysical.etphys" />
- <test testid="ChoicePointTestExtended" models="${models.path}/ChoicePointTestExtended.room ${models.path}/GenericPhysical.etphys" />
- <test testid="DataDrivenTest" models="${models.path}/DataDrivenTest.room ${models.path}/GenericPhysical.etphys ${models.path}/TimingService.room" />
- <test testid="HandlerTest" models="${models.path}/HandlerTest.room ${models.path}/GenericPhysical.etphys" />
- <test testid="OperationInheritanceTest" models="${models.path}/OperationInheritanceTest.room ${models.path}/GenericPhysical.etphys" />
- <test testid="PingPongThreadTest" models="${models.path}/PingPongThreadTest.etmap ${models.path}/PingPongThreadTest.room ${models.path}/TimingService.room" />
- <test testid="PingPongThreadReplPortTest" models="${models.path}/PingPongThreadReplPortTest.etmap ${models.path}/PingPongThreadReplPortTest.room ${models.path}/TimingService.room" />
- <test testid="InitializationTest" models="${models.path}/InitializationTest.room ${models.path}/GenericPhysical.etphys" />
- </target>
-
- <target name="copyModels" depends="common.copyModels">
- <copy todir="${models.path}">
- <fileset dir="./targetModels"/>
- </copy>
- <!--<move file="${models.path}/staticConfig/StaticConfigTest_C.room" toFile="${models.path}/staticConfig//StaticConfigTest.room" />-->
- </target>
-
- <!-- ################################################################ -->
-
- <import file="../org.eclipse.etrice.generator.common.tests/common.xml" as="common"/>
-
- <property name="runtime.path" value="../../runtime/org.eclipse.etrice.runtime.c" />
- <property name="modellib.path" value="../../runtime/org.eclipse.etrice.modellib.cpp" />
- <property name="cpp-runtime.path" value="../../runtime/org.eclipse.etrice.runtime.cpp" />
-
- <target name="set_local_rt" unless="runtime.platform">
- <!--<property name="runtime.platform" value="MT_POSIX_GENERIC_GCC"/>-->
- <property name="runtime.platform" value="MT_WIN_MinGW"/>
- <echo> runtime.platform = ${runtime.platform} </echo>
- </target>
- <target name="setVars" depends="set_local_rt,common.setVars"/>
-
- <target name="all" depends="clean,copyModels,testing"></target>
-
- <!-- test := generate 1 executable, build, run, process results -->
- <macrodef name="test">
- <attribute name="testId"/>
- <attribute name="models"/>
- <sequential>
- <echo>generating @{testId}</echo>
- <standaloneGenerator testId="@{testId}" models="@{models}"/>
-
- <echo>building @{testId}</echo>
- <build testId="@{testId}"/>
-
- <echo>running @{testId}</echo>
- <run testId="@{testId}"/>
-
- <echo>converting @{testId}</echo>
- <convert testId="@{testId}"/>
-
- <echo>copying result @{testId}</echo>
- <copyResult testId="@{testId}" targetId="CPP_${runtime.platform}_"/>
- </sequential>
- </macrodef>
-
- <macrodef name="standaloneGenerator">
- <attribute name="testId"/>
- <attribute name="models"/>
- <sequential>
- <mkdir dir="${output}"/>
- <java output="${output}/@{testId}_generate.txt" error="${output}/@{testId}_generate_err.txt" classname="org.eclipse.etrice.generator.cpp.Main" fork="true" failonerror="true">
- <arg line="@{models}"/>
- <arg value="-genDir"/><arg value="src-gen/@{testId}"/>
- <arg value="-msc_instr"/>
- <classpath refid="etrice.clspath"/>
- </java>
- </sequential>
- </macrodef>
-
- <!--
- build: compiles and links the generated Cpp sources
- -->
- <macrodef name="build">
- <attribute name="testId"/>
- <sequential>
- <mkdir dir="${bin.path}"/>
- <mkdir dir="${output}"/>
- <exec executable="make" failonerror="true" output="${output}/@{testId}_build.txt">
- <arg line="all"/>
- <arg line="APP_TARGET=@{testId}.exe"/>
- <arg line="APP_BUILD_DIR=${bin.path}"/>
- <arg line="APP_SRCDIRS_REC='./src-gen/@{testId} ./src/@{testId}'"/>
- <arg line="RUNTIME_ROOTDIR=${runtime.path}"/>
- <arg line="CPP_RUNTIME_ROOTDIR=${cpp-runtime.path}"/>
- <arg line="MODELLIB_ROOTDIR=${modellib.path}"/>
- <arg line="TARGET_PLATFORM=${runtime.platform}"/>
- </exec>
- </sequential>
- </macrodef>
-
- <macrodef name="run">
- <attribute name="testId"/>
- <sequential>
- <mkdir dir="${output}"/>
- <mkdir dir="${testlog.path}"/>
- <exec dir="./" output="${output}/@{testId}_run.txt" resolveexecutable="true" executable="${bin.path}/@{testId}.exe" timeout="${run.msTimout}">
- <arg value="-run_as_test"/>
- </exec>
- </sequential>
- </macrodef>
-
-</project>
diff --git a/tests/org.eclipse.etrice.generator.cpp.tests/targetModels/InitializationTest.room b/tests/org.eclipse.etrice.generator.cpp.tests/models/InitializationTest.room
index 05a85ba8f..7d1ccfb7f 100644
--- a/tests/org.eclipse.etrice.generator.cpp.tests/targetModels/InitializationTest.room
+++ b/tests/org.eclipse.etrice.generator.cpp.tests/models/InitializationTest.room
@@ -1,8 +1,7 @@
RoomModel InitializationTest {
- import room.basic.types.* from "Types.room"
-
- import room.basic.test.* from "Tests.room"
+ import room.basic.types.* from "../../../runtime/org.eclipse.etrice.modellib.cpp/model/Types.room"
+ import room.basic.test.* from "../../../runtime/org.eclipse.etrice.modellib.cpp/model/Tests.room"
async ActorClass InitializationTest {
@TestInstance
@@ -46,7 +45,7 @@ RoomModel InitializationTest {
}
Behavior {
ctor {
- "caseId = etUnit_openAll(\"log/testlog\", \"InitializationTest\", \"org.eclipse.etrice.generator.cpp.tests.InitializationTest\", \"InitializationTest_case\");"
+ "caseId = etUnit_openAll(\"log\", \"InitializationTest\", \"org.eclipse.etrice.generator.cpp.tests.InitializationTest\", \"InitializationTest_case\");"
"testInitValues(caseId);"
}
dtor {
diff --git a/tests/org.eclipse.etrice.generator.common.tests/models/sendingData/SendingDataTestCpp.room b/tests/org.eclipse.etrice.generator.cpp.tests/models/SendingDataTest.room
index a7e4a9a12..b38d93c30 100644
--- a/tests/org.eclipse.etrice.generator.common.tests/models/sendingData/SendingDataTestCpp.room
+++ b/tests/org.eclipse.etrice.generator.cpp.tests/models/SendingDataTest.room
@@ -1,8 +1,8 @@
-RoomModel SendingDataTestCpp {
+RoomModel SendingDataTest {
- import room.basic.test.* from "../Tests.room"
- import room.basic.types.* from "../Types.room"
- import room.basic.language.* from "../Language.room"
+ import room.basic.test.* from "../../../runtime/org.eclipse.etrice.modellib.cpp/model/Tests.room"
+ import room.basic.types.* from "../../../runtime/org.eclipse.etrice.modellib.cpp/model/Types.room"
+ import room.basic.language.* from "../../../runtime/org.eclipse.etrice.modellib.cpp/model/Language.room"
ActorClass SendingDataTop {
@TestInstance
@@ -186,7 +186,7 @@ RoomModel SendingDataTestCpp {
StateMachine {
Transition init: initial -> tp0 of state0 {
action {
- "caseId = etUnit_openAll(\"log/testlog\", \"SendingDataTestCpp\", \"org.eclipse.etrice.generator.common.tests.SendingDataTest\", \"SendingDataTest_case\");"
+ "caseId = etUnit_openAll(\"log\", \"SendingDataTest\", \"org.eclipse.etrice.generator.cpp.tests.SendingDataTest\", \"SendingDataTest_case\");"
"EXPECT_ORDER_START(caseId,resultlist,23);"
"EXPECT_ORDER(caseId,\"<|MODEL_LOCATION|>\", 1);"
"/* send the default values */"
diff --git a/tests/org.eclipse.etrice.generator.cpp.tests/org.eclipse.etrice.generator.cpp.tests make.xml.launch b/tests/org.eclipse.etrice.generator.cpp.tests/org.eclipse.etrice.generator.cpp.tests make.xml.launch
deleted file mode 100644
index 6849d0869..000000000
--- a/tests/org.eclipse.etrice.generator.cpp.tests/org.eclipse.etrice.generator.cpp.tests make.xml.launch
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.ant.AntLaunchConfigurationType">
-<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.etrice.generator.cpp.tests/make.xml"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.etrice.generator.cpp.tests"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
-<mapAttribute key="org.eclipse.ui.externaltools.ATTR_ANT_PROPERTIES">
-<mapEntry key="eclipse.home" value="${eclipse_home}"/>
-<mapEntry key="eclipse.pdebuild.home" value="${target_platform_plugin_location:org.eclipse.pde.build}"/>
-<mapEntry key="eclipse.pdebuild.scripts" value="${target_platform_plugin_location:org.eclipse.pde.build}/scripts/"/>
-<mapEntry key="eclipse.pdebuild.templates" value="${target_platform_plugin_location:org.eclipse.pde.build}/templates/"/>
-<mapEntry key="eclipse.running" value="true"/>
-<mapEntry key="com.google.guava" value="${target_platform_plugin_location:com.google.guava}"/>
-<mapEntry key="com.google.inject" value="${target_platform_plugin_location:com.google.inject}"/>
-<mapEntry key="javax.inject" value="${target_platform_plugin_location:javax.inject}"/>
-<mapEntry key="org.antlr.runtime" value="${target_platform_plugin_location:org.antlr.runtime}"/>
-<mapEntry key="org.apache.log4j" value="${target_platform_plugin_location:org.apache.log4j}"/>
-<mapEntry key="org.eclipse.emf.common" value="${target_platform_plugin_location:org.eclipse.emf.common}"/>
-<mapEntry key="org.eclipse.emf.ecore" value="${target_platform_plugin_location:org.eclipse.emf.ecore}"/>
-<mapEntry key="org.eclipse.emf.ecore.xmi" value="${target_platform_plugin_location:org.eclipse.emf.ecore.xmi}"/>
-<mapEntry key="org.eclipse.equinox.common" value="${target_platform_plugin_location:org.eclipse.equinox.common}"/>
-<mapEntry key="org.eclipse.xtend.lib" value="${target_platform_plugin_location:org.eclipse.xtend.lib}"/>
-<mapEntry key="org.eclipse.xtext" value="${target_platform_plugin_location:org.eclipse.xtext}"/>
-<mapEntry key="org.eclipse.xtext.common.types" value="${target_platform_plugin_location:org.eclipse.xtext.common.types}"/>
-<mapEntry key="org.eclipse.xtext.util" value="${target_platform_plugin_location:org.eclipse.xtext.util}"/>
-<mapEntry key="org.eclipse.xtext.xbase.lib" value="${target_platform_plugin_location:org.eclipse.xtext.xbase.lib}"/>
-</mapAttribute>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/org.eclipse.etrice.generator.cpp.tests/make.xml}"/>
-<stringAttribute key="process_factory_id" value="org.eclipse.ant.ui.remoteAntProcessFactory"/>
-</launchConfiguration>
diff --git a/tests/org.eclipse.etrice.generator.cpp.tests/targetModels/empty.txt b/tests/org.eclipse.etrice.generator.cpp.tests/targetModels/empty.txt
deleted file mode 100644
index e69de29bb..000000000
--- a/tests/org.eclipse.etrice.generator.cpp.tests/targetModels/empty.txt
+++ /dev/null
diff --git a/tests/org.eclipse.etrice.generator.java.tests/.classpath b/tests/org.eclipse.etrice.generator.java.tests/.classpath
index e536cf5fa..65add28fb 100644
--- a/tests/org.eclipse.etrice.generator.java.tests/.classpath
+++ b/tests/org.eclipse.etrice.generator.java.tests/.classpath
@@ -1,8 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="src/dynamicActorTest7"/>
+ <classpathentry kind="src" path="src/storeRestoreTest"/>
+ <classpathentry kind="src" path="src/staticConfigTest"/>
+ <classpathentry kind="src" path="src/dynamicConfigTest"/>
+ <classpathentry kind="lib" path="build/libs/org.eclipse.etrice.generator.java.tests.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.etrice.modellib.java"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.etrice.runtime.java"/>
- <classpathentry kind="output" path="bin"/>
+ <classpathentry kind="output" path="build/classes/main"/>
</classpath>
diff --git a/tests/org.eclipse.etrice.generator.java.tests/.gitignore b/tests/org.eclipse.etrice.generator.java.tests/.gitignore
index 074d50426..b45c5f774 100644
--- a/tests/org.eclipse.etrice.generator.java.tests/.gitignore
+++ b/tests/org.eclipse.etrice.generator.java.tests/.gitignore
@@ -1,8 +1 @@
-bin
-models
-output
-results
-src-gen
-log
-/tmp/
-/*.obj
+src-gen/ \ No newline at end of file
diff --git a/tests/org.eclipse.etrice.generator.java.tests/.project b/tests/org.eclipse.etrice.generator.java.tests/.project
index e76db8475..8373cc3a2 100644
--- a/tests/org.eclipse.etrice.generator.java.tests/.project
+++ b/tests/org.eclipse.etrice.generator.java.tests/.project
@@ -6,12 +6,12 @@
</projects>
<buildSpec>
<buildCommand>
- <name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
+ <name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
- <nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
diff --git a/tests/org.eclipse.etrice.generator.java.tests/buckminster.cspec b/tests/org.eclipse.etrice.generator.java.tests/buckminster.cspec
deleted file mode 100644
index b4b3128c9..000000000
--- a/tests/org.eclipse.etrice.generator.java.tests/buckminster.cspec
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><cs:cspec xmlns:cs="http://www.eclipse.org/buckminster/CSpec-1.0" name="org.eclipse.etrice.generator.java.tests" componentType="buckminster" version="0.5.0.qualifier">
- <cs:actions>
- <cs:public name="run_tests" actor="ant">
- <cs:actorProperties>
- <cs:property key="buildFile" value="make.xml"/>
- <cs:property key="targets" value="all"/>
- </cs:actorProperties>
- </cs:public>
- </cs:actions>
-</cs:cspec>
diff --git a/tests/org.eclipse.etrice.generator.java.tests/build.gradle b/tests/org.eclipse.etrice.generator.java.tests/build.gradle
new file mode 100644
index 000000000..0c8b984e7
--- /dev/null
+++ b/tests/org.eclipse.etrice.generator.java.tests/build.gradle
@@ -0,0 +1,29 @@
+plugins {
+ id 'java-base'
+}
+
+apply from: "$rootDir/gradle/etTest.gradle"
+
+def genericPhysical = '../org.eclipse.etrice.generator.common.tests/models/GenericPhysical.etphys'
+
+createTest('java', 'sendingDataTest', ['models/SendingDataTest.room', genericPhysical])
+createTest('java', 'staticConfigTest', ['models/StaticConfigTest.etmap', 'models/StaticConfigTest.room', 'models/StaticConfigTest.config'])
+sourceSets.staticConfigTest.java.srcDir 'src/staticConfigTest'
+
+createTest('java', 'dynamicActorTest1', ['models/DynamicActorTest1.etmap', 'models/DynamicActorTest1.room'])
+createTest('java', 'dynamicActorTest2', ['models/DynamicActorTest2.etmap', 'models/DynamicActorTest2.room'])
+createTest('java', 'dynamicActorTest3', ['models/DynamicActorTest3.room', genericPhysical])
+createTest('java', 'dynamicActorTest4', ['models/DynamicActorTest4.room', genericPhysical])
+createTest('java', 'dynamicActorTest5', ['models/DynamicActorTest5.room', genericPhysical])
+createTest('java', 'dynamicActorTest6', ['models/DynamicActorTest6.room', genericPhysical])
+
+createTest('java', 'tCPTest', ['models/TCPTest.room', genericPhysical])
+
+/* These are not working yet (problem when genererating with -persistable -storeObjects the Modellib is overriden) :((
+def genOptions = ['-persistable', '-storeDataObj']
+createTest('java', 'dynamicActorTest7', ['models/DynamicActorTest7.etmap', 'models/DynamicActorTest7.room'], genOptions)
+sourceSets.dynamicActorTest7.java.srcDir 'src/dynamicActorTest7'
+createTest('java', 'dynamicConfigTest', ['models/DynamicConfigTest.etmap', 'models/DynamicConfigTest.room'], genOptions)
+sourceSets.dynamicConfigTest.java.srcDir 'src/dynamicConfigTest'
+createTest('java', 'storeRestoreTest', ['models/StoreRestoreTest.room', genericPhysical], genOptions)
+sourceSets.storeRestoreTest.java.srcDir 'src/storeRestoreTest' */ \ No newline at end of file
diff --git a/tests/org.eclipse.etrice.generator.java.tests/make.xml b/tests/org.eclipse.etrice.generator.java.tests/make.xml
deleted file mode 100644
index a75d0330c..000000000
--- a/tests/org.eclipse.etrice.generator.java.tests/make.xml
+++ /dev/null
@@ -1,129 +0,0 @@
-<?xml version="1.0"?>
-<!--
- Ant makefile for building and running of tests.
-
- Includes common.xml from org.eclipse.etrice.generator.common.tests
--->
-<project name="org.eclipse.etrice.generator.java.tests" basedir="." default="all">
-
- <target name="testing" depends="dynamicActorTests,common.testing">
-
- <!-- add test here, testid==testSuiteFileName -->
- <test testid="SendingDataTestJava" models="${models.path}/sendingData/SendingDataTestJava.room ${models.path}/GenericPhysical.etphys" />
- <test testid="TCPTest" models="${models.path}/TCPTest.room ${models.path}/GenericPhysical.etphys ${models.path}/TcpService.room" />
- <test testid="DynamicConfigTest" models="${models.path}/DynamicConfigTest.etmap ${models.path}/DynamicConfigTest.room ${models.path}/DynamicConfigTest.config ${models.path}/TimingService.room"/>
- <test testid="StaticConfigTest" models="${models.path}/staticConfig/StaticConfigTest.etmap ${models.path}/staticConfig/StaticConfigTest.room ${models.path}/staticConfig/StaticConfigTest.config ${models.path}/TimingService.room" />
-
- <echo>done with ${ant.project.name}</echo>
- </target>
-
- <target name="dynamicActorTests">
- <property name="genOptions" value="-persistable -storeDataObj"/>
-
- <test testid="DynamicActorTest1" genOptions="${genOptions}" models="${models.path}/DynamicActorTest1.etmap ${models.path}/DynamicActorTest1.room" />
- <test testid="DynamicActorTest2" genOptions="${genOptions}" models="${models.path}/DynamicActorTest2.etmap ${models.path}/DynamicActorTest2.room" />
- <test testid="DynamicActorTest3" genOptions="${genOptions}" models="${models.path}/DynamicActorTest3.room ${models.path}/GenericPhysical.etphys" />
- <test testid="DynamicActorTest4" genOptions="${genOptions}" models="${models.path}/DynamicActorTest4.room ${models.path}/GenericPhysical.etphys" />
- <test testid="DynamicActorTest5" genOptions="${genOptions}" models="${models.path}/DynamicActorTest5.room ${models.path}/GenericPhysical.etphys" />
- <test testid="DynamicActorTest6" genOptions="${genOptions}" models="${models.path}/DynamicActorTest6.room ${models.path}/GenericPhysical.etphys" />
- <test testid="DynamicActorTest7" genOptions="${genOptions}" models="${models.path}/DynamicActorTest7.etmap ${models.path}/DynamicActorTest7.room" />
- <test testid="StoreRestore" genOptions="${genOptions}" models="${models.path}/StoreRestore.room ${models.path}/GenericPhysical.etphys" />
- </target>
-
- <target name="copyModels" depends="common.copyModels">
- <copy todir="${models.path}">
- <fileset dir="./targetModels"/>
- </copy>
- <move file="${models.path}/staticConfig/StaticConfigTest_Java.room" toFile="${models.path}/staticConfig//StaticConfigTest.room" />
- </target>
-
- <!-- ################################################################ -->
-
- <import file="../org.eclipse.etrice.generator.common.tests/common.xml" as="common"/>
-
- <property name="modellib.path" value="../../runtime/org.eclipse.etrice.modellib.java" />
- <property name="runtime.path" value="../../runtime/org.eclipse.etrice.runtime.java" />
-
- <target name="all" depends="clean,copyModels,testing"/>
-
- <!-- test := generate 1 executable, build, run, process results -->
- <macrodef name="test">
- <attribute name="testId"/>
- <attribute name="models"/>
- <attribute name="genOptions" default=""/>
- <sequential>
- <standaloneGenerator testId="@{testId}" models="@{models}" genOptions="@{genOptions}"/>
- <build testId="@{testId}"/>
- <run testId="@{testId}"/>
- <convert testId="@{testId}"/>
- <copyResult testId="@{testId}" targetId="Java_"/>
- </sequential>
- </macrodef>
-
- <macrodef name="standaloneGenerator">
- <attribute name="testId"/>
- <attribute name="models"/>
- <attribute name="genOptions" default=""/>
- <sequential>
- <mkdir dir="${output}"/>
- <java output="${output}/generate.txt" error="${output}/generate_err.txt" classname="org.eclipse.etrice.generator.java.Main" fork="true" failonerror="true">
- <arg line="@{models}"/>
- <arg value="-genDir"/><arg value="src-gen/@{testId}"/>
- <arg value="-msc_instr" />
- <arg line="@{genOptions}" />
- <classpath refid="etrice.clspath" />
- </java>
- </sequential>
- </macrodef>
-
- <!--
- compile: compiles the generated Java sources
- -->
- <macrodef name="build">
- <attribute name="testId"/>
- <sequential>
- <mkdir dir="${bin.path}/@{testId}" />
- <!-- ./src/xxx is optional, create it anyway to avoid error -->
- <mkdir dir="./src/@{testId}" />
- <record name="${basedir}/output/compile.txt" action="start"/>
- <javac destdir="${bin.path}/@{testId}" source="1.6" classpath="${runtime.path}/target/classes" debug="off" verbose="off">
- <src>
- <pathelement location="src-gen/@{testId}" />
- <pathelement location="src/@{testId}" />
- </src>
- </javac>
- <record name="${basedir}/output/compile.txt" action="stop"/>
- </sequential>
- </macrodef>
-
- <!--
- run: runs all executables
- -->
- <macrodef name="run">
- <attribute name="testId"/>
- <sequential>
- <mkdir dir="${testlog.path}" />
- <!-- get runner class -->
- <local name="runner.class"/>
- <fileset id="runnerFileSet" dir="./src-gen/@{testId}">
- <include name="**/*Runner.java"/>
- </fileset>
- <pathconvert property="runner.class">
- <string>${toString:runnerFileSet}</string>
- <chainedmapper>
- <globmapper from="*.java" to="*"/>
- <packagemapper from="*" to="*"/>
- </chainedmapper>
- </pathconvert>
- <!--<echo>path of runner.java: ${toString:runnerFileSet}</echo>
- <echo>runner path converted to class: ${runner.class}</echo>-->
-
- <echo>run @{testId}</echo>
- <java output="${output}/run@{testId}.txt" classname="${runner.class}" fork="true" failonerror="true" timeout="${run.msTimout}">
- <arg value="-run_as_test" />
- <classpath path="./bin/@{testId};${runtime.path}/target/classes;" />
- </java>
- </sequential>
- </macrodef>
-
-</project>
diff --git a/tests/org.eclipse.etrice.generator.java.tests/targetModels/DynamicActorTest1.etmap b/tests/org.eclipse.etrice.generator.java.tests/models/DynamicActorTest1.etmap
index e50d57a44..760374536 100644
--- a/tests/org.eclipse.etrice.generator.java.tests/targetModels/DynamicActorTest1.etmap
+++ b/tests/org.eclipse.etrice.generator.java.tests/models/DynamicActorTest1.etmap
@@ -1,6 +1,6 @@
MappingModel DynamicActorTest1 {
import DynamicActorTest1.* from "DynamicActorTest1.room"
- import room.generic.physical.* from "GenericPhysical.etphys"
+ import room.generic.physical.* from "../../org.eclipse.etrice.generator.common.tests/models/GenericPhysical.etphys"
Mapping JavaGenTests -> GenericPhysicalSystem {
SubSystemMapping da1Test -> node {
diff --git a/tests/org.eclipse.etrice.generator.java.tests/targetModels/DynamicActorTest1.room b/tests/org.eclipse.etrice.generator.java.tests/models/DynamicActorTest1.room
index 65fccd5ca..9f393fd1a 100644
--- a/tests/org.eclipse.etrice.generator.java.tests/targetModels/DynamicActorTest1.room
+++ b/tests/org.eclipse.etrice.generator.java.tests/models/DynamicActorTest1.room
@@ -1,7 +1,7 @@
RoomModel DynamicActorTest1 {
- import room.basic.test.* from "Tests.room"
- import room.basic.types.* from "Types.room"
+ import room.basic.test.* from "../../../runtime/org.eclipse.etrice.modellib.java/model/Tests.room"
+ import room.basic.types.* from "../../../runtime/org.eclipse.etrice.modellib.java/model/Types.room"
LogicalSystem JavaGenTests {
SubSystemRef da1Test : SubSystem_DynamicActorTest1
@@ -30,7 +30,7 @@ RoomModel DynamicActorTest1 {
}
Behavior {
ctor {
- "caseId = etUnit_openAll(\"log/testlog\", \"DynamicActorTest1\", \"org.eclipse.etrice.generator.common.tests.DynamicActorTest1\", \"DynamicActorTest1_case\");"
+ "caseId = etUnit_openAll(\"log\", \"DynamicActorTest1\", \"org.eclipse.etrice.generator.java.tests.DynamicActorTest1\", \"DynamicActorTest1_case\");"
}
dtor {
"etUnit_closeAll(caseId);"
diff --git a/tests/org.eclipse.etrice.generator.java.tests/targetModels/DynamicActorTest2.etmap b/tests/org.eclipse.etrice.generator.java.tests/models/DynamicActorTest2.etmap
index dcc7fb88d..e13a69c66 100644
--- a/tests/org.eclipse.etrice.generator.java.tests/targetModels/DynamicActorTest2.etmap
+++ b/tests/org.eclipse.etrice.generator.java.tests/models/DynamicActorTest2.etmap
@@ -1,6 +1,6 @@
MappingModel DynamicActorTest1 {
import DynamicActorTest2.* from "DynamicActorTest2.room"
- import room.generic.physical.* from "GenericPhysical.etphys"
+ import room.generic.physical.* from "../../org.eclipse.etrice.generator.common.tests/models/GenericPhysical.etphys"
Mapping JavaGenTests -> GenericPhysicalSystem {
SubSystemMapping da2Test -> node {
diff --git a/tests/org.eclipse.etrice.generator.java.tests/targetModels/DynamicActorTest2.room b/tests/org.eclipse.etrice.generator.java.tests/models/DynamicActorTest2.room
index e4c9a709c..9893c7dbf 100644
--- a/tests/org.eclipse.etrice.generator.java.tests/targetModels/DynamicActorTest2.room
+++ b/tests/org.eclipse.etrice.generator.java.tests/models/DynamicActorTest2.room
@@ -1,7 +1,7 @@
RoomModel DynamicActorTest2 {
- import room.basic.test.* from "Tests.room"
- import room.basic.types.* from "Types.room"
+ import room.basic.test.* from "../../../runtime/org.eclipse.etrice.modellib.java/model/Tests.room"
+ import room.basic.types.* from "../../../runtime/org.eclipse.etrice.modellib.java/model/Types.room"
LogicalSystem JavaGenTests {
SubSystemRef da2Test : SubSystem_DynamicActorTest2
@@ -30,7 +30,7 @@ RoomModel DynamicActorTest2 {
}
Behavior {
ctor {
- "caseId = etUnit_openAll(\"log/testlog\", \"DynamicActorTest2\", \"org.eclipse.etrice.generator.common.tests.DynamicActorTest2\", \"DynamicActorTest2_case\");"
+ "caseId = etUnit_openAll(\"log\", \"DynamicActorTest2\", \"org.eclipse.etrice.generator.java.tests.DynamicActorTest2\", \"DynamicActorTest2_case\");"
}
dtor {
"etUnit_closeAll(caseId);"
diff --git a/tests/org.eclipse.etrice.generator.java.tests/targetModels/DynamicActorTest3.room b/tests/org.eclipse.etrice.generator.java.tests/models/DynamicActorTest3.room
index 985383f18..152b36811 100644
--- a/tests/org.eclipse.etrice.generator.java.tests/targetModels/DynamicActorTest3.room
+++ b/tests/org.eclipse.etrice.generator.java.tests/models/DynamicActorTest3.room
@@ -1,7 +1,7 @@
RoomModel DynamicActorTest3 {
- import room.basic.test.* from "Tests.room"
- import room.basic.types.* from "Types.room"
+ import room.basic.test.* from "../../../runtime/org.eclipse.etrice.modellib.java/model/Tests.room"
+ import room.basic.types.* from "../../../runtime/org.eclipse.etrice.modellib.java/model/Types.room"
ActorClass Appl {
@TestInstance
@@ -22,7 +22,7 @@ RoomModel DynamicActorTest3 {
}
Behavior {
ctor {
- "caseId = etUnit_openAll(\"log/testlog\", \"DynamicActorTest3\", \"org.eclipse.etrice.generator.common.tests.DynamicActorTest3\", \"DynamicActorTest3_case\");"
+ "caseId = etUnit_openAll(\"log\", \"DynamicActorTest3\", \"org.eclipse.etrice.generator.java.tests.DynamicActorTest3\", \"DynamicActorTest3_case\");"
}
dtor {
"etUnit_closeAll(caseId);"
diff --git a/tests/org.eclipse.etrice.generator.java.tests/targetModels/DynamicActorTest4.room b/tests/org.eclipse.etrice.generator.java.tests/models/DynamicActorTest4.room
index c26a065a0..3deb03ddd 100644
--- a/tests/org.eclipse.etrice.generator.java.tests/targetModels/DynamicActorTest4.room
+++ b/tests/org.eclipse.etrice.generator.java.tests/models/DynamicActorTest4.room
@@ -1,7 +1,7 @@
RoomModel DynamicActorTest4 {
- import room.basic.test.* from "Tests.room"
- import room.basic.types.* from "Types.room"
+ import room.basic.test.* from "../../../runtime/org.eclipse.etrice.modellib.java/model/Tests.room"
+ import room.basic.types.* from "../../../runtime/org.eclipse.etrice.modellib.java/model/Types.room"
ActorClass Appl {
@TestInstance
@@ -21,7 +21,7 @@ RoomModel DynamicActorTest4 {
}
Behavior {
ctor {
- "caseId = etUnit_openAll(\"log/testlog\", \"DynamicActorTest4\", \"org.eclipse.etrice.generator.common.tests.DynamicActorTest4\", \"DynamicActorTest4_case\");"
+ "caseId = etUnit_openAll(\"log\", \"DynamicActorTest4\", \"org.eclipse.etrice.generator.java.tests.DynamicActorTest4\", \"DynamicActorTest4_case\");"
}
dtor {
"etUnit_closeAll(caseId);"
diff --git a/tests/org.eclipse.etrice.generator.java.tests/targetModels/DynamicActorTest5.room b/tests/org.eclipse.etrice.generator.java.tests/models/DynamicActorTest5.room
index e2d22dbe6..0a4d3d8c0 100644
--- a/tests/org.eclipse.etrice.generator.java.tests/targetModels/DynamicActorTest5.room
+++ b/tests/org.eclipse.etrice.generator.java.tests/models/DynamicActorTest5.room
@@ -1,7 +1,7 @@
RoomModel DynamicActorTest5 {
- import room.basic.test.* from "Tests.room"
- import room.basic.types.* from "Types.room"
+ import room.basic.test.* from "../../../runtime/org.eclipse.etrice.modellib.java/model/Tests.room"
+ import room.basic.types.* from "../../../runtime/org.eclipse.etrice.modellib.java/model/Types.room"
ActorClass Appl {
@TestInstance
@@ -21,7 +21,7 @@ RoomModel DynamicActorTest5 {
}
Behavior {
ctor {
- "caseId = etUnit_openAll(\"log/testlog\", \"DynamicActorTest5\", \"org.eclipse.etrice.generator.common.tests.DynamicActorTest5\", \"DynamicActorTest5_case\");"
+ "caseId = etUnit_openAll(\"log\", \"DynamicActorTest5\", \"org.eclipse.etrice.generator.java.tests.DynamicActorTest5\", \"DynamicActorTest5_case\");"
}
dtor {
"etUnit_closeAll(caseId);"
diff --git a/tests/org.eclipse.etrice.generator.java.tests/targetModels/DynamicActorTest6.room b/tests/org.eclipse.etrice.generator.java.tests/models/DynamicActorTest6.room
index 2b4d94f18..174b03d01 100644
--- a/tests/org.eclipse.etrice.generator.java.tests/targetModels/DynamicActorTest6.room
+++ b/tests/org.eclipse.etrice.generator.java.tests/models/DynamicActorTest6.room
@@ -1,7 +1,7 @@
RoomModel DynamicActorTest6 {
- import room.basic.test.* from "Tests.room"
- import room.basic.types.* from "Types.room"
+ import room.basic.test.* from "../../../runtime/org.eclipse.etrice.modellib.java/model/Tests.room"
+ import room.basic.types.* from "../../../runtime/org.eclipse.etrice.modellib.java/model/Types.room"
ActorClass Appl {
@TestInstance
@@ -24,7 +24,7 @@ RoomModel DynamicActorTest6 {
}
Behavior {
ctor {
- "caseId = etUnit_openAll(\"log/testlog\", \"DynamicActorTest6\", \"org.eclipse.etrice.generator.common.tests.DynamicActorTest6\", \"DynamicActorTest6_case\");"
+ "caseId = etUnit_openAll(\"log\", \"DynamicActorTest6\", \"org.eclipse.etrice.generator.java.tests.DynamicActorTest6\", \"DynamicActorTest6_case\");"
}
dtor {
"etUnit_closeAll(caseId);"
diff --git a/tests/org.eclipse.etrice.generator.java.tests/targetModels/DynamicActorTest7.etmap b/tests/org.eclipse.etrice.generator.java.tests/models/DynamicActorTest7.etmap
index cb52ba408..4bd054cd2 100644
--- a/tests/org.eclipse.etrice.generator.java.tests/targetModels/DynamicActorTest7.etmap
+++ b/tests/org.eclipse.etrice.generator.java.tests/models/DynamicActorTest7.etmap
@@ -1,6 +1,6 @@
MappingModel DynamicActorTest1 {
import DynamicActorTest7.* from "DynamicActorTest7.room"
- import room.generic.physical.* from "GenericPhysical.etphys"
+ import room.generic.physical.* from "../../org.eclipse.etrice.generator.common.tests/models/GenericPhysical.etphys"
Mapping JavaGenTests -> GenericPhysicalSystem {
SubSystemMapping da7Test -> node {
diff --git a/tests/org.eclipse.etrice.generator.java.tests/targetModels/DynamicActorTest7.room b/tests/org.eclipse.etrice.generator.java.tests/models/DynamicActorTest7.room
index 15630c617..ec9aff939 100644
--- a/tests/org.eclipse.etrice.generator.java.tests/targetModels/DynamicActorTest7.room
+++ b/tests/org.eclipse.etrice.generator.java.tests/models/DynamicActorTest7.room
@@ -1,7 +1,7 @@
RoomModel DynamicActorTest7 {
- import room.basic.test.* from "Tests.room"
- import room.basic.types.* from "Types.room"
+ import room.basic.test.* from "../../../runtime/org.eclipse.etrice.modellib.java/model/Tests.room"
+ import room.basic.types.* from "../../../runtime/org.eclipse.etrice.modellib.java/model/Types.room"
LogicalSystem JavaGenTests {
SubSystemRef da7Test : SubSystem_DynamicActorTest7
@@ -42,7 +42,7 @@ RoomModel DynamicActorTest7 {
}
Behavior {
ctor {
- "caseId = etUnit_openAll(\"log/testlog\", \"DynamicActorTest7\", \"org.eclipse.etrice.generator.common.tests.DynamicActorTest7\", \"DynamicActorTest7_case\");"
+ "caseId = etUnit_openAll(\"log\", \"DynamicActorTest7\", \"org.eclipse.etrice.generator.java.tests.DynamicActorTest7\", \"DynamicActorTest7_case\");"
}
dtor {
"etUnit_closeAll(caseId);"
diff --git a/tests/org.eclipse.etrice.generator.java.tests/targetModels/DynamicConfigTest.config b/tests/org.eclipse.etrice.generator.java.tests/models/DynamicConfigTest.config
index 13fd8a62b..13fd8a62b 100644
--- a/tests/org.eclipse.etrice.generator.java.tests/targetModels/DynamicConfigTest.config
+++ b/tests/org.eclipse.etrice.generator.java.tests/models/DynamicConfigTest.config
diff --git a/tests/org.eclipse.etrice.generator.java.tests/targetModels/DynamicConfigTest.etmap b/tests/org.eclipse.etrice.generator.java.tests/models/DynamicConfigTest.etmap
index 3ec15a8f2..3ec15a8f2 100644
--- a/tests/org.eclipse.etrice.generator.java.tests/targetModels/DynamicConfigTest.etmap
+++ b/tests/org.eclipse.etrice.generator.java.tests/models/DynamicConfigTest.etmap
diff --git a/tests/org.eclipse.etrice.generator.java.tests/targetModels/DynamicConfigTest.room b/tests/org.eclipse.etrice.generator.java.tests/models/DynamicConfigTest.room
index 6e0550ec5..9835b42af 100644
--- a/tests/org.eclipse.etrice.generator.java.tests/targetModels/DynamicConfigTest.room
+++ b/tests/org.eclipse.etrice.generator.java.tests/models/DynamicConfigTest.room
@@ -1,8 +1,7 @@
RoomModel DynamicConfigTest {
- import room.basic.types.* from "Types.room"
-
- import room.basic.service.timing.* from "TimingService.room"
+ import room.basic.types.* from "../../../runtime/org.eclipse.etrice.modellib.java/model/Types.room"
+ import room.basic.service.timing.* from "../../../runtime/org.eclipse.etrice.modellib.java/model/TimingService.room"
LogicalSystem System_DynamicConfigTest{
SubSystemRef main : SubSystem_DynamicConfigTest
@@ -50,8 +49,8 @@ RoomModel DynamicConfigTest {
}
Behavior {
ctor {
- "etUnit_open(\"log/testlog\", \"DynamicConfigTest\");"
- "etUnit_openTestSuite(\"org.eclipse.etrice.generator.common.tests.DynamicConfigTest\");"
+ "etUnit_open(\"log\", \"DynamicConfigTest\");"
+ "etUnit_openTestSuite(\"org.eclipse.etrice.generator.java.tests.DynamicConfigTest\");"
"caseId = etUnit_openTestCase(\"DynamicConfigTest_case_Testee_ac\");"
}
dtor {
diff --git a/tests/org.eclipse.etrice.generator.java.tests/targetModels/DynamicConfigTest.rt-config b/tests/org.eclipse.etrice.generator.java.tests/models/DynamicConfigTest.rt-config
index c27ad68cf..c27ad68cf 100644
--- a/tests/org.eclipse.etrice.generator.java.tests/targetModels/DynamicConfigTest.rt-config
+++ b/tests/org.eclipse.etrice.generator.java.tests/models/DynamicConfigTest.rt-config
diff --git a/tests/org.eclipse.etrice.generator.common.tests/models/sendingData/SendingDataTestJava.room b/tests/org.eclipse.etrice.generator.java.tests/models/SendingDataTest.room
index aafe3bb69..39a66aeee 100644
--- a/tests/org.eclipse.etrice.generator.common.tests/models/sendingData/SendingDataTestJava.room
+++ b/tests/org.eclipse.etrice.generator.java.tests/models/SendingDataTest.room
@@ -1,9 +1,9 @@
-RoomModel SendingDataTestJava {
-
- import room.basic.test.* from "../Tests.room"
- import room.basic.types.* from "../Types.room"
- import room.basic.language.* from "../Language.room"
+RoomModel SendingDataTest {
+ import room.basic.test.* from "../../../runtime/org.eclipse.etrice.modellib.java/model/Tests.room"
+ import room.basic.types.* from "../../../runtime/org.eclipse.etrice.modellib.java/model/Types.room"
+ import room.basic.language.* from "../../../runtime/org.eclipse.etrice.modellib.java/model/Language.room"
+
ActorClass SendingDataTop {
@TestInstance
Structure {
@@ -178,7 +178,7 @@ RoomModel SendingDataTestJava {
StateMachine {
Transition init: initial -> tp0 of state0 {
action {
- "caseId = etUnit_openAll(\"log/testlog\", \"SendingDataTestJava\", \"org.eclipse.etrice.generator.common.tests.SendingDataTest\", \"SendingDataTest_case\");"
+ "caseId = etUnit_openAll(\"log\", \"SendingDataTest\", \"org.eclipse.etrice.generator.java.tests.SendingDataTest\", \"SendingDataTest_case\");"
"EXPECT_ORDER_START(caseId,resultlist,23);"
"EXPECT_ORDER(caseId,\"<|MODEL_LOCATION|>\", 1);"
"// send the default values"
diff --git a/tests/org.eclipse.etrice.generator.java.tests/models/StaticConfigTest.config b/tests/org.eclipse.etrice.generator.java.tests/models/StaticConfigTest.config
new file mode 100644
index 000000000..426adc5e6
--- /dev/null
+++ b/tests/org.eclipse.etrice.generator.java.tests/models/StaticConfigTest.config
@@ -0,0 +1,141 @@
+ConfigModel StaticTestConfig {
+
+ import StaticConfigTest.* from "StaticConfigTest.room"
+
+ ActorClassConfig Tester_ac {
+ // nothing
+ }
+
+ ActorClassConfig Testee_1_ac {
+ Attr data_1 {
+ Attr bool_c = false
+ Attr bool_i = false
+ Attr int8_c = 24
+ Attr int8_i = 24
+ Attr int16_c = 48
+ Attr int16_i = 48
+ Attr int32_c = 96
+ Attr int32_i = 96
+ Attr int64_c = 192
+ Attr int64_i = 192
+ Attr float32_c = 9.6
+ Attr float32_i = 9.6
+ Attr float64_c = 19.2
+ Attr float64_i = 19.2
+ Attr char_c = "C"
+ Attr char_i = "C"
+ Attr string_c = ":)"
+ Attr string_i = ":)"
+
+ Attr bool_array_c = true, false
+ Attr bool_array_i = true, false
+ Attr int8_array_c = 24, 48
+ Attr int8_array_i = 24, 48
+ Attr int16_array_c = 48, 96
+ Attr int16_array_i = 48, 96
+ Attr int32_array_c = 96, 192
+ Attr int32_array_i = 96, 192
+ Attr int64_array_c = 192, 384
+ Attr int64_array_i = 192, 384
+ Attr float32_array_c = 9.6
+ Attr float32_array_i = 9.6
+ Attr float64_array_c = 19.2
+ Attr float64_array_i = 19.2
+ Attr char_array_c = "Claz"
+ Attr char_array_i = "Claz"
+
+ Attr data_2 {
+ Attr int32_c = 42
+ Attr int32_i = 42
+ }
+ }
+ Attr enumval1 = Enum_1.two
+ Attr enumval2 = Enum_2.three
+ }
+
+ ActorClassConfig Testee_Super2_ac {
+ Attr float64_super_c = 2.2
+ Attr float64_super_i = 2.2
+ }
+
+ ActorClassConfig Testee_2_ac {
+ Attr int32_own_c = 12
+ Attr int32_own_i = 12
+ }
+
+ ProtocolClassConfig TestProtocolAttributes {
+ regular Port{
+ Attr float_c = 3.0
+ Attr float_i = 3.0
+ }
+ conjugate Port {
+ Attr array2_c = 16, 32
+ Attr array2_i = 16, 32
+ }
+ }
+
+ ProtocolClassConfig TestProtocolWithDataClass {
+ conjugate Port {
+ Attr sap_data_2{
+ Attr int32_c = 2
+ Attr int32_i = 2
+ }
+ }
+ }
+
+ ActorInstanceConfig System_StaticConfigTest/main/top/tester {
+ // nothing
+ }
+
+ ActorInstanceConfig System_StaticConfigTest/main/top/testee_1 {
+ Attr data_1 {
+ Attr bool_i = true
+ Attr int8_i = 2
+ Attr int16_i = 4
+ Attr int32_i = 8
+ Attr int64_i = 16
+ Attr float32_i = 1.6
+ Attr float64_i = 3.2
+ Attr char_i = "I"
+ Attr string_i = ":]"
+
+ Attr bool_array_i = true, true
+ Attr int8_array_i = 2, 6
+ Attr int16_array_i = 4, 12
+ Attr int32_array_i = 8, 24
+ Attr int64_array_i = 16, 48
+ Attr float32_array_i = 1.6
+ Attr float64_array_i = 3.2
+ Attr char_array_i = "Inst"
+
+ Attr data_2 {
+ Attr int32_i = 43
+ }
+ }
+ InterfaceItem conj_port {
+ Attr array2_i = 1, 2
+ }
+ }
+
+
+ ActorInstanceConfig System_StaticConfigTest/main/top/tester/testee_super2{
+ Attr float64_super_i = 3.3
+ InterfaceItem reg_port {
+ Attr float_i = 25.0
+ }
+ }
+
+ ActorInstanceConfig System_StaticConfigTest/main/top/testee_1/testee_2 {
+ Attr float64_super_i = 4.4
+ Attr int32_own_i = 13
+ InterfaceItem reg_port {
+ Attr float_i = 50.0
+ }
+ InterfaceItem sap {
+ Attr sap_data_2 {
+ Attr int32_i = 3
+ }
+ }
+ }
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.etrice.generator.java.tests/models/StaticConfigTest.etmap b/tests/org.eclipse.etrice.generator.java.tests/models/StaticConfigTest.etmap
new file mode 100644
index 000000000..c0f26f88d
--- /dev/null
+++ b/tests/org.eclipse.etrice.generator.java.tests/models/StaticConfigTest.etmap
@@ -0,0 +1,10 @@
+MappingModel StaticConfigTest {
+
+ import StaticConfigTest.* from "StaticConfigTest.room"
+ import room.generic.physical.* from "../../org.eclipse.etrice.generator.common.tests/models/GenericPhysical.etphys"
+
+ Mapping System_StaticConfigTest -> GenericPhysicalSystem {
+ SubSystemMapping main -> node {}
+ }
+
+} \ No newline at end of file
diff --git a/tests/org.eclipse.etrice.generator.common.tests/models/staticConfig/StaticConfigTest_Java.room b/tests/org.eclipse.etrice.generator.java.tests/models/StaticConfigTest.room
index 96e43a311..b6242c9a1 100644
--- a/tests/org.eclipse.etrice.generator.common.tests/models/staticConfig/StaticConfigTest_Java.room
+++ b/tests/org.eclipse.etrice.generator.java.tests/models/StaticConfigTest.room
@@ -1,7 +1,7 @@
RoomModel StaticConfigTest {
- import room.basic.types.* from "../Types.room"
- import room.basic.service.timing.* from "../TimingService.room"
+ import room.basic.types.* from "../../../runtime/org.eclipse.etrice.modellib.java/model/Types.room"
+ import room.basic.service.timing.* from "../../../runtime/org.eclipse.etrice.modellib.java/model/TimingService.room"
LogicalSystem System_StaticConfigTest {
SubSystemRef main : SubSystem_StaticConfigTest
@@ -22,8 +22,8 @@ RoomModel StaticConfigTest {
}
Behavior {
ctor {
- "etUnit_open(\"log/testlog\", \"StaticConfigTest\");"
- "etUnit_openTestSuite(\"org.eclipse.etrice.generator.common.tests.StaticConfigTest\");"
+ "etUnit_open(\"log\", \"StaticConfigTest\");"
+ "etUnit_openTestSuite(\"org.eclipse.etrice.generator.java.tests.StaticConfigTest\");"
}
dtor {
"etUnit_closeTestSuite();"
diff --git a/tests/org.eclipse.etrice.generator.java.tests/targetModels/StoreRestore.room b/tests/org.eclipse.etrice.generator.java.tests/models/StoreRestoreTest.room
index 6c5a11105..7fab6d5cc 100644
--- a/tests/org.eclipse.etrice.generator.java.tests/targetModels/StoreRestore.room
+++ b/tests/org.eclipse.etrice.generator.java.tests/models/StoreRestoreTest.room
@@ -1,7 +1,7 @@
-RoomModel StoreRestore {
-
- import room.basic.test.* from "Tests.room"
+RoomModel StoreRestoreTest {
+ import room.basic.test.* from "../../../runtime/org.eclipse.etrice.modellib.java/model/Tests.room"
+
ActorClass StoreRestore_Top {
@TestInstance
Structure {
@@ -117,7 +117,7 @@ RoomModel StoreRestore {
}
Behavior {
ctor {
- "caseId = etUnit_openAll(\"log/testlog\", \"StoreRestore\", \"org.eclipse.etrice.generator.common.tests.StoreRestore\", \"StoreRestore_case\");"
+ "caseId = etUnit_openAll(\"log\", \"StoreRestoreTest\", \"org.eclipse.etrice.generator.java.tests.StoreRestoreTest\", \"StoreRestoreTest_case\");"
}
dtor {
"etUnit_closeAll(caseId);"
diff --git a/tests/org.eclipse.etrice.generator.java.tests/targetModels/TCPTest.room b/tests/org.eclipse.etrice.generator.java.tests/models/TCPTest.room
index d234bfe2b..5e2b2c4f3 100644
--- a/tests/org.eclipse.etrice.generator.java.tests/targetModels/TCPTest.room
+++ b/tests/org.eclipse.etrice.generator.java.tests/models/TCPTest.room
@@ -1,160 +1,160 @@
-RoomModel TCPTest {
-
- import room.basic.test.* from "Tests.room"
- import room.basic.types.* from "Types.room"
- import room.basic.service.tcp.* from "TcpService.room"
-
- ActorClass TCPTestTop {
- @TestInstance
- Structure {
- ActorRef ref0: ATcpServer
- ActorRef ref1 [ 5 ]: ATcpClient
- ActorRef ref2: Tester
- Binding ref2.p1 and ref0.PayloadPort
- Binding ref2.p0 and ref0.ControlPort
- Binding ref2.p2 and ref1.ControlPort
- Binding ref2.p3 and ref1.PayloadPort
- }
- Behavior { }
- }
-
- ActorClass Tester {
- Interface {
- conjugated Port p0: PTcpControl
- conjugated Port p1: PTcpPayload
- conjugated Port p2 [*]: PTcpControl
- conjugated Port p3 [5]: PTcpPayload
- }
- Structure {
- external Port p0
- external Port p1
- external Port p2
- external Port p3
- Attribute controlData:DTcpControl
- Attribute testData:DTcpPayload
- Attribute counter:int32
- Attribute resultPattern:int32
- Attribute pattern:int32
- Attribute caseId: int32
- Attribute resultlist[3]: int16 = "{1,2,3}"
-
- }
- Behavior {
- ctor {
- "caseId = etUnit_openAll(\"log/testlog\", \"TCPTest\", \"org.eclipse.etrice.generator.common.tests.TCPTest\", \"TCPTest_case\");"
- }
- dtor {
- "etUnit_closeAll(caseId);"
- }
- StateMachine {
- Transition init: initial -> state0 {
- action {
- "EXPECT_ORDER_START(caseId,resultlist,3);"
- "EXPECT_ORDER(caseId,\"<|MODEL_LOCATION|>\", 1);"
- "// open Server"
- "controlData.setIPAddr(\"127.0.0.1\");"
- "controlData.setTcpPort(4711);"
- "p0.open(controlData);"
- }
- }
- Transition tr0: state0 -> state1 {
- triggers {
- <established: p0>
- }
- action {
- "// open 5 clients"
- "for (int i=0;i<p2.getReplication();i++){"
- "p2[i].open(controlData);"
- "}"
- "counter=0;"
- }
- }
- Transition tr1: state1 -> cp cp0 {
- triggers {
- <established: p2>
- }
- action {
- "counter++;"
- }
- }
- Transition tr4: cp cp0 -> state1
- Transition tr5: cp cp0 -> state2 {
- cond {
- "counter>=p2.getReplication()"
- }
- action {
- "String s=new String (\"Test!\");"
- "testData.setData(s.getBytes());"
- "testData.setLength(s.length());"
- "testData.setConnectionId(0);"
- "for (int i=0; i<p3.getReplication();i++){"
- "\tp3[i].send(testData);"
- "}"
- "counter=0;"
- "resultPattern=0;"
- }
- }
- Transition tr8: state2 -> cp cp2 {
- triggers {
- <receive: p3>
- }
- action {
- "resultPattern+=p3.getIndexOf(ifitem);"
- "//System.out.printf(\"c:%d, Idx:%d!\\n\", counter,p3.getIndexOf(ifitem));"
- "counter++;"
- }
- }
- Transition tr9: cp cp2 -> state2
- Transition tr10: cp cp2 -> cp cp1 {
- cond {
- "counter>=p2.getReplication()"
- }
- action {
- "int i;"
- "p0.close();"
- "// close all clients"
- "p2.close();"
- "pattern=0;"
- "for (i=0;i<p2.getReplication();i++){"
- "\tpattern+=i;"
- "}"
- }
- }
- Transition tr3: state2 -> state2 {
- triggers {
- <receive: p1>
- }
- action {
- "p1.send(data);"
- }
- }
- Transition tr2: cp cp1 -> test_failed
- Transition tr6: cp cp1 -> test_ok {
- cond {
- "pattern==resultPattern"
- }
- }
- ChoicePoint cp0
- ChoicePoint cp2
- ChoicePoint cp1
- State state0
- State state1
- State state2
- State test_ok {
- entry {
- "EXPECT_ORDER(caseId,\"<|MODEL_LOCATION|>\", 2);"
- "EXPECT_ORDER_END(caseId,\"<|MODEL_LOCATION|>\", 3);"
- "etUnit_testFinished(caseId);"
- }
- }
- State test_failed {
- entry {
- "EXPECT_ORDER(caseId,\"<|MODEL_LOCATION|>\", 0xFF);"
- "EXPECT_ORDER_END(caseId,\"<|MODEL_LOCATION|>\", 3);"
- "etUnit_testFinished(caseId);"
- }
- }
- }
- }
- }
+RoomModel TCPTest {
+
+ import room.basic.test.* from "../../../runtime/org.eclipse.etrice.modellib.java/model/Tests.room"
+ import room.basic.types.* from "../../../runtime/org.eclipse.etrice.modellib.java/model/Types.room"
+ import room.basic.service.tcp.* from "../../../runtime/org.eclipse.etrice.modellib.java/model/TcpService.room"
+
+ ActorClass TCPTestTop {
+ @TestInstance
+ Structure {
+ ActorRef ref0: ATcpServer
+ ActorRef ref1 [ 5 ]: ATcpClient
+ ActorRef ref2: Tester
+ Binding ref2.p1 and ref0.PayloadPort
+ Binding ref2.p0 and ref0.ControlPort
+ Binding ref2.p2 and ref1.ControlPort
+ Binding ref2.p3 and ref1.PayloadPort
+ }
+ Behavior { }
+ }
+
+ ActorClass Tester {
+ Interface {
+ conjugated Port p0: PTcpControl
+ conjugated Port p1: PTcpPayload
+ conjugated Port p2 [*]: PTcpControl
+ conjugated Port p3 [5]: PTcpPayload
+ }
+ Structure {
+ external Port p0
+ external Port p1
+ external Port p2
+ external Port p3
+ Attribute controlData:DTcpControl
+ Attribute testData:DTcpPayload
+ Attribute counter:int32
+ Attribute resultPattern:int32
+ Attribute pattern:int32
+ Attribute caseId: int32
+ Attribute resultlist[3]: int16 = "{1,2,3}"
+
+ }
+ Behavior {
+ ctor {
+ "caseId = etUnit_openAll(\"log\", \"TCPTest\", \"org.eclipse.etrice.generator.java.tests.TCPTest\", \"TCPTest_case\");"
+ }
+ dtor {
+ "etUnit_closeAll(caseId);"
+ }
+ StateMachine {
+ Transition init: initial -> state0 {
+ action {
+ "EXPECT_ORDER_START(caseId,resultlist,3);"
+ "EXPECT_ORDER(caseId,\"<|MODEL_LOCATION|>\", 1);"
+ "// open Server"
+ "controlData.setIPAddr(\"127.0.0.1\");"
+ "controlData.setTcpPort(4711);"
+ "p0.open(controlData);"
+ }
+ }
+ Transition tr0: state0 -> state1 {
+ triggers {
+ <established: p0>
+ }
+ action {
+ "// open 5 clients"
+ "for (int i=0;i<p2.getReplication();i++){"
+ "p2[i].open(controlData);"
+ "}"
+ "counter=0;"
+ }
+ }
+ Transition tr1: state1 -> cp cp0 {
+ triggers {
+ <established: p2>
+ }
+ action {
+ "counter++;"
+ }
+ }
+ Transition tr4: cp cp0 -> state1
+ Transition tr5: cp cp0 -> state2 {
+ cond {
+ "counter>=p2.getReplication()"
+ }
+ action {
+ "String s=new String (\"Test!\");"
+ "testData.setData(s.getBytes());"
+ "testData.setLength(s.length());"
+ "testData.setConnectionId(0);"
+ "for (int i=0; i<p3.getReplication();i++){"
+ "\tp3[i].send(testData);"
+ "}"
+ "counter=0;"
+ "resultPattern=0;"
+ }
+ }
+ Transition tr8: state2 -> cp cp2 {
+ triggers {
+ <receive: p3>
+ }
+ action {
+ "resultPattern+=p3.getIndexOf(ifitem);"
+ "//System.out.printf(\"c:%d, Idx:%d!\\n\", counter,p3.getIndexOf(ifitem));"
+ "counter++;"
+ }
+ }
+ Transition tr9: cp cp2 -> state2
+ Transition tr10: cp cp2 -> cp cp1 {
+ cond {
+ "counter>=p2.getReplication()"
+ }
+ action {
+ "int i;"
+ "p0.close();"
+ "// close all clients"
+ "p2.close();"
+ "pattern=0;"
+ "for (i=0;i<p2.getReplication();i++){"
+ "\tpattern+=i;"
+ "}"
+ }
+ }
+ Transition tr3: state2 -> state2 {
+ triggers {
+ <receive: p1>
+ }
+ action {
+ "p1.send(data);"
+ }
+ }
+ Transition tr2: cp cp1 -> test_failed
+ Transition tr6: cp cp1 -> test_ok {
+ cond {
+ "pattern==resultPattern"
+ }
+ }
+ ChoicePoint cp0
+ ChoicePoint cp2
+ ChoicePoint cp1
+ State state0
+ State state1
+ State state2
+ State test_ok {
+ entry {
+ "EXPECT_ORDER(caseId,\"<|MODEL_LOCATION|>\", 2);"
+ "EXPECT_ORDER_END(caseId,\"<|MODEL_LOCATION|>\", 3);"
+ "etUnit_testFinished(caseId);"
+ }
+ }
+ State test_failed {
+ entry {
+ "EXPECT_ORDER(caseId,\"<|MODEL_LOCATION|>\", 0xFF);"
+ "EXPECT_ORDER_END(caseId,\"<|MODEL_LOCATION|>\", 3);"
+ "etUnit_testFinished(caseId);"
+ }
+ }
+ }
+ }
+ }
} \ No newline at end of file
diff --git a/tests/org.eclipse.etrice.generator.java.tests/org.eclipse.etrice.generator.java.tests make.xml.launch b/tests/org.eclipse.etrice.generator.java.tests/org.eclipse.etrice.generator.java.tests make.xml.launch
deleted file mode 100644
index 7ad38f90f..000000000
--- a/tests/org.eclipse.etrice.generator.java.tests/org.eclipse.etrice.generator.java.tests make.xml.launch
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.ant.AntLaunchConfigurationType">
-<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
-<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${project}"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.etrice.generator.java.tests/make.xml"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
-<listEntry value="org.eclipse.ui.externaltools.launchGroup"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.etrice.generator.java.tests"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LAUNCH_CONFIGURATION_BUILD_SCOPE" value="${none}"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/org.eclipse.etrice.generator.java.tests/make.xml}"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="-v"/>
-<stringAttribute key="process_factory_id" value="org.eclipse.ant.ui.remoteAntProcessFactory"/>
-<mapAttribute key="org.eclipse.ui.externaltools.ATTR_ANT_PROPERTIES">
-<mapEntry key="eclipse.home" value="${eclipse_home}"/>
-<mapEntry key="eclipse.pdebuild.home" value="${target_platform_plugin_location:org.eclipse.pde.build}"/>
-<mapEntry key="eclipse.pdebuild.scripts" value="${target_platform_plugin_location:org.eclipse.pde.build}/scripts/"/>
-<mapEntry key="eclipse.pdebuild.templates" value="${target_platform_plugin_location:org.eclipse.pde.build}/templates/"/>
-<mapEntry key="eclipse.running" value="true"/>
-<mapEntry key="com.google.guava" value="${target_platform_plugin_location:com.google.guava}"/>
-<mapEntry key="com.google.inject" value="${target_platform_plugin_location:com.google.inject}"/>
-<mapEntry key="javax.inject" value="${target_platform_plugin_location:javax.inject}"/>
-<mapEntry key="org.antlr.runtime" value="${target_platform_plugin_location:org.antlr.runtime}"/>
-<mapEntry key="org.apache.log4j" value="${target_platform_plugin_location:org.apache.log4j}"/>
-<mapEntry key="org.eclipse.emf.common" value="${target_platform_plugin_location:org.eclipse.emf.common}"/>
-<mapEntry key="org.eclipse.emf.ecore" value="${target_platform_plugin_location:org.eclipse.emf.ecore}"/>
-<mapEntry key="org.eclipse.emf.ecore.xmi" value="${target_platform_plugin_location:org.eclipse.emf.ecore.xmi}"/>
-<mapEntry key="org.eclipse.equinox.common" value="${target_platform_plugin_location:org.eclipse.equinox.common}"/>
-<mapEntry key="org.eclipse.xtend.lib" value="${target_platform_plugin_location:org.eclipse.xtend.lib}"/>
-<mapEntry key="org.eclipse.xtext" value="${target_platform_plugin_location:org.eclipse.xtext}"/>
-<mapEntry key="org.eclipse.xtext.common.types" value="${target_platform_plugin_location:org.eclipse.xtext.common.types}"/>
-<mapEntry key="org.eclipse.xtext.util" value="${target_platform_plugin_location:org.eclipse.xtext.util}"/>
-<mapEntry key="org.eclipse.xtext.xbase.lib" value="${target_platform_plugin_location:org.eclipse.xtext.xbase.lib}"/>
-</mapAttribute>
-</launchConfiguration>
diff --git a/tests/org.eclipse.etrice.generator.java.tests/src/DynamicActorTest7/FilePersistor.java b/tests/org.eclipse.etrice.generator.java.tests/src/dynamicActorTest7/DynamicActorTest7/FilePersistor.java
index eb1530117..eb1530117 100644
--- a/tests/org.eclipse.etrice.generator.java.tests/src/DynamicActorTest7/FilePersistor.java
+++ b/tests/org.eclipse.etrice.generator.java.tests/src/dynamicActorTest7/DynamicActorTest7/FilePersistor.java
diff --git a/tests/org.eclipse.etrice.generator.java.tests/src/DynamicConfigTest/ConfigSourceTestInstance.java b/tests/org.eclipse.etrice.generator.java.tests/src/dynamicConfigTest/DynamicConfigTest/ConfigSourceTestInstance.java
index 5d7b3f846..5d7b3f846 100644
--- a/tests/org.eclipse.etrice.generator.java.tests/src/DynamicConfigTest/ConfigSourceTestInstance.java
+++ b/tests/org.eclipse.etrice.generator.java.tests/src/dynamicConfigTest/DynamicConfigTest/ConfigSourceTestInstance.java
diff --git a/tests/org.eclipse.etrice.generator.java.tests/src/StaticConfigTest/External_Type_Test.java b/tests/org.eclipse.etrice.generator.java.tests/src/staticConfigTest/StaticConfigTest/External_Type_Test.java
index 1798235ce..1798235ce 100644
--- a/tests/org.eclipse.etrice.generator.java.tests/src/StaticConfigTest/External_Type_Test.java
+++ b/tests/org.eclipse.etrice.generator.java.tests/src/staticConfigTest/StaticConfigTest/External_Type_Test.java
diff --git a/tests/org.eclipse.etrice.generator.java.tests/src/StoreRestore/ObjectHolder.java b/tests/org.eclipse.etrice.generator.java.tests/src/storeRestoreTest/StoreRestoreTest/ObjectHolder.java
index 18df93cb5..ef6d75958 100644
--- a/tests/org.eclipse.etrice.generator.java.tests/src/StoreRestore/ObjectHolder.java
+++ b/tests/org.eclipse.etrice.generator.java.tests/src/storeRestoreTest/StoreRestoreTest/ObjectHolder.java
@@ -10,10 +10,12 @@
*
*******************************************************************************/
-package StoreRestore;
+package StoreRestoreTest;
import org.eclipse.etrice.runtime.java.modelbase.IActorClassDataObject;
+import StoreRestoreTest.ObjectHolder;
+
/**
* @author hrentz
*
diff --git a/tests/org.eclipse.etrice.runtime.c.tests/Makefile b/tests/org.eclipse.etrice.runtime.c.tests/Makefile
deleted file mode 100644
index 1f9507676..000000000
--- a/tests/org.eclipse.etrice.runtime.c.tests/Makefile
+++ /dev/null
@@ -1,13 +0,0 @@
-# for make.xml
-include ${RUNTIME_ROOTDIR}/buildTools/runtime.mk
-
-# ---
-IN_TARGET := $(notdir $(shell pwd)).exe
-IN_BUILD_DIR := ./bin
-IN_INCDIRS += ./src
-IN_SRCDIRS_REC += ./src
-#---
-
-
-# Create rules
-include ${RUNTIME_ROOTDIR}/buildTools/Makefile.mk \ No newline at end of file
diff --git a/tests/org.eclipse.etrice.runtime.c.tests/buckminster.cspec b/tests/org.eclipse.etrice.runtime.c.tests/buckminster.cspec
deleted file mode 100644
index f803be39c..000000000
--- a/tests/org.eclipse.etrice.runtime.c.tests/buckminster.cspec
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><cs:cspec xmlns:cs="http://www.eclipse.org/buckminster/CSpec-1.0" name="org.eclipse.etrice.runtime.c.tests" componentType="buckminster" version="0.5.0.qualifier">
- <cs:actions>
- <cs:public name="run_tests" actor="ant">
- <cs:actorProperties>
- <cs:property key="buildFile" value="make.xml"/>
- <cs:property key="targets" value="all"/>
- </cs:actorProperties>
- </cs:public>
- </cs:actions>
-</cs:cspec>
diff --git a/tests/org.eclipse.etrice.runtime.c.tests/build.gradle b/tests/org.eclipse.etrice.runtime.c.tests/build.gradle
new file mode 100644
index 000000000..32ebe4192
--- /dev/null
+++ b/tests/org.eclipse.etrice.runtime.c.tests/build.gradle
@@ -0,0 +1,49 @@
+import static org.apache.tools.ant.taskdefs.condition.Os.*
+
+plugins {
+ id 'c'
+}
+
+apply from: "$rootDir/gradle/etUnitConverter.gradle"
+
+model {
+ components {
+ etrice_runtime_c_tests(NativeExecutableSpec) {
+ sources.c {
+ source {
+ srcDirs = ['src']
+ include '**/*.c'
+ }
+ exportedHeaders {
+ srcDirs = ['src']
+ }
+ lib project: ':runtime:org.eclipse.etrice.runtime.c', library: 'etrice_runtime_c', linkage: 'static'
+ }
+ binaries {
+ all {
+ cCompiler.args '-g3'
+ if(isFamily(FAMILY_UNIX)) { linker.args '-lpthread', '-lrt', '-lm' }
+ }
+ }
+ }
+ }
+}
+
+def exeFile = "$buildDir/exe/etrice_runtime_c_tests/etrice_runtime_c_tests"
+def etuFileRuntimeTest = 'log/TestCRuntime.etu'
+def etuFileEtUnitTest = 'log/TestEtUnitSpecial.etu'
+
+clean.delete 'log'
+
+task run(type: Exec, dependsOn: assemble, group: 'verification') {
+ commandLine exeFile
+ inputs.file exeFile
+ outputs.files etuFileRuntimeTest, etuFileEtUnitTest
+
+ doFirst { file('log').mkdirs() }
+}
+
+createEtUnitConverterTask('convert', [etuFileRuntimeTest, etuFileEtUnitTest])
+convert.dependsOn run
+
+check.dependsOn convert \ No newline at end of file
diff --git a/tests/org.eclipse.etrice.runtime.c.tests/make.xml b/tests/org.eclipse.etrice.runtime.c.tests/make.xml
deleted file mode 100644
index a37d667b1..000000000
--- a/tests/org.eclipse.etrice.runtime.c.tests/make.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-<?xml version="1.0"?>
-<!--
- Ant makefile for building and running of tests.
- This includes conversion of the etunit
- results into xunit xml.
-
- @author Henrik Rentz-Reichert
--->
-<project name="org.eclipse.etrice.runtime.c.tests" basedir="." default="all">
-
- <import file="../org.eclipse.etrice.generator.common.tests/common.xml" as="common"/>
-
- <property name="runtime.path" value="../../runtime/org.eclipse.etrice.runtime.c" />
-
- <target name="set_local_rt" unless="runtime.platform">
- <!-- <property name="runtime.platform" value="MT_POSIX_GENERIC_GCC"/> -->
- <property name="runtime.platform" value="MT_WIN_MinGW"/>
- <echo> runtime.platform = ${runtime.platform} </echo>
- </target>
- <target name="setVars" depends="set_local_rt,common.setVars"/>
-
- <!--
- all: compiles, runs, converts and copies the results
- -->
- <target name="all" depends="convert,copy_results">
- <echo>done with ${ant.project.name}</echo>
- </target>
-
- <!--
- build: compiles and link everything
- -->
- <target name="build" depends="setVars,clean">
- <mkdir dir="${output}"/>
- <mkdir dir="${bin.path}"/>
- <exec executable="make" failonerror="true" output="${output}/build.txt">
- <arg line="all"/>
- <arg line="RUNTIME_ROOTDIR=${runtime.path}"/>
- <arg line="TARGET_PLATFORM=${runtime.platform}"/>
- </exec>
- </target>
-
- <!--
- run: runs all executables
- -->
- <target name="run" depends="build">
- <mkdir dir="${testlog.path}"/>
- <echo>start RuntimeTest</echo>
- <exec resolveexecutable="true" executable="${bin.path}/${ant.project.name}.exe" output="${output}/run.txt" />
- <echo>end RuntimeTest</echo>
- </target>
-
- <!--
- convert: converts etu- into xunit xml-format
- -->
- <target name="convert" depends="run">
- <convertPre testId="TestEtUnitSpecial"/>
- <convertPre testId="TestCRuntime"/>
- </target>
-
- <!--
- copy_results: copies the *.xml results to their final destination
- -->
- <target name="copy_results" depends="setVars">
- <copyResult testId="TestEtUnitSpecial" targetid="${runtime.platform}_"/>
- <copyResult testId="TestCRuntime" targetid="${runtime.platform}_"/>
- </target>
-
-</project>
diff --git a/tests/org.eclipse.etrice.runtime.c.tests/org.eclipse.etrice.runtime.c.tests make.xml.launch b/tests/org.eclipse.etrice.runtime.c.tests/org.eclipse.etrice.runtime.c.tests make.xml.launch
deleted file mode 100644
index 37fbb50c8..000000000
--- a/tests/org.eclipse.etrice.runtime.c.tests/org.eclipse.etrice.runtime.c.tests make.xml.launch
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.ant.AntLaunchConfigurationType">
-<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.etrice.runtime.c.tests/make.xml"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
-<listEntry value="org.eclipse.ui.externaltools.launchGroup"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.etrice.runtime.c.tests"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
-<mapAttribute key="org.eclipse.ui.externaltools.ATTR_ANT_PROPERTIES">
-<mapEntry key="eclipse.home" value="${eclipse_home}"/>
-<mapEntry key="eclipse.pdebuild.home" value="${target_platform_plugin_location:org.eclipse.pde.build}"/>
-<mapEntry key="eclipse.pdebuild.scripts" value="${target_platform_plugin_location:org.eclipse.pde.build}/scripts/"/>
-<mapEntry key="eclipse.pdebuild.templates" value="${target_platform_plugin_location:org.eclipse.pde.build}/templates/"/>
-<mapEntry key="eclipse.running" value="true"/>
-<mapEntry key="com.google.guava" value="${target_platform_plugin_location:com.google.guava}"/>
-<mapEntry key="com.google.inject" value="${target_platform_plugin_location:com.google.inject}"/>
-<mapEntry key="javax.inject" value="${target_platform_plugin_location:javax.inject}"/>
-<mapEntry key="org.antlr.runtime" value="${target_platform_plugin_location:org.antlr.runtime}"/>
-<mapEntry key="org.apache.log4j" value="${target_platform_plugin_location:org.apache.log4j}"/>
-<mapEntry key="org.eclipse.emf.common" value="${target_platform_plugin_location:org.eclipse.emf.common}"/>
-<mapEntry key="org.eclipse.emf.ecore" value="${target_platform_plugin_location:org.eclipse.emf.ecore}"/>
-<mapEntry key="org.eclipse.emf.ecore.xmi" value="${target_platform_plugin_location:org.eclipse.emf.ecore.xmi}"/>
-<mapEntry key="org.eclipse.equinox.common" value="${target_platform_plugin_location:org.eclipse.equinox.common}"/>
-<mapEntry key="org.eclipse.xtend.lib" value="${target_platform_plugin_location:org.eclipse.xtend.lib}"/>
-<mapEntry key="org.eclipse.xtext" value="${target_platform_plugin_location:org.eclipse.xtext}"/>
-<mapEntry key="org.eclipse.xtext.common.types" value="${target_platform_plugin_location:org.eclipse.xtext.common.types}"/>
-<mapEntry key="org.eclipse.xtext.util" value="${target_platform_plugin_location:org.eclipse.xtext.util}"/>
-<mapEntry key="org.eclipse.xtext.xbase.lib" value="${target_platform_plugin_location:org.eclipse.xtext.xbase.lib}"/>
-</mapAttribute>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LAUNCH_CONFIGURATION_BUILD_SCOPE" value="${none}"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/org.eclipse.etrice.runtime.c.tests/make.xml}"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="-v"/>
-<stringAttribute key="process_factory_id" value="org.eclipse.ant.ui.remoteAntProcessFactory"/>
-</launchConfiguration>
diff --git a/tests/org.eclipse.etrice.runtime.c.tests/src/runtime/RunCRuntimeTestcases.c b/tests/org.eclipse.etrice.runtime.c.tests/src/runtime/RunCRuntimeTestcases.c
index 0a932fb44..8aed2e209 100644
--- a/tests/org.eclipse.etrice.runtime.c.tests/src/runtime/RunCRuntimeTestcases.c
+++ b/tests/org.eclipse.etrice.runtime.c.tests/src/runtime/RunCRuntimeTestcases.c
@@ -38,8 +38,8 @@
void RunCRuntimeTestcases(void){
etInt16 id;
- etMSCLogger_open("log/testlog", "test.log");
- etUnit_open("log/testlog","TestCRuntime");
+ etMSCLogger_open("log", "test.log");
+ etUnit_open("log","TestCRuntime");
TestEtQueue_runSuite();
TestEtMemory_runSuite();
@@ -56,7 +56,7 @@ void RunCRuntimeTestcases(void){
/* special situation for testing openAll and closeAll of etUnit
* this has to be done outside of etUnit_open and etUnit_close */
- id = etUnit_openAll("log/testlog","TestEtUnitSpecial", "etUnit", "openAll and closeAll");
+ id = etUnit_openAll("log","TestEtUnitSpecial", "org.eclipse.etrice.runtime.c.tests.etUnit", "openAll_and_closeAll");
EXPECT_TRUE(id, "Open and Close", ET_TRUE);
etUnit_closeAll(id);
diff --git a/tests/org.eclipse.etrice.runtime.c.tests/src/runtime/TestEtDatatypes.c b/tests/org.eclipse.etrice.runtime.c.tests/src/runtime/TestEtDatatypes.c
index 84cbb0ff9..267feb3be 100644
--- a/tests/org.eclipse.etrice.runtime.c.tests/src/runtime/TestEtDatatypes.c
+++ b/tests/org.eclipse.etrice.runtime.c.tests/src/runtime/TestEtDatatypes.c
@@ -85,7 +85,7 @@ void TestEtDatatypes_FLOAT(etInt16 id) {
}
void TestEtDatatypes_runSuite(void) {
- etUnit_openTestSuite("TestDatatypes");
+ etUnit_openTestSuite("org.eclipse.etrice.runtime.c.tests.TestDatatypes");
ADD_TESTCASE(TestEtDatatypes_IntegerSize);
ADD_TESTCASE(TestEtDatatypes_IntegerSign);
ADD_TESTCASE(TestEtDatatypes_Boolean);
diff --git a/tests/org.eclipse.etrice.runtime.c.tests/src/runtime/TestEtMemory.c b/tests/org.eclipse.etrice.runtime.c.tests/src/runtime/TestEtMemory.c
index a46c00f17..f93239901 100644
--- a/tests/org.eclipse.etrice.runtime.c.tests/src/runtime/TestEtMemory.c
+++ b/tests/org.eclipse.etrice.runtime.c.tests/src/runtime/TestEtMemory.c
@@ -185,7 +185,7 @@ static void TestEtMemory_testFreeListOverflow(etInt16 id) {
}
void TestEtMemory_runSuite(void){
- etUnit_openTestSuite("TestMemory");
+ etUnit_openTestSuite("org.eclipse.etrice.runtime.c.tests.TestMemory");
ADD_TESTCASE(TestEtMemory_testFixedSize);
ADD_TESTCASE(TestEtMemory_testFreeList);
ADD_TESTCASE(TestEtMemory_testFreeListOverflow);
diff --git a/tests/org.eclipse.etrice.runtime.c.tests/src/runtime/TestEtMessage.c b/tests/org.eclipse.etrice.runtime.c.tests/src/runtime/TestEtMessage.c
index 84e4022df..2ac07f2f3 100644
--- a/tests/org.eclipse.etrice.runtime.c.tests/src/runtime/TestEtMessage.c
+++ b/tests/org.eclipse.etrice.runtime.c.tests/src/runtime/TestEtMessage.c
@@ -38,7 +38,7 @@ void TestEtMessage_testBasicMessage(etInt16 id){
}
void TestEtMessage_runSuite(void){
- etUnit_openTestSuite("TestMessage");
+ etUnit_openTestSuite("org.eclipse.etrice.runtime.c.tests.TestMessage");
ADD_TESTCASE(TestEtMessage_testBasicMessage);
etUnit_closeTestSuite();
}
diff --git a/tests/org.eclipse.etrice.runtime.c.tests/src/runtime/TestEtMessageQueue.c b/tests/org.eclipse.etrice.runtime.c.tests/src/runtime/TestEtMessageQueue.c
index f7cb75c4e..a2deeb162 100644
--- a/tests/org.eclipse.etrice.runtime.c.tests/src/runtime/TestEtMessageQueue.c
+++ b/tests/org.eclipse.etrice.runtime.c.tests/src/runtime/TestEtMessageQueue.c
@@ -92,7 +92,7 @@ void TestEtMessageQueue_testMassiveMessaging(etInt16 id){
}
void TestEtMessageQueue_runSuite(void){
- etUnit_openTestSuite("TestEtMessageQueue");
+ etUnit_openTestSuite("org.eclipse.etrice.runtime.c.tests.TestEtMessageQueue");
ADD_TESTCASE(TestEtMessageQueue_testPushPop);
ADD_TESTCASE(TestEtMessageQueue_testMassiveMessaging);
etUnit_closeTestSuite();
diff --git a/tests/org.eclipse.etrice.runtime.c.tests/src/runtime/TestEtMessageService.c b/tests/org.eclipse.etrice.runtime.c.tests/src/runtime/TestEtMessageService.c
index 0867bf366..6fdf18a58 100644
--- a/tests/org.eclipse.etrice.runtime.c.tests/src/runtime/TestEtMessageService.c
+++ b/tests/org.eclipse.etrice.runtime.c.tests/src/runtime/TestEtMessageService.c
@@ -293,7 +293,7 @@ void TestEtMessageService_getMessagePoolLowWaterMark(etInt16 id){
void TestEtMessageService_runSuite(void){
- etUnit_openTestSuite("TestEtMessageService");
+ etUnit_openTestSuite("org.eclipse.etrice.runtime.c.tests.TestEtMessageService");
ADD_TESTCASE(TestEtMessageService_init);
ADD_TESTCASE(TestEtMessageService_GetPushPopReturn);
ADD_TESTCASE(TestEtMessageService_GetReturn);
diff --git a/tests/org.eclipse.etrice.runtime.c.tests/src/runtime/TestEtQueue.c b/tests/org.eclipse.etrice.runtime.c.tests/src/runtime/TestEtQueue.c
index c32de2627..dc1ea3ffa 100644
--- a/tests/org.eclipse.etrice.runtime.c.tests/src/runtime/TestEtQueue.c
+++ b/tests/org.eclipse.etrice.runtime.c.tests/src/runtime/TestEtQueue.c
@@ -62,7 +62,7 @@ static void TestEtQueue_test(etInt16 id){
}
void TestEtQueue_runSuite(void){
- etUnit_openTestSuite("TestQueue");
+ etUnit_openTestSuite("org.eclipse.etrice.runtime.c.tests.TestQueue");
ADD_TESTCASE(TestEtQueue_test);
etUnit_closeTestSuite();
}
diff --git a/tests/org.eclipse.etrice.runtime.c.tests/src/runtime/TestEtTimer.c b/tests/org.eclipse.etrice.runtime.c.tests/src/runtime/TestEtTimer.c
index fb574e6b2..f031baaa9 100644
--- a/tests/org.eclipse.etrice.runtime.c.tests/src/runtime/TestEtTimer.c
+++ b/tests/org.eclipse.etrice.runtime.c.tests/src/runtime/TestEtTimer.c
@@ -116,7 +116,7 @@ static void TestEtTimer_multiTimer (etInt16 id) {
}
void TestEtTimer_runSuite(void){
- etUnit_openTestSuite("TestEtTimer");
+ etUnit_openTestSuite("org.eclipse.etrice.runtime.c.tests.TestEtTimer");
ADD_TESTCASE(TestEtTimer_lifecycle);
ADD_TESTCASE(TestEtTimer_multiTimer);
etUnit_closeTestSuite();
diff --git a/tests/org.eclipse.etrice.runtime.c.tests/src/runtime/TestEtUnit.c b/tests/org.eclipse.etrice.runtime.c.tests/src/runtime/TestEtUnit.c
index 4bf2c137e..5a39e30c9 100644
--- a/tests/org.eclipse.etrice.runtime.c.tests/src/runtime/TestEtUnit.c
+++ b/tests/org.eclipse.etrice.runtime.c.tests/src/runtime/TestEtUnit.c
@@ -59,7 +59,7 @@ void TestEtUnit_Expect_Order(etInt16 id){
}
void TestEtUnit_runSuite(void){
- etUnit_openTestSuite("TestEtUnit");
+ etUnit_openTestSuite("org.eclipse.etrice.runtime.c.tests.TestEtUnit");
ADD_TESTCASE(TestEtUnit_Expect_Order);
ADD_TESTCASE(TestEtUnit_Expect);
etUnit_closeTestSuite();
diff --git a/tests/org.eclipse.etrice.runtime.c.tests/src/runtime/helpers/TestEtTimeHelpers.c b/tests/org.eclipse.etrice.runtime.c.tests/src/runtime/helpers/TestEtTimeHelpers.c
index c1693cafa..8cc33d926 100644
--- a/tests/org.eclipse.etrice.runtime.c.tests/src/runtime/helpers/TestEtTimeHelpers.c
+++ b/tests/org.eclipse.etrice.runtime.c.tests/src/runtime/helpers/TestEtTimeHelpers.c
@@ -171,7 +171,7 @@ static void TestEtTimeHelpers_subtract (etInt16 id) {
}
void TestEtTimeHelpers_runSuite(void){
- etUnit_openTestSuite("TestEtTimeHelpers");
+ etUnit_openTestSuite("org.eclipse.etrice.runtime.c.tests.TestEtTimeHelpers");
ADD_TESTCASE(TestEtTimeHelpers_convertToMSec);
ADD_TESTCASE(TestEtTimeHelpers_convertToEtTime);
ADD_TESTCASE(TestEtTimeHelpers_copy);
diff --git a/tests/org.eclipse.etrice.runtime.c.tests/src/runtime/util/TestUtil.c b/tests/org.eclipse.etrice.runtime.c.tests/src/runtime/util/TestUtil.c
index da583e1de..335a792c5 100644
--- a/tests/org.eclipse.etrice.runtime.c.tests/src/runtime/util/TestUtil.c
+++ b/tests/org.eclipse.etrice.runtime.c.tests/src/runtime/util/TestUtil.c
@@ -49,7 +49,7 @@ static void TestRandomGenerator (etInt16 id) {
#endif
void TestUtil_runSuite(void){
- etUnit_openTestSuite("TestUtil");
+ etUnit_openTestSuite("org.eclipse.etrice.runtime.c.tests.TestUtil");
#ifdef ET_FLOAT64
ADD_TESTCASE(TestRandomGenerator);
diff --git a/tests/org.eclipse.etrice.runtime.cpp.tests/Makefile b/tests/org.eclipse.etrice.runtime.cpp.tests/Makefile
deleted file mode 100644
index 6d6a9607b..000000000
--- a/tests/org.eclipse.etrice.runtime.cpp.tests/Makefile
+++ /dev/null
@@ -1,14 +0,0 @@
-include ${CPP_RUNTIME_ROOTDIR}/buildTools/runtime.mk
-
-# ---
-IN_TARGET := $(notdir $(shell pwd)).exe
-IN_BUILD_DIR := ./bin
-IN_INCDIRS += ./src
-IN_SRCDIRS_REC += ./src
-CC = ${CXX}
-IN_CFLAGS += -std=c++98 -O0 -g3 -pedantic -Wall
-#---
-
-
-# Create rules
-include ${RUNTIME_ROOTDIR}/buildTools/Makefile.mk
diff --git a/tests/org.eclipse.etrice.runtime.cpp.tests/buckminster.cspec b/tests/org.eclipse.etrice.runtime.cpp.tests/buckminster.cspec
deleted file mode 100644
index 74fcad21d..000000000
--- a/tests/org.eclipse.etrice.runtime.cpp.tests/buckminster.cspec
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><cs:cspec xmlns:cs="http://www.eclipse.org/buckminster/CSpec-1.0" name="org.eclipse.etrice.runtime.cpp.tests" componentType="buckminster" version="0.5.0.qualifier">
- <cs:actions>
- <cs:public name="run_tests" actor="ant">
- <cs:actorProperties>
- <cs:property key="buildFile" value="make.xml"/>
- <cs:property key="targets" value="all"/>
- </cs:actorProperties>
- </cs:public>
- </cs:actions>
-</cs:cspec>
diff --git a/tests/org.eclipse.etrice.runtime.cpp.tests/build.gradle b/tests/org.eclipse.etrice.runtime.cpp.tests/build.gradle
new file mode 100644
index 000000000..c3bcbb50b
--- /dev/null
+++ b/tests/org.eclipse.etrice.runtime.cpp.tests/build.gradle
@@ -0,0 +1,49 @@
+import static org.apache.tools.ant.taskdefs.condition.Os.*
+
+plugins {
+ id 'cpp'
+}
+
+apply from: "$rootDir/gradle/etUnitConverter.gradle"
+
+model {
+ components {
+ etrice_runtime_cpp_tests(NativeExecutableSpec) {
+ sources.cpp {
+ source {
+ srcDirs = ['src']
+ include '**/*.cpp'
+ }
+ exportedHeaders {
+ srcDirs = ['src']
+ }
+ lib project: ':runtime:org.eclipse.etrice.runtime.cpp', library: 'etrice_runtime_cpp', linkage: 'static'
+ lib project: ':runtime:org.eclipse.etrice.runtime.c', library: 'etrice_runtime_c', linkage: 'static'
+ }
+ binaries {
+ all {
+ cppCompiler.args '-g3'
+ if(isFamily(FAMILY_UNIX)) { linker.args '-lpthread', '-lrt', '-lm' }
+ }
+ }
+ }
+ }
+}
+
+def exeFile = "$buildDir/exe/etrice_runtime_cpp_tests/etrice_runtime_cpp_tests"
+def etuFile = 'log/TestCppRuntime.etu'
+
+clean.delete 'log'
+
+task run(type: Exec, dependsOn: assemble, group: 'verification') {
+ commandLine exeFile
+ inputs.file exeFile
+ outputs.files etuFile
+
+ doFirst { file('log').mkdirs() }
+}
+
+createEtUnitConverterTask('convert', [etuFile])
+convert.dependsOn run
+
+check.dependsOn convert \ No newline at end of file
diff --git a/tests/org.eclipse.etrice.runtime.cpp.tests/make.xml b/tests/org.eclipse.etrice.runtime.cpp.tests/make.xml
deleted file mode 100644
index e8c7725d1..000000000
--- a/tests/org.eclipse.etrice.runtime.cpp.tests/make.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-<?xml version="1.0"?>
-<!--
- Ant makefile for building and running of tests.
- This includes conversion of the etunit
- results into xunit xml.
-
- @author Henrik Rentz-Reichert
--->
-<project name="org.eclipse.etrice.runtime.cpp.tests" basedir="." default="all">
-
- <import file="../org.eclipse.etrice.generator.common.tests/common.xml" as="common"/>
-
- <property name="runtime.path" value="../../runtime/org.eclipse.etrice.runtime.c" />
- <property name="cpp-runtime.path" value="../../runtime/org.eclipse.etrice.runtime.cpp" />
-
- <target name="set_local_rt" unless="runtime.platform">
- <!-- <property name="runtime.platform" value="MT_POSIX_GENERIC_GCC"/> -->
- <property name="runtime.platform" value="MT_WIN_MinGW"/>
- <echo> runtime.platform = ${runtime.platform} </echo>
- </target>
- <target name="setVars" depends="set_local_rt,common.setVars"/>
-
- <!--
- all: compiles, runs, converts and copies the results
- -->
- <target name="all" depends="convert,copy_results">
- <echo>done with ${ant.project.name}</echo>
- </target>
-
- <!--
- build: compiles and link everything
- -->
- <target name="build" depends="setVars,clean">
- <mkdir dir="${output}"/>
- <mkdir dir="${bin.path}"/>
- <exec executable="make" failonerror="true" output="${output}/build.txt">
- <arg line="all"/>
- <arg line="RUNTIME_ROOTDIR=${runtime.path}"/>
- <arg line="TARGET_PLATFORM=${runtime.platform}"/>
- <arg line="CPP_RUNTIME_ROOTDIR=${cpp-runtime.path}"/>
- </exec>
- </target>
-
- <!--
- run: runs all executables
- -->
- <target name="run" depends="build">
- <mkdir dir="${testlog.path}"/>
- <echo>start RuntimeTest</echo>
- <exec resolveexecutable="true" executable="${bin.path}/${ant.project.name}.exe" output="${output}/run.txt" />
- <echo>end RuntimeTest</echo>
- </target>
-
- <!--
- convert: converts etu- into xunit xml-format
- -->
- <target name="convert" depends="run">
- <convertPre testId="TestCppRuntime"/>
- </target>
-
- <!--
- copy_results: copies the *.xml results to their final destination
- -->
- <target name="copy_results" depends="setVars">
- <copyResult testId="TestCppRuntime" targetid="${runtime.platform}_"/>
- </target>
-
-</project>
diff --git a/tests/org.eclipse.etrice.runtime.cpp.tests/org.eclipse.etrice.runtime.cpp.tests make.xml.launch b/tests/org.eclipse.etrice.runtime.cpp.tests/org.eclipse.etrice.runtime.cpp.tests make.xml.launch
deleted file mode 100644
index 8d344f97e..000000000
--- a/tests/org.eclipse.etrice.runtime.cpp.tests/org.eclipse.etrice.runtime.cpp.tests make.xml.launch
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.ant.AntLaunchConfigurationType">
-<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
-<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${project}"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.etrice.runtime.cpp.tests/make.xml"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.etrice.runtime.cpp.tests"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
-<mapAttribute key="org.eclipse.ui.externaltools.ATTR_ANT_PROPERTIES">
-<mapEntry key="eclipse.home" value="${eclipse_home}"/>
-<mapEntry key="eclipse.pdebuild.home" value="${target_platform_plugin_location:org.eclipse.pde.build}"/>
-<mapEntry key="eclipse.pdebuild.scripts" value="${target_platform_plugin_location:org.eclipse.pde.build}/scripts/"/>
-<mapEntry key="eclipse.pdebuild.templates" value="${target_platform_plugin_location:org.eclipse.pde.build}/templates/"/>
-<mapEntry key="eclipse.running" value="true"/>
-<mapEntry key="com.google.guava" value="${target_platform_plugin_location:com.google.guava}"/>
-<mapEntry key="com.google.inject" value="${target_platform_plugin_location:com.google.inject}"/>
-<mapEntry key="javax.inject" value="${target_platform_plugin_location:javax.inject}"/>
-<mapEntry key="org.antlr.runtime" value="${target_platform_plugin_location:org.antlr.runtime}"/>
-<mapEntry key="org.apache.log4j" value="${target_platform_plugin_location:org.apache.log4j}"/>
-<mapEntry key="org.eclipse.emf.common" value="${target_platform_plugin_location:org.eclipse.emf.common}"/>
-<mapEntry key="org.eclipse.emf.ecore" value="${target_platform_plugin_location:org.eclipse.emf.ecore}"/>
-<mapEntry key="org.eclipse.emf.ecore.xmi" value="${target_platform_plugin_location:org.eclipse.emf.ecore.xmi}"/>
-<mapEntry key="org.eclipse.equinox.common" value="${target_platform_plugin_location:org.eclipse.equinox.common}"/>
-<mapEntry key="org.eclipse.xtend.lib" value="${target_platform_plugin_location:org.eclipse.xtend.lib}"/>
-<mapEntry key="org.eclipse.xtext" value="${target_platform_plugin_location:org.eclipse.xtext}"/>
-<mapEntry key="org.eclipse.xtext.common.types" value="${target_platform_plugin_location:org.eclipse.xtext.common.types}"/>
-<mapEntry key="org.eclipse.xtext.util" value="${target_platform_plugin_location:org.eclipse.xtext.util}"/>
-<mapEntry key="org.eclipse.xtext.xbase.lib" value="${target_platform_plugin_location:org.eclipse.xtext.xbase.lib}"/>
-</mapAttribute>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LAUNCH_CONFIGURATION_BUILD_SCOPE" value="${none}"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/org.eclipse.etrice.runtime.cpp.tests/make.xml}"/>
-<stringAttribute key="process_factory_id" value="org.eclipse.ant.ui.remoteAntProcessFactory"/>
-</launchConfiguration>
diff --git a/tests/org.eclipse.etrice.runtime.cpp.tests/src/RunAllTestCases.cpp b/tests/org.eclipse.etrice.runtime.cpp.tests/src/RunAllTestCases.cpp
index 322ca7a2c..86376c989 100644
--- a/tests/org.eclipse.etrice.runtime.cpp.tests/src/RunAllTestCases.cpp
+++ b/tests/org.eclipse.etrice.runtime.cpp.tests/src/RunAllTestCases.cpp
@@ -35,7 +35,7 @@
int main() {
- etUnit_open("log/testlog", "TestCppRuntime");
+ etUnit_open("log", "TestCppRuntime");
// Test containers
StaticArrayTest staticArrayTest;
diff --git a/tests/org.eclipse.etrice.runtime.cpp.tests/src/containers/MapTest.h b/tests/org.eclipse.etrice.runtime.cpp.tests/src/containers/MapTest.h
index fceac394e..895d805fd 100644
--- a/tests/org.eclipse.etrice.runtime.cpp.tests/src/containers/MapTest.h
+++ b/tests/org.eclipse.etrice.runtime.cpp.tests/src/containers/MapTest.h
@@ -20,7 +20,7 @@ class MapTest : public etTestSuite {
public:
MapTest() :
- etTestSuite("MapTest"){
+ etTestSuite("org.eclipse.etrice.runtime.cpp.tests.MapTest"){
}
protected:
diff --git a/tests/org.eclipse.etrice.runtime.cpp.tests/src/containers/PairTest.h b/tests/org.eclipse.etrice.runtime.cpp.tests/src/containers/PairTest.h
index 145d1cc4a..b6b71d114 100644
--- a/tests/org.eclipse.etrice.runtime.cpp.tests/src/containers/PairTest.h
+++ b/tests/org.eclipse.etrice.runtime.cpp.tests/src/containers/PairTest.h
@@ -20,7 +20,7 @@ class PairTest : public etTestSuite {
public:
PairTest() :
- etTestSuite("PairTest"){
+ etTestSuite("org.eclipse.etrice.runtime.cpp.tests.PairTest"){
}
protected:
diff --git a/tests/org.eclipse.etrice.runtime.cpp.tests/src/containers/SetTest.h b/tests/org.eclipse.etrice.runtime.cpp.tests/src/containers/SetTest.h
index b76490d58..59d31826e 100644
--- a/tests/org.eclipse.etrice.runtime.cpp.tests/src/containers/SetTest.h
+++ b/tests/org.eclipse.etrice.runtime.cpp.tests/src/containers/SetTest.h
@@ -20,7 +20,7 @@ class SetTest : public etTestSuite {
public:
SetTest() :
- etTestSuite("SetTest"){
+ etTestSuite("org.eclipse.etrice.runtime.cpp.tests.SetTest"){
}
protected:
diff --git a/tests/org.eclipse.etrice.runtime.cpp.tests/src/containers/StaticArrayTest.h b/tests/org.eclipse.etrice.runtime.cpp.tests/src/containers/StaticArrayTest.h
index af59bb9e6..9b29cdc1a 100644
--- a/tests/org.eclipse.etrice.runtime.cpp.tests/src/containers/StaticArrayTest.h
+++ b/tests/org.eclipse.etrice.runtime.cpp.tests/src/containers/StaticArrayTest.h
@@ -20,7 +20,7 @@ class StaticArrayTest : public etTestSuite {
public:
StaticArrayTest() :
- etTestSuite("StaticArrayTest"){
+ etTestSuite("org.eclipse.etrice.runtime.cpp.tests.StaticArrayTest"){
}
protected:
diff --git a/tests/org.eclipse.etrice.runtime.cpp.tests/src/containers/StaticDequeTest.h b/tests/org.eclipse.etrice.runtime.cpp.tests/src/containers/StaticDequeTest.h
index b09d7bba0..41ceeea85 100644
--- a/tests/org.eclipse.etrice.runtime.cpp.tests/src/containers/StaticDequeTest.h
+++ b/tests/org.eclipse.etrice.runtime.cpp.tests/src/containers/StaticDequeTest.h
@@ -17,7 +17,7 @@
class StaticDequeTest : public etTestSuite {
public:
- StaticDequeTest(void) : etTestSuite("StaticDequeTest") {}
+ StaticDequeTest(void) : etTestSuite("org.eclipse.etrice.runtime.cpp.tests.StaticDequeTest") {}
protected:
void runAllTestCases(void);
diff --git a/tests/org.eclipse.etrice.runtime.cpp.tests/src/containers/StaticStringTest.h b/tests/org.eclipse.etrice.runtime.cpp.tests/src/containers/StaticStringTest.h
index fcbc86beb..096c27da7 100644
--- a/tests/org.eclipse.etrice.runtime.cpp.tests/src/containers/StaticStringTest.h
+++ b/tests/org.eclipse.etrice.runtime.cpp.tests/src/containers/StaticStringTest.h
@@ -20,7 +20,7 @@ class StaticStringTest : public etTestSuite {
public:
StaticStringTest() :
- etTestSuite("StaticStringTest"){
+ etTestSuite("org.eclipse.etrice.runtime.cpp.tests.StaticStringTest"){
}
protected:
diff --git a/tests/org.eclipse.etrice.runtime.cpp.tests/src/containers/StringTest.h b/tests/org.eclipse.etrice.runtime.cpp.tests/src/containers/StringTest.h
index 7a7cb4871..1210fd26d 100644
--- a/tests/org.eclipse.etrice.runtime.cpp.tests/src/containers/StringTest.h
+++ b/tests/org.eclipse.etrice.runtime.cpp.tests/src/containers/StringTest.h
@@ -20,7 +20,7 @@ class StringTest : public etTestSuite {
public:
StringTest() :
- etTestSuite("StringTest"){
+ etTestSuite("org.eclipse.etrice.runtime.cpp.tests.StringTest"){
}
protected:
diff --git a/tests/org.eclipse.etrice.runtime.cpp.tests/src/containers/VectorTest.h b/tests/org.eclipse.etrice.runtime.cpp.tests/src/containers/VectorTest.h
index d997a9cc3..5bc8f60aa 100644
--- a/tests/org.eclipse.etrice.runtime.cpp.tests/src/containers/VectorTest.h
+++ b/tests/org.eclipse.etrice.runtime.cpp.tests/src/containers/VectorTest.h
@@ -20,7 +20,7 @@ class VectorTest : public etTestSuite {
public:
VectorTest() :
- etTestSuite("VectorTest"){
+ etTestSuite("org.eclipse.etrice.runtime.cpp.tests.VectorTest"){
}
protected:
diff --git a/tests/org.eclipse.etrice.runtime.cpp.tests/src/debugging/DebuggingServiceTest.cpp b/tests/org.eclipse.etrice.runtime.cpp.tests/src/debugging/DebuggingServiceTest.cpp
index b04d03034..8f5d71694 100644
--- a/tests/org.eclipse.etrice.runtime.cpp.tests/src/debugging/DebuggingServiceTest.cpp
+++ b/tests/org.eclipse.etrice.runtime.cpp.tests/src/debugging/DebuggingServiceTest.cpp
@@ -13,6 +13,7 @@
#include "debugging/DebuggingServiceTest.h"
#include "common/debugging/DebuggingService.h"
#include "common/messaging/MessageService.h"
+#include "common/messaging/MessageServiceController.h"
#include "common/messaging/RTServices.h"
#include "common/messaging/StaticMessageMemory.h"
#include "etUnit/etUnit.h"
@@ -22,17 +23,18 @@ using namespace etRuntime;
void DebuggingServiceTest::testLogging() {
+ MessageServiceController& msgSvcCtrl = RTServices::getInstance().getMsgSvcCtrl();
MessageService msgSvc(NULL, IMessageService::BLOCKED, 0, 0,
"TestMessageService", new StaticMessageMemory(NULL, "TestMemory", 64, 100));
- RTServices::getInstance().getMsgSvcCtrl().addMsgSvc(msgSvc);
- RTServices::getInstance().getMsgSvcCtrl().start();
+ msgSvcCtrl.addMsgSvc(msgSvc);
+ msgSvcCtrl.start();
SubSystemClass subSystem(NULL, "TestSubSystem");
ActorClass actor1(&subSystem, "TestActor1");
ActorClass actor2(&subSystem, "TestActor2");
Port port1(&actor1, "TestPort1");
Port port2(&actor2, "TestPort2");
DebuggingService& dbgSvc = DebuggingService::getInstance();
- dbgSvc.getAsyncLogger().setMSC("DebuggingServiceTest", "log/testlog/");
+ dbgSvc.getAsyncLogger().setMSC("DebuggingServiceTest", "log/");
dbgSvc.getAsyncLogger().open();
InterfaceItemBase::connect(&subSystem, port1.getInstancePath(),
@@ -59,7 +61,8 @@ void DebuggingServiceTest::testLogging() {
dbgSvc.removePortInstance(port2);
dbgSvc.getAsyncLogger().close();
- RTServices::getInstance().getMsgSvcCtrl().stop();
+ msgSvcCtrl.stop();
+ msgSvcCtrl.removeMsgSvc(msgSvc);
const char* failMsg = "DebuggingServiceTest failed";
Vector<String>& result = dbgSvc.getAsyncLogger().getCommandList();
diff --git a/tests/org.eclipse.etrice.runtime.cpp.tests/src/debugging/DebuggingServiceTest.h b/tests/org.eclipse.etrice.runtime.cpp.tests/src/debugging/DebuggingServiceTest.h
index 212d38e8f..f00650d82 100644
--- a/tests/org.eclipse.etrice.runtime.cpp.tests/src/debugging/DebuggingServiceTest.h
+++ b/tests/org.eclipse.etrice.runtime.cpp.tests/src/debugging/DebuggingServiceTest.h
@@ -23,7 +23,7 @@ using namespace etRuntime;
class DebuggingServiceTest: public etTestSuite {
public:
DebuggingServiceTest() :
- etTestSuite("DebuggingServiceTest") {
+ etTestSuite("org.eclipse.etrice.runtime.cpp.tests.DebuggingServiceTest") {
}
protected:
diff --git a/tests/org.eclipse.etrice.runtime.cpp.tests/src/debugging/MSCFilterTest.h b/tests/org.eclipse.etrice.runtime.cpp.tests/src/debugging/MSCFilterTest.h
index f1de8d669..8b5879d16 100644
--- a/tests/org.eclipse.etrice.runtime.cpp.tests/src/debugging/MSCFilterTest.h
+++ b/tests/org.eclipse.etrice.runtime.cpp.tests/src/debugging/MSCFilterTest.h
@@ -18,7 +18,7 @@
class MSCFilterTest: public etTestSuite {
public:
MSCFilterTest() :
- etTestSuite("MSCFilterTest") {
+ etTestSuite("org.eclipse.etrice.runtime.cpp.tests.MSCFilterTest") {
}
protected:
diff --git a/tests/org.eclipse.etrice.runtime.cpp.tests/src/debugging/MSCFunctionObjectTest.cpp b/tests/org.eclipse.etrice.runtime.cpp.tests/src/debugging/MSCFunctionObjectTest.cpp
index b7c8567f0..4096678fc 100644
--- a/tests/org.eclipse.etrice.runtime.cpp.tests/src/debugging/MSCFunctionObjectTest.cpp
+++ b/tests/org.eclipse.etrice.runtime.cpp.tests/src/debugging/MSCFunctionObjectTest.cpp
@@ -19,7 +19,7 @@ using namespace etRuntime;
void MSCFunctionObjectTest::test() {
DebuggingService::getInstance().getSyncLogger().setMSC(
- "MSCFunctionObjectTest", "log/testlog/");
+ "MSCFunctionObjectTest", "log/");
DebuggingService::getInstance().getSyncLogger().open();
DebuggingService::getInstance().getSyncLogger().setObjectName("main");
MSCFunctionObject* obj = new MSCFunctionObject("MSCFunctionObjectTest",
diff --git a/tests/org.eclipse.etrice.runtime.cpp.tests/src/debugging/MSCFunctionObjectTest.h b/tests/org.eclipse.etrice.runtime.cpp.tests/src/debugging/MSCFunctionObjectTest.h
index 3415f4c8b..86a8ac5d0 100644
--- a/tests/org.eclipse.etrice.runtime.cpp.tests/src/debugging/MSCFunctionObjectTest.h
+++ b/tests/org.eclipse.etrice.runtime.cpp.tests/src/debugging/MSCFunctionObjectTest.h
@@ -18,7 +18,7 @@
class MSCFunctionObjectTest: public etTestSuite {
public:
MSCFunctionObjectTest() :
- etTestSuite("MSFunctionObjectTest") {
+ etTestSuite("org.eclipse.etrice.runtime.cpp.tests.MSFunctionObjectTest") {
}
protected:
diff --git a/tests/org.eclipse.etrice.runtime.cpp.tests/src/debugging/MSCLoggerTest.cpp b/tests/org.eclipse.etrice.runtime.cpp.tests/src/debugging/MSCLoggerTest.cpp
index 01be8e936..6b2a68037 100644
--- a/tests/org.eclipse.etrice.runtime.cpp.tests/src/debugging/MSCLoggerTest.cpp
+++ b/tests/org.eclipse.etrice.runtime.cpp.tests/src/debugging/MSCLoggerTest.cpp
@@ -19,7 +19,7 @@ using namespace etRuntime;
void MSCLoggerTest::testLogger() {
MSCLogger logger;
- logger.setMSC("MSCTest", "log/testlog/");
+ logger.setMSC("MSCTest", "log/");
logger.open();
logger.addMessageAsyncOut("Source", "Target", "MessageAsync");
logger.addMessageAsyncIn("Source", "Target", "MessageAsync");
diff --git a/tests/org.eclipse.etrice.runtime.cpp.tests/src/debugging/MSCLoggerTest.h b/tests/org.eclipse.etrice.runtime.cpp.tests/src/debugging/MSCLoggerTest.h
index 0a2491a01..b19e5bf77 100644
--- a/tests/org.eclipse.etrice.runtime.cpp.tests/src/debugging/MSCLoggerTest.h
+++ b/tests/org.eclipse.etrice.runtime.cpp.tests/src/debugging/MSCLoggerTest.h
@@ -18,7 +18,7 @@
class MSCLoggerTest: public etTestSuite {
public:
MSCLoggerTest(void) :
- etTestSuite("MSCLoggerTest") {
+ etTestSuite("org.eclipse.etrice.runtime.cpp.tests.MSCLoggerTest") {
}
protected:
diff --git a/tests/org.eclipse.etrice.runtime.cpp.tests/src/messaging/AddressTest.h b/tests/org.eclipse.etrice.runtime.cpp.tests/src/messaging/AddressTest.h
index 6266c84d4..557b98918 100644
--- a/tests/org.eclipse.etrice.runtime.cpp.tests/src/messaging/AddressTest.h
+++ b/tests/org.eclipse.etrice.runtime.cpp.tests/src/messaging/AddressTest.h
@@ -20,7 +20,7 @@ class AddressTest: public etTestSuite {
public:
AddressTest(void) :
- etTestSuite("AddressTest") {
+ etTestSuite("org.eclipse.etrice.runtime.cpp.tests.AddressTest") {
}
protected:
diff --git a/tests/org.eclipse.etrice.runtime.cpp.tests/src/messaging/MessageDispatcherTest.cpp b/tests/org.eclipse.etrice.runtime.cpp.tests/src/messaging/MessageDispatcherTest.cpp
index 0c04fd125..c59d7639e 100644
--- a/tests/org.eclipse.etrice.runtime.cpp.tests/src/messaging/MessageDispatcherTest.cpp
+++ b/tests/org.eclipse.etrice.runtime.cpp.tests/src/messaging/MessageDispatcherTest.cpp
@@ -15,6 +15,8 @@
#include "common/messaging/MessageDispatcher.h"
#include "common/messaging/MessageService.h"
#include "common/messaging/StaticMessageMemory.h"
+#include "common/messaging/MessageServiceController.h"
+#include "common/messaging/RTServices.h"
using namespace etRuntime;
@@ -70,8 +72,11 @@ void MessageDispatcherTest::testDispatching() {
const char *failMsg = "MessageDispatcher dispatching test failed";
// Test dispatching Messages
+ MessageServiceController& msgSvcCtrl = RTServices::getInstance().getMsgSvcCtrl();
MessageService msgSvc(NULL, IMessageService::BLOCKED, 1, 2,
"Test MessageService", new StaticMessageMemory(NULL, "TestMemory", 64, 100));
+ msgSvcCtrl.addMsgSvc(msgSvc);
+ msgSvcCtrl.start();
MessageDispatcher msgDisp(&msgSvc, Address(1, 2, 0), "TestMessageDispatcher");
Address addr1 = msgDisp.getFreeAddress();
Address addr2 = msgDisp.getFreeAddress();
@@ -133,6 +138,8 @@ void MessageDispatcherTest::testDispatching() {
msgDisp.removePollingMessageReceiver(recv1);
msgDisp.removePollingMessageReceiver(recv2);
msgDisp.removePollingMessageReceiver(recv3);
+ msgSvcCtrl.stop();
+ msgSvcCtrl.removeMsgSvc(msgSvc);
}
void MessageDispatcherTest::runAllTestCases() {
diff --git a/tests/org.eclipse.etrice.runtime.cpp.tests/src/messaging/MessageDispatcherTest.h b/tests/org.eclipse.etrice.runtime.cpp.tests/src/messaging/MessageDispatcherTest.h
index beab56e2a..0972986f8 100644
--- a/tests/org.eclipse.etrice.runtime.cpp.tests/src/messaging/MessageDispatcherTest.h
+++ b/tests/org.eclipse.etrice.runtime.cpp.tests/src/messaging/MessageDispatcherTest.h
@@ -20,7 +20,7 @@
class MessageDispatcherTest: public etTestSuite {
public:
MessageDispatcherTest(void) :
- etTestSuite("MessageDispatcherTest") {
+ etTestSuite("org.eclipse.etrice.runtime.cpp.tests.MessageDispatcherTest") {
}
protected:
diff --git a/tests/org.eclipse.etrice.runtime.cpp.tests/src/messaging/MessageSeQueueTest.h b/tests/org.eclipse.etrice.runtime.cpp.tests/src/messaging/MessageSeQueueTest.h
index d5053d12a..37634f32d 100644
--- a/tests/org.eclipse.etrice.runtime.cpp.tests/src/messaging/MessageSeQueueTest.h
+++ b/tests/org.eclipse.etrice.runtime.cpp.tests/src/messaging/MessageSeQueueTest.h
@@ -18,7 +18,7 @@
class MessageSeQueueTest: public etTestSuite {
public:
MessageSeQueueTest(void) :
- etTestSuite("MessageSeQueueTest") {
+ etTestSuite("org.eclipse.etrice.runtime.cpp.tests.MessageSeQueueTest") {
}
protected:
diff --git a/tests/org.eclipse.etrice.runtime.cpp.tests/src/messaging/MessageServiceControllerTest.cpp b/tests/org.eclipse.etrice.runtime.cpp.tests/src/messaging/MessageServiceControllerTest.cpp
index 439d9c079..c0950fbe0 100644
--- a/tests/org.eclipse.etrice.runtime.cpp.tests/src/messaging/MessageServiceControllerTest.cpp
+++ b/tests/org.eclipse.etrice.runtime.cpp.tests/src/messaging/MessageServiceControllerTest.cpp
@@ -20,7 +20,7 @@
using namespace etRuntime;
MessageServiceControllerTest::MessageServiceControllerTest() :
- etTestSuite("MessageServiceControllerTest") {
+ etTestSuite("org.eclipse.etrice.runtime.cpp.tests.MessageServiceControllerTest") {
etTime interval;
interval.sec = 5;
diff --git a/tests/org.eclipse.etrice.runtime.cpp.tests/src/messaging/MessageServiceTest.cpp b/tests/org.eclipse.etrice.runtime.cpp.tests/src/messaging/MessageServiceTest.cpp
index 728b8efff..e90143afd 100644
--- a/tests/org.eclipse.etrice.runtime.cpp.tests/src/messaging/MessageServiceTest.cpp
+++ b/tests/org.eclipse.etrice.runtime.cpp.tests/src/messaging/MessageServiceTest.cpp
@@ -19,7 +19,7 @@
using namespace etRuntime;
MessageServiceTest::MessageServiceTest() :
- etTestSuite("MessageServiceTest"), m_senderTerminated(0) {
+ etTestSuite("org.eclipse.etrice.runtime.cpp.tests.MessageServiceTest"), m_senderTerminated(0) {
RTServices::getInstance().getMsgSvcCtrl().resetAll();
diff --git a/tests/org.eclipse.etrice.runtime.cpp.tests/src/messaging/MessageTest.h b/tests/org.eclipse.etrice.runtime.cpp.tests/src/messaging/MessageTest.h
index 213e8ae3a..7d20118b4 100644
--- a/tests/org.eclipse.etrice.runtime.cpp.tests/src/messaging/MessageTest.h
+++ b/tests/org.eclipse.etrice.runtime.cpp.tests/src/messaging/MessageTest.h
@@ -18,7 +18,7 @@
class MessageTest: public etTestSuite {
public:
MessageTest(void) :
- etTestSuite("MessageTest") {
+ etTestSuite("org.eclipse.etrice.runtime.cpp.tests.MessageTest") {
}
protected:
diff --git a/tests/org.eclipse.etrice.runtime.cpp.tests/src/messaging/RTObjectTest.h b/tests/org.eclipse.etrice.runtime.cpp.tests/src/messaging/RTObjectTest.h
index 3bd46eaf1..7922c8c14 100644
--- a/tests/org.eclipse.etrice.runtime.cpp.tests/src/messaging/RTObjectTest.h
+++ b/tests/org.eclipse.etrice.runtime.cpp.tests/src/messaging/RTObjectTest.h
@@ -18,7 +18,7 @@
class RTObjectTest: public etTestSuite {
public:
RTObjectTest(void) :
- etTestSuite("RTObject Test") {
+ etTestSuite("org.eclipse.etrice.runtime.cpp.tests.RTObject Test") {
}
protected:
diff --git a/tests/org.eclipse.etrice.runtime.cpp.tests/src/messaging/StaticMessageMemoryTest.h b/tests/org.eclipse.etrice.runtime.cpp.tests/src/messaging/StaticMessageMemoryTest.h
index 44b74d060..3cf26bd52 100644
--- a/tests/org.eclipse.etrice.runtime.cpp.tests/src/messaging/StaticMessageMemoryTest.h
+++ b/tests/org.eclipse.etrice.runtime.cpp.tests/src/messaging/StaticMessageMemoryTest.h
@@ -18,7 +18,7 @@
class StaticMessageMemoryTest: public etTestSuite {
public:
StaticMessageMemoryTest(void) :
- etTestSuite("StaticMessageMemoryTest") {
+ etTestSuite("org.eclipse.etrice.runtime.cpp.tests.StaticMessageMemoryTest") {
}
protected:
diff --git a/tests/org.eclipse.etrice.runtime.java.tests/buckminster.cspec b/tests/org.eclipse.etrice.runtime.java.tests/buckminster.cspec
deleted file mode 100644
index c02254993..000000000
--- a/tests/org.eclipse.etrice.runtime.java.tests/buckminster.cspec
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<cs:cspec xmlns:cs="http://www.eclipse.org/buckminster/CSpec-1.0" name="org.eclipse.etrice.runtime.java.tests" componentType="buckminster" version="0.5.0.qualifier">
- <cs:dependencies>
- <cs:dependency name="org.eclipse.etrice.runtime.java" componentType="buckminster"/>
- </cs:dependencies>
-</cs:cspec>
diff --git a/tests/org.eclipse.etrice.runtime.java.tests/build.gradle b/tests/org.eclipse.etrice.runtime.java.tests/build.gradle
new file mode 100644
index 000000000..ad80588e9
--- /dev/null
+++ b/tests/org.eclipse.etrice.runtime.java.tests/build.gradle
@@ -0,0 +1,15 @@
+plugins {
+ id 'java'
+}
+
+dependencies {
+ testCompile project(':runtime:org.eclipse.etrice.runtime.java')
+ testCompile 'junit:junit:4.12'
+}
+
+sourceSets.test.java.srcDirs = ['src']
+
+test.reports.html.enabled = false
+test.reports.junitXml.destination = file('log')
+
+clean.delete 'log' \ No newline at end of file
diff --git a/tests/org.eclipse.etrice.runtime.java.tests/src/org/eclipse/etrice/runtime/java/debugging/MSCLoggerTest.java b/tests/org.eclipse.etrice.runtime.java.tests/src/org/eclipse/etrice/runtime/java/debugging/MSCLoggerTest.java
index 055a31f46..704bfe90b 100644
--- a/tests/org.eclipse.etrice.runtime.java.tests/src/org/eclipse/etrice/runtime/java/debugging/MSCLoggerTest.java
+++ b/tests/org.eclipse.etrice.runtime.java.tests/src/org/eclipse/etrice/runtime/java/debugging/MSCLoggerTest.java
@@ -16,7 +16,7 @@ public class MSCLoggerTest extends TestCase {
public void testMSCLogger() {
MSCLogger logger = new MSCLogger();
- logger.setMSC("MSC1", ".\\");
+ logger.setMSC("MSC1", "./");
logger.open();
logger.addMessageAsyncOut("Inst1", "Inst2", "msg1");
logger.addMessageAsyncIn("Inst1", "Inst2", "msg1");
diff --git a/tests/org.eclipse.etrice.runtime.java.tests/src/org/eclipse/etrice/runtime/java/etunit/EtUnitTest.java b/tests/org.eclipse.etrice.runtime.java.tests/src/org/eclipse/etrice/runtime/java/etunit/EtUnitTest.java
index 99c7f60d8..1916f84ab 100644
--- a/tests/org.eclipse.etrice.runtime.java.tests/src/org/eclipse/etrice/runtime/java/etunit/EtUnitTest.java
+++ b/tests/org.eclipse.etrice.runtime.java.tests/src/org/eclipse/etrice/runtime/java/etunit/EtUnitTest.java
@@ -80,7 +80,7 @@ public class EtUnitTest extends TestCase {
}
public void testSuite() throws IOException {
- etUnit_open(null, "test");
+ etUnit_open("log", "test");
etUnit_openTestSuite("TestEtUnit");
int id = etUnit_openTestCase("doTestExpect");
@@ -96,7 +96,7 @@ public class EtUnitTest extends TestCase {
ArrayList<String> lines = new ArrayList<String>();
{
- FileReader fr = new FileReader("test.etu");
+ FileReader fr = new FileReader("log/test.etu");
BufferedReader br = new BufferedReader(fr);
String line;
while ((line=br.readLine())!=null)
diff --git a/tests/org.eclipse.etrice.ui.tests.base/.classpath b/tests/org.eclipse.etrice.ui.base.tests/.classpath
index 1fa3e6803..1fa3e6803 100644
--- a/tests/org.eclipse.etrice.ui.tests.base/.classpath
+++ b/tests/org.eclipse.etrice.ui.base.tests/.classpath
diff --git a/tests/org.eclipse.etrice.ui.tests.base/.gitignore b/tests/org.eclipse.etrice.ui.base.tests/.gitignore
index ba077a403..ba077a403 100644
--- a/tests/org.eclipse.etrice.ui.tests.base/.gitignore
+++ b/tests/org.eclipse.etrice.ui.base.tests/.gitignore
diff --git a/tests/org.eclipse.etrice.ui.tests.base/.project b/tests/org.eclipse.etrice.ui.base.tests/.project
index a9cfde5ad..0d2614b47 100644
--- a/tests/org.eclipse.etrice.ui.tests.base/.project
+++ b/tests/org.eclipse.etrice.ui.base.tests/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.eclipse.etrice.ui.tests.base</name>
+ <name>org.eclipse.etrice.ui.base.tests</name>
<comment></comment>
<projects>
</projects>
diff --git a/tests/org.eclipse.etrice.ui.tests.base/META-INF/MANIFEST.MF b/tests/org.eclipse.etrice.ui.base.tests/META-INF/MANIFEST.MF
index 20e03aaaa..edc780d96 100644
--- a/tests/org.eclipse.etrice.ui.tests.base/META-INF/MANIFEST.MF
+++ b/tests/org.eclipse.etrice.ui.base.tests/META-INF/MANIFEST.MF
@@ -1,7 +1,7 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: eTrice Diagram Test Base Classes
-Bundle-SymbolicName: org.eclipse.etrice.ui.tests.base
+Bundle-SymbolicName: org.eclipse.etrice.ui.base.tests
Bundle-Version: 1.1.1.qualifier
Require-Bundle: org.junit;bundle-version="4.8.1",
org.eclipse.core.runtime,
diff --git a/tests/org.eclipse.etrice.ui.tests.base/about.html b/tests/org.eclipse.etrice.ui.base.tests/about.html
index c258ef55d..c258ef55d 100644
--- a/tests/org.eclipse.etrice.ui.tests.base/about.html
+++ b/tests/org.eclipse.etrice.ui.base.tests/about.html
diff --git a/tests/org.eclipse.etrice.ui.tests.base/build.properties b/tests/org.eclipse.etrice.ui.base.tests/build.properties
index 34d2e4d2d..34d2e4d2d 100644
--- a/tests/org.eclipse.etrice.ui.tests.base/build.properties
+++ b/tests/org.eclipse.etrice.ui.base.tests/build.properties
diff --git a/tests/org.eclipse.etrice.ui.tests.base/src/org/eclipse/etrice/tests/base/TestBase.java b/tests/org.eclipse.etrice.ui.base.tests/src/org/eclipse/etrice/tests/base/TestBase.java
index 73a95af74..73a95af74 100644
--- a/tests/org.eclipse.etrice.ui.tests.base/src/org/eclipse/etrice/tests/base/TestBase.java
+++ b/tests/org.eclipse.etrice.ui.base.tests/src/org/eclipse/etrice/tests/base/TestBase.java
diff --git a/tests/org.eclipse.etrice.ui.behavior.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.etrice.ui.behavior.tests/META-INF/MANIFEST.MF
index a94874042..c8f7920c5 100644
--- a/tests/org.eclipse.etrice.ui.behavior.tests/META-INF/MANIFEST.MF
+++ b/tests/org.eclipse.etrice.ui.behavior.tests/META-INF/MANIFEST.MF
@@ -11,12 +11,13 @@ Require-Bundle: org.eclipse.etrice.core.fsm;bundle-version="1.1.1",
org.eclipse.etrice.ui.behavior.fsm;bundle-version="1.1.1",
org.eclipse.etrice.ui.common;bundle-version="1.1.1",
org.eclipse.etrice.ui.common.base;bundle-version="1.1.1",
- org.eclipse.etrice.ui.tests.base;bundle-version="1.1.1",
+ org.eclipse.etrice.ui.base.tests;bundle-version="1.1.1",
org.eclipse.etrice.generator.launch;bundle-version="1.1.1",
org.eclipse.ui,
org.eclipse.core.runtime,
org.junit;bundle-version="4.8.1",
org.eclipse.xtext;bundle-version="2.6.0",
org.eclipse.graphiti;bundle-version="0.8.0"
+Import-Package: org.eclipse.xtext.xbase.lib
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ActivationPolicy: lazy
diff --git a/tests/org.eclipse.etrice.ui.behavior.tests/build.properties b/tests/org.eclipse.etrice.ui.behavior.tests/build.properties
index 34d2e4d2d..5d898b5c0 100644
--- a/tests/org.eclipse.etrice.ui.behavior.tests/build.properties
+++ b/tests/org.eclipse.etrice.ui.behavior.tests/build.properties
@@ -1,4 +1,5 @@
-source.. = src/
+source.. = src/,\
+ xtend-gen
output.. = bin/
bin.includes = META-INF/,\
.
diff --git a/tests/org.eclipse.etrice.ui.behavior.tests/xtend-gen/org/eclipse/etrice/ui/launch/TestGeneratorLaunchHelper.java b/tests/org.eclipse.etrice.ui.behavior.tests/xtend-gen/org/eclipse/etrice/ui/launch/TestGeneratorLaunchHelper.java
deleted file mode 100644
index ed57f8aae..000000000
--- a/tests/org.eclipse.etrice.ui.behavior.tests/xtend-gen/org/eclipse/etrice/ui/launch/TestGeneratorLaunchHelper.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/**
- * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Juergen Haug (initial contribution)
- */
-package org.eclipse.etrice.ui.launch;
-
-import java.nio.file.Path;
-import java.nio.file.Paths;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-import org.eclipse.etrice.generator.launch.GeneratorLaunchHelper;
-import org.eclipse.xtext.xbase.lib.CollectionLiterals;
-import org.eclipse.xtext.xbase.lib.Functions.Function1;
-import org.eclipse.xtext.xbase.lib.IterableExtensions;
-import org.eclipse.xtext.xbase.lib.ListExtensions;
-import org.eclipse.xtext.xbase.lib.ObjectExtensions;
-import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;
-import org.junit.Assert;
-import org.junit.Test;
-
-@SuppressWarnings("all")
-public class TestGeneratorLaunchHelper {
- private List<String> get(final Iterable<String> list) {
- Collection<String> _allDependenciesWithinProjects = GeneratorLaunchHelper.getAllDependenciesWithinProjects(list);
- return IterableExtensions.<String>toList(_allDependenciesWithinProjects);
- }
-
- @Test
- public void notExisting() {
- final Procedure1<List<String>> _function = new Procedure1<List<String>>() {
- @Override
- public void apply(final List<String> models) {
- List<String> _get = TestGeneratorLaunchHelper.this.get(models);
- Assert.assertEquals(models, _get);
- }
- };
- ObjectExtensions.<List<String>>operator_doubleArrow(
- Collections.<String>unmodifiableList(CollectionLiterals.<String>newArrayList()), _function);
- final Procedure1<List<String>> _function_1 = new Procedure1<List<String>>() {
- @Override
- public void apply(final List<String> models) {
- List<String> _get = TestGeneratorLaunchHelper.this.get(models);
- Assert.assertEquals(models, _get);
- }
- };
- ObjectExtensions.<List<String>>operator_doubleArrow(
- Collections.<String>unmodifiableList(CollectionLiterals.<String>newArrayList("1", ".0ß+/§`}]\"°")), _function_1);
- final Procedure1<List<String>> _function_2 = new Procedure1<List<String>>() {
- @Override
- public void apply(final List<String> models) {
- List<String> _get = TestGeneratorLaunchHelper.this.get(models);
- Assert.assertEquals(models, _get);
- }
- };
- ObjectExtensions.<List<String>>operator_doubleArrow(
- Collections.<String>unmodifiableList(CollectionLiterals.<String>newArrayList("1.room", "2.etphys", "3.etmap", "4.etconfig", "5.unknown")), _function_2);
- }
-
- @Test
- public void project() {
- final Function1<String, String> _function = new Function1<String, String>() {
- @Override
- public String apply(final String file) {
- Path _get = Paths.get("models/generatorLaunchHelper", file);
- Path _absolutePath = _get.toAbsolutePath();
- return _absolutePath.toString();
- }
- };
- final Function1<? super String, ? extends String> toAbsolutePath = _function;
- final Function1<String, String> _function_1 = new Function1<String, String>() {
- @Override
- public String apply(final String it) {
- return toAbsolutePath.apply(it);
- }
- };
- List<String> _map = ListExtensions.<String, String>map(Collections.<String>unmodifiableList(CollectionLiterals.<String>newArrayList("project1/System.etmap", "project1/NotMapped.room", "project1/Physical.etphys", "project1/Dep.room")), _function_1);
- final Function1<String, String> _function_2 = new Function1<String, String>() {
- @Override
- public String apply(final String it) {
- return toAbsolutePath.apply(it);
- }
- };
- List<String> _map_1 = ListExtensions.<String, String>map(Collections.<String>unmodifiableList(CollectionLiterals.<String>newArrayList("project1/System.etmap", "project1/NotMapped.room")), _function_2);
- List<String> _get = this.get(_map_1);
- Assert.assertEquals(_map, _get);
- }
-}
diff --git a/tests/org.eclipse.etrice.ui.structure.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.etrice.ui.structure.tests/META-INF/MANIFEST.MF
index 64de37617..6ab01c2a4 100644
--- a/tests/org.eclipse.etrice.ui.structure.tests/META-INF/MANIFEST.MF
+++ b/tests/org.eclipse.etrice.ui.structure.tests/META-INF/MANIFEST.MF
@@ -8,7 +8,7 @@ Require-Bundle: org.eclipse.etrice.core.fsm;bundle-version="1.1.1",
org.eclipse.etrice.ui.structure;bundle-version="1.1.1",
org.eclipse.etrice.ui.common;bundle-version="1.1.1",
org.eclipse.etrice.ui.common.base;bundle-version="1.1.1",
- org.eclipse.etrice.ui.tests.base;bundle-version="1.1.1",
+ org.eclipse.etrice.ui.base.tests;bundle-version="1.1.1",
org.eclipse.ui,
org.eclipse.core.runtime,
org.junit;bundle-version="4.8.1",
diff --git a/tests/pom.xml b/tests/pom.xml
new file mode 100644
index 000000000..4376835cb
--- /dev/null
+++ b/tests/pom.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.etrice</groupId>
+ <artifactId>org.eclipse.etrice.parent</artifactId>
+ <version>1.1.1-SNAPSHOT</version>
+ <relativePath>../releng/org.eclipse.etrice.parent</relativePath>
+ </parent>
+ <groupId>org.eclipse.etrice</groupId>
+ <artifactId>org.eclipse.etrice.tests</artifactId>
+ <packaging>pom</packaging>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-surefire-plugin</artifactId>
+ <version>${tycho.version}</version>
+ <configuration>
+ <failIfNoTests>false</failIfNoTests>
+ <reportsDirectory>log</reportsDirectory>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project> \ No newline at end of file

Back to the top