Merge branch 'upstream'

Former-commit-id: b02076fa59f110db92f02eba01f1afe82d9639a7
This commit is contained in:
Xamarin Public Jenkins 2015-05-28 04:48:59 -04:00
commit c955cc2cca
17 changed files with 32 additions and 11 deletions

View File

@ -253,6 +253,13 @@ namespace System.IO {
m_buffer [pos ++] = (byte)read_byte; m_buffer [pos ++] = (byte)read_byte;
bytes_read ++; bytes_read ++;
if (m_encoding is UnicodeEncoding) {
CheckBuffer (pos + 1);
read_byte = m_stream.ReadByte();
if (read_byte != -1) {
m_buffer [pos++] = (byte)read_byte;
}
}
int n = m_encoding.GetChars (m_buffer, 0, pos, buffer, index + chars_read); int n = m_encoding.GetChars (m_buffer, 0, pos, buffer, index + chars_read);
if (n > 0) if (n > 0)

View File

@ -274,6 +274,20 @@ namespace MonoTests.System.IO
} }
} }
[Test]
public void TestReadUnicode ()
{
char testChar1 = 'H';
using (var stream = new MemoryStream())
using (var writer = new BinaryWriter(stream, Encoding.Unicode, true))
using (var reader = new BinaryReader(stream, Encoding.Unicode))
{
writer.Write(testChar1);
stream.Position = 0;
Assert.AreEqual ('H', reader.ReadChar ());
}
}
//-TODO: (TestRead[Type]*) Verify the ReadBoolean, ReadByte .... //-TODO: (TestRead[Type]*) Verify the ReadBoolean, ReadByte ....
// ReadBoolean, ReadByte, ReadChar, ReadInt32 Done // ReadBoolean, ReadByte, ReadChar, ReadInt32 Done

View File

@ -1 +1 @@
1c8c63024e2890bc7bef625af05d4c2f6a8f7b5a a7e75eef6368c6220420fa94b92d9f18efdc954b

View File

@ -1 +1 @@
70d2fcb59d657b9d2a69eaf92589ac8dd29b8ae5 2eb43af5239e63316874341249c70a7aaaa21548

View File

@ -1 +1 @@
433141ac44966433021bb18eca97d0c0bf1eba6e 1e8e4cd027b107938b2ccffcb417211866ad1223

View File

@ -1 +1 @@
d36f7fa35e1e825e33423f2bc7ed953ba7ab3d69 c662727d3b509939685f97c0494d303020cc0725

View File

@ -1 +1 @@
062186f53d20ad38ba65594e46aa800bcb9ec915 134f3a9815c9cb89f775b433dcde3143b910e93c

View File

@ -1 +1 @@
#define FULL_VERSION "(detached/11b5830" #define FULL_VERSION "(detached/ed1d3ec"

Binary file not shown.

View File

@ -1 +1 @@
b18a93586930c4819afa4f63ebc2fd161de5c32e ff2d756a7f32d77cd2a721a68b035fbc69e57ef7

Binary file not shown.

View File

@ -1 +1 @@
98858f5344ebf3d4d728c04aa06f70a98af639f9 3b249963775464504655c0b1f30dfc2ca6a25709

Binary file not shown.

View File

@ -1 +1 @@
906d3946f50e849f48f31362a464c0784f9b48b4 e20a637041eac6d869e1fda5b4fd5d14658b6347

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: mono 4.0.1\n" "Project-Id-Version: mono 4.0.1\n"
"Report-Msgid-Bugs-To: http://www.mono-project.com/Bugs\n" "Report-Msgid-Bugs-To: http://www.mono-project.com/Bugs\n"
"POT-Creation-Date: 2015-05-20 07:16-0400\n" "POT-Creation-Date: 2015-05-28 04:20-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"

Binary file not shown.

View File

@ -1 +1 @@
f860a69e98ef0e4954ebd899879a5c9baa6fd921 f9040ad4c3d6d8b547cc25310a949e56da482c9a