Commit 1da726e
authored
Fix a change detection test (#8605)
# Objective
The unit test `chang_tick_wraparound` is meant to ensure that change
ticks correctly deal with wrapping by setting the world's
`last_change_tick` to `u32::MAX`. However, since systems don't use* the
value of `World::last_change_tick`, this test doesn't actually involve
any wrapping behavior.
*exclusive systems do use `World::last_change_tick`; however it gets
overwritten by the system's own last tick in `System::run`.
## Solution
Use `QueryState` instead of systems in the unit test. This approach
actually uses `World::last_change_tick`, so it properly tests that
change ticks deal with wrapping correctly.1 parent 08bf1a6 commit 1da726e
1 file changed
+3
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
814 | 814 | | |
815 | 815 | | |
816 | 816 | | |
817 | | - | |
818 | | - | |
819 | | - | |
820 | | - | |
821 | 817 | | |
822 | 818 | | |
823 | 819 | | |
824 | 820 | | |
825 | 821 | | |
826 | 822 | | |
827 | 823 | | |
828 | | - | |
829 | | - | |
830 | | - | |
| 824 | + | |
831 | 825 | | |
832 | 826 | | |
833 | 827 | | |
834 | | - | |
| 828 | + | |
| 829 | + | |
835 | 830 | | |
836 | 831 | | |
837 | 832 | | |
| |||
0 commit comments