Skip to content

Commit

Permalink
Update PolyfillTests_Encoding.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp committed Dec 19, 2024
1 parent d3bb830 commit 2f9f57d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Tests/PolyfillTests_Encoding.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@ public void Encoding_GetByteCount()
{
var encoding = Encoding.UTF8;
var chars = "Hello, World!".AsSpan();

var byteCount = encoding.GetByteCount(chars);
Assert.AreEqual(13, byteCount);
}
#endif

#if FeatureMemory && AllowUnsafeBlocks

[Test]
public void Encoding_GetString()
Expand All @@ -20,6 +18,7 @@ public void Encoding_GetString()
var result = Encoding.UTF8.GetString(array);
Assert.AreEqual("value", result);
}
#if AllowUnsafeBlocks

[Test]
public void Encoding_GetBytes()
Expand All @@ -36,5 +35,6 @@ public void Encoding_GetBytes()
Assert.AreEqual(encoding.GetBytes("Hello, World!"), bytes.ToArray());
}

#endif
#endif
}

0 comments on commit 2f9f57d

Please sign in to comment.