Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorHenrik Rentz-Reichert2012-02-27 16:03:29 +0000
committerHenrik Rentz-Reichert2012-02-27 16:03:29 +0000
commit9b63ec1b9654dd00d644ceb94f664df3e61d6c4e (patch)
tree3607453cd83d3e2963fd2a415a84289931d29e22 /tests
parent1b19f7079ee48921ad2fb0169eb73d537f9eab1e (diff)
parentfa4a03389b5596fbaa65d5acb0e198013c1820a8 (diff)
downloadorg.eclipse.etrice-9b63ec1b9654dd00d644ceb94f664df3e61d6c4e.tar.gz
org.eclipse.etrice-9b63ec1b9654dd00d644ceb94f664df3e61d6c4e.tar.xz
org.eclipse.etrice-9b63ec1b9654dd00d644ceb94f664df3e61d6c4e.zip
Merge remote branch 'refs/remotes/origin/master'
Conflicts: plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/ActorClassGen.java plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/ProtocolClassGen.java plugins/org.eclipse.etrice.generator/xtend-gen/org/eclipse/etrice/generator/generic/GenericProtocolClassGenerator.java
Diffstat (limited to 'tests')
-rw-r--r--tests/org.eclipse.etrice.generator.c.tests/.cproject309
-rw-r--r--tests/org.eclipse.etrice.generator.c.tests/src-gen/cGenRef/DataClass1.c7
-rw-r--r--tests/org.eclipse.etrice.generator.c.tests/src-gen/cGenRef/DataClass1.h19
-rw-r--r--tests/org.eclipse.etrice.generator.c.tests/src-gen/cGenRef/DataClass2.c3
-rw-r--r--tests/org.eclipse.etrice.generator.c.tests/src-gen/cGenRef/DataClass2.h9
-rw-r--r--tests/org.eclipse.etrice.generator.c.tests/src/RunAllTestcases.c2
-rw-r--r--tests/org.eclipse.etrice.generator.c.tests/src/test/generator/RunCGeneratorTestcases.c4
-rw-r--r--tests/org.eclipse.etrice.generator.c.tests/src/test/generator/TestDataClass.c134
-rw-r--r--tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/RunCRuntimeTestcases.c98
-rw-r--r--tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtMessage.c90
-rw-r--r--tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtMessageQueue.c198
-rw-r--r--tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtMessageService.c4
-rw-r--r--tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtMessageService.h42
-rw-r--r--tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtUnit.c134
-rw-r--r--tests/org.eclipse.etrice.generator.c.tests/tmp/testlog/TestCRuntime.xml2
15 files changed, 530 insertions, 525 deletions
diff --git a/tests/org.eclipse.etrice.generator.c.tests/.cproject b/tests/org.eclipse.etrice.generator.c.tests/.cproject
index f811adc92..8b220ecb5 100644
--- a/tests/org.eclipse.etrice.generator.c.tests/.cproject
+++ b/tests/org.eclipse.etrice.generator.c.tests/.cproject
@@ -1,150 +1,159 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<?fileVersion 4.0.0?>
-
-<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
- <storageModule moduleId="org.eclipse.cdt.core.settings">
- <cconfiguration id="cdt.managedbuild.config.gnu.mingw.exe.debug.54263550">
- <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.mingw.exe.debug.54263550" moduleId="org.eclipse.cdt.core.settings" name="Debug">
- <externalSettings/>
- <extensions>
- <extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
- <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
- <extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
- <extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
- </extensions>
- </storageModule>
- <storageModule moduleId="cdtBuildSystem" version="4.0.0">
- <configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.mingw.exe.debug.54263550" name="Debug" parent="cdt.managedbuild.config.gnu.mingw.exe.debug">
- <folderInfo id="cdt.managedbuild.config.gnu.mingw.exe.debug.54263550." name="/" resourcePath="">
- <toolChain id="cdt.managedbuild.toolchain.gnu.mingw.exe.debug.918285240" name="MinGW GCC" superClass="cdt.managedbuild.toolchain.gnu.mingw.exe.debug">
- <targetPlatform id="cdt.managedbuild.target.gnu.platform.mingw.exe.debug.1377401325" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.mingw.exe.debug"/>
- <builder buildPath="${workspace_loc:/org.eclipse.etrice.generator.c.tests/Debug}" id="cdt.managedbuild.tool.gnu.builder.mingw.base.1914462916" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="CDT Internal Builder" superClass="cdt.managedbuild.tool.gnu.builder.mingw.base"/>
- <tool id="cdt.managedbuild.tool.gnu.assembler.mingw.exe.debug.2128193487" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.mingw.exe.debug">
- <option id="gnu.both.asm.option.include.paths.646571697" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths"/>
- <inputType id="cdt.managedbuild.tool.gnu.assembler.input.1636502349" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
- </tool>
- <tool id="cdt.managedbuild.tool.gnu.archiver.mingw.base.1852443642" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.mingw.base"/>
- <tool id="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.exe.debug.1864486752" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.exe.debug">
- <option id="gnu.cpp.compiler.mingw.exe.debug.option.optimization.level.321169512" name="Optimization Level" superClass="gnu.cpp.compiler.mingw.exe.debug.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
- <option id="gnu.cpp.compiler.mingw.exe.debug.option.debugging.level.1151544407" name="Debug Level" superClass="gnu.cpp.compiler.mingw.exe.debug.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
- </tool>
- <tool id="cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.debug.1547425303" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.debug">
- <option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.mingw.exe.debug.option.optimization.level.836528711" name="Optimization Level" superClass="gnu.c.compiler.mingw.exe.debug.option.optimization.level" valueType="enumerated"/>
- <option id="gnu.c.compiler.mingw.exe.debug.option.debugging.level.1206340557" name="Debug Level" superClass="gnu.c.compiler.mingw.exe.debug.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
- <option id="gnu.c.compiler.option.include.paths.937550345" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
- <listOptionValue builtIn="false" value="&quot;${workspace_loc:/org.eclipse.etrice.runtime.c/src}&quot;"/>
- </option>
- <option id="gnu.c.compiler.option.misc.other.674019116" name="Other flags" superClass="gnu.c.compiler.option.misc.other" value="-c -fmessage-length=0 -Wconversion" valueType="string"/>
- <inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.215126527" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
- </tool>
- <tool id="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.debug.2141539090" name="MinGW C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.debug">
- <option id="gnu.c.link.option.libs.1886054812" name="Libraries (-l)" superClass="gnu.c.link.option.libs" valueType="libs">
- <listOptionValue builtIn="false" value="org.eclipse.etrice.runtime.c"/>
- </option>
- <option id="gnu.c.link.option.paths.1410926104" name="Library search path (-L)" superClass="gnu.c.link.option.paths" valueType="libPaths">
- <listOptionValue builtIn="false" value="&quot;${workspace_loc:/org.eclipse.etrice.runtime.c/Debug}&quot;"/>
- </option>
- <inputType id="cdt.managedbuild.tool.gnu.c.linker.input.1941302758" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
- <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
- <additionalInput kind="additionalinput" paths="$(LIBS)"/>
- </inputType>
- </tool>
- <tool id="cdt.managedbuild.tool.gnu.cpp.linker.mingw.exe.debug.1915798937" name="MinGW C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.mingw.exe.debug"/>
- </toolChain>
- </folderInfo>
- <sourceEntries>
- <entry excluding="src-gen|src" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
- <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
- <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src-gen"/>
- </sourceEntries>
- </configuration>
- </storageModule>
- <storageModule moduleId="org.eclipse.cdt.core.externalSettings">
- <externalSettings containerId="org.eclipse.etrice.runtime.c;cdt.managedbuild.config.gnu.mingw.lib.debug.505530637" factoryId="org.eclipse.cdt.core.cfg.export.settings.sipplier"/>
- </storageModule>
- </cconfiguration>
- <cconfiguration id="cdt.managedbuild.config.gnu.mingw.exe.release.1445732435">
- <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.mingw.exe.release.1445732435" moduleId="org.eclipse.cdt.core.settings" name="Release">
- <externalSettings/>
- <extensions>
- <extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
- <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
- <extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
- <extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
- </extensions>
- </storageModule>
- <storageModule moduleId="cdtBuildSystem" version="4.0.0">
- <configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.mingw.exe.release.1445732435" name="Release" parent="cdt.managedbuild.config.gnu.mingw.exe.release">
- <folderInfo id="cdt.managedbuild.config.gnu.mingw.exe.release.1445732435." name="/" resourcePath="">
- <toolChain id="cdt.managedbuild.toolchain.gnu.mingw.exe.release.44614125" name="MinGW GCC" superClass="cdt.managedbuild.toolchain.gnu.mingw.exe.release">
- <targetPlatform id="cdt.managedbuild.target.gnu.platform.mingw.exe.release.1563670810" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.mingw.exe.release"/>
- <builder buildPath="${workspace_loc:/org.eclipse.etrice.generator.c.tests/Release}" id="cdt.managedbuild.tool.gnu.builder.mingw.base.748437960" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="CDT Internal Builder" superClass="cdt.managedbuild.tool.gnu.builder.mingw.base"/>
- <tool id="cdt.managedbuild.tool.gnu.assembler.mingw.exe.release.2087319745" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.mingw.exe.release">
- <option id="gnu.both.asm.option.include.paths.2089558096" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths" valueType="includePath">
- <listOptionValue builtIn="false" value="&quot;${workspace_loc:/org.eclipse.etrice.runtime.c}&quot;"/>
- </option>
- <inputType id="cdt.managedbuild.tool.gnu.assembler.input.1375308303" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
- </tool>
- <tool id="cdt.managedbuild.tool.gnu.archiver.mingw.base.245787891" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.mingw.base"/>
- <tool id="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.exe.release.1042972525" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.exe.release">
- <option id="gnu.cpp.compiler.mingw.exe.release.option.optimization.level.1950851559" name="Optimization Level" superClass="gnu.cpp.compiler.mingw.exe.release.option.optimization.level" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/>
- <option id="gnu.cpp.compiler.mingw.exe.release.option.debugging.level.373334651" name="Debug Level" superClass="gnu.cpp.compiler.mingw.exe.release.option.debugging.level" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
- </tool>
- <tool id="cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.release.1378403430" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.release">
- <option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.mingw.exe.release.option.optimization.level.554911279" name="Optimization Level" superClass="gnu.c.compiler.mingw.exe.release.option.optimization.level" valueType="enumerated"/>
- <option id="gnu.c.compiler.mingw.exe.release.option.debugging.level.331396171" name="Debug Level" superClass="gnu.c.compiler.mingw.exe.release.option.debugging.level" value="gnu.c.debugging.level.none" valueType="enumerated"/>
- <option id="gnu.c.compiler.option.include.paths.1226733508" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
- <listOptionValue builtIn="false" value="&quot;${workspace_loc:/org.eclipse.etrice.runtime.c/src}&quot;"/>
- </option>
- <inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.156681579" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
- </tool>
- <tool id="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.release.1192709765" name="MinGW C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.release">
- <option id="gnu.c.link.option.libs.2121552378" name="Libraries (-l)" superClass="gnu.c.link.option.libs" valueType="libs">
- <listOptionValue builtIn="false" value="org.eclipse.etrice.runtime.c"/>
- </option>
- <option id="gnu.c.link.option.paths.1610581119" name="Library search path (-L)" superClass="gnu.c.link.option.paths" valueType="libPaths">
- <listOptionValue builtIn="false" value="&quot;${workspace_loc:/org.eclipse.etrice.runtime.c/Release}&quot;"/>
- </option>
- <inputType id="cdt.managedbuild.tool.gnu.c.linker.input.1107454825" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
- <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
- <additionalInput kind="additionalinput" paths="$(LIBS)"/>
- </inputType>
- </tool>
- <tool id="cdt.managedbuild.tool.gnu.cpp.linker.mingw.exe.release.1557729682" name="MinGW C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.mingw.exe.release"/>
- </toolChain>
- </folderInfo>
- <sourceEntries>
- <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src-gen"/>
- <entry excluding="runtime/RMessageQueue.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
- <entry excluding="src-gen|src" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
- </sourceEntries>
- </configuration>
- </storageModule>
- <storageModule moduleId="org.eclipse.cdt.core.externalSettings">
- <externalSettings containerId="org.eclipse.etrice.runtime.c;cdt.managedbuild.config.gnu.mingw.lib.release.406040144" factoryId="org.eclipse.cdt.core.cfg.export.settings.sipplier">
- <externalSetting>
- <entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/org.eclipse.etrice.runtime.c"/>
- <entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/org.eclipse.etrice.runtime.c/Release"/>
- <entry flags="RESOLVED" kind="libraryFile" name="org.eclipse.etrice.runtime.c"/>
- </externalSetting>
- </externalSettings>
- </storageModule>
- </cconfiguration>
- </storageModule>
- <storageModule moduleId="cdtBuildSystem" version="4.0.0">
- <project id="org.eclipse.etrice.generator.c.tests.cdt.managedbuild.target.gnu.mingw.exe.44532741" name="Executable" projectType="cdt.managedbuild.target.gnu.mingw.exe"/>
- </storageModule>
- <storageModule moduleId="scannerConfiguration">
- <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
- <scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.exe.debug.54263550;cdt.managedbuild.config.gnu.mingw.exe.debug.54263550.;cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.debug.1547425303;cdt.managedbuild.tool.gnu.c.compiler.input.215126527">
- <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
- </scannerConfigBuildInfo>
- <scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.exe.release.1445732435;cdt.managedbuild.config.gnu.mingw.exe.release.1445732435.;cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.release.1378403430;cdt.managedbuild.tool.gnu.c.compiler.input.156681579">
- <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
- </scannerConfigBuildInfo>
- </storageModule>
- <storageModule moduleId="refreshScope" versionNumber="1">
- <resource resourceType="PROJECT" workspacePath="/org.eclipse.etrice.generator.c.tests"/>
- </storageModule>
- <storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
-</cproject>
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?fileVersion 4.0.0?>
+
+<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
+ <storageModule moduleId="org.eclipse.cdt.core.settings">
+ <cconfiguration id="cdt.managedbuild.config.gnu.mingw.exe.debug.54263550">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.mingw.exe.debug.54263550" moduleId="org.eclipse.cdt.core.settings" name="Debug">
+ <externalSettings/>
+ <extensions>
+ <extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
+ <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ </extensions>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.mingw.exe.debug.54263550" name="Debug" parent="cdt.managedbuild.config.gnu.mingw.exe.debug">
+ <folderInfo id="cdt.managedbuild.config.gnu.mingw.exe.debug.54263550." name="/" resourcePath="">
+ <toolChain id="cdt.managedbuild.toolchain.gnu.mingw.exe.debug.918285240" name="MinGW GCC" superClass="cdt.managedbuild.toolchain.gnu.mingw.exe.debug">
+ <targetPlatform id="cdt.managedbuild.target.gnu.platform.mingw.exe.debug.1377401325" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.mingw.exe.debug"/>
+ <builder buildPath="${workspace_loc:/org.eclipse.etrice.generator.c.tests/Debug}" id="cdt.managedbuild.tool.gnu.builder.mingw.base.1914462916" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="CDT Internal Builder" superClass="cdt.managedbuild.tool.gnu.builder.mingw.base"/>
+ <tool id="cdt.managedbuild.tool.gnu.assembler.mingw.exe.debug.2128193487" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.mingw.exe.debug">
+ <option id="gnu.both.asm.option.include.paths.646571697" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths" valueType="includePath">
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/org.eclipse.etrice.runtime.c}&quot;"/>
+ </option>
+ <inputType id="cdt.managedbuild.tool.gnu.assembler.input.1636502349" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
+ </tool>
+ <tool id="cdt.managedbuild.tool.gnu.archiver.mingw.base.1852443642" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.mingw.base"/>
+ <tool id="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.exe.debug.1864486752" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.exe.debug">
+ <option id="gnu.cpp.compiler.mingw.exe.debug.option.optimization.level.321169512" name="Optimization Level" superClass="gnu.cpp.compiler.mingw.exe.debug.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
+ <option id="gnu.cpp.compiler.mingw.exe.debug.option.debugging.level.1151544407" name="Debug Level" superClass="gnu.cpp.compiler.mingw.exe.debug.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
+ </tool>
+ <tool id="cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.debug.1547425303" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.debug">
+ <option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.mingw.exe.debug.option.optimization.level.836528711" name="Optimization Level" superClass="gnu.c.compiler.mingw.exe.debug.option.optimization.level" valueType="enumerated"/>
+ <option id="gnu.c.compiler.mingw.exe.debug.option.debugging.level.1206340557" name="Debug Level" superClass="gnu.c.compiler.mingw.exe.debug.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
+ <option id="gnu.c.compiler.option.include.paths.937550345" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/org.eclipse.etrice.runtime.c/src/common}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/org.eclipse.etrice.runtime.c/src/platforms/generic}&quot;"/>
+ </option>
+ <option id="gnu.c.compiler.option.misc.other.674019116" name="Other flags" superClass="gnu.c.compiler.option.misc.other" value="-c -fmessage-length=0 -Wconversion" valueType="string"/>
+ <inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.215126527" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
+ </tool>
+ <tool id="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.debug.2141539090" name="MinGW C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.debug">
+ <option id="gnu.c.link.option.libs.1886054812" name="Libraries (-l)" superClass="gnu.c.link.option.libs" valueType="libs">
+ <listOptionValue builtIn="false" value="org.eclipse.etrice.runtime.c"/>
+ </option>
+ <option id="gnu.c.link.option.paths.1410926104" name="Library search path (-L)" superClass="gnu.c.link.option.paths" valueType="libPaths">
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/org.eclipse.etrice.runtime.c/Debug}&quot;"/>
+ </option>
+ <inputType id="cdt.managedbuild.tool.gnu.c.linker.input.1941302758" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
+ <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
+ <additionalInput kind="additionalinput" paths="$(LIBS)"/>
+ </inputType>
+ </tool>
+ <tool id="cdt.managedbuild.tool.gnu.cpp.linker.mingw.exe.debug.1915798937" name="MinGW C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.mingw.exe.debug"/>
+ </toolChain>
+ </folderInfo>
+ <sourceEntries>
+ <entry excluding="src-gen|src" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
+ <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
+ <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src-gen"/>
+ </sourceEntries>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings">
+ <externalSettings containerId="org.eclipse.etrice.runtime.c;cdt.managedbuild.config.gnu.mingw.lib.debug.505530637" factoryId="org.eclipse.cdt.core.cfg.export.settings.sipplier">
+ <externalSetting>
+ <entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/org.eclipse.etrice.runtime.c"/>
+ <entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/org.eclipse.etrice.runtime.c/Debug"/>
+ <entry flags="RESOLVED" kind="libraryFile" name="org.eclipse.etrice.runtime.c"/>
+ </externalSetting>
+ </externalSettings>
+ </storageModule>
+ </cconfiguration>
+ <cconfiguration id="cdt.managedbuild.config.gnu.mingw.exe.release.1445732435">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.mingw.exe.release.1445732435" moduleId="org.eclipse.cdt.core.settings" name="Release">
+ <externalSettings/>
+ <extensions>
+ <extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
+ <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ </extensions>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.mingw.exe.release.1445732435" name="Release" parent="cdt.managedbuild.config.gnu.mingw.exe.release">
+ <folderInfo id="cdt.managedbuild.config.gnu.mingw.exe.release.1445732435." name="/" resourcePath="">
+ <toolChain id="cdt.managedbuild.toolchain.gnu.mingw.exe.release.44614125" name="MinGW GCC" superClass="cdt.managedbuild.toolchain.gnu.mingw.exe.release">
+ <targetPlatform id="cdt.managedbuild.target.gnu.platform.mingw.exe.release.1563670810" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.mingw.exe.release"/>
+ <builder buildPath="${workspace_loc:/org.eclipse.etrice.generator.c.tests/Release}" id="cdt.managedbuild.tool.gnu.builder.mingw.base.748437960" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="CDT Internal Builder" superClass="cdt.managedbuild.tool.gnu.builder.mingw.base"/>
+ <tool id="cdt.managedbuild.tool.gnu.assembler.mingw.exe.release.2087319745" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.mingw.exe.release">
+ <option id="gnu.both.asm.option.include.paths.2089558096" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths" valueType="includePath">
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/org.eclipse.etrice.runtime.c}&quot;"/>
+ </option>
+ <inputType id="cdt.managedbuild.tool.gnu.assembler.input.1375308303" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
+ </tool>
+ <tool id="cdt.managedbuild.tool.gnu.archiver.mingw.base.245787891" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.mingw.base"/>
+ <tool id="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.exe.release.1042972525" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.exe.release">
+ <option id="gnu.cpp.compiler.mingw.exe.release.option.optimization.level.1950851559" name="Optimization Level" superClass="gnu.cpp.compiler.mingw.exe.release.option.optimization.level" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/>
+ <option id="gnu.cpp.compiler.mingw.exe.release.option.debugging.level.373334651" name="Debug Level" superClass="gnu.cpp.compiler.mingw.exe.release.option.debugging.level" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
+ </tool>
+ <tool id="cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.release.1378403430" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.release">
+ <option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.mingw.exe.release.option.optimization.level.554911279" name="Optimization Level" superClass="gnu.c.compiler.mingw.exe.release.option.optimization.level" valueType="enumerated"/>
+ <option id="gnu.c.compiler.mingw.exe.release.option.debugging.level.331396171" name="Debug Level" superClass="gnu.c.compiler.mingw.exe.release.option.debugging.level" value="gnu.c.debugging.level.none" valueType="enumerated"/>
+ <option id="gnu.c.compiler.option.include.paths.1226733508" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/org.eclipse.etrice.runtime.c/src}&quot;"/>
+ </option>
+ <inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.156681579" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
+ </tool>
+ <tool id="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.release.1192709765" name="MinGW C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.release">
+ <option id="gnu.c.link.option.libs.2121552378" name="Libraries (-l)" superClass="gnu.c.link.option.libs" valueType="libs">
+ <listOptionValue builtIn="false" value="org.eclipse.etrice.runtime.c"/>
+ </option>
+ <option id="gnu.c.link.option.paths.1610581119" name="Library search path (-L)" superClass="gnu.c.link.option.paths" valueType="libPaths">
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/org.eclipse.etrice.runtime.c/Release}&quot;"/>
+ </option>
+ <inputType id="cdt.managedbuild.tool.gnu.c.linker.input.1107454825" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
+ <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
+ <additionalInput kind="additionalinput" paths="$(LIBS)"/>
+ </inputType>
+ </tool>
+ <tool id="cdt.managedbuild.tool.gnu.cpp.linker.mingw.exe.release.1557729682" name="MinGW C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.mingw.exe.release"/>
+ </toolChain>
+ </folderInfo>
+ <sourceEntries>
+ <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src-gen"/>
+ <entry excluding="runtime/RMessageQueue.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
+ <entry excluding="src-gen|src" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
+ </sourceEntries>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings">
+ <externalSettings containerId="org.eclipse.etrice.runtime.c;cdt.managedbuild.config.gnu.mingw.lib.release.406040144" factoryId="org.eclipse.cdt.core.cfg.export.settings.sipplier">
+ <externalSetting>
+ <entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/org.eclipse.etrice.runtime.c"/>
+ <entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/org.eclipse.etrice.runtime.c/Release"/>
+ <entry flags="RESOLVED" kind="libraryFile" name="org.eclipse.etrice.runtime.c"/>
+ </externalSetting>
+ </externalSettings>
+ </storageModule>
+ </cconfiguration>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <project id="org.eclipse.etrice.generator.c.tests.cdt.managedbuild.target.gnu.mingw.exe.44532741" name="Executable" projectType="cdt.managedbuild.target.gnu.mingw.exe"/>
+ </storageModule>
+ <storageModule moduleId="scannerConfiguration">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
+ <scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.exe.debug.54263550;cdt.managedbuild.config.gnu.mingw.exe.debug.54263550.;cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.debug.1547425303;cdt.managedbuild.tool.gnu.c.compiler.input.215126527">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
+ </scannerConfigBuildInfo>
+ <scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.exe.release.1445732435;cdt.managedbuild.config.gnu.mingw.exe.release.1445732435.;cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.release.1378403430;cdt.managedbuild.tool.gnu.c.compiler.input.156681579">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
+ </scannerConfigBuildInfo>
+ </storageModule>
+ <storageModule moduleId="refreshScope" versionNumber="1">
+ <resource resourceType="PROJECT" workspacePath="/org.eclipse.etrice.generator.c.tests"/>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
+</cproject>
diff --git a/tests/org.eclipse.etrice.generator.c.tests/src-gen/cGenRef/DataClass1.c b/tests/org.eclipse.etrice.generator.c.tests/src-gen/cGenRef/DataClass1.c
index 7683d9062..f89049ff7 100644
--- a/tests/org.eclipse.etrice.generator.c.tests/src-gen/cGenRef/DataClass1.c
+++ b/tests/org.eclipse.etrice.generator.c.tests/src-gen/cGenRef/DataClass1.c
@@ -9,13 +9,12 @@
#include <string.h>
-//--------------------- begin user code
+/*--------------------- begin user code ---------------------*/
// usercode3
-//--------------------- end user code
+/*--------------------- end user code ---------------------*/
-// TODO: do we need setters and getters for C and C++ ?
-//--------------------- operations
+/*--------------------- operations ---------------------*/
int32 DataClass1_MultiplyWithAttr1(DataClass1* self, int32 value) {
return self->Attr1*value;
}
diff --git a/tests/org.eclipse.etrice.generator.c.tests/src-gen/cGenRef/DataClass1.h b/tests/org.eclipse.etrice.generator.c.tests/src-gen/cGenRef/DataClass1.h
index 948491f86..f1d7a6fb0 100644
--- a/tests/org.eclipse.etrice.generator.c.tests/src-gen/cGenRef/DataClass1.h
+++ b/tests/org.eclipse.etrice.generator.c.tests/src-gen/cGenRef/DataClass1.h
@@ -10,31 +10,30 @@
#include "etDatatypes.h"
-/* TODO: includes only for used DataClasses, also for other models */
#include "DataClass2.h"
-//--------------------- begin user code
+/*--------------------- begin user code ---------------------*/
// usercode1
-//--------------------- end user code
+/*--------------------- end user code ---------------------*/
typedef struct {
- //--------------------- begin user code
- // usercode2
- //--------------------- end user code
- //--------------------- attributes
+ /*--------------------- attributes ---------------------*/
int32 Attr1;
DataClass2 ComplexAttr;
float32 Attr3;
} DataClass1;
-// TODO: do we need setters and getters for C and C++ ?
-//--------------------- operations
+/*--------------------- operations ---------------------*/
int32 DataClass1_MultiplyWithAttr1(DataClass1* self, int32 value);
float32 DataClass1_MultiplyWithAttr3(DataClass1* self, float32 value);
-// deep copy
+/* deep copy */
void DataClass1_deepCopy(DataClass1* source, DataClass1* target);
+/*--------------------- begin user code ---------------------*/
+ // usercode2
+/*--------------------- end user code ---------------------*/
+
#endif /* _DATACLASS1_H_ */
diff --git a/tests/org.eclipse.etrice.generator.c.tests/src-gen/cGenRef/DataClass2.c b/tests/org.eclipse.etrice.generator.c.tests/src-gen/cGenRef/DataClass2.c
index 1fd7e1572..ab4bbb274 100644
--- a/tests/org.eclipse.etrice.generator.c.tests/src-gen/cGenRef/DataClass2.c
+++ b/tests/org.eclipse.etrice.generator.c.tests/src-gen/cGenRef/DataClass2.c
@@ -10,9 +10,8 @@
#include <string.h>
-// TODO: do we need setters and getters for C and C++ ?
-//--------------------- operations
+/*--------------------- operations ---------------------*/
void DataClass2_Operation1(DataClass2* self) {
/*nothing to do*/
}
diff --git a/tests/org.eclipse.etrice.generator.c.tests/src-gen/cGenRef/DataClass2.h b/tests/org.eclipse.etrice.generator.c.tests/src-gen/cGenRef/DataClass2.h
index 4b1f3164f..4b08b4125 100644
--- a/tests/org.eclipse.etrice.generator.c.tests/src-gen/cGenRef/DataClass2.h
+++ b/tests/org.eclipse.etrice.generator.c.tests/src-gen/cGenRef/DataClass2.h
@@ -10,23 +10,22 @@
#include "etDatatypes.h"
-/* TODO: includes only for used DataClasses, also for other models */
typedef struct {
- //--------------------- attributes
+ /*--------------------- attributes ---------------------*/
int32 Attr1;
float32 Attr2;
int32 Attr3;
} DataClass2;
-// TODO: do we need setters and getters for C and C++ ?
-//--------------------- operations
+/*--------------------- operations ---------------------*/
void DataClass2_Operation1(DataClass2* self);
-// deep copy
+/* deep copy */
void DataClass2_deepCopy(DataClass2* source, DataClass2* target);
+
#endif /* _DATACLASS2_H_ */
diff --git a/tests/org.eclipse.etrice.generator.c.tests/src/RunAllTestcases.c b/tests/org.eclipse.etrice.generator.c.tests/src/RunAllTestcases.c
index d62450db8..38bfdfbdb 100644
--- a/tests/org.eclipse.etrice.generator.c.tests/src/RunAllTestcases.c
+++ b/tests/org.eclipse.etrice.generator.c.tests/src/RunAllTestcases.c
@@ -14,7 +14,7 @@
#include "test/generator/RunCGeneratorTestcases.h"
#include "test/runtime/RunCRuntimeTestcases.h"
-#include "etMSCLogger.h"
+#include "debugging/etMSCLogger.h"
void runTestCases(void);
diff --git a/tests/org.eclipse.etrice.generator.c.tests/src/test/generator/RunCGeneratorTestcases.c b/tests/org.eclipse.etrice.generator.c.tests/src/test/generator/RunCGeneratorTestcases.c
index 615ba7422..ae0e95690 100644
--- a/tests/org.eclipse.etrice.generator.c.tests/src/test/generator/RunCGeneratorTestcases.c
+++ b/tests/org.eclipse.etrice.generator.c.tests/src/test/generator/RunCGeneratorTestcases.c
@@ -20,8 +20,8 @@
#include "RunCGeneratorTestcases.h"
#include "TestDataClass.h"
-#include "etUnit.h"
-#include "etMSCLogger.h"
+#include "etUnit/etUnit.h"
+#include "debugging/etMSCLogger.h"
diff --git a/tests/org.eclipse.etrice.generator.c.tests/src/test/generator/TestDataClass.c b/tests/org.eclipse.etrice.generator.c.tests/src/test/generator/TestDataClass.c
index e3c521dd3..b41cfa60c 100644
--- a/tests/org.eclipse.etrice.generator.c.tests/src/test/generator/TestDataClass.c
+++ b/tests/org.eclipse.etrice.generator.c.tests/src/test/generator/TestDataClass.c
@@ -1,67 +1,67 @@
-/*******************************************************************************
- * 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:
- * Thomas Schuetz (initial contribution)
- *
- *******************************************************************************/
-
-
-/*
- * TestDataClass.c
- *
- * Created on: 12.01.2012
- * Author: tschuetz
- */
-
-
-#include "TestDataClass.h"
-
-#include "etUnit.h"
-
-#include "../../../src-gen/cGenRef/DataClass1.h"
-
-void TestDataClass_Operations(void){
-
- DataClass1 d;
- d.Attr1 = 123;
- d.ComplexAttr.Attr1 = 456;
- d.ComplexAttr.Attr2 = (float32)789.123;
- d.ComplexAttr.Attr3 = 789;
- d.Attr3 = (float32)321.123;
-
- EXPECT_EQUAL_INT32("Operation DataClass1_MultiplyWithAttr1", 246, DataClass1_MultiplyWithAttr1(&d, 2));
- EXPECT_EQUAL_FLOAT32("Operation DataClass1_MultiplyWithAttr3", (float32)642.246, DataClass1_MultiplyWithAttr3(&d, 2), (float32)0.0001);
-
-}
-
-
-void TestDataClass_testDataClassDeepCopy(void){
-
- DataClass1 d, e;
- d.Attr1 = 123;
- d.ComplexAttr.Attr1 = 456;
- d.ComplexAttr.Attr2 = (float32)789.123;
- d.ComplexAttr.Attr3 = 789;
- d.Attr3 = (float32)321.123;
-
- DataClass1_deepCopy(&d,&e);
-
- EXPECT_EQUAL_INT32("Attr1", 123, e.Attr1);
- EXPECT_EQUAL_INT32("ComplexAttr.Attr1", 456, e.ComplexAttr.Attr1);
- EXPECT_EQUAL_FLOAT32("ComplexAttr.Attr2", (float32)789.123, e.ComplexAttr.Attr2, 0.001f);
- EXPECT_EQUAL_INT32("ComplexAttr.Attr3", 789, e.ComplexAttr.Attr3);
- EXPECT_EQUAL_FLOAT32("Attr3", (float32)321.123, e.Attr3, (float32)0.0001);
-
-}
-
-void TestDataClass_runSuite(void){
- etUnit_openTestSuite("TestDataClass");
- ADD_TESTCASE(TestDataClass_Operations);
- ADD_TESTCASE(TestDataClass_testDataClassDeepCopy);
- etUnit_closeTestSuite();
-}
+/*******************************************************************************
+ * 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:
+ * Thomas Schuetz (initial contribution)
+ *
+ *******************************************************************************/
+
+
+/*
+ * TestDataClass.c
+ *
+ * Created on: 12.01.2012
+ * Author: tschuetz
+ */
+
+
+#include "TestDataClass.h"
+
+#include "etUnit/etUnit.h"
+
+#include "../../../src-gen/cGenRef/DataClass1.h"
+
+void TestDataClass_Operations(void){
+
+ DataClass1 d;
+ d.Attr1 = 123;
+ d.ComplexAttr.Attr1 = 456;
+ d.ComplexAttr.Attr2 = (float32)789.123;
+ d.ComplexAttr.Attr3 = 789;
+ d.Attr3 = (float32)321.123;
+
+ EXPECT_EQUAL_INT32("Operation DataClass1_MultiplyWithAttr1", 246, DataClass1_MultiplyWithAttr1(&d, 2));
+ EXPECT_EQUAL_FLOAT32("Operation DataClass1_MultiplyWithAttr3", (float32)642.246, DataClass1_MultiplyWithAttr3(&d, 2), (float32)0.0001);
+
+}
+
+
+void TestDataClass_testDataClassDeepCopy(void){
+
+ DataClass1 d, e;
+ d.Attr1 = 123;
+ d.ComplexAttr.Attr1 = 456;
+ d.ComplexAttr.Attr2 = (float32)789.123;
+ d.ComplexAttr.Attr3 = 789;
+ d.Attr3 = (float32)321.123;
+
+ DataClass1_deepCopy(&d,&e);
+
+ EXPECT_EQUAL_INT32("Attr1", 123, e.Attr1);
+ EXPECT_EQUAL_INT32("ComplexAttr.Attr1", 456, e.ComplexAttr.Attr1);
+ EXPECT_EQUAL_FLOAT32("ComplexAttr.Attr2", (float32)789.123, e.ComplexAttr.Attr2, 0.001f);
+ EXPECT_EQUAL_INT32("ComplexAttr.Attr3", 789, e.ComplexAttr.Attr3);
+ EXPECT_EQUAL_FLOAT32("Attr3", (float32)321.123, e.Attr3, (float32)0.0001);
+
+}
+
+void TestDataClass_runSuite(void){
+ etUnit_openTestSuite("TestDataClass");
+ ADD_TESTCASE(TestDataClass_Operations);
+ ADD_TESTCASE(TestDataClass_testDataClassDeepCopy);
+ etUnit_closeTestSuite();
+}
diff --git a/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/RunCRuntimeTestcases.c b/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/RunCRuntimeTestcases.c
index a9a502f3b..bc60644c3 100644
--- a/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/RunCRuntimeTestcases.c
+++ b/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/RunCRuntimeTestcases.c
@@ -1,49 +1,49 @@
-/*******************************************************************************
- * 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:
- * Thomas Schuetz (initial contribution)
- *
- *******************************************************************************/
-
-
-/*
- * RunRuntimeTestcases.c
- *
- * Created on: 12.01.2012
- * Author: tschuetz
- */
-
-
-
-#include "RunCRuntimeTestcases.h"
-
-#include "TestEtMessage.h"
-#include "TestEtMessageQueue.h"
-#include "TestEtMessageService.h"
-#include "TestEtUnit.h"
-
-#include "etUnit.h"
-
-
-void RunCRuntimeTestcases(void){
- etUnit_open("tmp/testlog","TestCRuntime");
-
- TestEtMessage_runSuite();
- TestEtMessageQueue_runSuite();
- TestEtMessageService_runSuite();
- TestEtUnit_runSuite();
-
- etUnit_close();
-
- /* special situation for testing openAll and closeAll of etUnit
- * this has to be done outside of etUnit_open and etUnit_close */
- etUnit_openAll("tmp/testlog","TestEtUnitSpecial", "etUnit", "openAll and closeAll");
- EXPECT_TRUE("Open and Close", TRUE);
- etUnit_closeAll();
-}
-
+/*******************************************************************************
+ * 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:
+ * Thomas Schuetz (initial contribution)
+ *
+ *******************************************************************************/
+
+
+/*
+ * RunRuntimeTestcases.c
+ *
+ * Created on: 12.01.2012
+ * Author: tschuetz
+ */
+
+
+
+#include "RunCRuntimeTestcases.h"
+
+#include "TestEtMessage.h"
+#include "TestEtMessageQueue.h"
+#include "TestEtMessageService.h"
+#include "TestEtUnit.h"
+
+#include "etUnit/etUnit.h"
+
+
+void RunCRuntimeTestcases(void){
+ etUnit_open("tmp/testlog","TestCRuntime");
+
+ TestEtMessage_runSuite();
+ TestEtMessageQueue_runSuite();
+ TestEtMessageService_runSuite();
+ TestEtUnit_runSuite();
+
+ etUnit_close();
+
+ /* special situation for testing openAll and closeAll of etUnit
+ * this has to be done outside of etUnit_open and etUnit_close */
+ etUnit_openAll("tmp/testlog","TestEtUnitSpecial", "etUnit", "openAll and closeAll");
+ EXPECT_TRUE("Open and Close", TRUE);
+ etUnit_closeAll();
+}
+
diff --git a/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtMessage.c b/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtMessage.c
index c360b0a84..ed317284f 100644
--- a/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtMessage.c
+++ b/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtMessage.c
@@ -1,45 +1,45 @@
-/*******************************************************************************
- * 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:
- * Thomas Schuetz (initial contribution)
- *
- *******************************************************************************/
-
-#include "TestEtMessage.h"
-
-#include <stddef.h>
-#include "etUnit.h"
-#include "etMessage.h"
-
-
-
-void TestEtMessage_testBasicMessage(void){
-
- etMessage msg1 = {(etMessage*)1234567, 123,456,};
- etMessage msg2 = {NULL, 222,333};
-
- // basic checks -> detects structure changes that would cause problems for generated code
- EXPECT_EQUAL_PTR("Message.next", 1234567, msg1.next);
- EXPECT_EQUAL_INT16("Message.address", 123, msg1.address);
- EXPECT_EQUAL_INT16("Message.evtID", 456, msg1.evtID);
-
- // build pointer ring
- msg1.next = &msg2;
- msg2.next = &msg1;
-
- EXPECT_EQUAL_INT16("msg1.NextMsg", msg2.evtID, msg1.next->evtID);
- EXPECT_EQUAL_INT16("msg2.NextMsg", msg1.evtID, msg2.next->evtID);
-
-}
-
-void TestEtMessage_runSuite(void){
- etUnit_openTestSuite("TestMessage");
- ADD_TESTCASE(TestEtMessage_testBasicMessage);
- etUnit_closeTestSuite();
-}
-
+/*******************************************************************************
+ * 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:
+ * Thomas Schuetz (initial contribution)
+ *
+ *******************************************************************************/
+
+#include "TestEtMessage.h"
+
+#include <stddef.h>
+#include "etUnit/etUnit.h"
+#include "messaging/etMessage.h"
+
+
+
+void TestEtMessage_testBasicMessage(void){
+
+ etMessage msg1 = {(etMessage*)1234567, 123,456,};
+ etMessage msg2 = {NULL, 222,333};
+
+ // basic checks -> detects structure changes that would cause problems for generated code
+ EXPECT_EQUAL_PTR("Message.next", 1234567, msg1.next);
+ EXPECT_EQUAL_INT16("Message.address", 123, msg1.address);
+ EXPECT_EQUAL_INT16("Message.evtID", 456, msg1.evtID);
+
+ // build pointer ring
+ msg1.next = &msg2;
+ msg2.next = &msg1;
+
+ EXPECT_EQUAL_INT16("msg1.NextMsg", msg2.evtID, msg1.next->evtID);
+ EXPECT_EQUAL_INT16("msg2.NextMsg", msg1.evtID, msg2.next->evtID);
+
+}
+
+void TestEtMessage_runSuite(void){
+ etUnit_openTestSuite("TestMessage");
+ ADD_TESTCASE(TestEtMessage_testBasicMessage);
+ etUnit_closeTestSuite();
+}
+
diff --git a/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtMessageQueue.c b/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtMessageQueue.c
index 3a453962c..1febd72ce 100644
--- a/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtMessageQueue.c
+++ b/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtMessageQueue.c
@@ -1,99 +1,99 @@
-/*******************************************************************************
- * 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:
- * Thomas Schuetz (initial contribution)
- *
- *******************************************************************************/
-
-#include "TestEtMessageQueue.h"
-#include "etUnit.h"
-#include "etMessageQueue.h"
-
-void TestEtMessageQueue_testPushPop(void){
-
- etMessage msg1 = {NULL, 123, 456};
- etMessage msg2 = {NULL, 222, 333};
-
- etMessageQueue queue1;
- etMessageQueue_init(&queue1);
-
- etMessageQueue_push(&queue1, &msg1);
- etMessageQueue_push(&queue1, &msg2);
-
- EXPECT_EQUAL_INT16("etMessageQueue.size before", 2, queue1.size);
- EXPECT_EQUAL_INT16("etMessageQueue.highWaterMark before", 2, queue1.highWaterMark);
-
- etMessage* rcvMsg1 = etMessageQueue_pop(&queue1);
- etMessage* rcvMsg2 = etMessageQueue_pop(&queue1);
-
- EXPECT_EQUAL_INT16("etMessageQueue.size after", 0, queue1.size);
- EXPECT_EQUAL_INT16("etMessageQueue.highWaterMark after", 2, queue1.highWaterMark);
-
- EXPECT_EQUAL_INT16("rcvMsg1->address", 123, rcvMsg1->address);
- EXPECT_EQUAL_INT16("rcvMsg1->evtID", 456, rcvMsg1->evtID);
- EXPECT_EQUAL_PTR("rcvMsg1->next", NULL, rcvMsg1->next);
-
- EXPECT_EQUAL_INT16("rcvMsg2->address", 222, rcvMsg2->address);
- EXPECT_EQUAL_INT16("rcvMsg2->evtID", 333, rcvMsg2->evtID);
- EXPECT_EQUAL_PTR("rcvMsg2->next", NULL, rcvMsg2->next);
-
- EXPECT_EQUAL_PTR("etMessageQueue->first", NULL, queue1.first);
- EXPECT_EQUAL_PTR("etMessageQueue->last", NULL, queue1.last);
-
- etMessage* rcvMsg3 = etMessageQueue_pop(&queue1);
- EXPECT_EQUAL_PTR("etMessageQueue_pop if empty", NULL, rcvMsg3);
-
-}
-
-#define MAX 1000
-
-void TestEtMessageQueue_testMassiveMessaging(void){
-
- etMessage msgArray[MAX];
-
- etMessageQueue queue1;
- etMessageQueue_init(&queue1);
-
- int16 i;
- for(i=0; i<MAX; i++){
- //etMessage_init(&msgArray[i]);
- msgArray[i].address = i;
- msgArray[i].evtID = i;
- }
-
- int j;
- for(j=0; j<3; j++){
- for (i=0; i<MAX; i++){
- etMessageQueue_push(&queue1, &(msgArray[i]));
- }
- for (i=0; i<MAX; i++){
- etMessage* msg = etMessageQueue_pop(&queue1);
- // EXPECTS are hidden to avoid too many testcases in log
- if (msg == NULL){
- EXPECT_FALSE("msg == NULL", TRUE);
- break;
- }
- if (msg->address != msg->evtID){
- EXPECT_FALSE("msg->address != msg->evtID", TRUE);
- break;
- }
- if (msg->address != i){
- EXPECT_FALSE("msg->address != i", TRUE);
- break;
- }
- }
- EXPECT_EQUAL_INT32("i==MAX", MAX, i);
- }
-}
-
-void TestEtMessageQueue_runSuite(void){
- etUnit_openTestSuite("TestEtMessageQueue");
- ADD_TESTCASE(TestEtMessageQueue_testPushPop);
- ADD_TESTCASE(TestEtMessageQueue_testMassiveMessaging);
- etUnit_closeTestSuite();
-}
+/*******************************************************************************
+ * 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:
+ * Thomas Schuetz (initial contribution)
+ *
+ *******************************************************************************/
+
+#include "TestEtMessageQueue.h"
+#include "etUnit/etUnit.h"
+#include "messaging/etMessageQueue.h"
+
+void TestEtMessageQueue_testPushPop(void){
+
+ etMessage msg1 = {NULL, 123, 456};
+ etMessage msg2 = {NULL, 222, 333};
+
+ etMessageQueue queue1;
+ etMessageQueue_init(&queue1);
+
+ etMessageQueue_push(&queue1, &msg1);
+ etMessageQueue_push(&queue1, &msg2);
+
+ EXPECT_EQUAL_INT16("etMessageQueue.size before", 2, queue1.size);
+ EXPECT_EQUAL_INT16("etMessageQueue.highWaterMark before", 2, queue1.highWaterMark);
+
+ etMessage* rcvMsg1 = etMessageQueue_pop(&queue1);
+ etMessage* rcvMsg2 = etMessageQueue_pop(&queue1);
+
+ EXPECT_EQUAL_INT16("etMessageQueue.size after", 0, queue1.size);
+ EXPECT_EQUAL_INT16("etMessageQueue.highWaterMark after", 2, queue1.highWaterMark);
+
+ EXPECT_EQUAL_INT16("rcvMsg1->address", 123, rcvMsg1->address);
+ EXPECT_EQUAL_INT16("rcvMsg1->evtID", 456, rcvMsg1->evtID);
+ EXPECT_EQUAL_PTR("rcvMsg1->next", NULL, rcvMsg1->next);
+
+ EXPECT_EQUAL_INT16("rcvMsg2->address", 222, rcvMsg2->address);
+ EXPECT_EQUAL_INT16("rcvMsg2->evtID", 333, rcvMsg2->evtID);
+ EXPECT_EQUAL_PTR("rcvMsg2->next", NULL, rcvMsg2->next);
+
+ EXPECT_EQUAL_PTR("etMessageQueue->first", NULL, queue1.first);
+ EXPECT_EQUAL_PTR("etMessageQueue->last", NULL, queue1.last);
+
+ etMessage* rcvMsg3 = etMessageQueue_pop(&queue1);
+ EXPECT_EQUAL_PTR("etMessageQueue_pop if empty", NULL, rcvMsg3);
+
+}
+
+#define MAX 1000
+
+void TestEtMessageQueue_testMassiveMessaging(void){
+
+ etMessage msgArray[MAX];
+
+ etMessageQueue queue1;
+ etMessageQueue_init(&queue1);
+
+ int16 i;
+ for(i=0; i<MAX; i++){
+ //etMessage_init(&msgArray[i]);
+ msgArray[i].address = i;
+ msgArray[i].evtID = i;
+ }
+
+ int j;
+ for(j=0; j<3; j++){
+ for (i=0; i<MAX; i++){
+ etMessageQueue_push(&queue1, &(msgArray[i]));
+ }
+ for (i=0; i<MAX; i++){
+ etMessage* msg = etMessageQueue_pop(&queue1);
+ // EXPECTS are hidden to avoid too many testcases in log
+ if (msg == NULL){
+ EXPECT_FALSE("msg == NULL", TRUE);
+ break;
+ }
+ if (msg->address != msg->evtID){
+ EXPECT_FALSE("msg->address != msg->evtID", TRUE);
+ break;
+ }
+ if (msg->address != i){
+ EXPECT_FALSE("msg->address != i", TRUE);
+ break;
+ }
+ }
+ EXPECT_EQUAL_INT32("i==MAX", MAX, i);
+ }
+}
+
+void TestEtMessageQueue_runSuite(void){
+ etUnit_openTestSuite("TestEtMessageQueue");
+ ADD_TESTCASE(TestEtMessageQueue_testPushPop);
+ ADD_TESTCASE(TestEtMessageQueue_testMassiveMessaging);
+ etUnit_closeTestSuite();
+}
diff --git a/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtMessageService.c b/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtMessageService.c
index 867576097..9c1499ea8 100644
--- a/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtMessageService.c
+++ b/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtMessageService.c
@@ -11,8 +11,8 @@
*******************************************************************************/
#include "TestEtMessageService.h"
-#include "etUnit.h"
-#include "etMessageService.h"
+#include "etUnit/etUnit.h"
+#include "messaging/etMessageService.h"
/* mocking for MessageDispatcher */
diff --git a/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtMessageService.h b/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtMessageService.h
index 43a85baee..22bd62dc5 100644
--- a/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtMessageService.h
+++ b/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtMessageService.h
@@ -1,21 +1,21 @@
-/*******************************************************************************
- * 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:
- * Thomas Schuetz (initial contribution)
- *
- *******************************************************************************/
-
-#ifndef _TESTRMESSAGESERVICE_H_
-#define _TESTRMESSAGESERVICE_H_
-
-#include "etMessageService.h"
-
-void TestEtMessageService_runSuite(void);
-
-
-#endif /* _TESTRMESSAGESERVICE_H_ */
+/*******************************************************************************
+ * 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:
+ * Thomas Schuetz (initial contribution)
+ *
+ *******************************************************************************/
+
+#ifndef _TESTRMESSAGESERVICE_H_
+#define _TESTRMESSAGESERVICE_H_
+
+#include "messaging/etMessageService.h"
+
+void TestEtMessageService_runSuite(void);
+
+
+#endif /* _TESTRMESSAGESERVICE_H_ */
diff --git a/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtUnit.c b/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtUnit.c
index 3f01d0587..f69abb441 100644
--- a/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtUnit.c
+++ b/tests/org.eclipse.etrice.generator.c.tests/src/test/runtime/TestEtUnit.c
@@ -1,67 +1,67 @@
-/*******************************************************************************
- * 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:
- * Thomas Schuetz (initial contribution)
- *
- *******************************************************************************/
-
-
-/*
- * TestEtUnit.c
- *
- * Created on: 16.01.2012
- * Author: tschuetz
- */
-
-#include "TestEtUnit.h"
-#include "etUnit.h"
-
-void TestEtUnit_Expect(void){
- EXPECT_TRUE("EXPECT_TRUE", TRUE);
- EXPECT_FALSE("EXPECT_FALSE", FALSE);
-
- /* signed integer values */
- EXPECT_EQUAL_INT8("EXPECT_EQUAL_INT8", -123, -123);
- EXPECT_EQUAL_INT16("EXPECT_EQUAL_INT16", -12345, -12345);
- EXPECT_EQUAL_INT32("EXPECT_EQUAL_INT32", -1234567, -1234567);
-
- /* unsigned integer values */
- EXPECT_EQUAL_UINT8("EXPECT_EQUAL_INT8", 123, 123);
- EXPECT_EQUAL_UINT16("EXPECT_EQUAL_INT16", 12345, 12345);
- EXPECT_EQUAL_UINT32("EXPECT_EQUAL_INT32", 1234567, 1234567);
-
- /* float values */
- EXPECT_EQUAL_FLOAT32("EXPECT_EQUAL_FLOAT32", (etFloat32) 123.456, (etFloat32) 123.456, (etFloat32) 0.0001);
- EXPECT_EQUAL_FLOAT64("EXPECT_EQUAL_FLOAT64", (etFloat64) 123.456, (etFloat64) 123.456, (etFloat64) 0.0001);
-
- /* Pointers */
- etUInt16 value;
- etUInt16* valuePtr = &value;
-
- EXPECT_EQUAL_PTR("EXPECT_EQUAL_PTR", &value, valuePtr) \
-
-}
-
-
-void TestEtUnit_Expect_Order(void){
- etInt16 list[] = {1,2,3,4};
- EXPECT_ORDER_START(list, 4);
- EXPECT_ORDER("id=1", 1);
- EXPECT_ORDER("id=2", 2);
- EXPECT_ORDER("id=3", 3);
- EXPECT_ORDER_END("id=4", 4);
-}
-
-void TestEtUnit_runSuite(void){
- etUnit_openTestSuite("TestEtUnit");
- ADD_TESTCASE(TestEtUnit_Expect_Order);
- ADD_TESTCASE(TestEtUnit_Expect);
- etUnit_closeTestSuite();
-}
-
-
+/*******************************************************************************
+ * 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:
+ * Thomas Schuetz (initial contribution)
+ *
+ *******************************************************************************/
+
+
+/*
+ * TestEtUnit.c
+ *
+ * Created on: 16.01.2012
+ * Author: tschuetz
+ */
+
+#include "TestEtUnit.h"
+#include "etUnit/etUnit.h"
+
+void TestEtUnit_Expect(void){
+ EXPECT_TRUE("EXPECT_TRUE", TRUE);
+ EXPECT_FALSE("EXPECT_FALSE", FALSE);
+
+ /* signed integer values */
+ EXPECT_EQUAL_INT8("EXPECT_EQUAL_INT8", -123, -123);
+ EXPECT_EQUAL_INT16("EXPECT_EQUAL_INT16", -12345, -12345);
+ EXPECT_EQUAL_INT32("EXPECT_EQUAL_INT32", -1234567, -1234567);
+
+ /* unsigned integer values */
+ EXPECT_EQUAL_UINT8("EXPECT_EQUAL_INT8", 123, 123);
+ EXPECT_EQUAL_UINT16("EXPECT_EQUAL_INT16", 12345, 12345);
+ EXPECT_EQUAL_UINT32("EXPECT_EQUAL_INT32", 1234567, 1234567);
+
+ /* float values */
+ EXPECT_EQUAL_FLOAT32("EXPECT_EQUAL_FLOAT32", (etFloat32) 123.456, (etFloat32) 123.456, (etFloat32) 0.0001);
+ EXPECT_EQUAL_FLOAT32("EXPECT_EQUAL_FLOAT32", (etFloat32) 123.456, (etFloat32) 123.456, (etFloat32) 0.0001);
+
+ /* Pointers */
+ etUInt16 value;
+ etUInt16* valuePtr = &value;
+
+ EXPECT_EQUAL_PTR("EXPECT_EQUAL_PTR", &value, valuePtr) \
+
+}
+
+
+void TestEtUnit_Expect_Order(void){
+ etInt16 list[] = {1,2,3,4};
+ EXPECT_ORDER_START(list, 4);
+ EXPECT_ORDER("id=1", 1);
+ EXPECT_ORDER("id=2", 2);
+ EXPECT_ORDER("id=3", 3);
+ EXPECT_ORDER_END("id=4", 4);
+}
+
+void TestEtUnit_runSuite(void){
+ etUnit_openTestSuite("TestEtUnit");
+ ADD_TESTCASE(TestEtUnit_Expect_Order);
+ ADD_TESTCASE(TestEtUnit_Expect);
+ etUnit_closeTestSuite();
+}
+
+
diff --git a/tests/org.eclipse.etrice.generator.c.tests/tmp/testlog/TestCRuntime.xml b/tests/org.eclipse.etrice.generator.c.tests/tmp/testlog/TestCRuntime.xml
index 54d6818aa..a59852cc4 100644
--- a/tests/org.eclipse.etrice.generator.c.tests/tmp/testlog/TestCRuntime.xml
+++ b/tests/org.eclipse.etrice.generator.c.tests/tmp/testlog/TestCRuntime.xml
@@ -4,7 +4,7 @@
</testsuite>
<testsuite name="TestEtMessageQueue" tests="0" failures="0" errors="0" time="0">
<testcase name="TestEtMessageQueue_testPushPop" time="0"/>
- <testcase name="TestEtMessageQueue_testMassiveMessaging" time="0"/>
+ <testcase name="TestEtMessageQueue_testMassiveMessaging" time="15"/>
</testsuite>
<testsuite name="TestEtMessageService" tests="0" failures="0" errors="0" time="0">
<testcase name="TestEtMessageService_init" time="0"/>

Back to the top