Repository navigation
Replies: 3 comments 3 replies
|
This sounds like a very useful feature, that, when implemented correctly, would allow for actual tests to make sure it works as expected. But this is a UI crate. If there is a way to pull it off properly and accurately (which I'm sure there is), it is probably going to take a not insubstantial effort and should probably be shelved till post 1.0 for a feature update. |
2 replies
|
The biggest issue about making all struct fields public, is that suddenly all changes to existing struct structure, are breaking changes. No matter what you are doing. |
1 reply
|
There is some related discussion in #619 for a use case for getters that is not unit testing. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
The idea is too add a "framework" (I'm not sure what to call it) to allow users of the library to test the interfaces they created with ratatui.
Currently, this is really hard.
While there is the TestBackend that can be used, it's not really user friendly.
See the widget_list test for an example. Checking if the list has the correct items requires the user to write a lot of boilerplate. They also have to check the white space of the items.
A better solution would be something like
I'm not to sure about the feasibility of this proposal, because I'm "just" a user of the library and haven't looked at the code too closely.
Additional features that would be nice to have:
What are your thoughts on this? Would you use a framework like this?
All reactions