-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
Initial InputEvent set of unit tests #68677
base: master
Are you sure you want to change the base?
Conversation
Covers all branches of non-virtual functions for all derivatives of the InputEvent class.
…al function calls Cleaned up formatting issues and added class specifiers to hopefully resolve the macOS build issues.
Seems to crash:
There are also style issues to fix, see the diff (wrong filename in header, and wrong indentation style): https://github.com/godotengine/godot/actions/runs/3467850975/jobs/5793096042 |
d5049cc
to
3957af5
Compare
Removed extra space fixed spacing on multiline macro removed tabs from spacing on multiline macro Update test_input_event.h
3957af5
to
18aef3a
Compare
You could also add tests for |
Note that #79444 (which was opened after this PR) has already added tests for InputEvent with a different, incompatible code structure. It's still possible to add more unit tests to the now-existing file, but you'll need to refactor the code added by your pull request to do so. Feel free to look into doing this if you have time – if you don't, let us know and we can mark this PR as |
Covers all branches of non-virtual functions for all derivatives of the InputEvent class.
I'm not sure how to add the discussion label, but I was hoping to get some feedback on how to approach the rest of the class. Currently I've covered all the non-virtual functions (since it's abstract that required testing all the child classes). I think the rest of the functionality should be covered in tests that target each child directly, but I'm not sure as I've haven't worked with unit tests a ton and especially haven't worked with them in C++ before.
Any feedback would be appreciated!
Tests for class based on suggestions from: #43440 (comment)