You've already forked linux-packaging-mono
Imported Upstream version 3.10.0
Former-commit-id: 172c8e3c300b39d5785c7a3e8dfb08ebdbc1a99b
This commit is contained in:
@ -13,7 +13,7 @@ using System;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
#if !TARGET_JVM && !MONOTOUCH // Reflection.Emit not supported for TARGET_JVM
|
||||
#if !MONOTOUCH
|
||||
using System.Reflection.Emit;
|
||||
#endif
|
||||
using System.Runtime.InteropServices;
|
||||
@ -311,7 +311,7 @@ namespace MonoTests.System {
|
||||
Assert.AreEqual (7, objCOMTest.Id, "#A05");
|
||||
}
|
||||
|
||||
#if !TARGET_JVM && !MONOTOUCH // Reflection.Emit not supported for TARGET_JVM
|
||||
#if !MONOTOUCH
|
||||
[Test]
|
||||
[ExpectedException (typeof (MissingMethodException))]
|
||||
public void CreateInstance_TypeBuilder ()
|
||||
@ -334,7 +334,7 @@ namespace MonoTests.System {
|
||||
{
|
||||
Activator.CreateInstance (typeof (ArgIterator), null);
|
||||
}
|
||||
#endif // TARGET_JVM
|
||||
#endif
|
||||
|
||||
[Test]
|
||||
[ExpectedException (typeof (NotSupportedException))]
|
||||
@ -343,14 +343,12 @@ namespace MonoTests.System {
|
||||
Activator.CreateInstance (typeof (void), null);
|
||||
}
|
||||
|
||||
#if !TARGET_JVM // RuntimeArgumentHandle not supported for TARGET_JVM
|
||||
[Test]
|
||||
[ExpectedException (typeof (NotSupportedException))]
|
||||
public void CreateInstance_RuntimeArgumentHandle ()
|
||||
{
|
||||
Activator.CreateInstance (typeof (RuntimeArgumentHandle), null);
|
||||
}
|
||||
#endif // TARGET_JVM
|
||||
|
||||
[Test]
|
||||
[ExpectedException (typeof (NotSupportedException))]
|
||||
@ -370,7 +368,6 @@ namespace MonoTests.System {
|
||||
|
||||
[Test]
|
||||
[ExpectedException(typeof(MissingMethodException))]
|
||||
[Category ("TargetJvmNotWorking")]
|
||||
public void CreateInstanceAbstract2 ()
|
||||
{
|
||||
Activator.CreateInstance (typeof (Type), true);
|
||||
@ -392,14 +389,12 @@ namespace MonoTests.System {
|
||||
|
||||
[Test]
|
||||
[ExpectedException (typeof (MissingMethodException))]
|
||||
[Category ("TargetJvmNotWorking")]
|
||||
public void CreateInstanceAbstract5 ()
|
||||
{
|
||||
Activator.CreateInstance (typeof (Type), BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance, null, null, CultureInfo.InvariantCulture, null);
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("TargetJvmNotWorking")]
|
||||
public void CreateInstance_Nullable ()
|
||||
{
|
||||
Assert.AreEqual (5, Activator.CreateInstance (typeof (Nullable<int>), new object [] { 5 }));
|
||||
@ -419,7 +414,6 @@ namespace MonoTests.System {
|
||||
#if !MOBILE
|
||||
[Test]
|
||||
[ExpectedException (typeof (ArgumentNullException))]
|
||||
[Category ("TargetJvmNotWorking")]
|
||||
public void GetObject_UrlNull ()
|
||||
{
|
||||
Activator.GetObject (typeof (COMTest), null);
|
||||
@ -477,7 +471,6 @@ namespace MonoTests.System {
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("TargetJvmNotSupported")] // No support under TARGET_JVM for assemlies versioning
|
||||
public void Unification_FromFx10 ()
|
||||
{
|
||||
Unification (String.Format (CorlibPermissionPattern, fx10version));
|
||||
@ -485,7 +478,6 @@ namespace MonoTests.System {
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("TargetJvmNotSupported")] // No support under TARGET_JVM for assemlies versioning
|
||||
public void Unification_FromFx11 ()
|
||||
{
|
||||
Unification (String.Format (CorlibPermissionPattern, fx11version));
|
||||
@ -493,7 +485,6 @@ namespace MonoTests.System {
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("TargetJvmNotSupported")] // No support under TARGET_JVM for assemlies versioning
|
||||
public void Unification_FromFx20 ()
|
||||
{
|
||||
Unification (String.Format (CorlibPermissionPattern, fx20version));
|
||||
@ -501,14 +492,12 @@ namespace MonoTests.System {
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("TargetJvmNotSupported")] // No support under TARGET_JVM for assemlies versioning
|
||||
public void Unification_FromFx99_Corlib ()
|
||||
{
|
||||
Unification (String.Format (CorlibPermissionPattern, "9.99.999.9999"));
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("TargetJvmNotSupported")] // No support under TARGET_JVM for assemlies versioning
|
||||
[Category ("NotWorking")]
|
||||
public void Unification_FromFx99_System ()
|
||||
{
|
||||
|
@ -29,7 +29,6 @@ namespace MonoTests.System
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("TargetJvmNotWorking")]
|
||||
public void ConfigurationFile_Relative_ApplicationBase ()
|
||||
{
|
||||
string fileName = "blar.config";
|
||||
@ -51,7 +50,6 @@ namespace MonoTests.System
|
||||
|
||||
[Test]
|
||||
[ExpectedException (typeof (MemberAccessException))] // The ApplicationBase must be set before retrieving this property
|
||||
[Category ("TargetJvmNotWorking")]
|
||||
public void ConfigurationFile_Relative_NoApplicationBase ()
|
||||
{
|
||||
AppDomainSetup setup = new AppDomainSetup();
|
||||
@ -72,7 +70,6 @@ namespace MonoTests.System
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("TargetJvmNotWorking")]
|
||||
public void ApplicationBase1 ()
|
||||
{
|
||||
string expected_path = tmpPath.Replace(@"\", @"/");
|
||||
@ -96,7 +93,6 @@ namespace MonoTests.System
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("TargetJvmNotWorking")]
|
||||
public void ApplicationBase2 ()
|
||||
{
|
||||
AppDomainSetup setup = new AppDomainSetup ();
|
||||
@ -105,7 +101,6 @@ namespace MonoTests.System
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("TargetJvmNotWorking")]
|
||||
public void ApplicationBase3 ()
|
||||
{
|
||||
AppDomainSetup setup = new AppDomainSetup ();
|
||||
@ -115,7 +110,6 @@ namespace MonoTests.System
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("TargetJvmNotWorking")]
|
||||
public void ApplicationBase4 ()
|
||||
{
|
||||
AppDomainSetup setup = new AppDomainSetup ();
|
||||
@ -134,7 +128,6 @@ namespace MonoTests.System
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("TargetJvmNotWorking")]
|
||||
public void ApplicationBase5 ()
|
||||
{
|
||||
// This is failing because of (probably) a windows-ism, so don't worry
|
||||
@ -154,7 +147,6 @@ namespace MonoTests.System
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("TargetJvmNotWorking")]
|
||||
public void ApplicationBase6 ()
|
||||
{
|
||||
AppDomainSetup setup = new AppDomainSetup ();
|
||||
|
@ -543,11 +543,6 @@ public class ArrayTest
|
||||
} catch (ArgumentException) {
|
||||
errorThrown = true;
|
||||
}
|
||||
#if TARGET_JVM // This is really implementation dependent behaviour.
|
||||
catch (RankException) {
|
||||
errorThrown = true;
|
||||
}
|
||||
#endif // TARGET_JVM
|
||||
Assert.IsTrue (errorThrown, "#E62");
|
||||
}
|
||||
{
|
||||
@ -707,7 +702,6 @@ public class ArrayTest
|
||||
}
|
||||
Assert.IsTrue (errorThrown, "#F03b");
|
||||
}
|
||||
#if !TARGET_JVM // Arrays lower bounds are not supported for TARGET_JVM
|
||||
{
|
||||
bool errorThrown = false;
|
||||
try {
|
||||
@ -717,7 +711,6 @@ public class ArrayTest
|
||||
}
|
||||
Assert.IsTrue (errorThrown, "#F04");
|
||||
}
|
||||
#endif // TARGET_JVM
|
||||
{
|
||||
bool errorThrown = false;
|
||||
try {
|
||||
@ -728,7 +721,6 @@ public class ArrayTest
|
||||
}
|
||||
Assert.IsTrue (errorThrown, "#F05");
|
||||
}
|
||||
#if !TARGET_JVM // CreateInstance with lower bounds not supported for TARGET_JVM
|
||||
{
|
||||
bool errorThrown = false;
|
||||
try {
|
||||
@ -771,7 +763,6 @@ public class ArrayTest
|
||||
Type szarrayType = new int [10].GetType ();
|
||||
Assert.IsTrue (szarrayType == (Array.CreateInstance (typeof (int), new int[] {1}, new int[] {0})).GetType ());
|
||||
Assert.IsTrue (szarrayType != (Array.CreateInstance (typeof (int), new int[] {1}, new int[] {1})).GetType ());
|
||||
#endif // TARGET_JVM
|
||||
}
|
||||
|
||||
[Test]
|
||||
@ -842,7 +833,6 @@ public class ArrayTest
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("TargetJvmNotSupported")] // Arrays lower bounds are not supported for TARGET_JVM
|
||||
public void TestGetEnumeratorNonZeroLowerBounds() {
|
||||
int[] myLengthsArray = new int[2] { 3, 5 };
|
||||
int[] myBoundsArray = new int[2] { 2, 3 };
|
||||
@ -871,7 +861,6 @@ public class ArrayTest
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("TargetJvmNotSupported")] // Arrays lower bounds are not supported for TARGET_JVM
|
||||
public void TestIList_Add () {
|
||||
int[] myLengthsArray = new int[2] { 3, 5 };
|
||||
int[] myBoundsArray = new int[2] { 2, 3 };
|
||||
@ -892,7 +881,6 @@ public class ArrayTest
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("TargetJvmNotSupported")] // Arrays lower bounds are not supported for TARGET_JVM
|
||||
public void TestIList_Insert () {
|
||||
int[] myLengthsArray = new int[2] { 3, 5 };
|
||||
int[] myBoundsArray = new int[2] { 2, 3 };
|
||||
@ -913,7 +901,6 @@ public class ArrayTest
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("TargetJvmNotSupported")] // Arrays lower bounds are not supported for TARGET_JVM
|
||||
public void TestIList_Remove () {
|
||||
int[] myLengthsArray = new int[2] { 3, 5 };
|
||||
int[] myBoundsArray = new int[2] { 2, 3 };
|
||||
@ -934,7 +921,6 @@ public class ArrayTest
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("TargetJvmNotSupported")] // Arrays lower bounds are not supported for TARGET_JVM
|
||||
public void TestIList_RemoveAt () {
|
||||
int[] myLengthsArray = new int[2] { 3, 5 };
|
||||
int[] myBoundsArray = new int[2] { 2, 3 };
|
||||
@ -955,7 +941,6 @@ public class ArrayTest
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("TargetJvmNotSupported")] // Arrays lower bounds are not supported for TARGET_JVM
|
||||
public void TestIList_Contains () {
|
||||
int[] myLengthsArray = new int[2] { 3, 5 };
|
||||
int[] myBoundsArray = new int[2] { 2, 3 };
|
||||
@ -981,7 +966,6 @@ public class ArrayTest
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("TargetJvmNotSupported")] // Arrays lower bounds are not supported for TARGET_JVM
|
||||
public void TestIList_IndexOf () {
|
||||
int[] myLengthsArray = new int[2] { 3, 5 };
|
||||
int[] myBoundsArray = new int[2] { 2, 3 };
|
||||
@ -3178,7 +3162,6 @@ public class ArrayTest
|
||||
public int i, j;
|
||||
}
|
||||
|
||||
#if !TARGET_JVM // BugBUG: T[] is not yet ICollection<T> under TARGET_JVM
|
||||
[Test]
|
||||
// From bug #80563
|
||||
public void ICollectionNull ()
|
||||
@ -3234,7 +3217,6 @@ public class ArrayTest
|
||||
Assert.AreEqual (-1, test.IndexOf (null), "array with test");
|
||||
}
|
||||
|
||||
#endif // TARGET_JVM
|
||||
|
||||
#region Bug 80299
|
||||
|
||||
|
@ -64,12 +64,8 @@ namespace MonoTests.System
|
||||
Assert.IsNotNull (bif.Message, "#4");
|
||||
Assert.AreEqual ("message", bif.Message, "#5");
|
||||
Assert.IsNull (bif.FusionLog, "#6");
|
||||
#if TARGET_JVM // ToString always has a stack trace under TARGET_JVM
|
||||
Assert.IsTrue (bif.ToString ().StartsWith (bif.GetType ().FullName + ": message"), "#7");
|
||||
#else
|
||||
Assert.AreEqual (bif.GetType ().FullName + ": message",
|
||||
bif.ToString (), "#7");
|
||||
#endif // TARGET_JVM
|
||||
}
|
||||
|
||||
[Test]
|
||||
@ -85,12 +81,8 @@ namespace MonoTests.System
|
||||
Assert.IsNotNull (bif.Message, "#4");
|
||||
Assert.AreEqual (string.Empty, bif.Message, "#5");
|
||||
Assert.IsNull (bif.FusionLog, "#6");
|
||||
#if TARGET_JVM // ToString always has a stack trace under TARGET_JVM
|
||||
Assert.IsTrue (bif.ToString ().StartsWith (bif.GetType().FullName + ": "), "#7");
|
||||
#else
|
||||
Assert.AreEqual (bif.GetType ().FullName + ": ",
|
||||
bif.ToString (), "#7");
|
||||
#endif // TARGET_JVM
|
||||
}
|
||||
|
||||
[Test]
|
||||
@ -135,12 +127,8 @@ namespace MonoTests.System
|
||||
Assert.IsNotNull (bif.Message, "#5");
|
||||
Assert.AreEqual ("message", bif.Message, "#6");
|
||||
Assert.IsNull (bif.FusionLog, "#7");
|
||||
#if TARGET_JVM // ToString always has a stack trace under TARGET_JVM
|
||||
Assert.IsTrue (bif.ToString ().IndexOf (ame.GetType ().FullName + ": something") != -1, "#8");
|
||||
#else
|
||||
Assert.AreEqual (bif.GetType ().FullName + ": message ---> "
|
||||
+ ame.GetType ().FullName + ": something", bif.ToString (), "#8");
|
||||
#endif // TARGET_JVM
|
||||
}
|
||||
|
||||
[Test]
|
||||
@ -158,12 +146,8 @@ namespace MonoTests.System
|
||||
Assert.IsNotNull (bif.Message, "#5");
|
||||
Assert.AreEqual (string.Empty, bif.Message, "#6");
|
||||
Assert.IsNull (bif.FusionLog, "#7");
|
||||
#if TARGET_JVM // ToString always has a stack trace under TARGET_JVM
|
||||
Assert.IsTrue (bif.ToString ().IndexOf (ame.GetType ().FullName + ": something") != -1, "#8");
|
||||
#else
|
||||
Assert.AreEqual (bif.GetType ().FullName + ": ---> "
|
||||
+ ame.GetType ().FullName + ": something", bif.ToString (), "#8");
|
||||
#endif // TARGET_JVM
|
||||
}
|
||||
|
||||
[Test]
|
||||
@ -188,9 +172,7 @@ namespace MonoTests.System
|
||||
Assert.IsNull (bif.FusionLog, "#7");
|
||||
Assert.IsTrue (bif.ToString ().StartsWith (bif.GetType ().FullName), "#8");
|
||||
Assert.IsTrue (bif.ToString ().IndexOf ("---> " + ame.GetType ().FullName) != -1, "#9");
|
||||
#if !TARGET_JVM // ToString always has a stack trace under TARGET_JVM
|
||||
Assert.IsFalse (bif.ToString ().IndexOf (Environment.NewLine) != -1, "#10");
|
||||
#endif // TARGET_JVM
|
||||
}
|
||||
|
||||
[Test]
|
||||
@ -207,12 +189,8 @@ namespace MonoTests.System
|
||||
Assert.IsNotNull (bif.Message, "#4");
|
||||
Assert.AreEqual ("message", bif.Message, "#5");
|
||||
Assert.IsNull (bif.FusionLog, "#6");
|
||||
#if TARGET_JVM // ToString always has a stack trace under TARGET_JVM
|
||||
Assert.IsTrue (bif.ToString ().StartsWith (bif.GetType().FullName + ": message"), "#7");
|
||||
#else
|
||||
Assert.AreEqual (bif.GetType ().FullName + ": message",
|
||||
bif.ToString (), "#7");
|
||||
#endif // TARGET_JVM
|
||||
}
|
||||
|
||||
[Test]
|
||||
@ -256,12 +234,8 @@ namespace MonoTests.System
|
||||
Assert.IsNotNull (bif.Message, "#5");
|
||||
Assert.AreEqual ("message", bif.Message, "#6");
|
||||
Assert.IsNull (bif.FusionLog, "#7");
|
||||
#if TARGET_JVM // ToString always has a stack trace under TARGET_JVM
|
||||
Assert.IsTrue (bif.ToString ().StartsWith (bif.GetType().FullName + ": message"), "#8");
|
||||
#else
|
||||
Assert.AreEqual (bif.GetType ().FullName + ": message",
|
||||
bif.ToString (), "#8");
|
||||
#endif // TARGET_JVM
|
||||
}
|
||||
|
||||
[Test]
|
||||
@ -278,12 +252,8 @@ namespace MonoTests.System
|
||||
Assert.IsNotNull (bif.Message, "#A4");
|
||||
Assert.AreEqual ("message", bif.Message, "#A5");
|
||||
Assert.IsNull (bif.FusionLog, "#A6");
|
||||
#if TARGET_JVM // ToString always has a stack trace under TARGET_JVM
|
||||
Assert.IsTrue (bif.ToString ().StartsWith (bif.GetType().FullName + ": message"), "#A7");
|
||||
#else
|
||||
Assert.AreEqual (bif.GetType ().FullName + ": message",
|
||||
bif.ToString (), "#A7");
|
||||
#endif // TARGET_JVM
|
||||
|
||||
bif = new BadImageFormatException (string.Empty, (string) null);
|
||||
|
||||
@ -295,12 +265,8 @@ namespace MonoTests.System
|
||||
Assert.IsNotNull (bif.Message, "#B4");
|
||||
Assert.AreEqual (string.Empty, bif.Message, "#B5");
|
||||
Assert.IsNull (bif.FusionLog, "#B6");
|
||||
#if TARGET_JVM // ToString always has a stack trace under TARGET_JVM
|
||||
Assert.IsTrue (bif.ToString ().StartsWith (bif.GetType().FullName + ": "), "#B7");
|
||||
#else
|
||||
Assert.AreEqual (bif.GetType ().FullName + ": ",
|
||||
bif.ToString (), "#B7");
|
||||
#endif // TARGET_JVM
|
||||
}
|
||||
|
||||
[Test]
|
||||
@ -318,11 +284,7 @@ namespace MonoTests.System
|
||||
Assert.IsNotNull (bif.Message, "#5");
|
||||
Assert.AreEqual (string.Empty, bif.Message, "#6");
|
||||
Assert.IsNull (bif.FusionLog, "#7");
|
||||
#if TARGET_JVM // ToString always has a stack trace under TARGET_JVM
|
||||
Assert.IsTrue (bif.ToString ().StartsWith (bif.GetType().FullName + ": "), "#8");
|
||||
#else
|
||||
Assert.AreEqual (bif.GetType ().FullName + ": ", bif.ToString (), "#8");
|
||||
#endif // TARGET_JVM
|
||||
}
|
||||
|
||||
[Test]
|
||||
@ -346,9 +308,7 @@ namespace MonoTests.System
|
||||
Assert.IsNull (bif.FusionLog, "#5");
|
||||
Assert.IsTrue (bif.ToString ().StartsWith (bif.GetType ().FullName
|
||||
+ ": "), "#6");
|
||||
#if !TARGET_JVM // ToString always has a stack trace under TARGET_JVM
|
||||
Assert.IsFalse (bif.ToString ().IndexOf (Environment.NewLine) != -1, "#7");
|
||||
#endif // TARGET_JVM
|
||||
}
|
||||
|
||||
[Test]
|
||||
@ -412,9 +372,7 @@ namespace MonoTests.System
|
||||
Assert.IsNull (bif.FusionLog, "#B6");
|
||||
Assert.IsTrue (bif.ToString ().StartsWith (bif.GetType ().FullName
|
||||
+ ": "), "#B7");
|
||||
#if !TARGET_JVM // ToString always has a stack trace under TARGET_JVM
|
||||
Assert.IsFalse (bif.ToString ().IndexOf (Environment.NewLine) != -1, "#B8");
|
||||
#endif // TARGET_JVM
|
||||
Assert.IsTrue (bif.ToString ().IndexOf ("''") != -1, "#B9");
|
||||
}
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
6467fe44115ced7f5784024b9e14861d86ed5e9e
|
||||
8aee8a9cc657db1a0dc9cdd3bdeb26f77da10970
|
@ -668,6 +668,43 @@ namespace MonoTests.System {
|
||||
Assert.AreEqual (dto.Offset, dto2.Offset);
|
||||
Assert.AreEqual (dt.AddDays (-60), dto2.DateTime);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestPartialDateTimeParsing ()
|
||||
{
|
||||
var now = DateTime.Now;
|
||||
const DateTimeStyles style = DateTimeStyles.AssumeUniversal;
|
||||
|
||||
//year
|
||||
var date = DateTimeOffset.ParseExact ("2003", "yyyy", CultureInfo.InvariantCulture, style);
|
||||
var expected = "01/01/2003 00:00:00 +00:00";
|
||||
Assert.AreEqual (expected, date.ToString (CultureInfo.InvariantCulture));
|
||||
|
||||
//month
|
||||
date = DateTimeOffset.ParseExact ("12", "MM", CultureInfo.InvariantCulture, style);
|
||||
expected = string.Format ("12/01/{0} 00:00:00 +00:00", now.Year);
|
||||
Assert.AreEqual (expected, date.ToString (CultureInfo.InvariantCulture));
|
||||
|
||||
//day
|
||||
date = DateTimeOffset.ParseExact ("29", "dd", CultureInfo.InvariantCulture, style);
|
||||
expected = string.Format ("01/29/{0} 00:00:00 +00:00", now.Year);
|
||||
Assert.AreEqual (expected, date.ToString (CultureInfo.InvariantCulture));
|
||||
|
||||
//hours
|
||||
date = DateTimeOffset.ParseExact ("06", "HH", CultureInfo.InvariantCulture, style);
|
||||
expected = string.Format ("{0:D2}/{1:D2}/{2} 06:00:00 +00:00", now.Month, now.Day, now.Year);
|
||||
Assert.AreEqual (expected, date.ToString (CultureInfo.InvariantCulture));
|
||||
|
||||
//minutes
|
||||
date = DateTimeOffset.ParseExact ("45", "mm", CultureInfo.InvariantCulture, style);
|
||||
expected = string.Format ("{0:D2}/{1:D2}/{2} 00:45:00 +00:00", now.Month, now.Day, now.Year);
|
||||
Assert.AreEqual (expected, date.ToString (CultureInfo.InvariantCulture));
|
||||
|
||||
//seconds
|
||||
date = DateTimeOffset.ParseExact ("45", "ss", CultureInfo.InvariantCulture, style);
|
||||
expected = string.Format ("{0:D2}/{1:D2}/{2} 00:00:45 +00:00", now.Month, now.Day, now.Year);
|
||||
Assert.AreEqual (expected, date.ToString (CultureInfo.InvariantCulture));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -198,9 +198,7 @@ namespace MonoTests.System
|
||||
new ToStringTest ("E", Decimal.MinValue, "-7.922816E+028"),
|
||||
new ToStringTest ("E3", Decimal.MinValue, "-7.923E+028"),
|
||||
new ToStringTest ("E28", Decimal.MinValue, "-7.9228162514264337593543950335E+028"),
|
||||
#if !TARGET_JVM // TargetJvmNotWorking
|
||||
new ToStringTest ("E30", Decimal.MinValue, "-7.922816251426433759354395033500E+028"),
|
||||
#endif
|
||||
new ToStringTest ("E0", Decimal.MinValue, "-8E+028"),
|
||||
new ToStringTest ("N3", Decimal.MinValue, "-79,228,162,514,264,337,593,543,950,335.000"),
|
||||
new ToStringTest ("N0", Decimal.MinValue, "-79,228,162,514,264,337,593,543,950,335"),
|
||||
@ -288,7 +286,6 @@ namespace MonoTests.System
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("TargetJvmNotWorking")]
|
||||
public void TestPercentPattern ()
|
||||
{
|
||||
NumberFormatInfo nfi2 = (NumberFormatInfo) NfiUser.Clone ();
|
||||
@ -342,7 +339,6 @@ namespace MonoTests.System
|
||||
};
|
||||
|
||||
[Test]
|
||||
[Category ("TargetJvmNotWorking")]
|
||||
public void TestParse ()
|
||||
{
|
||||
|
||||
@ -1140,7 +1136,6 @@ namespace MonoTests.System
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("TargetJvmNotWorking")]
|
||||
public void TryParse ()
|
||||
{
|
||||
Decimal r;
|
||||
@ -1561,5 +1556,13 @@ namespace MonoTests.System
|
||||
d = Decimal.Parse ("0.");
|
||||
Assert.AreEqual ("0", d.ToString (), "#11");
|
||||
}
|
||||
|
||||
[Test] // bug #21764
|
||||
public void RoundToString ()
|
||||
{
|
||||
Assert.AreEqual ("3", Math.Round (3M, 5).ToString (CultureInfo.InvariantCulture), "#1");
|
||||
Assert.AreEqual ("3.01", Math.Round (3.01M, 5).ToString (CultureInfo.InvariantCulture), "#2");
|
||||
Assert.AreEqual ("-3.01", Math.Round (-3.01M, 5).ToString (CultureInfo.InvariantCulture), "#3");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
d87cbb1173bd1d82bea418842652358a2471ccbb
|
||||
aa39bad89918df73061366771587a9ed97b11252
|
@ -851,7 +851,6 @@ namespace MonoTests.System
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("TargetJvmNotWorking")]
|
||||
public void CoContraVariance ()
|
||||
{
|
||||
CoContraVariantDelegate d = (CoContraVariantDelegate)
|
||||
|
@ -201,30 +201,22 @@ namespace MonoTests.System
|
||||
|
||||
Assert.AreEqual ("00", TestingEnum4.This.ToString ("x"), "#B1");
|
||||
Assert.AreEqual ("00", TestingEnum4.This.ToString ("X"), "#B2");
|
||||
#if !TARGET_JVM // This appears not to work under .Net
|
||||
Assert.AreEqual ("ff", TestingEnum4.Test.ToString ("x"), "#B3");
|
||||
#endif // TARGET_JVM
|
||||
Assert.AreEqual ("FF", TestingEnum4.Test.ToString ("X"), "#B4");
|
||||
|
||||
Assert.AreEqual ("0000", TestingEnum5.This.ToString ("x"), "#C1");
|
||||
Assert.AreEqual ("0000", TestingEnum5.This.ToString ("X"), "#C2");
|
||||
#if !TARGET_JVM // This appears not to work under .Net
|
||||
Assert.AreEqual ("7fff", TestingEnum5.Test.ToString ("x"), "#C3");
|
||||
#endif // TARGET_JVM
|
||||
Assert.AreEqual ("7FFF", TestingEnum5.Test.ToString ("X"), "#C4");
|
||||
|
||||
Assert.AreEqual ("00000000", TestingEnum6.This.ToString ("x"), "#D1");
|
||||
Assert.AreEqual ("00000000", TestingEnum6.This.ToString ("X"), "#D2");
|
||||
#if !TARGET_JVM // This appears not to work under .Net
|
||||
Assert.AreEqual ("7fffffff", TestingEnum6.Test.ToString ("x"), "#D3");
|
||||
#endif // TARGET_JVM
|
||||
Assert.AreEqual ("7FFFFFFF", TestingEnum6.Test.ToString ("X"), "#D4");
|
||||
|
||||
Assert.AreEqual ("0000000000000000", TestingEnum3.This.ToString ("x"), "#E1");
|
||||
Assert.AreEqual ("0000000000000000", TestingEnum3.This.ToString ("X"), "#E2");
|
||||
#if !TARGET_JVM // This appears not to work under .Net
|
||||
Assert.AreEqual ("ffffffffffffffff", TestingEnum3.Test.ToString ("x"), "#E3");
|
||||
#endif // TARGET_JVM
|
||||
Assert.AreEqual ("FFFFFFFFFFFFFFFF", TestingEnum3.Test.ToString ("X"), "#E4");
|
||||
}
|
||||
|
||||
|
@ -138,7 +138,7 @@ namespace MonoTests.System
|
||||
Assert.IsFalse (d.IsSynchronized, "IsSynchronized");
|
||||
}
|
||||
|
||||
#if NET_2_0 && !TARGET_JVM && !NET_2_1
|
||||
#if NET_2_0 && !NET_2_1
|
||||
[Test] // bug #333740
|
||||
public void GetEnvironmentVariables_NewlySet ()
|
||||
{
|
||||
@ -176,7 +176,6 @@ namespace MonoTests.System
|
||||
Environment.GetEnvironmentVariables ((EnvironmentVariableTarget)Int32.MinValue);
|
||||
}
|
||||
|
||||
#if !TARGET_JVM // Environment.SetEnvironmentVariable not supported under TARGET_JVM
|
||||
[Test]
|
||||
[ExpectedException (typeof (ArgumentException))]
|
||||
public void SetEnvironmentVariable_Target_Invalid ()
|
||||
@ -228,7 +227,6 @@ namespace MonoTests.System
|
||||
Environment.SetEnvironmentVariable ("A3", "\0");
|
||||
Assert.IsNull (Environment.GetEnvironmentVariables ()["A3"]);
|
||||
}
|
||||
#endif // TARGET_JVM
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -17,11 +17,7 @@ namespace MonoTests.System
|
||||
public class MathTest
|
||||
{
|
||||
private static double double_epsilon =
|
||||
#if TARGET_JVM
|
||||
1E-15;
|
||||
#else
|
||||
double.Epsilon;
|
||||
#endif
|
||||
|
||||
static double x = 0.1234;
|
||||
static double y = 12.345;
|
||||
@ -521,11 +517,9 @@ namespace MonoTests.System
|
||||
iTest++;
|
||||
Assert.IsTrue (Double.IsNaN (Math.Pow (1, Double.NaN)),
|
||||
"Math.Pow(1, NaN) should be NaN");
|
||||
#if !TARGET_JVM
|
||||
iTest++;
|
||||
Assert.IsTrue (Double.IsNaN (Math.Pow (Double.NaN, 0)),
|
||||
"Math.Pow(NaN, 0) should be NaN");
|
||||
#endif
|
||||
iTest++;
|
||||
Assert.IsTrue (1.0 == Math.Pow (-1, Double.MaxValue),
|
||||
"Math.Pow(-1, MaxValue) should be 1.0");
|
||||
|
@ -43,17 +43,10 @@ namespace MonoTests.System
|
||||
{
|
||||
private CultureInfo old_culture;
|
||||
|
||||
#if TARGET_JVM // BinaryFormatter is Java based under TARGET_JVM.
|
||||
private BinaryFormatter CreateBinaryFormatter()
|
||||
{
|
||||
return (BinaryFormatter)vmw.@internal.remoting.BinaryFormatterUtils.CreateBinaryFormatter (false);
|
||||
}
|
||||
#else
|
||||
private BinaryFormatter CreateBinaryFormatter()
|
||||
{
|
||||
return new BinaryFormatter();
|
||||
}
|
||||
#endif // TARGET_JVM
|
||||
|
||||
[SetUp]
|
||||
public void SetUp ()
|
||||
|
@ -1 +1 @@
|
||||
82675d01cd6f6499376ee6438682f9b9fa46312c
|
||||
f5026e12fd88d5f6b888dd50f594f06a4b233c72
|
@ -177,7 +177,6 @@ public class TimeZoneTest {
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("TargetJvmNotWorking")]
|
||||
public void CurrentTimeZone_SerializationRoundtrip ()
|
||||
{
|
||||
TimeZone tz = TimeZone.CurrentTimeZone;
|
||||
|
@ -1 +1 @@
|
||||
6d5431e082d30b8533e4c1a318ee66c3d2d66236
|
||||
00131c8d47f1d59ef4266e335ec71b293424a720
|
Reference in New Issue
Block a user