mirror of
https://github.com/BepInEx/dotnet-runtime.git
synced 2026-11-24 21:54:01 -10:00
Merge branch 'v1.0' into merge-v1.0-to-master
Conflicts: src/System.IO.MemoryMappedFiles/src/Microsoft/Win32/SafeMemoryMappedFileHandle.cs src/System.IO.MemoryMappedFiles/tests/MemoryMappedFile/CreateFromFile.cs src/System.IO.MemoryMappedFiles/tests/MemoryMappedFile/CreateNew.cs src/System.IO.MemoryMappedFiles/tests/MemoryMappedFile/CreateOrOpen.cs src/System.IO.MemoryMappedFiles/tests/MemoryMappedFile/CreateViewAccessor.cs src/System.IO.MemoryMappedFiles/tests/MemoryMappedFile/CreateViewStream.cs src/System.IO.MemoryMappedFiles/tests/MemoryMappedFile/Dispose.cs src/System.IO.MemoryMappedFiles/tests/MemoryMappedFile/OpenExisting.cs src/System.IO.MemoryMappedFiles/tests/MemoryMappedViewAccessor/Flush.cs src/System.IO.MemoryMappedFiles/tests/MemoryMappedViewAccessor/ReadX.cs src/System.IO.MemoryMappedFiles/tests/MemoryMappedViewAccessor/SafeMemoryMappedViewHandle.cs src/System.IO.MemoryMappedFiles/tests/MemoryMappedViewAccessor/WriteX.cs src/System.IO.MemoryMappedFiles/tests/MemoryMappedViewStream/Flush.cs src/System.IO.MemoryMappedFiles/tests/MemoryMappedViewStream/ReadWrite.cs src/System.IO.MemoryMappedFiles/tests/MemoryMappedViewStream/SafeMemoryMappedViewHandle.cs src/System.IO.MemoryMappedFiles/tests/MemoryMappedViewStream/SetLength.cs Commit migrated from https://github.com/dotnet/corefx/commit/8018d0685e1cc40fdb2df3c8577ceb95503a8ff9
This commit is contained in:
commit
10f180c735
38 files changed
+328
-296
No files matched your search
@@ -80,14 +80,12 @@ public class EncodingTest
|
||||
EnsureInitialization();
|
||||
|
||||
Encoding encoding = Encoding.GetEncoding(0);
|
||||
Console.WriteLine("System default non-unicode code page: {0} ({1})", encoding.WebName, encoding.CodePage);
|
||||
Assert.True(encoding.CodePage != 0);
|
||||
Assert.True(encoding.WebName != Encoding.UTF8.WebName);
|
||||
}
|
||||
|
||||
private static void TestRoundtrippingCodepageEncoding(string encodingName, byte[] bytes, string s)
|
||||
{
|
||||
Console.WriteLine("Testing codepage: {0}", encodingName);
|
||||
Encoding enc = Encoding.GetEncoding(encodingName);
|
||||
string resultString = enc.GetString(bytes, 0, bytes.Length);
|
||||
Assert.True(s.Equals(resultString));
|
||||
@@ -96,7 +94,7 @@ public class EncodingTest
|
||||
Assert.Equal(bytes.Length, resultBytes.Length);
|
||||
for (int i = 0; i < bytes.Length; i++)
|
||||
{
|
||||
Assert.Equal<byte>(bytes[i], resultBytes[i]);
|
||||
Assert.True(bytes[i] == resultBytes[i], "encodingName: " + encodingName);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -183,11 +181,6 @@ public class EncodingTest
|
||||
int charCount = jpDecoder.GetChars(japaneseEncodedBuffer, byteIndex, 1, buffer, charIndex);
|
||||
if (charCount > 0)
|
||||
{
|
||||
for (int i = 0; i < charCount; i++)
|
||||
{
|
||||
Console.Write("0x{0:X}, ", (int)buffer[charIndex + i]);
|
||||
}
|
||||
Console.WriteLine();
|
||||
charIndex += charCount;
|
||||
}
|
||||
byteIndex++;
|
||||
@@ -228,11 +221,6 @@ public class EncodingTest
|
||||
int charCount = chineseDecoder.GetChars(chineseBuffer, byteIndex, 1, buffer, charIndex);
|
||||
if (charCount > 0)
|
||||
{
|
||||
for (int i = 0; i < charCount; i++)
|
||||
{
|
||||
Console.Write("0x{0:X}, ", (int)buffer[charIndex + i]);
|
||||
}
|
||||
Console.WriteLine();
|
||||
charIndex += charCount;
|
||||
}
|
||||
byteIndex++;
|
||||
@@ -271,11 +259,6 @@ public class EncodingTest
|
||||
int charCount = jpDecoder.GetChars(shiftJapaneseBuffer, byteIndex, 1, buffer, charIndex);
|
||||
if (charCount > 0)
|
||||
{
|
||||
for (int i = 0; i < charCount; i++)
|
||||
{
|
||||
Console.Write("0x{0:X}, ", (int)buffer[charIndex + i]);
|
||||
}
|
||||
Console.WriteLine();
|
||||
charIndex += charCount;
|
||||
}
|
||||
byteIndex++;
|
||||
@@ -313,11 +296,6 @@ public class EncodingTest
|
||||
int charCount = krDecoder.GetChars(koreanEncodedBuffer, byteIndex, 1, buffer, charIndex);
|
||||
if (charCount > 0)
|
||||
{
|
||||
for (int i = 0; i < charCount; i++)
|
||||
{
|
||||
Console.Write("0x{0:X}, ", (int)buffer[charIndex + i]);
|
||||
}
|
||||
Console.WriteLine();
|
||||
charIndex += charCount;
|
||||
}
|
||||
byteIndex++;
|
||||
@@ -356,11 +334,6 @@ public class EncodingTest
|
||||
int charCount = krDecoder.GetChars(hzEncodedBuffer, byteIndex, 1, buffer, charIndex);
|
||||
if (charCount > 0)
|
||||
{
|
||||
for (int i = 0; i < charCount; i++)
|
||||
{
|
||||
Console.Write("0x{0:X}, ", (int)buffer[charIndex + i]);
|
||||
}
|
||||
Console.WriteLine();
|
||||
charIndex += charCount;
|
||||
}
|
||||
byteIndex++;
|
||||
|
||||
Reference in new issue
Block a user