summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDirk Huss <dirk_huss@mentor.com>2015-12-15 15:43:01 +0100
committerDirk Huss <dirk_huss@mentor.com>2015-12-15 15:43:07 +0100
commitf3ad81cde79469a1424cfb44edeb82b57e7b08de (patch)
tree88c502f1e479c6253443c92f18024f869c58c900
parent6b1eb79629cd188e6d1384854adfbfb5b35df14f (diff)
downloadgenivi-common-api-runtime-f3ad81cde79469a1424cfb44edeb82b57e7b08de.tar.gz
CommonAPI-Tools 3.1.5p13.1.5p1
-rw-r--r--org.genivi.commonapi.core.verification/fidl/ti_datatypes_advanced.fidl2
-rw-r--r--org.genivi.commonapi.core.verification/src/DTAdvanced.cpp25
-rw-r--r--org.genivi.commonapi.core.verification/src/stub/DTAdvancedStub.cpp4
-rw-r--r--org.genivi.commonapi.core.verification/src/stub/DTAdvancedStub.h1
-rw-r--r--org.genivi.commonapi.core/src/org/genivi/commonapi/core/generator/FInterfaceProxyGenerator.xtend4
-rw-r--r--org.genivi.commonapi.core/src/org/genivi/commonapi/core/generator/FInterfaceStubGenerator.xtend6
6 files changed, 33 insertions, 9 deletions
diff --git a/org.genivi.commonapi.core.verification/fidl/ti_datatypes_advanced.fidl b/org.genivi.commonapi.core.verification/fidl/ti_datatypes_advanced.fidl
index 84c11a0..12022d0 100644
--- a/org.genivi.commonapi.core.verification/fidl/ti_datatypes_advanced.fidl
+++ b/org.genivi.commonapi.core.verification/fidl/ti_datatypes_advanced.fidl
@@ -21,6 +21,7 @@ interface TestInterface {
tUnion tUnionIn
tMap tMapIn
tTypedef tTypedefIn
+ tEnumeration [] tEnumerationArrayIn
}
out {
tArray tArrayOut
@@ -29,6 +30,7 @@ interface TestInterface {
tUnion tUnionOut
tMap tMapOut
tTypedef tTypedefOut
+ tEnumeration [] tEnumerationArrayOut
}
}
diff --git a/org.genivi.commonapi.core.verification/src/DTAdvanced.cpp b/org.genivi.commonapi.core.verification/src/DTAdvanced.cpp
index 24c15f3..e053fe5 100644
--- a/org.genivi.commonapi.core.verification/src/DTAdvanced.cpp
+++ b/org.genivi.commonapi.core.verification/src/DTAdvanced.cpp
@@ -137,12 +137,16 @@ TEST_F(DTAdvanced, SendAndReceive) {
typedefTestValue = 64;
+ std::vector<v1_0::commonapi::datatypes::advanced::TestInterface::tEnumeration> enumArrayIn;
+ enumArrayIn.push_back(enumerationTestValue);
+
v1_0::commonapi::datatypes::advanced::TestInterface::tArray arrayResultValue;
v1_0::commonapi::datatypes::advanced::TestInterface::tEnumeration enumerationResultValue;
v1_0::commonapi::datatypes::advanced::TestInterface::tStruct structResultValue;
v1_0::commonapi::datatypes::advanced::TestInterface::tUnion unionResultValue;
v1_0::commonapi::datatypes::advanced::TestInterface::tMap mapResultValue;
v1_0::commonapi::datatypes::advanced::TestInterface::tTypedef typedefResultValue;
+ std::vector<v1_0::commonapi::datatypes::advanced::TestInterface::tEnumeration> enumArrayOut;
testProxy_->fTest(
arrayTestValue,
@@ -151,13 +155,15 @@ TEST_F(DTAdvanced, SendAndReceive) {
unionTestValue,
mapTestValue,
typedefTestValue,
+ enumArrayIn,
callStatus,
arrayResultValue,
enumerationResultValue,
structResultValue,
unionResultValue,
mapResultValue,
- typedefResultValue
+ typedefResultValue,
+ enumArrayOut
);
ASSERT_EQ(callStatus, CommonAPI::CallStatus::SUCCESS);
@@ -167,6 +173,7 @@ TEST_F(DTAdvanced, SendAndReceive) {
EXPECT_EQ(unionTestValue, unionResultValue);
EXPECT_EQ(mapTestValue, mapResultValue);
EXPECT_EQ(typedefTestValue, typedefResultValue);
+ EXPECT_EQ(enumArrayIn, enumArrayOut);
}
/*
@@ -203,12 +210,16 @@ TEST_F(DTAdvanced, SendAndReceiveInvalid) {
typedefTestValue = 64;
+ std::vector<v1_0::commonapi::datatypes::advanced::TestInterface::tEnumeration> enumArrayIn;
+ enumArrayIn.push_back(v1_0::commonapi::datatypes::advanced::TestInterface::tEnumeration::VALUE2);
+
v1_0::commonapi::datatypes::advanced::TestInterface::tArray arrayResultValue;
v1_0::commonapi::datatypes::advanced::TestInterface::tEnumeration enumerationResultValue;
v1_0::commonapi::datatypes::advanced::TestInterface::tStruct structResultValue;
v1_0::commonapi::datatypes::advanced::TestInterface::tUnion unionResultValue;
v1_0::commonapi::datatypes::advanced::TestInterface::tMap mapResultValue;
v1_0::commonapi::datatypes::advanced::TestInterface::tTypedef typedefResultValue;
+ std::vector<v1_0::commonapi::datatypes::advanced::TestInterface::tEnumeration> enumArrayOut;
testProxy_->fTest(
arrayTestValue,
@@ -217,13 +228,15 @@ TEST_F(DTAdvanced, SendAndReceiveInvalid) {
unionTestValue,
mapTestValue,
typedefTestValue,
+ enumArrayIn,
callStatus,
arrayResultValue,
enumerationResultValue,
structResultValue,
unionResultValue,
mapResultValue,
- typedefResultValue
+ typedefResultValue,
+ enumArrayOut
);
ASSERT_EQ(callStatus, CommonAPI::CallStatus::INVALID_VALUE);
@@ -383,12 +396,16 @@ TEST_F(DTAdvanced, BroadcastReceive) {
typedefTestValue = 64;
+ std::vector<v1_0::commonapi::datatypes::advanced::TestInterface::tEnumeration> enumArrayIn;
+ enumArrayIn.push_back(enumerationTestValue);
+
v1_0::commonapi::datatypes::advanced::TestInterface::tArray arrayResultValue;
v1_0::commonapi::datatypes::advanced::TestInterface::tEnumeration enumerationResultValue;
v1_0::commonapi::datatypes::advanced::TestInterface::tStruct structResultValue;
v1_0::commonapi::datatypes::advanced::TestInterface::tUnion unionResultValue;
v1_0::commonapi::datatypes::advanced::TestInterface::tMap mapResultValue;
v1_0::commonapi::datatypes::advanced::TestInterface::tTypedef typedefResultValue;
+ std::vector<v1_0::commonapi::datatypes::advanced::TestInterface::tEnumeration> enumArrayOut;
received_ = false;
testProxy_->getBTestEvent().subscribe([&](
@@ -415,13 +432,15 @@ TEST_F(DTAdvanced, BroadcastReceive) {
unionTestValue,
mapTestValue,
typedefTestValue,
+ enumArrayIn,
callStatus,
arrayResultValue,
enumerationResultValue,
structResultValue,
unionResultValue,
mapResultValue,
- typedefResultValue
+ typedefResultValue,
+ enumArrayOut
);
usleep(100000);
diff --git a/org.genivi.commonapi.core.verification/src/stub/DTAdvancedStub.cpp b/org.genivi.commonapi.core.verification/src/stub/DTAdvancedStub.cpp
index 715cd89..b4ed6f3 100644
--- a/org.genivi.commonapi.core.verification/src/stub/DTAdvancedStub.cpp
+++ b/org.genivi.commonapi.core.verification/src/stub/DTAdvancedStub.cpp
@@ -30,6 +30,7 @@ void DTAdvancedStub::fTest(const std::shared_ptr<CommonAPI::ClientId> clientId,
TestInterface::tUnion tUnionIn,
TestInterface::tMap tMapIn,
TestInterface::tTypedef tTypedefIn,
+ std::vector<TestInterface::tEnumeration> _tEnumerationArrayIn,
fTestReply_t _reply) {
(void)clientId;
@@ -39,8 +40,9 @@ void DTAdvancedStub::fTest(const std::shared_ptr<CommonAPI::ClientId> clientId,
TestInterface::tUnion tUnionOut = tUnionIn;
TestInterface::tMap tMapOut = tMapIn;
TestInterface::tTypedef tTypedefOut = tTypedefIn;
+ std::vector<TestInterface::tEnumeration> _tEnumerationArrayOut = _tEnumerationArrayIn;
- _reply(tArrayOut, tEnumerationOut, tStructOut, tUnionOut, tMapOut, tTypedefOut);
+ _reply(tArrayOut, tEnumerationOut, tStructOut, tUnionOut, tMapOut, tTypedefOut, _tEnumerationArrayOut);
fireBTestEvent(
tArrayOut,
diff --git a/org.genivi.commonapi.core.verification/src/stub/DTAdvancedStub.h b/org.genivi.commonapi.core.verification/src/stub/DTAdvancedStub.h
index 052740f..5719111 100644
--- a/org.genivi.commonapi.core.verification/src/stub/DTAdvancedStub.h
+++ b/org.genivi.commonapi.core.verification/src/stub/DTAdvancedStub.h
@@ -29,6 +29,7 @@ public:
TestInterface::tStruct tStructIn,
TestInterface::tUnion tUnionIn, TestInterface::tMap tMapIn,
TestInterface::tTypedef tTypedefIn,
+ std::vector<TestInterface::tEnumeration> _tEnumerationArrayIn,
fTestReply_t _reply);
};
diff --git a/org.genivi.commonapi.core/src/org/genivi/commonapi/core/generator/FInterfaceProxyGenerator.xtend b/org.genivi.commonapi.core/src/org/genivi/commonapi/core/generator/FInterfaceProxyGenerator.xtend
index 397522d..af8ef42 100644
--- a/org.genivi.commonapi.core/src/org/genivi/commonapi/core/generator/FInterfaceProxyGenerator.xtend
+++ b/org.genivi.commonapi.core/src/org/genivi/commonapi/core/generator/FInterfaceProxyGenerator.xtend
@@ -304,7 +304,7 @@ class FInterfaceProxyGenerator {
template <typename ... _AttributeExtensions>
«method.generateDefinitionWithin(fInterface.proxyClassName + '<_AttributeExtensions...>', false)» {
«FOR arg : method.inArgs»
- «IF arg.getType.supportsValidation»
+ «IF !arg.array && arg.getType.supportsValidation»
if (!_«arg.elementName».validate()) {
_internalCallStatus = CommonAPI::CallStatus::INVALID_VALUE;
return;
@@ -319,7 +319,7 @@ class FInterfaceProxyGenerator {
template <typename ... _AttributeExtensions>
«method.generateAsyncDefinitionWithin(fInterface.proxyClassName + '<_AttributeExtensions...>', false)» {
«FOR arg : method.inArgs»
- «IF arg.getType.supportsValidation»
+ «IF !arg.array && arg.getType.supportsValidation»
if (!_«arg.elementName».validate()) {
«method.generateDummyArgumentDefinitions»
«val callbackArguments = method.generateDummyArgumentList»
diff --git a/org.genivi.commonapi.core/src/org/genivi/commonapi/core/generator/FInterfaceStubGenerator.xtend b/org.genivi.commonapi.core/src/org/genivi/commonapi/core/generator/FInterfaceStubGenerator.xtend
index 140590c..fc9ba42 100644
--- a/org.genivi.commonapi.core/src/org/genivi/commonapi/core/generator/FInterfaceStubGenerator.xtend
+++ b/org.genivi.commonapi.core/src/org/genivi/commonapi/core/generator/FInterfaceStubGenerator.xtend
@@ -485,7 +485,7 @@ class FInterfaceStubGenerator {
«IF !method.isFireAndForget»
«method.generateDummyArgumentDefinitions»
«FOR arg : method.outArgs»
- «IF arg.getType.supportsValidation»
+ «IF !arg.array && arg.getType.supportsValidation»
if (!«arg.elementName».validate()) {
return;
}
@@ -502,7 +502,7 @@ class FInterfaceStubGenerator {
«IF broadcast.selective»
void «fInterface.stubDefaultClassName»::«broadcast.stubAdapterClassFireSelectiveMethodName»(«generateSendSelectiveSignatur(broadcast, fInterface, false)») {
«FOR arg : broadcast.outArgs»
- «IF arg.getType.supportsValidation»
+ «IF !arg.array && arg.getType.supportsValidation»
if (!_«arg.elementName».validate()) {
return;
}
@@ -535,7 +535,7 @@ class FInterfaceStubGenerator {
«ELSE»
void «fInterface.stubDefaultClassName»::«broadcast.stubAdapterClassFireEventMethodName»(«broadcast.outArgs.map['const ' + getTypeName(fInterface, true) + ' &_' + elementName].join(', ')») {
«FOR arg : broadcast.outArgs»
- «IF arg.getType.supportsValidation»
+ «IF !arg.array && arg.getType.supportsValidation»
if (!_«arg.elementName».validate()) {
return;
}