thrift/test
Jake Farrell f9f01fa1e0 THRIFT-1394:Treatment of optional fields is not consistent between C++ and Java
Client: cpp
Patch: Diwaker Gupta

In CPP, all optional fields are guarded by the isset helper struct. On Java, however, the generated code takes advantage of nullable types: for containers, structs, exceptions, enums, and, notably, strings, the generator elides explicit use of an "isset" bit vector and instead emits checks of the form "field null". This leads to varying behavior between the two languages: an optional string field with a default value will have {{isset[fieldid]}} false on C, but the equivalent test in Java will be true.



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1236529 13f79535-47bb-0310-9956-ffa450edef68
2012-01-27 04:48:26 +00:00
..
cpp Thrift-1462: add more strict compiler flags 2011-12-13 20:02:33 +00:00
csharp/ThriftTest THRIFT-1489 Add support for WCF bindings (optionally) to C# compiler, allowing web service usage of Thrift generated code 2012-01-17 21:20:56 +00:00
hs THRIFT-1202 Malformed JSON for map<string,type> services parameters 2011-06-21 04:42:43 +00:00
nodejs THRIFT-1267 Node.js can't throw exceptions 2012-01-12 21:38:29 +00:00
ocaml THRIFT-387. Add license headers to a bunch of files 2009-03-30 21:35:00 +00:00
perl THRIFT-847 Test Framework harmonization across all languages 2012-01-10 21:30:02 +00:00
php THRIFT-847 Test Framework harmonization across all languages 2012-01-21 09:18:05 +00:00
py THRIFT-1416 Python Unit test is broken on ci 2011-11-01 21:03:33 +00:00
py.twisted THRIFT-581 Add a testsuite for txThrift (Twisted) / py.twisted 2010-10-08 17:46:06 +00:00
rb THRIFT-526. rb: Generated Ruby enums have no good way to get the names back out once you have a number. 2009-06-24 17:55:53 +00:00
threads THRIFT-1361 Optional replacement of pthread by boost::thread 2011-10-02 10:51:45 +00:00
AnnotationTest.thrift THRIFT-564. Support arbitrary annotations on struct fields 2010-03-05 07:51:51 +00:00
BrokenConstants.thrift THRIFT-387. Add license headers to a bunch of files 2009-03-30 21:35:00 +00:00
ConstantsDemo.thrift THRIFT-918 : better haskell tests 2010-09-27 19:27:40 +00:00
DebugProtoTest.thrift THRIFT-1365. java: TupleProtocol#writeBitSet unintentionally writes a variable length byte array 2011-09-26 21:29:15 +00:00
DenseLinkingTest.thrift THRIFT-420. Remove all negative structure field ids from the code 2009-04-02 19:24:02 +00:00
DocTest.thrift THRIFT-387. Add license headers to a bunch of files 2009-03-30 21:35:00 +00:00
FastbinaryTest.py THRIFT-420. Remove all negative structure field ids from the code 2009-04-02 19:24:02 +00:00
JavaBeansTest.thrift THRIFT-734. java: Can't use primitive types in service definitions for bean generated code 2010-03-16 03:13:26 +00:00
Makefile.am THRIFT-847 Test Framework harmonization across all languages 2012-01-21 09:18:05 +00:00
ManyOptionals.thrift THRIFT-1469. java: Java isset space optimization 2011-12-21 18:13:29 +00:00
ManyTypedefs.thrift THRIFT-387. Add license headers to a bunch of files 2009-03-30 21:35:00 +00:00
OptionalRequiredTest.thrift THRIFT-1394:Treatment of optional fields is not consistent between C++ and Java 2012-01-27 04:48:26 +00:00
SmallTest.thrift THRIFT-387. Add license headers to a bunch of files 2009-03-30 21:35:00 +00:00
StressTest.thrift THRIFT-387. Add license headers to a bunch of files 2009-03-30 21:35:00 +00:00
test.sh THRIFT-847 Test Framework harmonization across all languages 2012-01-21 09:18:05 +00:00
ThriftTest.thrift THRIFT-317. java: Issues with Java struct validation 2011-12-27 22:26:59 +00:00