-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add examples, integration tests and docs for simulated device and rea… #87
Conversation
…der interaction (#1) Integration tests and docs for simulated device and reader interaction **Integration tests:** - add simulated device and reader interaction - also for simulated device and reader interaction, add a more structured one using `state pattern`, `Mutex` and `Arc` - one test from the holder's POV with a simulated reader, and vice-versa for another test **Docs:** - add example from the holder's POV with a simulated reader, and vice-versa for another example - add diagram for simulated device and reader interaction - add diagrams for simulated device perspective and simulated reader perspective - add diagrams in readme and links to examples - add ASCII diagrams in `lib.rs` and include examples from device and reader's perspective - fix some docs **Code:** - add `allow invisible_characters` for clippy in a file **CI:** - upgrade `actions/checkout` - add `--all-targets` to build so that it builds tests too (to make sure they don't fall behind) - add `--all-targets` to `clippy` so that it runs on tests too (it will run o tests too but I assume it's fine) - don't explicitly run in in `macros` because `--all-targets` takes care of that - add `--all` to `fmt --check` so that it runs on examples too - don't explicitly run in in `macros` because `--all` takes care of that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see the value of these four separate files in the tests directory. They are using the same code, sometimes imported from common.rs
, sometimes duplicated in the file. Possibly it could be made clearer if you created Device
and Reader
structs, where each of these functions was a method of the corresponding struct, but I also think just having a single well-documented file would be clearer.
@cobward did the changes. |
…se common code. (#3) Removed some of the integration tests and refactor remaining ones to use common code.
# Conflicts: # src/lib.rs # tests/README.md # tests/common.rs # tests/simulated_device_and_reader.rs # tests/simulated_device_and_reader_state.rs
Add tests and docs for simulated device and reader interaction.
Integration tests:
state pattern
,Mutex
andArc
Docs:
lib.rs
and include examples from device and reader's perspectiveCode:
allow invisible_characters
for clippy in a fileCI:
actions/checkout
--all-targets
to build so that it builds tests too (to make sure they don't fall behind)--all-targets
toclippy
so that it runs on tests too (it will run o tests too but I assume it's fine)macros
because--all-targets
takes care of that--all
tofmt --check
so that it runs on examples toomacros
because--all
takes care of that