Imported Upstream version 6.0.0.172

Former-commit-id: f3cc9b82f3e5bd8f0fd3ebc098f789556b44e9cd
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2019-04-12 14:10:50 +00:00
parent 8016999e4d
commit 64ac736ec5
32155 changed files with 3981439 additions and 75368 deletions

View File

@ -283,10 +283,10 @@ namespace MonoTests.System
double b = 0.12371341868561381;
Assert.IsTrue (Math.Abs (a - b) <= 0.0000000000000001, a.ToString ("G99")
+ " != " + b.ToString ("G99"));
Assert.IsTrue (double.IsNaN (Math.Sinh (Double.NaN)));
Assert.IsTrue (double.IsNegativeInfinity (Math.Sinh (Double.NegativeInfinity)));
Assert.IsTrue (double.IsPositiveInfinity (Math.Sinh (Double.PositiveInfinity)));
+ " != " + b.ToString ("G99"));
Assert.IsTrue (double.IsNaN (Math.Sinh (Double.NaN)), "SinH of Nan should be a Nan");
Assert.IsTrue (double.IsNegativeInfinity (Math.Sinh (Double.NegativeInfinity)), "SinH of -inf should be -inf");
Assert.IsTrue (double.IsPositiveInfinity (Math.Sinh (Double.PositiveInfinity)), "SinH of +inf should be +inf");
}
[Test]
@ -507,7 +507,10 @@ namespace MonoTests.System
Assert.IsTrue (double.IsNaN (Math.Pow ( -2, double.NaN)), "#9");
Assert.IsTrue (double.IsNaN (Math.Pow ( -1, double.NaN)), "#10");
Assert.IsTrue (double.IsNaN (Math.Pow ( 0, double.NaN)), "#11");
#if !WASM
/* WASM returns NaN */
Assert.IsFalse (double.IsNaN (Math.Pow ( 1, double.NaN)), "#12");
#endif
Assert.IsTrue (double.IsNaN (Math.Pow ( 2, double.NaN)), "#13");
Assert.IsTrue (double.IsNaN (Math.Pow (double.PositiveInfinity, double.NaN)), "#14");
@ -527,8 +530,11 @@ namespace MonoTests.System
Assert.IsTrue (double.IsNaN (Math.Pow (-1, 2.5)), "#19");
/* x = -1; y = NegativeInfinity or PositiveInfinity -> NaN */
#if !WASM
/* WASM returns NaN */
Assert.IsFalse (double.IsNaN (Math.Pow (-1, double.PositiveInfinity)), "#20");
Assert.IsFalse (double.IsNaN (Math.Pow (-1, double.NegativeInfinity)), "#21");
#endif
/* -1 < x < 1; y = NegativeInfinity -> PositiveInfinity */
Assert.AreEqual (double.PositiveInfinity, Math.Pow (-0.5, double.NegativeInfinity), "#22");
@ -553,11 +559,15 @@ namespace MonoTests.System
Assert.AreEqual ((double) 0, Math.Pow (0, +2), "#31");
/* x = 1; y is any value except NaN -> 1 */
#if !WASM
Assert.AreEqual ((double) 1, Math.Pow (1, double.NegativeInfinity), "#32");
#endif
Assert.AreEqual ((double) 1, Math.Pow (1, -2), "#33");
Assert.AreEqual ((double) 1, Math.Pow (1, 0), "#34");
Assert.AreEqual ((double) 1, Math.Pow (1, +2), "#35");
#if !WASM
Assert.AreEqual ((double) 1, Math.Pow (1, double.PositiveInfinity), "#36");
#endif
/* x = PositiveInfinity; y < 0 -> 0 */
Assert.AreEqual ((double) 0, Math.Pow (double.PositiveInfinity, -1), "#37");