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. |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
There is some related discussion in #619 for a use case for getters that is not unit testing. |
Beta Was this translation helpful? Give feedback.
-
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?
Beta Was this translation helpful? Give feedback.
All reactions