SW 중심대학 OSS GIT 서버 박건태, 이승준, 고기완, 이준호 새로운 배포
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1.2 KiB

4 years ago
  1. using System.Text.RegularExpressions;
  2. using UnityEngine.TestTools.Logging;
  3. namespace UnityEngine.TestTools
  4. {
  5. public static class LogAssert
  6. {
  7. public static void Expect(LogType type, string message)
  8. {
  9. LogScope.Current.ExpectedLogs.Enqueue(new LogMatch() { LogType = type, Message = message });
  10. }
  11. public static void Expect(LogType type, Regex message)
  12. {
  13. LogScope.Current.ExpectedLogs.Enqueue(new LogMatch() { LogType = type, MessageRegex = message });
  14. }
  15. public static void NoUnexpectedReceived()
  16. {
  17. LogScope.Current.NoUnexpectedReceived();
  18. }
  19. public static bool ignoreFailingMessages
  20. {
  21. get
  22. {
  23. return LogScope.Current.IgnoreFailingMessages;
  24. }
  25. set
  26. {
  27. if (value != LogScope.Current.IgnoreFailingMessages)
  28. {
  29. Debug.LogFormat(LogType.Log, LogOption.NoStacktrace, null, "\nIgnoreFailingMessages:" + (value? "true":"false"));
  30. }
  31. LogScope.Current.IgnoreFailingMessages = value;
  32. }
  33. }
  34. }
  35. }