diff options
| author | Oskari Timperi <oskari.timperi@iki.fi> | 2018-04-30 21:38:22 +0300 |
|---|---|---|
| committer | Oskari Timperi <oskari.timperi@iki.fi> | 2018-04-30 21:38:22 +0300 |
| commit | ee952098da537187d011a135e23b079756480f6f (patch) | |
| tree | 82915e40aa617e5a97bcb9607c1666357a12de8c /tests | |
| parent | 59654d7c4955114732fe911b016961d780bf8393 (diff) | |
| download | nimpb-ee952098da537187d011a135e23b079756480f6f.tar.gz nimpb-ee952098da537187d011a135e23b079756480f6f.zip | |
First try at somewhat working Any
Now users can register their own types to work with Any. WKT's are automatically
registered. User messages can be packed into an Any and unpacked from an Any.
Then there's support for converting Any to/from JSON with user types and WKT's.
The conformance test suite looks always better and better:
Required.Proto3.JsonInput.Int32FieldLeadingZero
Required.Proto3.JsonInput.Int32FieldNegativeWithLeadingZero
Required.Proto3.JsonInput.Struct.ProtobufOutput
Required.Proto3.JsonInput.Uint64FieldMaxValueNotQuoted.JsonOutput
Required.Proto3.JsonInput.Uint64FieldMaxValueNotQuoted.ProtobufOutput
Required.Proto3.JsonInput.ValueAcceptNull.JsonOutput
Required.Proto3.JsonInput.ValueAcceptNull.ProtobufOutput
Required.Proto3.ProtobufInput.RepeatedScalarSelectsLast.DOUBLE.JsonOutput
Required.Proto3.ProtobufInput.ValidDataRepeated.DOUBLE.JsonOutput
CONFORMANCE SUITE FAILED: 594 successes, 194 skipped, 0 expected failures, 9
unexpected failures.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/conformance/conformance_nim.nim | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/conformance/conformance_nim.nim b/tests/conformance/conformance_nim.nim index 819a7c9..1b73517 100644 --- a/tests/conformance/conformance_nim.nim +++ b/tests/conformance/conformance_nim.nim @@ -4,6 +4,7 @@ import streams import strformat import nimpb/nimpb +import nimpb/wkt/any import conformance_pb import test_messages_proto3_pb @@ -30,6 +31,8 @@ proc myReadString(s: Stream, size: int): string = proc errorMessage(exc: ref Exception): string = result = $exc.name & ": " & exc.msg & "\n" & getStackTrace(exc) +any.registerType(protobuf_test_messages_proto3_TestAllTypesProto3) + while true: var requestSize = 0'i32 |
