Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consolidate and add new tests of adjacently tagged enums #2804

Merged
merged 19 commits into from
Aug 23, 2024

Commits on Aug 16, 2024

  1. Move all adjacently tagged enum tests (except flatten) into a dedicat…

    …ed module
    
    Moved and renamed:
    From test_annotatons
    - test_adjacently_tagged_enum_bytes               => bytes
    - flatten::enum_::adjacently_tagged::straitforward=> struct_with_flatten
    - test_expecting_message_adjacently_tagged_enum   => expecting_message
    - test_partially_untagged_adjacently_tagged_enum  => partially_untagged
    
    From test_macros
    - test_adjacently_tagged_newtype_struct           => newtype_with_newtype
    - test_adjacently_tagged_enum
    - test_adjacently_tagged_enum_deny_unknown_fields => deny_unknown_fields
    Mingun committed Aug 16, 2024
    Configuration menu
    Copy the full SHA
    5e37ade View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5a359e1 View commit details
    Browse the repository at this point in the history
  3. Split test test_adjacently_tagged_enum into four tests for each variant

    (review this commit with "ignore whitespace changes" option on)
    Mingun committed Aug 16, 2024
    Configuration menu
    Copy the full SHA
    bee7470 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    59628d1 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    36b9a85 View commit details
    Browse the repository at this point in the history
  6. Remove unnecessary generic

    Mingun committed Aug 16, 2024
    Configuration menu
    Copy the full SHA
    9d0f811 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    5445f17 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    df07751 View commit details
    Browse the repository at this point in the history
  9. Reuse AdjacentlyTagged enum in bytes test

    Change 0i32 to 1u8 so the test can be merged with the previous in the next commit
    Mingun committed Aug 16, 2024
    Configuration menu
    Copy the full SHA
    42e63ff View commit details
    Browse the repository at this point in the history
  10. Integrate bytes test into struct_ test

    `newtype` test also integrates test with `Bytes` tag, so be like
    
    Removed the first assert_tokens because it is the same as the first assert in the merged method
    Mingun committed Aug 16, 2024
    Configuration menu
    Copy the full SHA
    3dc6829 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    a7f0bab View commit details
    Browse the repository at this point in the history
  12. Unit: add tests for deserialization from sequence

    (review this commit with "ignore whitespace changes" option on)
    Mingun committed Aug 16, 2024
    Configuration menu
    Copy the full SHA
    29dc6c3 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    a02da49 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    6bfe1c4 View commit details
    Browse the repository at this point in the history
  15. No need to test integer and byte array field names, they already test…

    …ed for Unit case
    
    There is no difference what variant is deserialized so we can test only one kind of variant
    Mingun committed Aug 16, 2024
    Configuration menu
    Copy the full SHA
    d5a9c11 View commit details
    Browse the repository at this point in the history
  16. Newtype: add tests for deserialization from sequence

    (review this commit with "ignore whitespace changes" option on)
    Mingun committed Aug 16, 2024
    Configuration menu
    Copy the full SHA
    b0d651b View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    a94d875 View commit details
    Browse the repository at this point in the history
  18. Tuple: add tests for deserialization from sequence

    (review this commit with "ignore whitespace changes" option on)
    Mingun committed Aug 16, 2024
    Configuration menu
    Copy the full SHA
    c383e4f View commit details
    Browse the repository at this point in the history
  19. Struct: add tests for deserialization from sequence

    (review this commit with "ignore whitespace changes" option on)
    Mingun committed Aug 16, 2024
    Configuration menu
    Copy the full SHA
    9f72ce6 View commit details
    Browse the repository at this point in the history