summaryrefslogtreecommitdiff
path: root/test/OptionalRequiredTest.thrift
Commit message (Collapse)AuthorAgeFilesLines
* THRIFT-3464 Fix several defects in c_glib code generatorNobuaki Sukegawa2015-12-061-0/+6
| | | | | | | Client: c_glib compiler Patch: Nobuaki Sukegawa This closes #724
* THRIFT-1394:Treatment of optional fields is not consistent between C++ and JavaJake Farrell2012-01-271-0/+5
| | | | | | | | | | | 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
* THRIFT-582 C(c_glib) implementation of ThriftRoger Meier2010-10-271-0/+1
| | | | | | | Patch: Anatol Pomozov and Michael Lum git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1027933 13f79535-47bb-0310-9956-ffa450edef68
* THRIFT-622. Add appropriate licensing information to get Thrift ready for a ↵Todd Lipcon2009-12-071-0/+4
| | | | | | release. git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@887812 13f79535-47bb-0310-9956-ffa450edef68
* THRIFT-387. Add license headers to a bunch of filesDavid Reiss2009-03-301-0/+19
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@760189 13f79535-47bb-0310-9956-ffa450edef68
* Add support for .equals() to Java structs.David Reiss2008-03-021-0/+10
| | | | | | | | | | | | | | | | | | | - Add a new method to t_java_generator that generates a .equals() method. - Add a correct but useless implementation of hashCode for structs. (This is required by conventino when overriding .equals().) - Add java_package to DebugProtoTest and OptionalRequiredTest. - Add a new structure to OptionalRequiredTest to assist testing the behavior of .equals() with respect to null and unset fields. - Clean up test/java/build.xml a bit. (It still has a ways to go.) - Add EqualityTest.java to test .equals(). - Add IdentityTest.java to test that writing and reading a structure preserves equality. Tested by runnint atn test. I also looked at the generated code for OptionalRequiredTest.thrift. git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665541 13f79535-47bb-0310-9956-ffa450edef68
* Make the C++ generator use non-hardcoded namespaces.David Reiss2008-02-271-1/+1
| | | | | | | | | | | - Make the C++ generator use program->get_namespace("cpp") instead of program->get_cpp_namespace() - Eliminate the explicit "cpp_namespace" in t_program. - Deprecate the cpp_namespace token. - Update example .thrift files and syntax files. git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665513 13f79535-47bb-0310-9956-ffa450edef68
* Thrift: "make check" support.David Reiss2008-02-041-8/+0
| | | | | | | | | | | | | | | | | | Summary: Add a Makefile.am in the test directory that runs some of the test programs when "make check" is executed. Also removed some obsolete comments. Reviewed By: mcslee Test Plan: Ran make check, saw all tests pass. Ran make install, saw no test programs installed. Ran ./cleanup.sh, saw a pristine workspace. Revert Plan: ok git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665458 13f79535-47bb-0310-9956-ffa450edef68
* Thrift: Clean up and test TDenseProtocolDavid Reiss2007-09-111-0/+9
| | | | | | | | | | | | | | | | | Summary: - TDenseProtocol now includes a part of the struct fingerprint in the serialized message, to protect from unserialzing trash. - A lot of cleanups and commenting for TDenseProtocol. - A lot of test cases for same. Reviewed By: mcslee Test Plan: test/DenseProtoTest.cpp Revert Plan: ok git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665257 13f79535-47bb-0310-9956-ffa450edef68
* Thrift: Move TStringBuffer functionality into TMemoryBuffer.David Reiss2007-08-211-1/+1
| | | | | | | | | | | | | | | | | | | Summary: TMemoryBuffer already has the necessary plubming to work with C++ strings. This revision implements that functionality with a few wrapper methods. Removed TStringBuffer as it should no longer be required (and it is tricky to safely inherit from a class that has a non-virtual destructor). Also refactored the TMemoryBuffer constructors a bit. Reviewed By: aditya, yunfang Test Plan: test/TMemoryBufferTest.cpp Revert Plan: ok git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665213 13f79535-47bb-0310-9956-ffa450edef68
* Thrift: Merging external patch.David Reiss2007-08-141-0/+42
Summary: Merging a patch from Andy Lutomirsky. - Allow fields to be marked "required" or "optional" (only affects C++). - Thrift structs now have operator ==. Reviewed By: mcslee Test Plan: test/OptionalRequiredTest.cpp Revert Plan: ok git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665202 13f79535-47bb-0310-9956-ffa450edef68