protobuf3-solidity icon indicating copy to clipboard operation
protobuf3-solidity copied to clipboard

Remove redundant checks

Open pavlovdog opened this issue 1 year ago • 0 comments

Overview

Allow packed array to be empty

The previous version did not allow packed fields to be empty, which is a common case (example).

Allow fields to be encoded in order other than monotonically increasing

In case the field order is correct, but data is being encoded in another order (example, same scheme but with upgraded scheme), decoding was failing.

Update Makefile

Made test results more explicit

PASS: test/pass/all_features
PASS: test/pass/import
PASS: test/pass/nested_enum
PASS: test/pass/nested_message
PASS: test/pass/no_message
PASS: test/pass/only_primitives
PASS: test/pass/repeated_uint64
PASS: test/pass/uint64
--sol_out: unsupported field type TYPE_DOUBLE: Message.field
PASS (expected to fail): test/fail/double
empty_enum.proto:3:6: Enums must contain at least one value.
PASS (expected to fail): test/fail/empty_enum
--sol_out: messages must have at least one field: EmptyMessage
....

Checklist

  • [x] New and updated code has appropriate documentation
  • [x] New and updated code has new and/or updated testing
  • [x] Required CI checks are passing
  • [x] Visual proof for any user facing features like CLI or documentation updates
  • [x] Linked issues closed with keywords

pavlovdog avatar Feb 13 '24 17:02 pavlovdog