Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/fixNullHasher' into fix808
Browse files Browse the repository at this point in the history
  • Loading branch information
AArnott committed Feb 7, 2020
2 parents da3176e + a47f350 commit 58eca43
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ private MessagePackSecurity()
/// </summary>
/// <param name="copyFrom">The template to copy from.</param>
protected MessagePackSecurity(MessagePackSecurity copyFrom)
: this()
{
if (copyFrom is null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,13 @@ public void EqualityComparer_ObjectFallback()
Assert.NotEqual(eq.GetHashCode(o), eq.GetHashCode(new object()));
}

[Fact]
public void EqualityComparer_ObjectFallback_AfterCopyCtor()
{
var security = MessagePackSecurity.UntrustedData.WithMaximumObjectGraphDepth(15);
Assert.NotNull(security.GetEqualityComparer<object>());
}

/// <summary>
/// Verifies that arbitrary other types not known to be hash safe will be rejected.
/// </summary>
Expand Down

0 comments on commit 58eca43

Please sign in to comment.