THRIFT-2704 - compiler: T_ONEWAY type used for oneway methods instead of T_CALL
Patch: Konrad Grochowski
This closes #216
diff --git a/lib/cpp/test/AllProtocolTests.tcc b/lib/cpp/test/AllProtocolTests.tcc
index 7ccaef5..3c98943 100644
--- a/lib/cpp/test/AllProtocolTests.tcc
+++ b/lib/cpp/test/AllProtocolTests.tcc
@@ -97,14 +97,16 @@
const char* name;
TMessageType type;
int32_t seqid;
- } messages[4] = {
+ } messages[] = {
{"short message name", T_CALL, 0},
{"1", T_REPLY, 12345},
{"loooooooooooooooooooooooooooooooooong", T_EXCEPTION, 1 << 16},
+ {"one way push", T_ONEWAY, 12},
{"Janky", T_CALL, 0}
};
+ const int messages_count = sizeof(messages) / sizeof(TMessage);
- for (int i = 0; i < 4; i++) {
+ for (int i = 0; i < messages_count; i++) {
shared_ptr<TTransport> transport(new TMemoryBuffer());
shared_ptr<TProtocol> protocol(new TProto(transport));