Commit Graph

172 Commits

Author SHA1 Message Date
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