Commit Graph

305 Commits

Author SHA1 Message Date
Rafi Kamal
394f5c8c0f Whitelist newly added conformance test failures for Ruby, C#, and PHP 2019-11-12 13:38:58 -08:00
Rafi Kamal
8edd68ea75 Add proguard.pgcfg to EXTRA_DIST in Makefile.am 2019-11-12 13:38:58 -08:00
Rafi Kamal
58d4420e2d Down Integrate Internal Changes 2019-11-12 13:38:58 -08:00
Rafi Kamal
5e6d57bd8c Merge branch '201910111201' of https://github.com/rafi-kamal/protobuf into 201910111201 2019-10-23 17:46:09 -07:00
Rafi Kamal
80734b2e1a Reverted changes in conformance/failure_list_js.txt 2019-10-23 17:45:23 -07:00
Rafi Kamal
27c1defe35
Merge branch 'master' into 201910111201 2019-10-11 12:07:38 -07:00
Rafi Kamal
6c92f9dff1 Down integrate to GitHub 2019-10-11 12:05:46 -07:00
Rafi Kamal
d8e678aae4
Merge pull request #6728 from protocolbuffers/3.10.x-merge
Merge 3.10.x with master and increment the version number
2019-10-10 16:56:19 -07:00
Paul Yang
2dec82e1e0
Fix conformance test (#6750)
* Fix conformance test

Default value of string/message map is not encoded

* Fix zts build
2019-10-10 16:03:52 -07:00
Rafi Kamal
97c7c3fc97 Merge 3.10.x to master 2019-10-03 14:03:38 -07:00
Paul Yang
3f323c5b99
Fix incorrect leap day for Timestamp in php (#6696) 2019-09-24 18:26:02 -07:00
Paul Yang
7114d73dea
Implement binary conformance test for oneof fields (#6622)
* Implement binary conformance test for oneof fields

* Update failure list

* Update failure list for php c extension
2019-09-09 13:31:53 -07:00
Paul Yang
ce942bcae1
Add binary conformance tests for map fields (#6560)
* Add binary conformance tests for map fields

* Update failure list

* Fix php conformance test

* Fix php conformance test

In 32-bit platform, int64 should be string. However, map iterator returns string key as integer.

* Add more test cases for map

* Update failure list
2019-09-03 10:47:32 -07:00
Paul Yang
659e799fb8
Sync upb (#6577)
* Sync upb

* https://github.com/protocolbuffers/upb/pull/208

* Fix php c extension compiling

Don't use macros defined by upb

* Update ruby conformance failure list
2019-08-27 13:14:57 -07:00
Thomas Van Lenten
b273cba192 Fix enum writing.
Enums use varint, so if the value is negative it should end up being longer.

This was caught my new conformance test cases.
2019-08-26 17:17:32 -04:00
Paul Yang
6c9d7ecfa4
Test singular fields are encoded in canonical way (#6553)
* Test singular fields are encoded in canonical way

* Defautl values in proto3 should not be encoded.
* Values should be converted to the canonical representation (e.g.,
long int64 value may be truncated for int32 field)

* Update failure list

* Update failure list
2019-08-23 12:20:19 -07:00
Rafi Kamal
4f02f056b5 Down integrate to GitHub 2019-08-22 17:33:01 -07:00
Paul Yang
893a7d31e1
No need to have a separate ruby conformance test on Mac (#6555)
The previous issue of mktime doesn't work on Mac has been fixed.
2019-08-22 16:17:37 -07:00
Paul Yang
d79d368ff1
Remove stale comment (#6552)
Proto2 has been tested for invalid cases. Check implementation of
ExpectParseFailureForProto (https://github.com/protocolbuffers/protobuf/blob/master/conformance/binary_json_conformance_suite.cc#L322)
2019-08-22 13:25:19 -07:00
Paul Yang
6b3024f693
Accept string for int64 wrappers (#6491) 2019-08-19 17:16:58 -07:00
Paul Yang
0c4b607e98
Conformance packed (#6447)
* Add conformance tests for explicit packed/unpacked fields

* Fix typo

* Update failure lists

* Update failure list

* Use enum class to make enum scoped
2019-08-02 14:35:44 -07:00
Paul Yang
a9bb65643b
Add binary conformance test for default repeated fields (#6440)
* Add binary conformance test for default repeated fields

1) Both packed and unpacked encoding should be accepted for parsing.
2) Encode should follow the default way for the syntax.

* Uncomment test

* Remove is_primitive

* Add failed tests to failure lists.

* Add failed test to failure list

* Use binary format to specify expected value

Text format cannot distinguish whether repeated field is packed or not.

* Change method name from ToHexString to ToOctString

* Add failed test to failure list

* Add failed test to php's failure list

* Fix comments
2019-07-26 10:05:14 -07:00
Paul Yang
2849a79990
Add binary conformance test for message type. (#6435)
* Add binary conformance test for message type.

* Add test case for merge repeated scalar message field

* Add failed tests to failure list

* Add failed test to php's failure list

* Remove successful tests from php c's failure list
2019-07-24 12:26:40 -07:00
Paul Yang
455440fc47
Add binary conformance test for enum fields. (#6434)
* Add binary conformance test for enum fields.

* Add failed conformance test to js failure list
2019-07-23 15:07:26 -07:00
Paul Yang
29e4fadbfb
Add binary conformance test case for bytes field (#6428)
* Add binary conformance test case for bytes field

* Add failed conformance test to php's failure list
2019-07-23 12:42:30 -07:00
Paul Yang
eef87dd138
Add conformance test for binary string (#6415)
* Add conformance test for binary string

* Add failing tests to php failure list
2019-07-22 16:52:31 -07:00
Thomas Van Lenten
400d3888b9 Revert bad change to objc conformance test in #6199
Since true for objc is external, changes should always start on the github
side, so the fact that something got pushed out is a sign something was
broken in the process.
2019-07-19 10:14:53 -04:00
Hao Nguyen
51026d9229 Down integrate to GitHub 2019-06-26 11:01:34 -07:00
Bo Yang
bc742640ef Merge remote-tracking branch 'origin/3.8.x' 2019-06-21 04:01:45 +00:00
Leonard Hecker
43307d4da0 php: Fix formatting of Duration (#6155)
* php: Fixed php notices for unknown enum indices

* php: Fixed formatting of Duration

This fixes:
* Missing nanoseconds. The nanoseconds where divided as a float and
  implicitly converted to a string before being passed to bcadd.
  This can result in a float formatted in scientific/exponential notation,
  which bcmath doesn't understand.
* Durations are supposed to be formatted without trailing zeroes.
2019-06-18 10:31:50 -07:00
Paul Yang
640423f157
Change int64 json encoding to be string for php and ruby (#6251)
* Change int64 json encoding to be string for php and ruby

* Fix ruby test

* Sync upb change
2019-06-17 13:14:27 -07:00
Paul Yang
abb4fb0040
Change offset of Timestamp conformance test to distinguish from the default (#6263)
Fixes #4079
2019-06-17 13:13:54 -07:00
Hao Nguyen
634d704d23 Merge branch '3.8.x' into 3.8.x-201905311515 2019-05-31 15:18:39 -07:00
Hao Nguyen
044c766fd4 Down integrate to GitHub 2019-05-30 13:31:15 -07:00
Thomas Van Lenten
beaeaeda34 Use runtime_error vs just exiting for some issues.
release notes: no
2019-05-29 15:58:09 -04:00
Paul Yang
7597f8ad24
Custom mktime to fix issue on mac (#6118)
* Custom mktime to fix issue on mac

* Remove succeeded tests from failure list
2019-05-09 20:51:35 -07:00
Hao Nguyen
6b4b9869ec
Add a new conformance test for top level JSON null (#5966)
* Add a new conformance test for top level JSON null
2019-04-24 15:29:17 -07:00
Hao Nguyen
ef1e8e7172 Add module for JavaLite and fix builds 2019-04-09 06:48:01 -07:00
Hao Nguyen
6dc9832aab Merge branch 'master' of https://github.com/protocolbuffers/protobuf into sync201904090622 2019-04-09 06:25:48 -07:00
Hao Nguyen
176f7db11d Down integrate to Github 2019-04-09 06:23:32 -07:00
Hao Nguyen
c163a2d1a4 Revert accidentally commit 2019-04-05 17:09:42 -07:00
Hao Nguyen
1eb049141e Add module for JavaLite and fix builds 2019-04-05 16:55:34 -07:00
Hao Nguyen
86bc27d220 Merge branch 'master' of https://github.com/protocolbuffers/protobuf 2019-04-05 16:41:24 -07:00
Hao Nguyen
a48a574f7e Down integrate to Github 2019-04-05 16:39:18 -07:00
Bo Yang
2d9507ec74 Update upb for ruby 2019-03-28 02:17:39 +00:00
Adam Cozzette
8645d893ab Merge branch '3.7.x' into merge-3-7-x 2019-03-26 14:32:20 -07:00
Hao Nguyen
1a3fa5d9eb Update conformance test failures 2019-03-20 14:43:42 -07:00
Hao Nguyen
81567d89a9 Merge branch 'contributing' of https://github.com/haon4/protobuf into contributing 2019-03-20 11:46:11 -07:00
Hao Nguyen
2f864fdfdf Down integrate to Github 2019-03-20 11:45:01 -07:00
Paul Yang
57b6597f46
Replace strptime with custom implementation (#5906)
* Replace strptime with custom implementation

* Fix ruby strptime

* Fix test

* Fix ruby conformance test

* Use mktime

* Remove EmptyFieldMask from failed conformance test list
2019-03-19 22:27:13 -07:00
Paul Yang
4b145b1c7f
Parse nested listvalue in json for ruby (#5867)
* Add conformance test for nested listvalue

* Fix upb for parsing repeated Value/ListValue

* Add failed repeated ListValue conformance test into php failure list
2019-03-12 10:56:58 -07:00
Sydney Acksman
15fab9109d Bump target frameworks of C# programs from netcoreapp1.0 to netcoreapp2.1 (#5838)
* Bump target frameworks from netcoreapp1.0 to netcoreapp2.2.
Move global.json up to root of repo, change SDK ver to 2.2.100
Change .net core sdk in dockerfile for kokoro to ver 2.2.100

* Re-add curl install

* Change all exe target to 2.1

* Fix incorrect versions in global.json and Dockerfile

* Downgrade version to 2.1 to match exe targets

* introduce separate testing Dockerfile for C#

* revert changes to the shared Dockerfile

* use netcoreapp2.1 for C# conformance tests

* use language specific dockerfile for testing C#

* Edit compatibility tests script to use parameters instead of file copies

* install dotnet SDK on windows before running the tests

* update csharp_EXTRA_DIST
2019-03-11 13:03:58 -07:00
Paul Yang
a18680890b
Encode empty ListValue (#5857)
* Encode empty ListValue

* Update mac ruby conformance failure list
2019-03-10 17:33:46 -07:00
Paul Yang
e75a689f7c
Fix ruby continuous tests (#5853)
* Fix ruby continuous tests

* Fix compatibility test
2019-03-07 17:16:31 -08:00
Hao Nguyen
d0f91c863a
Down integrate to Github (#5839)
* Down integrate to github
2019-03-06 12:39:12 -08:00
Bo Yang
cb6fa92ee8 Merge branch '3.7.x' 2019-03-04 10:18:18 -08:00
Yilun Chong
6d29c22a43 fix conformance test for text format 2019-02-26 13:46:30 -08:00
Yilun Chong
429d2ae19f
Merge branch 'master' into integration 2019-02-24 17:17:17 -08:00
Yilun Chong
d8c2501b43 down integration from internal 2019-02-22 18:13:33 +08:00
Xiang Dai
e479410564 delete all duplicate empty blanks (#5758)
Signed-off-by: Xiang Dai <764524258@qq.com>
2019-02-20 19:28:50 -08:00
Bo Yang
96029f3c4a Convert integer to string if field is string field in json
json_decode automatically convert numeric string to integer, so that
we need to convert it back. However, this will suceed to parse invalid
json data with string field set as integer even though it should have failed.
Because, the failure case is less often than the succeeding case, we decided
to make this change. Users should make sure their data don't use integer for
string fields by themselves.
2019-01-28 20:57:51 +00:00
Paul Yang
3cae8e4467 Default values should also be serialized for json map key/value (#5643) 2019-01-28 19:30:10 +00:00
Paul Yang
a21caa237a
Default values should also be serialized for json map key/value (#5643) 2019-01-28 11:25:52 -08:00
Paul Yang
7f42d6d0bc
Fix empty FieldMask json encoding/decoding (#5605)
* Fix empty FieldMask json encoding/decoding

* Add failed test to python's conformance failure list
2019-01-22 15:35:12 -08:00
Paul Yang
37a0ab7d83
Fix Any json encoding/decoding for ruby. (#5592)
* Fix Any json encoding/decoding for ruby.

* Revert unnecessary changes
2019-01-17 10:24:41 -08:00
Paul Yang
c4f2a92c55
Fix field mask for php in json (#5591)
* Fix field mask for php in json

* Update byte size
2019-01-17 10:18:43 -08:00
Thomas Van Lenten
0c95791509 [ObjC] add support for the TextFormat constants.
ObjC doesn't support them, but this ensure when tests are added
they will be handled correctly.

The conformance.proto was updated in PR #5566
2019-01-14 11:03:16 -05:00
Yilun Chong
a2a0afb546
Down-integrate internal changes to github. (#5575)
* Down-integrate internal changes to github.

* Fix BUILD file and regenerate csharp descritpor
2019-01-13 17:40:58 -08:00
Yilun Chong
cb95a7f6a8
Down-integrate internal changes to github. (#5566)
* Down-integrate internal changes to github.

* fix csharp conformance test

* add comments in conformance.proto for text format

* fix comments

* fix comments, re-generated csharp file

* fix comments, re-generated csharp file
2019-01-11 11:40:52 -08:00
Thomas Van Lenten
b1b9eaa6c7 Comments on the next line will go to the next field.
Even though the comments were indented to appear to go with the jspb
case/field, protoc doesn't collect comments like that, so these "hanging"
comments actually "attach" to the next thing added to each.  Looking at
https://github.com/protocolbuffers/protobuf/pull/5566 you see where
the generated code picked up the comment on the wrong field.
2019-01-10 13:14:21 -05:00
Yilun Chong
0adb74c2d3 Down-integrate internal changes to github. (#5555)
* Down-integrate internal changes to github.

* fix python conformance test

* fix csharp conformance test

* add back java map_lite_test.proto's optimize for option

* fix php conformance test
2019-01-08 15:06:30 -08:00
Paul Yang
aa5c12e882
Revert "Revert "Enable the ignore_unknown_field option in the Ruby unmarshal options" (#5511)" (#5533)
* Revert "Revert "Enable the ignore_unknown_field option in the Ruby unmarshal options" (#5511)"

This reverts commit be1716a6d0.

* Separate ruby conformance test on Mac

* Fix shell syntax

* Fix test
2019-01-08 10:53:34 -08:00
Thomas Van Lenten
24d344c30c [ObjC] Add the jspb cases to the switches so they are complete. 2019-01-07 17:38:20 -05:00
Paul Yang
be1716a6d0
Revert "Enable the ignore_unknown_field option in the Ruby unmarshal options" (#5511) 2018-12-26 12:26:24 -08:00
Paul Yang
8faa778add
Fix Any json encoding/decoding in php (#5496)
* Fix Any json encoding/decoding in php

* Fix comments
2018-12-26 10:36:09 -08:00
Joshua Haberman
21940734be
Merge pull request #5373 from ebenoist/erik/unknown-fields
Enable the ignore_unknown_field option in the Ruby unmarshal options
2018-12-22 10:10:40 -08:00
Erik Benoist
9ac11326df Adds the ability to ignore unknown fields on parse
This adds the ability for the MRI Ruby library to optionally pass in a
ignore_unknown_fields option when decoding JSON. The functionality was
added upstream in upb, this change exposes that option.
2018-12-21 16:06:21 -06:00
Hao Nguyen
e24d9a8aba Add dependency to AliasedEnum in PHP 2018-12-19 15:48:57 -08:00
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