diff --git a/THIRD-PARTY-NOTICES.TXT b/THIRD-PARTY-NOTICES.TXT
index a877e8fb7ab..14c806c5ca3 100644
--- a/THIRD-PARTY-NOTICES.TXT
+++ b/THIRD-PARTY-NOTICES.TXT
@@ -680,7 +680,7 @@ worldwide. This software is distributed without any warranty.
See .
-License for fastmod (https://github.com/lemire/fastmod)
+License for fastmod (https://github.com/lemire/fastmod) and ibm-fpgen (https://github.com/nigeltao/parse-number-fxx-test-data)
--------------------------------------
Copyright 2018 Daniel Lemire
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 2485b69e114..f1ef354b76c 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -214,5 +214,9 @@
https://github.com/dotnet/hotreload-utils
25b814e010cd4796cedfbcce72a274c26928f496
+
+ https://github.com/dotnet/runtime-assets
+ 8d7b898b96cbdb868cac343e938173105287ed9e
+
diff --git a/eng/Versions.props b/eng/Versions.props
index 493ee882e59..b62b9b4854c 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -110,6 +110,7 @@
4.5.0
6.0.0-preview.6.21314.1
+ 6.0.0-beta.21314.1
6.0.0-beta.21307.1
6.0.0-beta.21307.1
6.0.0-beta.21307.1
diff --git a/src/libraries/System.Runtime/tests/System.Runtime.Tests.csproj b/src/libraries/System.Runtime/tests/System.Runtime.Tests.csproj
index 2a68cc12651..2ca6739e9c6 100644
--- a/src/libraries/System.Runtime/tests/System.Runtime.Tests.csproj
+++ b/src/libraries/System.Runtime/tests/System.Runtime.Tests.csproj
@@ -1,4 +1,4 @@
-
+
true
$(NoWarn),1718,SYSLIB0013
@@ -282,6 +282,7 @@
+
diff --git a/src/libraries/System.Runtime/tests/System/DoubleTests.cs b/src/libraries/System.Runtime/tests/System/DoubleTests.cs
index cfe3690e588..a80eb05598c 100644
--- a/src/libraries/System.Runtime/tests/System/DoubleTests.cs
+++ b/src/libraries/System.Runtime/tests/System/DoubleTests.cs
@@ -3,6 +3,7 @@
using System.Collections.Generic;
using System.Globalization;
+using System.IO;
using Xunit;
#pragma warning disable xUnit1025 // reporting duplicate test cases due to not distinguishing 0.0 from -0.0, NaN from -NaN
@@ -346,6 +347,70 @@ namespace System.Tests
}
}
+ internal static string SplitPairs(string input)
+ {
+ string[] splitPairs = input.Split('-');
+ string ret = "";
+ foreach (var pair in splitPairs)
+ {
+ string reversedPair = Reverse(pair);
+ ret += reversedPair;
+ }
+
+ return ret;
+ }
+
+ internal static string Reverse(string s)
+ {
+ char[] charArray = s.ToCharArray();
+ Array.Reverse(charArray);
+ return new string(charArray);
+ }
+
+ [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser))]
+ public static void ParsePatterns()
+ {
+ string path = Directory.GetCurrentDirectory();
+ using (FileStream file = new FileStream(Path.Combine(path, "ibm-fpgen.txt"), FileMode.Open))
+ {
+ using (var streamReader = new StreamReader(file))
+ {
+ string line = streamReader.ReadLine();
+ while (line != null)
+ {
+ string[] data = line.Split(' ');
+ string inputHalfBytes = data[0];
+ string inputFloatBytes = data[1];
+ string inputDoubleBytes = data[2];
+ string correctValue = data[3];
+
+ double doubleValue = double.Parse(correctValue, NumberFormatInfo.InvariantInfo);
+ string doubleBytes = BitConverter.ToString(BitConverter.GetBytes(doubleValue));
+ float floatValue = float.Parse(correctValue, NumberFormatInfo.InvariantInfo);
+ string floatBytes = BitConverter.ToString(BitConverter.GetBytes(floatValue));
+ Half halfValue = Half.Parse(correctValue, NumberFormatInfo.InvariantInfo);
+ string halfBytes = BitConverter.ToString(BitConverter.GetBytes(halfValue));
+
+ doubleBytes = SplitPairs(doubleBytes);
+ floatBytes = SplitPairs(floatBytes);
+ halfBytes = SplitPairs(halfBytes);
+
+ if (BitConverter.IsLittleEndian)
+ {
+ doubleBytes = Reverse(doubleBytes);
+ floatBytes = Reverse(floatBytes);
+ halfBytes = Reverse(halfBytes);
+ }
+
+ Assert.Equal(doubleBytes, inputDoubleBytes);
+ Assert.Equal(floatBytes, inputFloatBytes);
+ Assert.Equal(halfBytes, inputHalfBytes);
+ line = streamReader.ReadLine();
+ }
+ }
+ }
+ }
+
public static IEnumerable