Commit Graph

227 Commits

Author SHA1 Message Date
Hao Nguyen
37dbfd6c46 Do not require ruby enum to be uppercase 2018-12-14 17:06:11 -08:00
Hao Nguyen
00b9b2303c Add conformance test for enum alias with same name but different case 2018-12-14 16:48:06 -08:00
Hao Nguyen
a6d624ba44 Merge branch 'master' of https://github.com/haon4/protobuf 2018-12-14 16:41:49 -08:00
Hao Nguyen
3d46d8dfe4 Add conformance test for enum alias of the same name with different case 2018-12-14 16:41:44 -08:00
Paul Yang
cecba296b8
Down-integrate internal changes (#5467)
* Down-integrate internal changes

* Update generated code for php, objc and csharp.

* Add missing dependency in conformance_php
2018-12-14 16:05:03 -08:00
Paul Yang
9bda1f19bf
Adopt upb change for timestamp and duration json to php (#5106)
* Adopt upb change for timestamp and duration json to php

* Remove unused code

* Re-sync upb

* Fix php implementation timestamp json parsing

* Fix strptime use local timezone on mac.

* Remove succeeding tests

* Resync

* Add tests for values

* Fix php tests

* Fix encoder handlers change default value

Previously, oneofsubmsg_handler and submsg_handler change zval's default value directly.
The fix use REPLACE_ZVAL_VALUE which create a copy of parsed value and assign it to zval.
2018-09-22 18:57:43 -07:00
Paul Yang
5aeee3dc91
Add source dependency of test suite implementation to main function (#5069)
* Fix conformance running nothing issue

This change adds a source dependency of the test suite implementaion
class in the main function. For generality reason, the main function is
moved to the file of the test suite implemetation.  New test suite
implementation will need to implement the main function.
In order to make it easy for test suite implementation to implement the
main function, this change also refactor out the common code out of the
main function.

* Fix typo
2018-09-06 15:02:04 -07:00
Paul Yang
98e26a4195
Add missing reference to conformanc_test_impl.cc in Makefile (#5100)
* Add missing reference to conformanc_test_impl.cc in Makefile

* Update conformance failure list
2018-08-31 10:47:58 -07:00
Feng Xiao
afe98de32a Replace repo links. 2018-08-22 11:55:30 -07:00
Joshua Haberman
585b24e9a6
Merge pull request #5032 from TeBoring/json-wrapper
Fix json parsing of wrapper values
2018-08-13 13:36:08 -07:00
Bo Yang
e3ee7167f1 Fix json parsing of wrapper values 2018-08-10 18:09:02 +00:00
Feng Xiao
acd5b05e9f Fix failing tests.
1. Fix C++ tests.
  * Add missing files to Makefile.am and fix distcheck in tests.sh
  * Remove BUILT_SOURCES from conformance/Makefile.am.
  * Add some missing override keyword.
  * Add a type cast to int64 because our StrCat() in stubs can't handle size_t.
2. Fix Java tests.
  * Add missing test dependency on guava in pom.xml.
  * Include newly referenced test data in test resources.
  * Manually fix map_lite_test.proto which is overwritten because it's mapped
    from map_test.proto in google3.
  * Add back "optimize_for = LITE_RUNTIME" which is still needed to keep the
    opensource test passing as it's still running lite tests.
  * Add a type cast in newBuilder() because without it the code doesn't compile
    with openjdk javac 1.8 (the compiler can't figure if it's the right type
    due to complex generic typing).
3. Fix Python tests.
  * Remove/replace references to <hash_map>.
  * Suppress more warnings in setup.py.
  * Replace incorrect header inclusion for google/protobuf/proto_api.h.
  * Add strings::EndsWith to google/protobuf/stubs/strutil.h because it's
    referenced in the updated python C extension code.
  * Replace proto2 with google::protobuf. The proto2 name is leaked to
    opensource because we removed the subsitition rule for proto2 namespace
    but only fixed C++ source code and forgot to update python C extension code.
2018-08-09 21:21:01 -07:00
Feng Xiao
a8465b738e Merge master branch. 2018-08-08 17:14:42 -07:00
Feng Xiao
6bbe197e9c Down-integrate from google3. 2018-08-08 17:00:41 -07:00
Paul Yang
8705adc228
Give a specific category to each test. (#4965)
* Give a unique category to each test.

This change introduce a TestCategory enum to ConformanceRequest. Existing tests
are divided into three categories: binary format test, json format test and json
format (ignore unknown when parsing) test. For the previous two categories, there
is no change to existing testee programs. For tests with the last category, testee programs
should either enable ignoring unknown field during json parsing or skip the test.

* Fix python test

* Fix java

* Fix csharp

* Update document

* Update csharp generated code
2018-07-27 12:24:42 -07:00
Paul Yang
bdcbcabe5e
Add conformance test for php c back (#4966)
* Add conformance test for php c back

php c extension has different result for conformance test for different
php version and architecture. Try to add conformance back for php 7.1 c extension first.

* Disable conformance test for c extension on 32-bit architecture
32-bit and 64-bit have different failing tests

* Fix typo
2018-07-26 13:52:22 -07:00
Feng Xiao
2dcd6ae409
Remove/replace travis references (#4953)
* Remove/replace travis references.
2018-07-22 17:14:24 -07:00
Paul Yang
26eeec93e4
Enable ignoring unknown in json parsing in php (#4839)
* Enable ignoring unknown in json parsing in php

* Update generated descriptor files

* Update failure list for other languages.

* Remove unnecessary php files
2018-07-09 14:29:23 -07:00
BSBandme
82b490f6fd Fix cpp_distcheck 2018-07-09 11:37:39 -07:00
Adam Cozzette
f91cf0559c Updated Ruby conformance test failure list
This commit adds two entries to the conformance failure list for Ruby.
It seems that these particular test cases have been failing since they
were introduced in 5140bae383, so there
has not been any regression.
2018-03-23 10:23:47 -07:00
Adam Cozzette
ed4321d1cb
Merge pull request #4387 from acozzette/down-integrate
Integrated internal changes from Google
2018-03-20 16:14:32 -07:00
Adam Cozzette
ec40953257 Updated conformance failure lists 2018-03-20 14:44:30 -07:00
Adam Cozzette
67952fab2c Deleted scoped_ptr.h
We no longer need this, now that we have finished the switch to C++11
and are using std::unique_ptr.
2018-03-14 11:17:48 -07:00
Adam Cozzette
0400cca323 Integrated internal changes from Google 2018-03-13 16:37:29 -07:00
Jon Skeet
5140bae383 Add conformance test for null value in list JSON 2018-03-01 13:45:13 +00:00
Adam Cozzette
39a789e657 Removed using statements from common.h
These statements pulled a bunch of symbols from the std namespace into
the global namespace. This commit removes all of them except for
std::string, which is a bit trickier to remove.
2018-01-26 16:17:14 -08:00
Jie Luo
bfd254e14f
Add unknown field support for csharp (#3936)
Add unknown field support for csharp
2017-12-13 13:48:58 -08:00
Adam Cozzette
7bb8584f9d Updated conformance failure lists 2017-12-04 14:14:29 -08:00
Adam Cozzette
0ba8eea655 Merge branch 'master' into down-integrate 2017-12-01 10:05:19 -08:00
Adam Cozzette
92a7e778e7 Integrated internal changes from Google 2017-12-01 10:05:10 -08:00
Paul Yang
188f18044f
All integer types should accept null in json. (#3869) 2017-11-13 09:31:28 -08:00
Paul Yang
2df472690e
Fix php well known type conformance tests (#3828) (#3840)
* Fix php well known type conformance tests

* Properly generate code for test.proto

* Provide GPBMetadata files in c extensions for generated files to import.

* Remove unnecessary test

* Clean up code

* Add declaration for initOnce.

* Refactoring
2017-11-04 09:33:56 -07:00
Paul Yang
bcda919cee
Fix php well known type conformance tests (#3828)
* Fix php well known type conformance tests

* Properly generate code for test.proto

* Provide GPBMetadata files in c extensions for generated files to import.

* Remove unnecessary test

* Clean up code

* Add declaration for initOnce.

* Refactoring
2017-11-03 12:30:09 -07:00
Paul Yang
23adfeb003 Reserve unknown in Ruby (#3763)
* Reserve unknown in ruby

* Revert ruby tests. Wait for cpp impl for conformance test

* Add conformance test for preserving unknown

* Add unknown field conformance test to csharp failure list.

* Fix comments

* Fix comment

* Fix comments

* Fix typo

* Use stringsink_string directly

* Mark hd unused

* Remove unused encodeunknown_handlerfunc
2017-10-26 14:41:43 -07:00
Jisi Liu
188755c065 Fix JS conformance tests 2017-10-18 15:09:21 -07:00
Jisi Liu
1a7a7fca80 Merge from google internal 2017-10-18 12:22:18 -07:00
Feng Xiao
cf1b29dec8 Merge pull request #2377 from mcos/chore/conformance-null-tests
Conformance Tests for Null Timestamp and Duration JSON Values
2017-09-19 22:35:27 -07:00
Adam Cozzette
13fd045dbb Integrated internal changes from Google 2017-09-14 10:03:57 -07:00
Jack Wakefield
174c82d8ce Add well-known timestamps to JSON for PHP (#3564) 2017-09-10 15:17:50 -07:00
Jisi Liu
139775ccc0 Merge remote-tracking branch 'origin/3.4.x' into mergemaster 2017-08-18 16:25:35 -07:00
cclauss
45483fd1c0 file() was removed in Python 3, use open() instead
http://python-future.org/compatible_idioms.html#file
2017-08-18 01:04:17 +02:00
Jon Skeet
e0d24cc84a Detect invalid tags with a field number of 0 in C#
Previously we only rejected the tag if the tag itself was 0, i.e.
field=0, type=varint. The type doesn't matter: field 0 is always
invalid.

This removes the last of the C# conformance failures.
2017-08-11 19:33:53 +01:00
Bo Yang
8f4b8e430a Merge branch 'master' into 3.4.x 2017-08-05 10:42:29 -07:00
Thomas Van Lenten
9a4692d8af Update the comment on the message_type to cover what it should be. 2017-07-26 17:07:01 -04:00
Thomas Van Lenten
3caf9fd00a Review feedback.
- Better error message for unknown messageType.
- Remove unneeded if.
2017-07-26 16:24:05 -04:00
Thomas Van Lenten
c2831a346c Add the proto2 message conformance support for ObjC. 2017-07-26 15:58:07 -04:00
Thomas Van Lenten
9fd5e59c97 Generate the proto2 test file and link it in for ObjC. 2017-07-26 15:45:23 -04:00
Thomas Van Lenten
21800ff84f Add a objc_class_prefix to test_messages_proto3.proto.
Both test_messages_proto3.proto & test_messages_proto2.proto define
message ForeignMessage {...} and enum ForeignEnum {...} but since
objc doesn't use the proto package in the naming, these end up
conflicting.

Adding the objc_class_prefix option to the proto3 file ensure the generated
objc types are all unique.
2017-07-26 15:44:02 -04:00
Jisi Liu
19b8c8bfd3 Update conformance tests again. 2017-07-25 16:08:17 -07:00
Jisi Liu
de6debcf2b Fix conformance tests 2017-07-25 14:37:37 -07:00
Jisi Liu
d974cc2e9a Update conformance tests 2017-07-25 12:22:32 -07:00
Jisi Liu
759245a49a Merge from master 2017-07-25 11:52:33 -07:00
Yilun Chong
a713b73076 Merge pull request #3281 from BSBandme/ConformanceTestYilunChong
Proto2 test message support to conformance test
2017-07-24 14:50:52 -07:00
Jisi Liu
7986ca7e53 Update conformance tests 2017-07-19 12:07:35 -07:00
Jisi Liu
3af881c7e2 Merge master into 3.4.x 2017-07-18 16:26:16 -07:00
Jisi Liu
09354db143 Merge from Google internal for 3.4 release 2017-07-18 15:38:30 -07:00
tanderson-google
126082c371 Add std:: namespace prefix to set and map (#3332)
* Remove using std::{set,map}
2017-07-09 20:31:50 -07:00
Yilun Chong
bceb830c39 add comments in makefile.am 2017-07-05 12:15:53 -07:00
Yilun Chong
32c8ed3b44 change csharp failure list 2017-07-05 11:07:49 -07:00
Yilun Chong
30b4194488 Merge branch 'ConformanceTestYilunChong' of github.com:BSBandme/protobuf into ConformanceTestYilunChong 2017-07-05 09:51:58 -07:00
Yilun Chong
cbf7dfb323 fix php failing list and csharp generated proto 2017-07-05 09:48:40 -07:00
Yilun Chong
e82ba0b802 Merge branch 'master' into ConformanceTestYilunChong 2017-06-30 17:38:50 -07:00
Yilun Chong
726ba33d98 changed php's failing list 2017-06-30 17:34:58 -07:00
Yilun Chong
5085102d96 remove backup files 2017-06-30 17:23:10 -07:00
Yilun Chong
3adb054bbf add some test proto2 supported, add js proto2 supported, fixed some error 2017-06-30 17:22:32 -07:00
Paul Yang
ecca6ea95d Add json encode/decode for php. (#3226)
* Add json encode/decode for php.

* Fix php conformance test on 32-bit machines.

* Fix conformance test for c extension.

* Fix comments
2017-06-30 12:14:09 -07:00
Yilun Chong
a7d5be6a91 change php objc nodejs csharp ruby 2017-06-29 15:04:50 -07:00
Yilun Chong
fcb9268255 change java to uniform message, revert TestValidDataForType's parameters 2017-06-29 14:40:47 -07:00
Yilun Chong
020a24dfdc change cpp and python to uniform message 2017-06-29 11:33:22 -07:00
Yilun Chong
364502102a add message set test case 2017-06-28 12:41:11 -07:00
Yilun Chong
06c9057cc3 add objec support 2017-06-28 12:17:24 -07:00
Yilun Chong
cf7b6a46b2 delete backup files 2017-06-28 11:44:41 -07:00
Yilun Chong
6c59c25735 delete binary 2017-06-28 11:41:43 -07:00
Yilun Chong
696cf779d4 add java supported 2017-06-28 11:32:01 -07:00
Yilun Chong
18a0c2c4d2 add proto2 supported for cpp,python,nodejs,ruby,php 2017-06-27 18:24:15 -07:00
Yilun Chong
2ad74e1606 add support for proto2 2017-06-26 17:46:34 -07:00
Yilun Chong
58a3c74df0 add test_proto2_message.proto and change conformnace/makefile.am 2017-06-23 11:14:22 -07:00
Joshua Haberman
1325588982 Updated upb to fix JSON conformance issues. (#3206)
* Fixed a bunch of Ruby conformance errors.

* Fixed some more Ruby conformance errors in JSON.
2017-06-19 15:13:24 -07:00
Thomas Van Lenten
dd19b876d4 Raise the number of digits used for floats.
About 1.5% of all IEEE754 single-precision numbers require nine
decimal digits to represent accurately.
2017-06-16 15:24:33 -04:00
Thomas Van Lenten
ecc0f54127 Properly error on a tag with field number zero. 2017-06-06 10:14:41 -04:00
Paul Yang
190b5270c8 Make PHP c extension work with PHP7 (#2951) 2017-04-19 16:23:51 -07:00
Feng Xiao
bd74319107 Update Java conformance failure list. 2017-03-31 15:59:48 -07:00
Feng Xiao
624d44f042 Update objective-c conformance failure list. 2017-03-30 17:45:14 -07:00
Feng Xiao
fab8812cc1 Update python conformance failure list. 2017-03-30 16:05:25 -07:00
Feng Xiao
057a2851e4 Update C# conformance failure list. 2017-03-29 16:19:00 -07:00
Feng Xiao
e47c068cfa Update python conformance failure list. 2017-03-29 16:17:18 -07:00
Feng Xiao
d36c0c538a Down-integrate from google3. 2017-03-29 14:33:05 -07:00
Joshua Haberman
c565e25c7d Merge pull request #1662 from haberman/jsconformance
Conformance tests for JavaScript (Node.js). 15 tests are failing.
2017-03-27 12:03:09 -07:00
Josh Haberman
1b0db1cb83 Removed obsolete comments and added docs. 2017-03-16 15:19:09 -07:00
Josh Haberman
95b4427d39 Build system fixes for JS conformance tests. 2017-03-14 12:45:57 -07:00
Josh Haberman
8df69f0894 Conformance test for JS now work, though 15 tests fail. 2017-03-13 15:10:53 -07:00
Joshua Haberman
cad6a51a30 Merge pull request #2819 from haberman/pythonexcept
update_failure_list.py: fixed Python "raise" statement.
2017-03-09 14:58:01 -08:00
Josh Haberman
3e6245e5d7 update_failure_list.py: fixed Python "raise" statement. 2017-03-09 14:48:28 -08:00
Paul Yang
dd8d5f57d7 Rename encode/decode to serializeToString/mergeFromString (#2795)
This better shows the semantic of the API. For already setted fields,
mergeFromString do replacement for singular fields and appending for
repeated fields.
2017-03-08 14:31:34 -08:00
Josh Haberman
f873d3213c Added JavaScript conformance tests. All tests pass! 2017-03-06 10:42:27 -08:00
Josh Haberman
27b1f2b477 WIP. 2017-03-06 10:42:27 -08:00
Paul Yang
cba04b19e8 Implement json encoding decoding for php. (#2682) 2017-02-08 10:27:54 -08:00
Paul Yang
39756643df Add conformance test for php (#2655) 2017-02-01 12:47:58 -08:00
Joshua Haberman
ffa71f8007 A few more cases for binary conformance tests. (#2500)
* A few more cases for binary conformance tests.

* over-encoded varints (encoded in more bytes than are necessary).
* truncated varints (>32 bits for 32-bit types).

* Fixed Python decoding bug with 32-bit varints.

* Fixed 1L -> 1LL for 32-bit platforms.
2017-01-06 16:58:21 -08:00
Joshua Haberman
2ff42dcf2c Added conformance testing for binary primitive types. (#2491)
This is basic and more tests will be added over time.
2016-12-13 16:31:02 -08:00