My test fails with an ‘Unhandled log message’ error.
However, I expect this unhandled log message and it is unrelated to the test case.
I tried to disable these checks with LogAssert.ignoreFailingMessages = true
. But it does not work. The test still fails due to an unrelated log message.
I also tried to exepct this log message: ```
LogAssert.Expect(LogType.Exception, new Regex(@“.*”))
So, how can I ignore unwanted and unrelated log message checks in test?
Example:
```csharp
[OneTimeSetUp]
public void OneTimeSetUp()
{
Debug.Log("OneTimeSetUp");
Debug.Log("ignoring failing messages");
// Does not help, still getting "Unhandled log message: '[Exception] Exception: SteamApi_Init returned false. Steam isn't running, couldn't find Steam, AppId is ureleased, Don't own AppId.'."
LogAssert.ignoreFailingMessages = true;
Debug.Log("Expecting all kind of exceptions");
// Does not help, now failing because "OneTimeSetUp: Expected log did not appear: [Exception] Regex: .*"
LogAssert.Expect(LogType.Exception, new Regex(@".*"));
// Normal OneTimeSetup for the test cases...
}