RunnableInDebugOnlyAttribute.cs 464 B

1234567891011121314151617
  1. using System.Diagnostics;
  2. using System.Runtime.CompilerServices;
  3. namespace Jint.Tests;
  4. public class RunnableInDebugOnlyAttribute : FactAttribute
  5. {
  6. public RunnableInDebugOnlyAttribute(
  7. [CallerFilePath] string sourceFilePath = null,
  8. [CallerLineNumber] int sourceLineNumber = -1) : base(sourceFilePath, sourceLineNumber)
  9. {
  10. if (!Debugger.IsAttached)
  11. {
  12. Skip = "Only running in interactive mode.";
  13. }
  14. }
  15. }