Search Issue Tracker
LogAssert.Expect(LogType.Error, message) fails if frames were skipped
How to reproduce:
1. Open the "AssertError" project
2. Open the Test Runner
3. Run tests, "Test" fails
Expected result: "Test" test should pass.
Reproducible with: 2017.3.0a2, 2017.2.0b5, 2017.1.0p1, 5.6.3f1, 5.6.1f1.
Note: "Test2" is the same script as "Test" just without frame skipping (It passes).
This is by design. One can only LogAssert on a message that has been just logged if you do it in the same frame. If you skip frames, you have to LogAssert before the actual call generating the log. So, the test rewritten like this works:
public IEnumerator TestDebugLog()
yield return null; yield return null;
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- Tabbed headers in editor windows need a style update
- [Android][IL2CPP] App crashes after executing Application.Quit
- [iOS] ReplayKit.APIAvailable returns 'false' on the first call on iOS 13 devices
- Texture preview can be clicked through
- [Progress] Progress bar does not revert to unresponsive status after another task completes