Skip to content

Commit

Permalink
Don't run tests that call Debug.Assert (everything Fody.NullGuard) in…
Browse files Browse the repository at this point in the history
… Debug mode.
  • Loading branch information
danielcweber committed Jun 6, 2023
1 parent 66d956b commit 5a0fba9
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
4 changes: 2 additions & 2 deletions test/Core.Tests/GraphModelTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public GraphModelTest() : base()

}

[Fact]
[ReleaseOnlyFact]
public void Fody_works()
{
g
Expand All @@ -44,7 +44,7 @@ public void MemberMetadata_name_cannot_be_null()
.Throw<InvalidOperationException>();
}

[Fact]
[ReleaseOnlyFact]
public void ElementMetadata_name_cannot_be_null()
{
var m = default(ElementMetadata);
Expand Down
4 changes: 2 additions & 2 deletions test/Core.Tests/QueryAssertions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public QueryAssertions()
.IncludeAssembliesOfBaseTypes())));
}

[Fact]
[ReleaseOnlyFact]
public virtual void VertexProperty_throws_on_null_value()
{
default(int)
Expand Down Expand Up @@ -104,7 +104,7 @@ public virtual void Mid_query_g_throws()
}


[Fact]
[ReleaseOnlyFact]
public virtual void NullGuard_works()
{
_g
Expand Down
13 changes: 13 additions & 0 deletions test/Tests.Infrastructure/ReleaseOnlyFactAttribute.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
namespace ExRam.Gremlinq.Core.Tests
{
public sealed class ReleaseOnlyFactAttribute : FactAttribute
{
public ReleaseOnlyFactAttribute()
{
#if DEBUG
Skip = "Skipped in Debug mode";
#endif
}

}
}

0 comments on commit 5a0fba9

Please sign in to comment.