aboutsummaryrefslogtreecommitdiffhomepage
path: root/objectivec/Tests
Commit message (Collapse)AuthorAge
* objectivec: Quash -Wself-assignGravatar Benjamin Barenblat2018-07-11
|
* [ObjC] Add ability to introspect list of enum values (#4678)Gravatar leovitch2018-05-29
| | | | | | | | | | Added new API to GPBEnumDescriptor to enable introspection of enum values. Refactored implementation so that this contains a minimum of added code. Clarified comments regarding behavior in the presence of the alias_allowed option. Added unit tests for new functionality and for the alias case.
* Remove the iOS Test App.Gravatar Thomas Van Lenten2018-04-20
| | | | | | The tests can run as what Apple calls a Logic Test (under xctest), which means it doesn't have to load an full UI App under the simulator, which speeds things up a fair amount.
* Add compile test sources for to test include order.Gravatar Thomas Van Lenten2018-04-02
| | | | | | | | | | | To ensure all headers aren't dependent on other things being imported before/after them, make a source that just imports each header and add it to the unittesting target, that way we ensure it can be included on its own with ordering issues. Also do this testing with a few generated headers that aren't part of the library to help ensure the different generated imports needed are complete.
* Add test for failing write of raw pointer to output streamGravatar Felix Jendrusch2018-03-08
|
* Add casts to removed undefined behaviors around shifts.Gravatar Thomas Van Lenten2018-01-31
| | | | | Fixes #4246 Fixes #4247
* Properly copy maps with string keys but pod values.Gravatar Thomas Van Lenten2018-01-03
| | | | | Add tests to cover all the common special casing in the runtime code to ensure things come out correctly.
* Fix up warnings from Xcode 9.1 (#3887)Gravatar dmaclach2017-11-16
| | | | Fix up warnings from Xcode 9.1
* Fixes 32bit tests.Gravatar Sergio Campama2017-11-15
|
* codereview cleanupGravatar Dave MacLachlan2017-11-15
|
* Reduce size of GPBDictionary by getting rid of class creation methodsGravatar Dave MacLachlan2017-11-14
|
* Improves coverage of GPBCodedInputStreamGravatar Sergio Campama2017-10-24
|
* Build out more complete code coverage in the tests.Gravatar Thomas Van Lenten2017-10-03
|
* ObjC: Fix merging of length delimited unknown fields.Gravatar Thomas Van Lenten2017-10-02
| | | | | - Add a test to cover this and tweak the test to not use two merge paths to be sure things are as expected.
* ObjC: Preserve unknown fields in proto3 syntax files.Gravatar Thomas Van Lenten2017-06-06
| | | | | | As announced: https://groups.google.com/forum/#!topic/protobuf/VX5qEmTW3y0 The ObjC side of https://github.com/google/protobuf/issues/272
* Properly error on a tag with field number zero.Gravatar Thomas Van Lenten2017-06-06
|
* Fix some cases of reading of 64bit map values.Gravatar Thomas Van Lenten2017-06-01
| | | | Fixes https://github.com/google/protobuf/issues/3164.
* Adds serial and parallel parsing tests to check if parallel parsing is ↵Gravatar Sergio Campama2017-05-23
| | | | faster than serial parsing, which it should
* Fix ExtensionRegistry copying and add tests.Gravatar Thomas Van Lenten2017-05-17
| | | | | | | | | - Fix up -copyWithZone: to not leave the two registries sharing some of the storage by using -addExtensions:. - Improve -addExtensions: to clone the sub dict when there is nothing to merge into. - A ExtensionRegistry unittests. - Update project schemes to not have extra things in perf scheme.
* Raise the recursion limit to 100 to match other languages.Gravatar Thomas Van Lenten2017-03-28
|
* Add GPBMessageDropUnknownFieldsRecursively() and tests.Gravatar Thomas Van Lenten2017-02-23
| | | | | GPBMessageDropUnknownFieldsRecursively() is a new helper to drop the unknownFields from a message and all sub messages (in fields or extensions).
* Timestamp helper fix, Duration helper cleanup.Gravatar Thomas Van Lenten2017-01-12
| | | | | | | | | - The Timestamp proto does not allow for negative nanos fields, so the seconds must be shifted and a positive nanos then applied. - Tweak the helpers on Duration to make it clear there is no "base" time involved. - Update the unittests for duration and timestamp to cover positive and negative NSTimeIntervals and what their impact is on the protos.
* Revert "Fix Timestamps with dates before the Unix epoch that contain ↵Gravatar Thomas Van Lenten2017-01-12
| | | | fractional seconds."
* Fix Timestamps with dates before the Unix epoch that contain fractional seconds.Gravatar Thomas Van Lenten2017-01-12
| | | | | The Timestamp proto does not allow for negative nanos fields, so the seconds must be shifted and a positive nanos then applied.
* Minor fix for autocreated object repeated fields and maps.Gravatar Thomas Van Lenten2017-01-05
| | | | | | | | | | | - If setting/clearing a repeated field/map that was objects, check the class before checking the autocreator. - Just to be paranoid, don’t mutate within copy/mutableCopy for the autocreated classes to ensure there is less chance of issues if someone does something really crazy threading wise. - Some more tests for the internal AutocreatedArray/AutocreatedDictionary classes to ensure things are working as expected. - Add Xcode 8.2 to the full_mac_build.sh supported list.
* Improve ObjC deprecated annotation support.Gravatar Thomas Van Lenten2016-12-08
| | | | | | | | | | | | | | - Check the parent file options for deprecation when deciding to tag Messages and Enums as deprecated. - Within the generated source push/pop the warning for implementing deprecated things around a deprecated class implementation. - Annotate the methods generated for extension fields as deprecated. - Add a testing .proto file that covers deprecated fields, messages, enums, enum values and compile it into the unittests to confirm things compile cleanly. - Add a testing .proto file that uses the file level option to make everything deprecated and compile it into the unittests to confirm things compile cleanly.
* Update the ObjC projects for Xcode 8Gravatar Thomas Van Lenten2016-10-03
| | | | | | | | | | - Let Xcode 8 update settings on the projects/schemes. - Migrate Swift tests to Swift 3 syntax. - Update the build/test script: - Require Xcode 8 (because of the Swift 3 requirement for tests) - Update the devices to what Xcode 8 has (8.x simulator seem to fail even though they can be downloaded in Xcode 8) - Update the travis images to ones with Xcode 8.
* Add ObjC helpers for Any WKT.Gravatar Thomas Van Lenten2016-09-08
| | | | | | | | | | | | | | | - Capture the ObjC prefix used when generating the the file. - Track the containing type on descriptors. - Mark descriptors where the message class name got a suffix added to it. - Expose a fullName property on Descriptors. - Add helpers for packing/unpacking Any messages. - Bump the ObjC runtime version number. Since we added methods and invoke them in the generated code, ensure the code is running against a matching version. Otherwise, someone could compile against headers, but run with a framework that is older and get unknown selector failures. This should trip clearer messaging. Fixes https://github.com/google/protobuf/issues/1674
* Make Root's +extensionRegistry generation smarter.Gravatar Thomas Van Lenten2016-09-01
| | | | | | | At generation time, walk the file's dependencies to see what really contains extensions so we can generate more minimal code that only links together the roots that provided extensions. Gets a bunch of otherwise noop code out of the call flow when the roots are +initialized.
* More complete nil/reset tests within a oneofGravatar Thomas Van Lenten2016-08-12
|
* Fix some constants to be correct for the message class in use.Gravatar Thomas Van Lenten2016-08-12
|
* More explicit tests for nil behaviors on fields.Gravatar Thomas Van Lenten2016-08-12
| | | | | Code already works, but make a bank of tests that call it out so things are very clean in the future just to be safe.
* Record zero for "has" for proto3 if in a oneof.Gravatar Thomas Van Lenten2016-08-11
| | | | | | | If a message is proto3, then the zero values still count as being set one the field is in a oneof. Add tests to confirm oneofs work as expected in both syntaxes.
* Never use strlen on utf8 runs so null characters work.Gravatar Thomas Van Lenten2016-08-09
| | | | | | | | | | | | | | Fixes https://github.com/google/protobuf/issues/1933 Add a new test that forces strings into two different implementations from the NSString class cluster to help confirm we're exercising both paths by which CodedOutputStream will extract data from an NSString. Move the old +load test (that was flawed because the behavior really depends on the type of string from the NSString class cluster); into a unittest that targets the specific case we're adding a behavior confirmation on. As a bonus, improve the TextFormat generation of string characters < 0x20.
* Adds support for appledoc in generated code. (#1928)Gravatar Sergio Campamá2016-08-09
| | | | | | Convert mapping of proto comments to appledoc format so they show up in Xcode and cocoadocs. Fixes https://github.com/google/protobuf/issues/1866
* add nullable qualifier to nil return typesGravatar Dia Kharrat2016-07-05
| | | | | | Add the `nullable` qualifier to return types of Objective-C methods that can return a nil due to errors. This change makes these methods compatible with the Swift 2 try-catch syntax.
* Xcode project cleanup/setup.Gravatar Thomas Van Lenten2016-06-29
| | | | | | | | - Correct some cases sources were compiled into the static lib and the tests. - Enable Xcodes code coverage support on the unittests. We aren't complete on coverage, but having the data always there should make it easier to chip away at this going forward. - Drop method in tests that isn't used, wire up a validator in another test.
* Fix GPBGetMessage{Repeated,Map}Field()Gravatar Thomas Van Lenten2016-06-27
| | | | | | | - Correct impl by using helpers the message wiring does. - Add unittests. Fixes https://github.com/google/protobuf/issues/1716
* Merge pull request #1714 from dnkoutso/masterGravatar Thomas Van Lenten2016-06-26
|\ | | | | Get value from text format name in GPBEnumDescriptor
| * Get value from text format name in GPBEnumDescriptorGravatar Dimitris Koutsogiorgas2016-06-26
| |
* | Rename methods to avoid ObjC KVC collisions. (#1699)Gravatar Thomas Van Lenten2016-06-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Note: Breaking API change on the Dictionary classes. The numeric value classes were using "Value" in the naming, but this silently collided with the KVC category on NSObject; meaning KVC code could break up a keypath and call these selectors with the wrong types leading to crashes (even though the code all would compile cleanly). - Rename the methods to use the "type" instead of literal "Value". - Update all the impls and tests. - Enable the warning that will catch issues like this in the future. Fixes https://github.com/google/protobuf/issues/1616
* | Adds destination flag to xcodebuild to avoid possible flake errors (#1697)Gravatar Sergio Campamá2016-06-20
| | | | | | | | Adds destination flag to xcodebuild to avoid possible flake errors
* | Add the CocoaPods integration tests to Travis.Gravatar Sergio Campamá2016-06-14
| | | | | | | | | | | | Also hotwires updating ruby as CocoaPods was crashing within a support library. Fixes #1619
* | Improving the granularity parsing errors (#1623)Gravatar Sergio Campamá2016-06-02
| | | | | | | | | | | | | | | | | | Add more context to GPBCodedInputStream failures. Have GPBMessage parsing apis extract out the GPBCodedInputStream information and expose it. Update HeaderDocs with pointers to all error domains/codes. Expand the unittests to cover the full set of errors reported. Fixes https://github.com/google/protobuf/issues/1618
* | fix expected class checking in GPBSetMessageRepeatedFieldGravatar Jon Wall2016-05-26
| | | | | | | | | | This is currently checking for the wrong class for enums and NSMutableArray fields.
* | Better support for using the proto library from a framework.Gravatar Thomas Van Lenten2016-05-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add generator constant for the default framework name. - Add generator api for making the CPP symbol from the name. - Add generator api to see if it is a bundled proto file. - Output a CPP conditional and two imports for the core library headers. - Add helper for generating the #import for file headers to deal with the framework imports. - Add a reference from the unittests to a WKT to use that to inspect how imports generate. - Update the podspec to define the CPP symbol and require pods 1.0 (or later). Fixes https://github.com/google/protobuf/issues/1457
* | Make the CocoaPods integration tests more robustGravatar Thomas Van Lenten2016-05-20
| | | | | | | | | | | | | | - Env solution doesn't seem to always work, use template pod files and copy them in place instead. - Flush the pods cache before and after runs. - Make pod install verbose to have the info incase something goes wrong.
* | Add shared schemes for the CocoaPods integration testsGravatar Thomas Van Lenten2016-05-19
| | | | | | | | | | Otherwise the projects have to be opened once to create user schemes for the command line builds to work.
* | CocoaPod Integration TestsGravatar Thomas Van Lenten2016-05-19
|/ | | | | | | | - Add an Xcode 6.3 created default iOS Project. - Add an Xcode 6.3 created default OS X Project. - Add Podfiles to for both that use Protobufs from within the tree. - Add a script to run the tests (and cleanup) to help confirm the state of the Protobuf.podspec and sources.
* Fix up -hash/-isEqual: for bool storage.Gravatar Thomas Van Lenten2016-04-27
| | | | | | | Both methods weren't checking the has_bits (where the bools are stored), so it resulted in invalid results. Add a test that should shake out something like this in the future also.