Fix BinaryReader on BE (#17893)
commit836f45390628c0d05b45d7b27237634062b224a8
authorCalvin Buckley <calvin@cmpct.info>
Mon, 25 Nov 2019 18:15:55 +0000 (25 14:15 -0400)
committermonojenkins <jo.shields+jenkins@xamarin.com>
Mon, 25 Nov 2019 18:15:55 +0000 (25 19:15 +0100)
tree97da5000702fb9dd30d351243d0a933439c055e0
parentbdf4790fa061704a6e40d55c07b214961e5083cc
Fix BinaryReader on BE (#17893)

Fix BinaryReader on BE

The ints passed into the int array ctor needed to be endian swapped.
Interestingly, the BinaryWriter implementation currently being used
(not refsrc AFAIK) does this on write just fine.

Fixes ReadDecimal test on AIX, and adds another test to ensure that
Write(decimal) can be read back by ReadDecimal in case.
mcs/class/corlib/Test/System.IO/BinaryWriterTest.cs
mcs/class/referencesource/mscorlib/system/io/binaryreader.cs