Skip to content

Commit

Permalink
fix: skip test that fails for release builds
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Linne <alexander.linne@tngtech.com>
  • Loading branch information
alexanderlinne committed Oct 10, 2024
1 parent 270a79f commit e75fe2b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ MethodCallDependency expectedDependency
Assert.Contains(expectedDependency, originMember.GetMethodCallDependencies());
}

[Theory]
[SkipInReleaseBuildTheory]
[ClassData(typeof(MethodDependencyTestBuild.MethodCallDependencyInAsyncMethodTestData))]
public void MethodCallDependenciesAreFoundInAsyncMethod(
IMember originMember,
Expand Down
10 changes: 10 additions & 0 deletions ArchUnitNETTests/SkipInReleaseBuild.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@ public SkipInReleaseBuild()
{
#if !DEBUG
Skip = "This test only works in debug build";
#endif
}
}

public sealed class SkipInReleaseBuildTheory : TheoryAttribute
{
public SkipInReleaseBuildTheory()
{
#if !DEBUG
Skip = "This test only works in debug build";
#endif
}
}
Expand Down

0 comments on commit e75fe2b

Please sign in to comment.