Commit 9cd243b8 authored by Florian Raeth's avatar Florian Raeth

add N, Z, B test

parent 80f4b94e
......@@ -36,8 +36,14 @@ public class AdapterGenerationTest extends AbstractSymtabTest {
// Connect component's ports to topics
componentInstanceSymbol.getPortInstance("in1").orElse(null).setMiddlewareSymbol(new SomeIPConnectionSymbol(11,12,13/*,14,15*/));
componentInstanceSymbol.getPortInstance("in2").orElse(null).setMiddlewareSymbol(new SomeIPConnectionSymbol(21,22,23/*,24,25*/));
componentInstanceSymbol.getPortInstance("in3").orElse(null).setMiddlewareSymbol(new SomeIPConnectionSymbol(31,32,33/*,34,35*/));
componentInstanceSymbol.getPortInstance("in4").orElse(null).setMiddlewareSymbol(new SomeIPConnectionSymbol(41,42,43/*,44,45*/));
componentInstanceSymbol.getPortInstance("in5").orElse(null).setMiddlewareSymbol(new SomeIPConnectionSymbol(51,52,53/*,54,55*/));
componentInstanceSymbol.getPortInstance("out1").orElse(null).setMiddlewareSymbol(new SomeIPConnectionSymbol(111,112,113/*,114,115*/));
componentInstanceSymbol.getPortInstance("out2").orElse(null).setMiddlewareSymbol(new SomeIPConnectionSymbol(121,122,123/*,124,125*/));
componentInstanceSymbol.getPortInstance("out3").orElse(null).setMiddlewareSymbol(new SomeIPConnectionSymbol(131,132,133/*,134,135*/));
componentInstanceSymbol.getPortInstance("out4").orElse(null).setMiddlewareSymbol(new SomeIPConnectionSymbol(141,142,143/*,144,145*/));
componentInstanceSymbol.getPortInstance("out5").orElse(null).setMiddlewareSymbol(new SomeIPConnectionSymbol(151,152,153/*,154,155*/));
List<File> files = generatorSomeIP.generateSomeIPAdapter(componentInstanceSymbol);
......
......@@ -34,7 +34,16 @@ public class PrettyPrintGenerationTest extends AbstractSymtabTest {
generatorSomeIP.setGenerationTargetPath("./target/generated-sources/");
// Connect component's ports to topics
componentInstanceSymbol.getPortInstance("in1").orElse(null).setMiddlewareSymbol(new SomeIPConnectionSymbol(1,2,3));
componentInstanceSymbol.getPortInstance("in1").orElse(null).setMiddlewareSymbol(new SomeIPConnectionSymbol(11,12,13/*,14,15*/));
componentInstanceSymbol.getPortInstance("in2").orElse(null).setMiddlewareSymbol(new SomeIPConnectionSymbol(21,22,23/*,24,25*/));
componentInstanceSymbol.getPortInstance("in3").orElse(null).setMiddlewareSymbol(new SomeIPConnectionSymbol(31,32,33/*,34,35*/));
componentInstanceSymbol.getPortInstance("in4").orElse(null).setMiddlewareSymbol(new SomeIPConnectionSymbol(41,42,43/*,44,45*/));
componentInstanceSymbol.getPortInstance("in5").orElse(null).setMiddlewareSymbol(new SomeIPConnectionSymbol(51,52,53/*,54,55*/));
componentInstanceSymbol.getPortInstance("out1").orElse(null).setMiddlewareSymbol(new SomeIPConnectionSymbol(111,112,113/*,114,115*/));
componentInstanceSymbol.getPortInstance("out2").orElse(null).setMiddlewareSymbol(new SomeIPConnectionSymbol(121,122,123/*,124,125*/));
componentInstanceSymbol.getPortInstance("out3").orElse(null).setMiddlewareSymbol(new SomeIPConnectionSymbol(131,132,133/*,134,135*/));
componentInstanceSymbol.getPortInstance("out4").orElse(null).setMiddlewareSymbol(new SomeIPConnectionSymbol(141,142,143/*,144,145*/));
componentInstanceSymbol.getPortInstance("out5").orElse(null).setMiddlewareSymbol(new SomeIPConnectionSymbol(151,152,153/*,154,155*/));
List<File> files = generatorSomeIP.generatePrettyPrint(componentInstanceSymbol);
......
......@@ -3,7 +3,13 @@ Component name: tests.a.compA
Ports:
in1 : incoming (someip, serviceID: 1 instanceID: 2 eventgroupID: 3)
in2 : incoming (unknown symbol)
out1 : outgoing (unknown symbol)
out2 : outgoing (unknown symbol)
in1 : incoming (someip, serviceID: 11 instanceID: 12 eventgroupID: 13)
in2 : incoming (someip, serviceID: 21 instanceID: 22 eventgroupID: 23)
in3 : incoming (someip, serviceID: 31 instanceID: 32 eventgroupID: 33)
in4 : incoming (someip, serviceID: 41 instanceID: 42 eventgroupID: 43)
in5 : incoming (someip, serviceID: 51 instanceID: 52 eventgroupID: 53)
out1 : outgoing (someip, serviceID: 111 instanceID: 112 eventgroupID: 113)
out2 : outgoing (someip, serviceID: 121 instanceID: 122 eventgroupID: 123)
out3 : outgoing (someip, serviceID: 131 instanceID: 132 eventgroupID: 133)
out4 : outgoing (someip, serviceID: 141 instanceID: 142 eventgroupID: 143)
out5 : outgoing (someip, serviceID: 151 instanceID: 152 eventgroupID: 153)
......@@ -43,6 +43,27 @@ private:
void run_in2();
void on_message_in2(const std::shared_ptr<vsomeip::message> &_message);
void on_availability_in2(vsomeip::service_t _service, vsomeip::instance_t _instance, bool _is_available);
std::shared_ptr<vsomeip::application> in3_Subscriber;
std::mutex mutex_in3;
std::condition_variable condition_in3;
void run_in3();
void on_message_in3(const std::shared_ptr<vsomeip::message> &_message);
void on_availability_in3(vsomeip::service_t _service, vsomeip::instance_t _instance, bool _is_available);
std::shared_ptr<vsomeip::application> in4_Subscriber;
std::mutex mutex_in4;
std::condition_variable condition_in4;
void run_in4();
void on_message_in4(const std::shared_ptr<vsomeip::message> &_message);
void on_availability_in4(vsomeip::service_t _service, vsomeip::instance_t _instance, bool _is_available);
std::shared_ptr<vsomeip::application> in5_Subscriber;
std::mutex mutex_in5;
std::condition_variable condition_in5;
void run_in5();
void on_message_in5(const std::shared_ptr<vsomeip::message> &_message);
void on_availability_in5(vsomeip::service_t _service, vsomeip::instance_t _instance, bool _is_available);
std::shared_ptr<vsomeip::application> out1_Publisher;
......@@ -50,4 +71,13 @@ private:
std::shared_ptr<vsomeip::application> out2_Publisher;
void publishout2_Publisher();
std::shared_ptr<vsomeip::application> out3_Publisher;
void publishout3_Publisher();
std::shared_ptr<vsomeip::application> out4_Publisher;
void publishout4_Publisher();
std::shared_ptr<vsomeip::application> out5_Publisher;
void publishout5_Publisher();
};
......@@ -4,6 +4,12 @@ package tests.a;
component CompA{
port in Q in1;
port in Q in2;
port in N in3;
port in Z in4;
port in B in5;
port out Q out1;
port out Q out2;
port out N out3;
port out Z out4;
port out B out5;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment