mirror of
https://github.com/BepInEx/dotnet-runtime.git
synced 2026-11-23 03:39:35 -10:00
Fix System.Text.Encoding tests to use non-static RNG
Commit migrated from https://github.com/dotnet/corefx/commit/1b5d9fb7503cc01a6fba08b5d9bf0eb9cfb031b6
This commit is contained in:
1 parent
42260a04b8
commit
ae493cc005
32 files changed
+199
-576
No files matched your search
+3
-1
@@ -7,6 +7,8 @@ namespace System.Text.EncodingTests
|
||||
//System.Test.UnicodeEncoding.GetDecoder()
|
||||
public class UnicodeEncodingGetDecoder
|
||||
{
|
||||
private readonly RandomDataGenerator _generator = new RandomDataGenerator();
|
||||
|
||||
#region Positive Tests
|
||||
// PosTest1:Invoke the method
|
||||
[Fact]
|
||||
@@ -45,7 +47,7 @@ namespace System.Text.EncodingTests
|
||||
int i = 0;
|
||||
while (i < length)
|
||||
{
|
||||
Char temp = TestLibrary.Generator.GetChar(-55);
|
||||
Char temp = _generator.GetChar(-55);
|
||||
if (!Char.IsSurrogate(temp))
|
||||
{
|
||||
charArray[i] = temp;
|
||||
|
||||
Reference in new issue
Block a user