aphorisme / aphorisme/packs-rs

Enhance testing

Đang mở
#3 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
enhancement std_structs
Ngôn ngữ chính
Rust
Star
0
Fork
0
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Enhance the testing with property based testing for pack -> unpack scenarios on primitive types, `Value` as well as standard structs (maybe use a macro?). Dependency should be part of `dev-dependencies`. To be decided if these tests are part of the integration test suite. This gives *inner consistency*. Maybe there is more to check with properties?
There are different routes for the standard structs:

- `encode` then `decode` and check that this does not fail and gives the original value
- `encode` and `StdStruct::Foo(foo).encode` which needs to lead to the same bytes
- `Foo::decode` needs to lead to the original value. As well as `StdStruct::decode`.

This applies for primitive types and their `Value` counterpart as well.

Also, enhance the testing to check for the right implementation, i.e. take a few examples and check if they get encoded into the right bytes.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.