mirror of
https://github.com/valitydev/thrift.git
synced 2024-11-08 03:08:53 +00:00
ae0b22cc29
Patch: Dave Watson This closes #88 Summary: Clean up how enum values are handled if an integer value is not explicitly specified in the thrift file. For example, the following used to be a compile error, but works now: enum MyEnum { SOMEVALUE } struct MyStruct { 1: MyEnum e = SOMEVALUE } This change also cleans up some of the error handling with out-of-range values. Previously thrift simply issued a warning for enum values that didn't fit in an i32, but serialized them as i32 anyway. Now out-of-range enum values result in a compile failure. Test Plan: Included a new unit test to verify the assignment of enum values. I also verified that g++ makes the same enum value assignments when compiling these enums as C++ code. |
||
---|---|---|
.. | ||
concurrency | ||
link | ||
processor | ||
AllProtocolTests.cpp | ||
AllProtocolTests.tcc | ||
Base64Test.cpp | ||
Benchmark.cpp | ||
DebugProtoTest_extras.cpp | ||
DebugProtoTest.cpp | ||
DenseProtoTest.cpp | ||
EnumTest.cpp | ||
GenericHelpers.h | ||
JSONProtoTest.cpp | ||
Makefile.am | ||
OpenSSLManualInitTest.cpp | ||
OptionalRequiredTest.cpp | ||
RecursiveTest.cpp | ||
RWMutexStarveTest.cpp | ||
SpecializationTest.cpp | ||
TBufferBaseTest.cpp | ||
TFDTransportTest.cpp | ||
TFileTransportTest.cpp | ||
ThriftTest_extras.cpp | ||
TMemoryBufferTest.cpp | ||
ToStringTest.cpp | ||
TPipedTransportTest.cpp | ||
TransportTest.cpp | ||
UnitTestMain.cpp | ||
ZlibTest.cpp |