-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[Merged by Bors] - Add ambiguity detection tests #6053
Conversation
Looks good to me so far. Let me know when you're ready for review. |
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 have mainly reviewed the tests, to see if I could understand them ( and thus the ambiguity cases).
|
||
let mut test_stage = SystemStage::parallel(); | ||
test_stage | ||
.add_system(empty_system) |
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.
At first, while trying to understand each test and its expected output, I wondered why this system (empty_system
) was added for this test.
(and I cloned your repository to run the test with report_ambiguities, to be sure I was not misunderstanding something with the expected value of 3).
So, personally, I would not have added empty_system
here, or added a comment to say it should not conflict.
But is also fine as is, of course.
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 didn't write these tests, I just made them compile haha. I'm not entirely sure what the motivation was for adding the empty system, but it may have been to make sure it doesn't flag a false positive somehow. This would probably make more sense as its own test, though.
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.
Yep, that was the intent. It should be split out into it's own test though.
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.
Actually, I don't think it even needs its own test. This case is already covered in read_only
, so I'll just remove the empty system from read_world
.
bors r+ |
# Objective - Add unit tests for ambiguity detection reporting. - Incremental implementation of #4299. ## Solution - Refactor ambiguity detection internals to make it testable. As a bonus, this should make it easier to extend in the future. ## Notes * This code was copy-pasted from #4299 and modified. Credit goes to @alice-i-cecile and @afonsolage, though I'm not sure who wrote what at this point.
Build failed: |
blocked on #6063 |
bors retry |
# Objective - Add unit tests for ambiguity detection reporting. - Incremental implementation of #4299. ## Solution - Refactor ambiguity detection internals to make it testable. As a bonus, this should make it easier to extend in the future. ## Notes * This code was copy-pasted from #4299 and modified. Credit goes to @alice-i-cecile and @afonsolage, though I'm not sure who wrote what at this point.
Pull request successfully merged into main. Build succeeded: |
# Objective - Add unit tests for ambiguity detection reporting. - Incremental implementation of bevyengine#4299. ## Solution - Refactor ambiguity detection internals to make it testable. As a bonus, this should make it easier to extend in the future. ## Notes * This code was copy-pasted from bevyengine#4299 and modified. Credit goes to @alice-i-cecile and @afonsolage, though I'm not sure who wrote what at this point.
# Objective - Add unit tests for ambiguity detection reporting. - Incremental implementation of bevyengine#4299. ## Solution - Refactor ambiguity detection internals to make it testable. As a bonus, this should make it easier to extend in the future. ## Notes * This code was copy-pasted from bevyengine#4299 and modified. Credit goes to @alice-i-cecile and @afonsolage, though I'm not sure who wrote what at this point.
# Objective - Add unit tests for ambiguity detection reporting. - Incremental implementation of bevyengine#4299. ## Solution - Refactor ambiguity detection internals to make it testable. As a bonus, this should make it easier to extend in the future. ## Notes * This code was copy-pasted from bevyengine#4299 and modified. Credit goes to @alice-i-cecile and @afonsolage, though I'm not sure who wrote what at this point.
Objective
Solution
Notes