aboutsummaryrefslogtreecommitdiff
path: root/csharp/src/Google.Protobuf.Test
Commit message (Collapse)AuthorAgeFilesLines
* Update the comment on the message_type to cover what it should be.Thomas Van Lenten2017-07-261-3/+3
|
* Merge pull request #3281 from BSBandme/ConformanceTestYilunChongYilun Chong2017-07-241-211/+215
|\ | | | | Proto2 test message support to conformance test
| * fix php failing list and csharp generated protoYilun Chong2017-07-051-211/+215
| |
* | C#: Implement IReadOnlyDictionary<K,V> in MapField<K,V>Jean-Rémy Bancel2017-07-121-0/+16
| |
* | Ensure leaveOpen is true when writing to a bufferJon Skeet2017-07-042-2/+16
| | | | | | | | | | | | | | | | Note that the compatibility tests have had to cahnge as well, to cope with internal changes. (The test project has access to internals in the main project.) Fixes #3209.
* | Make Any easier to work with in C#Jon Skeet2017-07-031-0/+28
|/ | | | | | | - Add a TryUnpack method which doesn't throw if the type is wrong - Make GetTypeName public for easier determination of the message type Fixes #3294.
* update csharp README and fix .NET 3.5 build errorJohn Brock2017-05-251-1/+5
|
* Convert C# projects to MSBuild (csproj) formatJon Skeet2017-05-244-66/+74
| | | | | | | | | | | | | | | | | This has one important packaging change: the netstandard version now depends (implicitly) on netstandard1.6.1 rather than on individual packages. This is the preferred style of dependency, and shouldn't affect any users - see http://stackoverflow.com/questions/42946951 for details. The tests are still NUnit, but NUnit doesn't support "dotnet test" yet; the test project is now an executable using NUnitLite. (When NUnit supports dotnet test, we can adapt to it.) Note that the project will now only work in Visual Studio 2017 (and Visual Studio Code, and from the command line with the .NET Core 1.0.0 SDK); Visual Studio 2015 does *not* support this project file format.
* Add FormatEnumAsInt support for Json Format. And scale ↵Jie Luo2017-03-242-12/+29
| | | | JsonFormatter.Settings to multiple options.
* There might be duplicated enum values when allow_alias is true. Add ↵Jie Luo2017-02-282-89/+221
| | | | PreferredAlias into OriginalNameAttribute to remove the duplication (#2727)
* Upgrading test-related librariesJohn Brock2017-02-231-2/+2
| | | | | NUnit 3.4.0 —> 3.6.0 dotnet-test-nunit 3.4.0-alpha-2 —> 3.4.0-beta-3
* Fixes for .NET 3.5 compatibilityJohn Brock2017-02-234-4/+74
| | | | | * Changing DOTNET35 framework symbols in preprocessor directives to the default built-in value of NET35. * Adding extension method StreamExtension.CopyTo for .NET 3.5 because it didn’t exist until .NET 4, and adding associated unit tests.
* Fix CopyTo argument validationJon Skeet2017-02-061-0/+16
| | | | Fixes #2669.
* Add Oneof custom options testJie Luo2017-01-272-110/+112
|
* Support custom options in C#Jon Skeet2017-01-192-0/+2894
| | | | | | | | | | | | This consists of: - Changing the codegen for the fixed set of options protos, to parse unknown fields instead of skipping them - Add a new CustomOptions type in the C# support library - Expose CustomOptions properties from the immutable proto wrappers in the support library Only single-value options are currently supported, and fetching options values requires getting the type right and knowing the field number. Both of these can be addressed at a later time. Fixes #2143, at least as a first pass.
* Add ByteString.FromStream and ByteString.FromStreamAsync in C#Jon Skeet2017-01-102-1/+55
| | | | | | | | | | Fixes #2088. We now have separate tests for netcoreapp and net45 to test the two branches here. (netstandard10 doesn't have MemoryStream.GetBuffer) Although most of this library doesn't have any async functionality, this feels like a natural place to locally add it.
* Give C# ByteString a sensible GetHashCode implementation.Jon Skeet2016-12-161-0/+13
| | | | Fixes #2511.
* remove leading whitespace in C# xml commentsJan Tattermusch2016-12-125-84/+84
|
* Factored Conformance and Benchmark test messages into shared test schema. ↵Joshua Haberman2016-12-032-1/+3691
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#1971) * Factored Conformance test messages into shared test schema. * Updated benchmarks to use new proto3 message locations. * Fixed include path. * Conformance: fixed include of Python test messages. * Make maven in Rakefile use --batch-mode. * Revert changes to benchmarks. On second thought I think a separate schema for CPU benchmarking makes sense. * Try regenerating C# protos for new test protos. * Removed benchmark messages from test proto. * Added Jon Skeet's fixes for C#. * Removed duplicate/old test messages C# file. * C# fixes for test schema move. * Fixed C# to use the correct TestAllTypes message. * Fixes for Objective C test schema move. * Added missing EXTRA_DIST file.
* Fix csharp/src/Google.Protobuf.Test/project.jsonJulien Brianceau2016-11-141-1/+1
| | | | | | | This change fixes the following Chromium presubmit error: third_party/protobuf/csharp/src/Google.Protobuf.Test/project.json could not be parsed: Expecting property name: line 25 column 3 (char 482)
* Change JSON field name formattingJon Skeet2016-11-031-6/+6
| | | | | | | | | This affects cases with leading capital letters. This breaks compatibility with previous C# releases, but fixes compatibility with other implementations. See #2278 for details.
* Bring C#'s ToPascalCase method in line with C++.Jon Skeet2016-07-271-0/+6
| | | | | (This still doesn't fix the conformance tests, but at least we're now consistent with the C++ code.)
* Move to dotnet cli for building, and .NET Core (netstandard1.0) as target ↵Jon Skeet2016-07-149-178/+68
| | | | | | | platform (#1727) Move to dotnet cli for building, and .NET Core (netstandard1.0) as target platform This also updates the version number to 3.0.0-beta4
* Implement RepeatedField.AddRange (#1733)Jon Skeet2016-07-131-2/+88
| | | | | | | | | | | | | | | | | | | * Improve exception throwing implementation in collections * Implement RepeatedField.AddRange. This fixes issue #1730. * Optimize AddRange for sequences implementing ICollection (Also fix a few more C# 6-isms.) * Remove the overload for Add(RepeatedField<T>) We now just perform the optimization within AddRange itself. This is a breaking change in terms of "drop in the DLL", but is source compatible, which should be fine.
* Remove unnecessary reflection callJon Skeet2016-07-081-19/+2
| | | | | This is the only call to TypeExtensions.IsValueType, so we can remove that method, making the whole type conditionally compiled out for .NET 3.5
* Changes to generated code from previous commitJon Skeet2016-07-046-78/+1107
|
* Adding conditional compiler symbol to support .NET 3.5 (#1713)detlevschwabe2016-06-281-1/+2
| | | | * Adding condition compiler symbol to support .NET 3.5
* Expose JsonFormatter.WriteValue.Jon Skeet2016-06-231-0/+47
| | | | | This isn't useful to most users, but can be handy in advanced use cases, as requested in #1465.
* Move test for standalone BoolValue to JsonParserTestJon Skeet2016-05-113-7/+19
| | | | | | Also added a standalone formatter test, for confidence. Have validated that undoing the change in 835fb947 breaks the tests (i.e. we are still testing that the change is required).
* Fixed parsing of BoolValue.Jos Hickson2016-05-111-0/+7
|
* Allow custom type URL prefixes in Any.PackJon Skeet2016-04-293-0/+47
| | | | | | (And likewise ignore the prefix in unpack.) Fixes issue #1459.
* Regenerate all C# code and make it compileJon Skeet2016-04-2012-113/+113
| | | | JSON tests fail, as we're not using OriginalNameAttribute yet.
* Remove duplicate test cases.Jon Skeet2016-04-012-2/+0
| | | | (NCrunch noticed these.)
* Code review fixesalien2016-03-291-0/+1
|
* csharp: add support for the json_name optionalien2016-03-182-5/+186
| | | | | Conflicts: csharp/src/Google.Protobuf/JsonFormatter.cs
* Replace StringBuilder with TextWriter in JsonFormatteravgweb2016-03-061-0/+9
|
* Fix copy/paste typo in CodedInputStreamTestJon Skeet2016-03-011-1/+1
|
* Implement IDisposable for CodedInputStream and CodedOutputStreamJon Skeet2016-02-292-0/+50
| | | | | This fixes issue #679 and issue #1282. (The .gitignore change is just around ncrunch; I can put it in a separate PR if you really want.)
* Merge pull request #1240 from jskeet/validate_groupJan Tattermusch2016-02-182-6/+51
|\ | | | | Validate that end-group tags match their corresponding start-group tags
| * Validate that end-group tags match their corresponding start-group tagsJon Skeet2016-02-152-6/+51
| | | | | | | | | | | | | | | | This detects: - An end-group tag with the wrong field number (doesn't match the start-group field) - An end-group tag with no preceding start-group tag Fixes issue #688.
* | Add more tests around merging wrappersJon Skeet2016-02-151-2/+41
|/ | | | This was in an attempt to fix the wrapper handling corner case, but it's really fiddly.
* Use checked-in key to build ReleaseSignedJan Tattermusch2016-02-091-1/+1
|
* Generated code changes from previous commitJon Skeet2016-02-042-14/+14
|
* Generated code for GeneratedCodeInfo changeJon Skeet2016-02-046-59/+59
|
* Merge pull request #1158 from jskeet/nonnormalized-tostringJan Tattermusch2016-01-265-2/+94
|\ | | | | Ensure that FieldMask, Timestamp and Duration ToString() calls don't throw
| * Ensure that FieldMask, Timestamp and Duration ToString() calls don't throwJon Skeet2016-01-205-2/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | The usage of ICustomDiagnosticMessage here is non-essential - ToDiagnosticString doesn't actually get called by ToString() in this case, due to JsonFormatter code. It was intended to make it clearer that it *did* have a custom format... but then arguably I should do the same for Value, Struct, Any etc. Moving some of the code out of JsonFormatter and into Duration/Timestamp/FieldMask likewise feels somewhat nice, somewhat nasty... basically there are JSON-specific bits of formatting, but also domain-specific bits of computation. <sigh> Thoughts welcome.
* | Fix mistakes in highest-representable float64 integersJon Skeet2016-01-211-2/+2
|/
* Merge pull request #1096 from jskeet/custom-to-stringJan Tattermusch2016-01-194-1/+63
|\ | | | | Introduce ICustomDiagnosticMessage to allow for custom string formatting
| * Introduce ICustomDiagnosticMessage to allow for custom string formattingJon Skeet2016-01-134-1/+63
| | | | | | | | This fixes issue #933, effectively.
* | Fix broken testJon Skeet2016-01-151-1/+1
| |