暂无描述
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

UnhandledLogMessageException.cs 999B

123456789101112131415161718192021222324252627282930313233343536
  1. using System;
  2. using NUnit.Framework;
  3. using NUnit.Framework.Interfaces;
  4. using UnityEngine.TestTools.Logging;
  5. using UnityEngine.TestTools.Utils;
  6. namespace UnityEngine.TestTools.TestRunner
  7. {
  8. internal class UnhandledLogMessageException : ResultStateException
  9. {
  10. public LogEvent LogEvent;
  11. private readonly string m_CustomStackTrace;
  12. public UnhandledLogMessageException(LogEvent log)
  13. : base(BuildMessage(log))
  14. {
  15. LogEvent = log;
  16. m_CustomStackTrace = StackTraceFilter.Filter(log.StackTrace);
  17. }
  18. private static string BuildMessage(LogEvent log)
  19. {
  20. return string.Format("Unhandled log message: '{0}'. Use UnityEngine.TestTools.LogAssert.Expect", log);
  21. }
  22. public override ResultState ResultState
  23. {
  24. get { return ResultState.Failure; }
  25. }
  26. public override string StackTrace
  27. {
  28. get { return m_CustomStackTrace; }
  29. }
  30. }
  31. }