r1283@opsdev009 (orig r69414): dreiss | 2007-11-13 03:55:06 -0800
[amiethrift.git] / test / ReflectionTest.cpp
blob614c6138f752a2425adc780e6a8dd8300a521876
1 /*
2 ../compiler/cpp/thrift -cpp DebugProtoTest.thrift
3 ../compiler/cpp/thrift -cpp StressTest.thrift
4 g++ -Wall -I../lib/cpp/src -I/usr/local/include/boost-1_33_1 \
5 ReflectionTest.cpp \
6 gen-cpp/StressTest_types.cpp gen-cpp/DebugProtoTest_types.cpp \
7 gen-cpp/Service.cpp gen-cpp/PartiallyReflectable.cpp \
8 ../lib/cpp/.libs/libthrift.a -o ReflectionTest
9 ./ReflectionTest
12 #include <iostream>
13 #include "gen-cpp/PartiallyReflectable.h"
14 #include "gen-cpp/Service.h"
15 #include "../lib/cpp/src/protocol/TDebugProtocol.h"
17 int main() {
18 using std::cout;
19 using std::endl;
21 facebook::thrift::reflection::limited::Service srv1;
22 thrift::test::PartiallyReflectableIf::getStaticLimitedReflection(srv1);
23 cout << facebook::thrift::ThriftDebugString(srv1) << endl << endl;
25 facebook::thrift::reflection::limited::Service srv2;
26 test::stress::ServiceIf::getStaticLimitedReflection(srv2);
27 cout << facebook::thrift::ThriftDebugString(srv2) << endl << endl;
29 return 0;