Imported Upstream version 5.16.0.100

Former-commit-id: 38faa55fb9669e35e7d8448b15c25dc447f25767
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2018-08-07 15:19:03 +00:00
parent 0a9828183b
commit 7d7f676260
4419 changed files with 170950 additions and 90273 deletions

View File

@@ -29,8 +29,8 @@
<Compile Include="$(CommonPath)\System\Globalization\FormatProvider.Number.cs">
<Link>System\Globalization\FormatProvider.Number.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\Text\ValueStringBuilder.cs">
<Link>System\Text\ValueStringBuilder.cs</Link>
<Compile Include="$(CommonPath)\CoreLib\System\Text\ValueStringBuilder.cs">
<Link>CoreLib\System\Text\ValueStringBuilder.cs</Link>
</Compile>
</ItemGroup>
<ItemGroup>

View File

@@ -330,7 +330,7 @@ namespace System.Numerics
return false;
}
return TryParseBigInteger(value.AsReadOnlySpan(), style, info, out result);
return TryParseBigInteger(value.AsSpan(), style, info, out result);
}
internal static bool TryParseBigInteger(ReadOnlySpan<char> value, NumberStyles style, NumberFormatInfo info, out BigInteger result)
@@ -371,7 +371,7 @@ namespace System.Numerics
throw new ArgumentNullException(nameof(value));
}
return ParseBigInteger(value.AsReadOnlySpan(), style, info);
return ParseBigInteger(value.AsSpan(), style, info);
}
internal static BigInteger ParseBigInteger(ReadOnlySpan<char> value, NumberStyles style, NumberFormatInfo info)

View File

@@ -13,26 +13,26 @@ namespace System.Numerics.Tests
{
if (failureNotExpected)
{
Eval(BigInteger.Parse(num1.AsReadOnlySpan(), ns), expected);
Eval(BigInteger.Parse(num1.AsSpan(), ns), expected);
Assert.True(BigInteger.TryParse(num1.AsReadOnlySpan(), ns, provider: null, out BigInteger test));
Assert.True(BigInteger.TryParse(num1.AsSpan(), ns, provider: null, out BigInteger test));
Eval(test, expected);
if (ns == NumberStyles.Integer)
{
Assert.True(BigInteger.TryParse(num1.AsReadOnlySpan(), out test));
Assert.True(BigInteger.TryParse(num1.AsSpan(), out test));
Eval(test, expected);
}
}
else
{
Assert.Throws<FormatException>(() => { BigInteger.Parse(num1.AsReadOnlySpan(), ns); });
Assert.Throws<FormatException>(() => { BigInteger.Parse(num1.AsSpan(), ns); });
Assert.False(BigInteger.TryParse(num1.AsReadOnlySpan(), ns, provider: null, out BigInteger test));
Assert.False(BigInteger.TryParse(num1.AsSpan(), ns, provider: null, out BigInteger test));
if (ns == NumberStyles.Integer)
{
Assert.False(BigInteger.TryParse(num1.AsReadOnlySpan(), out test));
Assert.False(BigInteger.TryParse(num1.AsSpan(), out test));
}
}
}
@@ -41,14 +41,14 @@ namespace System.Numerics.Tests
{
if (!failureExpected)
{
Assert.Equal(expected, BigInteger.Parse(num1.AsReadOnlySpan(), provider: nfi));
Assert.True(BigInteger.TryParse(num1.AsReadOnlySpan(), NumberStyles.Any, nfi, out BigInteger test));
Assert.Equal(expected, BigInteger.Parse(num1.AsSpan(), provider: nfi));
Assert.True(BigInteger.TryParse(num1.AsSpan(), NumberStyles.Any, nfi, out BigInteger test));
Assert.Equal(expected, test);
}
else
{
Assert.Throws<FormatException>(() => { BigInteger.Parse(num1.AsReadOnlySpan(), provider: nfi); });
Assert.False(BigInteger.TryParse(num1.AsReadOnlySpan(), NumberStyles.Any, nfi, out BigInteger test), String.Format("Expected TryParse to fail on {0}", num1));
Assert.Throws<FormatException>(() => { BigInteger.Parse(num1.AsSpan(), provider: nfi); });
Assert.False(BigInteger.TryParse(num1.AsSpan(), NumberStyles.Any, nfi, out BigInteger test), String.Format("Expected TryParse to fail on {0}", num1));
}
}
@@ -56,14 +56,14 @@ namespace System.Numerics.Tests
{
if (!failureExpected)
{
Assert.Equal(expected, BigInteger.Parse(num1.AsReadOnlySpan(), ns, nfi));
Assert.True(BigInteger.TryParse(num1.AsReadOnlySpan(), NumberStyles.Any, nfi, out BigInteger test));
Assert.Equal(expected, BigInteger.Parse(num1.AsSpan(), ns, nfi));
Assert.True(BigInteger.TryParse(num1.AsSpan(), NumberStyles.Any, nfi, out BigInteger test));
Assert.Equal(expected, test);
}
else
{
Assert.Throws<FormatException>(() => { BigInteger.Parse(num1.AsReadOnlySpan(), ns, nfi); });
Assert.False(BigInteger.TryParse(num1.AsReadOnlySpan(), ns, nfi, out BigInteger test), String.Format("Expected TryParse to fail on {0}", num1));
Assert.Throws<FormatException>(() => { BigInteger.Parse(num1.AsSpan(), ns, nfi); });
Assert.False(BigInteger.TryParse(num1.AsSpan(), ns, nfi, out BigInteger test), String.Format("Expected TryParse to fail on {0}", num1));
}
}
}

View File

@@ -440,7 +440,6 @@ namespace System.Numerics.Tests
yield return new object[] { double.NaN, double.NegativeInfinity, double.NaN, double.NaN };
}
[ActiveIssue(15455)]
[Theory, MemberData(nameof(ASin_Advanced_TestData))]
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public static void ASin_Advanced(double real, double imaginary, double expectedReal, double expectedImaginary)