Skip to content

Commit

Permalink
Modernise "default" style.
Browse files Browse the repository at this point in the history
  • Loading branch information
JonHanna committed Nov 30, 2017
1 parent bd69cc5 commit 26b88fd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions SpookilySharp/HashCode128.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace SpookilySharp
public struct HashCode128 : IEquatable<HashCode128>
{
/// <summary>A <see cref="HashCode128"/> that is all-zero. This is the same as the default value.</summary>
public static readonly HashCode128 Zero = default(HashCode128);
public static readonly HashCode128 Zero = default;

/// <summary>Initialises a new instance of the <see cref="HashCode128"/> struct.</summary>
/// <param name="hash1">The first 64 bits of the hash code.</param>
Expand Down Expand Up @@ -201,7 +201,7 @@ public static bool TryParse(string s, out HashCode128 result)
}

fail:
result = default(HashCode128);
result = default;
return false;
}

Expand Down
3 changes: 3 additions & 0 deletions SpookyHashTesting/Hash128Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ public void Parsing()
Assert.Equal(hash, new HashCode128(0x123456789abcdef0, 0x0fedcba987654321));
Assert.Equal(hash, HashCode128.Parse("0x123456789abcdef00fedcba987654321"));
Assert.Equal(hash, HashCode128.Parse("0x123456789abcdef00fedcba987654321"));
Assert.False(HashCode128.TryParse("x123456789abcdef00fedcba987654321", out hash));
Assert.False(HashCode128.TryParse("0xx123456789abcdef00fedcba987654321", out hash));
Assert.False(HashCode128.TryParse("1234x6789abcdef00fedcba987654321", out hash));
}

[Fact]
Expand Down

0 comments on commit 26b88fd

Please sign in to comment.