Imported Upstream version 3.10.0

Former-commit-id: 172c8e3c300b39d5785c7a3e8dfb08ebdbc1a99b
This commit is contained in:
Jo Shields
2014-10-04 11:27:48 +01:00
parent fe777c5c82
commit 8b9b85e7f5
970 changed files with 20242 additions and 31308 deletions

View File

@ -967,7 +967,6 @@ namespace MonoTests.System.IO
}
[Test]
[Category("TargetJvmNotSupported")] // LastAccessTime not supported for TARGET_JVM
public void LastAccessTime ()
{
DirectoryInfo info = new DirectoryInfo (TempFolder);
@ -975,7 +974,6 @@ namespace MonoTests.System.IO
}
[Test]
[Category("TargetJvmNotSupported")] // LastAccessTime not supported for TARGET_JVM
public void LastAccessTimeUtc ()
{
DirectoryInfo info = new DirectoryInfo (TempFolder);
@ -983,7 +981,6 @@ namespace MonoTests.System.IO
}
[Test]
[Category("TargetJvmNotSupported")] // CreationTime not supported for TARGET_JVM
public void CreationTime ()
{
DirectoryInfo info = new DirectoryInfo (TempFolder);
@ -991,7 +988,6 @@ namespace MonoTests.System.IO
}
[Test]
[Category("TargetJvmNotSupported")] // CreationTime not supported for TARGET_JVM
public void CreationTimeUtc ()
{
DirectoryInfo info = new DirectoryInfo (TempFolder);

View File

@ -364,7 +364,7 @@ public class DirectoryTest
Assert.IsFalse (Directory.Exists (null as string));
}
#if !TARGET_JVM && !MOBILE // We don't support yet the Process class.
#if !MOBILE // We don't support yet the Process class.
[Test] // bug #78239
public void ExistsAccessDenied ()
{
@ -385,7 +385,6 @@ public class DirectoryTest
#endif
[Test]
[Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
[ExpectedException(typeof(ArgumentNullException))]
public void GetCreationTimeException1 ()
{
@ -394,7 +393,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(ArgumentException))]
[Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
public void GetCreationTimeException2 ()
{
Directory.GetCreationTime (string.Empty);
@ -404,7 +402,6 @@ public class DirectoryTest
#if !NET_2_0
[ExpectedException(typeof(IOException))]
#endif
[Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
public void GetCreationTimeException_NonExistingPath ()
{
string path = TempFolder + DSC + "DirectoryTest.GetCreationTime.1";
@ -428,7 +425,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(ArgumentException))]
[Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
public void GetCreationTimeException4 ()
{
Directory.GetCreationTime (" ");
@ -436,7 +432,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(ArgumentException))]
[Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
public void GetCreationTimeException5 ()
{
Directory.GetCreationTime (Path.InvalidPathChars [0].ToString ());
@ -444,7 +439,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(ArgumentNullException))]
[Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
public void GetCreationTimeUtcException1 ()
{
Directory.GetCreationTimeUtc (null as string);
@ -452,7 +446,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(ArgumentException))]
[Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
public void GetCreationTimeUtcException2 ()
{
Directory.GetCreationTimeUtc (string.Empty);
@ -462,7 +455,6 @@ public class DirectoryTest
#if !NET_2_0
[ExpectedException (typeof (IOException))]
#endif
[Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
public void GetCreationTimeUtc_NonExistingPath ()
{
string path = TempFolder + DSC + "DirectoryTest.GetCreationTimeUtc.1";
@ -486,7 +478,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(ArgumentException))]
[Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
public void GetCreationTimeUtcException4 ()
{
Directory.GetCreationTimeUtc (" ");
@ -494,7 +485,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(ArgumentException))]
[Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
public void GetCreationTimeUtcException5 ()
{
Directory.GetCreationTime (Path.InvalidPathChars [0].ToString ());
@ -502,7 +492,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(ArgumentNullException))]
[Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM
public void GetLastAccessTime_Null ()
{
Directory.GetLastAccessTime (null as string);
@ -510,7 +499,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(ArgumentException))]
[Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM
public void GetLastAccessTimeException2 ()
{
Directory.GetLastAccessTime (string.Empty);
@ -520,7 +508,6 @@ public class DirectoryTest
#if !NET_2_0
[ExpectedException (typeof (IOException))]
#endif
[Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM
public void GetLastAccessTime_NonExistingPath ()
{
string path = TempFolder + DSC + "DirectoryTest.GetLastAccessTime.1";
@ -545,7 +532,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(ArgumentException))]
[Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM
public void GetLastAccessTimeException4 ()
{
Directory.GetLastAccessTime (" ");
@ -553,7 +539,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(ArgumentException))]
[Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM
public void GetLastAccessTimeException5 ()
{
Directory.GetLastAccessTime (Path.InvalidPathChars [0].ToString ());
@ -561,7 +546,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(ArgumentNullException))]
[Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM
public void GetLastAccessTimeUtc_Null ()
{
Directory.GetLastAccessTimeUtc (null as string);
@ -569,7 +553,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(ArgumentException))]
[Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM
public void GetLastAccessTimeUtcException2 ()
{
Directory.GetLastAccessTimeUtc (string.Empty);
@ -579,7 +562,6 @@ public class DirectoryTest
#if !NET_2_0
[ExpectedException (typeof (IOException))]
#endif
[Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM
public void GetLastAccessTimeUtc_NonExistingPath ()
{
string path = TempFolder + DSC + "DirectoryTest.GetLastAccessTimeUtc.1";
@ -602,7 +584,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(ArgumentException))]
[Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM
public void GetLastAccessTimeUtcException4 ()
{
Directory.GetLastAccessTimeUtc (" ");
@ -610,7 +591,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(ArgumentException))]
[Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM
public void GetLastAccessTimeUtcException5 ()
{
Directory.GetLastAccessTimeUtc (Path.InvalidPathChars [0].ToString ());
@ -1002,7 +982,6 @@ public class DirectoryTest
}
[Test]
[Category("TargetJvmNotSupported")] // CreationTime not supported for TARGET_JVM
public void CreationTime ()
{
if (RunningOnUnix)
@ -1053,7 +1032,6 @@ public class DirectoryTest
}
[Test]
[Category("TargetJvmNotSupported")] // LastAccessTime not supported for TARGET_JVM
public void LastAccessTime ()
{
string path = TempFolder + DSC + "DirectoryTest.AccessTime.1";
@ -1275,7 +1253,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(ArgumentNullException))]
[Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
public void SetLastAccessTimeException1 ()
{
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);
@ -1284,7 +1261,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(ArgumentException))]
[Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
public void SetLastAccessTimeException2 ()
{
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);
@ -1293,7 +1269,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(FileNotFoundException))]
[Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
public void SetLastAccessTimeException3 ()
{
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);
@ -1308,7 +1283,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(ArgumentException))]
[Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
public void SetLastAccessTimeException4 ()
{
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);
@ -1317,7 +1291,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(ArgumentException))]
[Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
public void SetLastAccessTimeException5 ()
{
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);
@ -1343,7 +1316,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(ArgumentNullException))]
[Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
public void SetLastAccessTimeUtcException1 ()
{
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);
@ -1352,7 +1324,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(ArgumentException))]
[Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
public void SetLastAccessTimeUtcException2 ()
{
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);
@ -1361,7 +1332,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(FileNotFoundException))]
[Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
public void SetLastAccessTimeUtcException3 ()
{
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);
@ -1376,7 +1346,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(ArgumentException))]
[Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
public void SetLastAccessTimeUtcException4 ()
{
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);
@ -1385,7 +1354,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(ArgumentException))]
[Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
public void SetLastAccessTimeUtcException5 ()
{
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);
@ -1410,7 +1378,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(ArgumentNullException))]
[Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
public void SetCreationTimeException1 ()
{
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);
@ -1419,7 +1386,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(ArgumentException))]
[Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
public void SetCreationTimeException2 ()
{
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);
@ -1428,7 +1394,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(FileNotFoundException))]
[Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
public void SetCreationTimeException3 ()
{
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);
@ -1444,7 +1409,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(ArgumentException))]
[Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
public void SetCreationTimeException4 ()
{
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);
@ -1453,7 +1417,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(ArgumentException))]
[Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
public void SetCreationTimeException5 ()
{
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);
@ -1480,7 +1443,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(ArgumentNullException))]
[Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
public void SetCreationTimeUtcException1 ()
{
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);
@ -1489,7 +1451,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(ArgumentException))]
[Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
public void SetCreationTimeUtcException2 ()
{
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);
@ -1498,7 +1459,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(FileNotFoundException))]
[Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
public void SetCreationTimeUtcException3 ()
{
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);
@ -1515,7 +1475,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(ArgumentException))]
[Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
public void SetCreationTimeUtcException4 ()
{
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);
@ -1524,7 +1483,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(ArgumentException))]
[Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
public void SetCreationTimeUtcException5 ()
{
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);

View File

@ -1147,7 +1147,6 @@ namespace MonoTests.System.IO
}
[Test]
[Category("TargetJvmNotSupported")] // File sharing not supported for TARGET_JVM
public void OpenRead_FileLock ()
{
string path = TempFolder + DSC + "FIT.OpenReadIOException.Test";

View File

@ -63,12 +63,8 @@ namespace MonoTests.System.IO {
Assert.IsNotNull (fnf.Message, "#4");
Assert.AreEqual ("message", fnf.Message, "#5");
Assert.IsNull (fnf.FusionLog, "#6");
#if TARGET_JVM
Assert.IsTrue(fnf.ToString().StartsWith(fnf.GetType().FullName + ": message"),"#7");
#else
Assert.AreEqual (fnf.GetType ().FullName + ": message",
fnf.ToString (), "#7");
#endif
}
[Test]
@ -84,12 +80,8 @@ namespace MonoTests.System.IO {
Assert.IsNotNull (fnf.Message, "#4");
Assert.AreEqual (string.Empty, fnf.Message, "#5");
Assert.IsNull (fnf.FusionLog, "#6");
#if TARGET_JVM
Assert.IsTrue(fnf.ToString().StartsWith(fnf.GetType().FullName + ": "), "#7");
#else
Assert.AreEqual (fnf.GetType ().FullName + ": ",
fnf.ToString (), "#7");
#endif
}
[Test]
@ -108,7 +100,7 @@ namespace MonoTests.System.IO {
Assert.IsNotNull (fnf.Message, "#4"); // File or assembly name (null), or ...
#endif
Assert.IsNull (fnf.FusionLog, "#5");
#if NET_2_0 && !TARGET_JVM
#if NET_2_0
Assert.AreEqual (fnf.GetType ().FullName + ": ",
fnf.ToString (), "#6");
#else
@ -132,13 +124,8 @@ namespace MonoTests.System.IO {
Assert.IsNotNull (fnf.Message, "#5");
Assert.AreEqual ("message", fnf.Message, "#6");
Assert.IsNull (fnf.FusionLog, "#7");
#if TARGET_JVM
Assert.IsTrue(fnf.ToString().StartsWith(fnf.GetType().FullName + ": message ---> "
+ ame.GetType().FullName + ": something"), "#8");
#else
Assert.AreEqual (fnf.GetType ().FullName + ": message ---> "
+ ame.GetType ().FullName + ": something", fnf.ToString (), "#8");
#endif
}
[Test]
@ -156,13 +143,8 @@ namespace MonoTests.System.IO {
Assert.IsNotNull (fnf.Message, "#5");
Assert.AreEqual (string.Empty, fnf.Message, "#6");
Assert.IsNull (fnf.FusionLog, "#7");
#if TARGET_JVM
Assert.IsTrue(fnf.ToString().StartsWith(fnf.GetType().FullName + ": ---> "
+ ame.GetType().FullName + ": something"), "#8");
#else
Assert.AreEqual (fnf.GetType ().FullName + ": ---> "
+ ame.GetType ().FullName + ": something", fnf.ToString (), "#8");
#endif
}
[Test]
@ -184,13 +166,8 @@ namespace MonoTests.System.IO {
#endif
Assert.IsNull (fnf.FusionLog, "#6");
#if NET_2_0
#if TARGET_JVM
Assert.IsTrue(fnf.ToString().StartsWith(fnf.GetType().FullName + ": ---> "
+ ame.GetType().FullName + ": something"), "#7");
#else
Assert.AreEqual (fnf.GetType ().FullName + ": ---> "
+ ame.GetType ().FullName + ": something", fnf.ToString (), "#7");
#endif
#else
Assert.IsTrue (fnf.ToString ().StartsWith (fnf.GetType ().FullName), "#7");
Assert.IsFalse (fnf.ToString ().IndexOf (Environment.NewLine) != -1, "#9");
@ -211,12 +188,8 @@ namespace MonoTests.System.IO {
Assert.IsNotNull (fnf.Message, "#4");
Assert.AreEqual ("message", fnf.Message, "#5");
Assert.IsNull (fnf.FusionLog, "#6");
#if TARGET_JVM
Assert.IsTrue(fnf.ToString().StartsWith(fnf.GetType().FullName + ": message"), "#7");
#else
Assert.AreEqual (fnf.GetType ().FullName + ": message",
fnf.ToString (), "#7");
#endif
}
[Test]
@ -260,12 +233,8 @@ namespace MonoTests.System.IO {
Assert.IsNotNull (fnf.Message, "#5");
Assert.AreEqual ("message", fnf.Message, "#6");
Assert.IsNull (fnf.FusionLog, "#7");
#if TARGET_JVM
Assert.IsTrue(fnf.ToString().StartsWith(fnf.GetType().FullName + ": message"), "#8");
#else
Assert.AreEqual (fnf.GetType ().FullName + ": message",
fnf.ToString (), "#8");
#endif
}
[Test]
@ -282,13 +251,9 @@ namespace MonoTests.System.IO {
Assert.IsNotNull (fnf.Message, "#A4");
Assert.AreEqual ("message", fnf.Message, "#A5");
Assert.IsNull (fnf.FusionLog, "#A6");
#if TARGET_JVM
Assert.IsTrue(fnf.ToString().StartsWith(fnf.GetType().FullName + ": message"), "#A7");
#else
Assert.AreEqual (fnf.GetType ().FullName + ": message",
fnf.ToString (), "#A7");
#endif
fnf = new FileNotFoundException (string.Empty, (string) null);
@ -300,12 +265,8 @@ namespace MonoTests.System.IO {
Assert.IsNotNull (fnf.Message, "#B4");
Assert.AreEqual (string.Empty, fnf.Message, "#B5");
Assert.IsNull (fnf.FusionLog, "#B6");
#if TARGET_JVM
Assert.IsTrue(fnf.ToString().StartsWith(fnf.GetType().FullName + ": "), "#B7");
#else
Assert.AreEqual (fnf.GetType ().FullName + ": ",
fnf.ToString (), "#B7");
#endif
}
[Test]
@ -323,11 +284,7 @@ namespace MonoTests.System.IO {
Assert.IsNotNull (fnf.Message, "#5");
Assert.AreEqual (string.Empty, fnf.Message, "#6");
Assert.IsNull (fnf.FusionLog, "#7");
#if TARGET_JVM
Assert.IsTrue(fnf.ToString().StartsWith(fnf.GetType().FullName + ": "), "#8");
#else
Assert.AreEqual (fnf.GetType ().FullName + ": ", fnf.ToString (), "#8");
#endif
}
[Test]
@ -349,9 +306,7 @@ namespace MonoTests.System.IO {
Assert.IsNull (fnf.FusionLog, "#5");
Assert.IsTrue (fnf.ToString ().StartsWith (fnf.GetType ().FullName
+ ": "), "#6");
#if !TARGET_JVM
Assert.IsFalse (fnf.ToString ().IndexOf (Environment.NewLine) != -1, "#7");
#endif
Assert.IsFalse (fnf.ToString ().IndexOf ("''") != -1, "#8");
}
@ -422,9 +377,7 @@ namespace MonoTests.System.IO {
Assert.IsNull (fnf.FusionLog, "#B6");
Assert.IsTrue (fnf.ToString ().StartsWith (fnf.GetType ().FullName
+ ": "), "#B7");
#if !TARGET_JVM
Assert.IsFalse (fnf.ToString ().IndexOf (Environment.NewLine) != -1, "#B8");
#endif
#if NET_2_0
Assert.IsTrue (fnf.ToString ().IndexOf ("''") != -1, "#B9");
#else

View File

@ -706,7 +706,6 @@ namespace MonoTests.System.IO
}
}
#if !TARGET_JVM // No support IntPtr file handles under TARGET_JVM
[Test, ExpectedException (typeof (IOException))]
public void CtorIOException2 ()
{
@ -718,9 +717,7 @@ namespace MonoTests.System.IO
stream.Close ();
}
}
#endif // TARGET_JVM
[Category("TargetJvmNotSupported")] // File sharing not supported for TARGET_JVM
[Test, ExpectedException (typeof (IOException))]
public void CtorIOException ()
{
@ -768,7 +765,6 @@ namespace MonoTests.System.IO
}
[Test]
[Category("TargetJvmNotSupported")] // File sharing not supported for TARGET_JVM
[ExpectedException (typeof (IOException))]
public void CtorAccess1Read2Write ()
{
@ -794,7 +790,6 @@ namespace MonoTests.System.IO
}
[Test]
[Category("TargetJvmNotSupported")] // File sharing not supported for TARGET_JVM
[ExpectedException (typeof (IOException))]
public void CtorAccess1Write2Write ()
{
@ -1022,7 +1017,6 @@ namespace MonoTests.System.IO
DeleteFile (path);
}
[Category("TargetJvmNotSupported")] // File locking not supported for TARGET_JVM
public void TestLock ()
{
string path = TempFolder + Path.DirectorySeparatorChar + "TestLock";
@ -1311,7 +1305,6 @@ namespace MonoTests.System.IO
}
}
#if !TARGET_JVM // No support IntPtr file handles under TARGET_JVM
// Check that the stream is flushed even when it doesn't own the
// handle
[Test]
@ -1331,7 +1324,6 @@ namespace MonoTests.System.IO
Assert.AreEqual ((int) '1', s.ReadByte ());
s.Close ();
}
#endif // TARGET_JVM
private void DeleteFile (string path)
{
@ -1447,14 +1439,12 @@ namespace MonoTests.System.IO
}
}
#if !TARGET_JVM // No support IntPtr file handles under TARGET_JVM
[Test]
[ExpectedException (typeof (ArgumentException))]
public void Constructor_InvalidFileHandle ()
{
new FileStream ((IntPtr) (-1L), FileAccess.Read);
}
#endif // TARGET_JVM
[Test]
public void PositionAfterSetLength ()
@ -1493,7 +1483,6 @@ namespace MonoTests.System.IO
}
[Test]
[Category("TargetJvmNotSupported")] // Async IO not supported for TARGET_JVM
[ExpectedException (typeof (ObjectDisposedException))]
public void BeginRead_Disposed ()
{
@ -1505,7 +1494,6 @@ namespace MonoTests.System.IO
}
[Test]
[Category("TargetJvmNotSupported")] // Async IO not supported for TARGET_JVM
[ExpectedException (typeof (ObjectDisposedException))]
public void BeginWrite_Disposed ()
{
@ -1546,7 +1534,6 @@ namespace MonoTests.System.IO
}
[Test]
[Category("TargetJvmNotSupported")] // File locking not supported for TARGET_JVM
[ExpectedException (typeof (ObjectDisposedException))]
public void Lock_Disposed ()
{
@ -1558,7 +1545,6 @@ namespace MonoTests.System.IO
}
[Test]
[Category("TargetJvmNotSupported")] // File locking not supported for TARGET_JVM
[ExpectedException (typeof (ObjectDisposedException))]
public void Unlock_Disposed ()
{
@ -1621,7 +1607,6 @@ namespace MonoTests.System.IO
}
}
[Category("TargetJvmNotSupported")] // FileOptions.DeleteOnClose not supported for TARGET_JVM
[Test]
public void DeleteOnClose ()
{

View File

@ -72,7 +72,6 @@ namespace MonoTests.System.IO
}
[Test]
[Category("TargetJvmNotSupported")] // CreationTime not supported for TARGET_JVM
public void CreationTimeFile ()
{
if (Unix)
@ -125,7 +124,6 @@ namespace MonoTests.System.IO
}
[Test]
[Category("TargetJvmNotSupported")] // CreationTime not supported for TARGET_JVM
public void CreationTimeDirectory ()
{
if (Unix)
@ -166,7 +164,6 @@ namespace MonoTests.System.IO
}
[Test]
[Category("TargetJvmNotSupported")] // CreationTime not supported for TARGET_JVM
public void CreationTimeNoFileOrDirectory ()
{
string path = TempFolder + DSC + "FSIT.CreationTimeNoFile.Test";
@ -216,7 +213,6 @@ namespace MonoTests.System.IO
}
[Test]
[Category("TargetJvmNotSupported")] // LastAccessTime not supported for TARGET_JVM
public void DefaultLastAccessTime ()
{
string path = TempFolder + DSC + "FSIT.DefaultLastAccessTime.Test";
@ -239,7 +235,6 @@ namespace MonoTests.System.IO
}
[Test]
[Category("TargetJvmNotSupported")] // LastAccessTime not supported for TARGET_JVM
public void LastAccessTime ()
{
string path = TempFolder + DSC + "FSIT.LastAccessTime.Test";
@ -282,7 +277,6 @@ namespace MonoTests.System.IO
}
[Test]
[Category("TargetJvmNotSupported")] // LastAccessTime not supported for TARGET_JVM
public void DefaultLastWriteTime ()
{
string path = TempFolder + DSC + "FSIT.DefaultLastWriteTime.Test";

View File

@ -1107,7 +1107,6 @@ namespace MonoTests.System.IO
}
[Test]
[Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
public void TestGetCreationTime ()
{
string path = TempFolder + Path.DirectorySeparatorChar + "baz";
@ -1123,7 +1122,6 @@ namespace MonoTests.System.IO
}
[Test]
[Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
public void CreationTime ()
{
if (RunningOnUnix)
@ -1166,7 +1164,6 @@ namespace MonoTests.System.IO
}
[Test]
[Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM
public void LastAccessTime ()
{
string path = TempFolder + Path.DirectorySeparatorChar + "lastAccessTime";
@ -1261,7 +1258,6 @@ namespace MonoTests.System.IO
}
[Test]
[Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
public void GetCreationTime_Path_Null ()
{
try {
@ -1276,7 +1272,6 @@ namespace MonoTests.System.IO
}
[Test]
[Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
public void GetCreationTime_Path_Empty ()
{
try {
@ -1292,7 +1287,6 @@ namespace MonoTests.System.IO
}
[Test]
//[Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
public void GetCreationTime_Path_DoesNotExist ()
{
string path = TempFolder + Path.DirectorySeparatorChar + "GetCreationTimeException3";
@ -1322,7 +1316,6 @@ namespace MonoTests.System.IO
}
[Test]
[Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
public void GetCreationTime_Path_Whitespace ()
{
try {
@ -1338,7 +1331,6 @@ namespace MonoTests.System.IO
}
[Test]
[Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
public void GetCreationTime_Path_InvalidPathChars ()
{
try {
@ -1354,7 +1346,6 @@ namespace MonoTests.System.IO
}
[Test]
[Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
public void GetCreationTimeUtc_Path_Null ()
{
try {
@ -1369,7 +1360,6 @@ namespace MonoTests.System.IO
}
[Test]
[Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
public void GetCreationTimeUtc_Path_Empty ()
{
try {
@ -1385,7 +1375,6 @@ namespace MonoTests.System.IO
}
[Test]
[Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
public void GetCreationTimeUtc_Path_DoesNotExist ()
{
string path = TempFolder + Path.DirectorySeparatorChar + "GetCreationTimeUtcException3";
@ -1414,7 +1403,6 @@ namespace MonoTests.System.IO
}
[Test]
[Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
public void GetCreationTimeUtc_Path_Whitespace ()
{
try {
@ -1430,7 +1418,6 @@ namespace MonoTests.System.IO
}
[Test]
[Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
public void GetCreationTimeUtc_Path_InvalidPathChars ()
{
try {
@ -1446,7 +1433,6 @@ namespace MonoTests.System.IO
}
[Test]
[Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM
public void GetLastAccessTime_Path_Null ()
{
try {
@ -1461,7 +1447,6 @@ namespace MonoTests.System.IO
}
[Test]
[Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM
public void GetLastAccessTime_Path_Empty ()
{
try {
@ -1477,7 +1462,6 @@ namespace MonoTests.System.IO
}
[Test]
[Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM
public void GetLastAccessTime_Path_DoesNotExist ()
{
string path = TempFolder + Path.DirectorySeparatorChar + "GetLastAccessTimeException3";
@ -1507,7 +1491,6 @@ namespace MonoTests.System.IO
}
[Test]
[Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM
public void GetLastAccessTime_Path_Whitespace ()
{
try {
@ -1523,7 +1506,6 @@ namespace MonoTests.System.IO
}
[Test]
[Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM
public void GetLastAccessTime_Path_InvalidPathChars ()
{
try {
@ -1539,7 +1521,6 @@ namespace MonoTests.System.IO
}
[Test]
[Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM
public void GetLastAccessTimeUtc_Path_Null ()
{
try {
@ -1554,7 +1535,6 @@ namespace MonoTests.System.IO
}
[Test]
[Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM
public void GetLastAccessTimeUtc_Path_Empty ()
{
try {
@ -1570,7 +1550,6 @@ namespace MonoTests.System.IO
}
[Test]
[Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM
public void GetLastAccessTimeUtc_Path_DoesNotExist ()
{
string path = TempFolder + Path.DirectorySeparatorChar + "GetLastAccessTimeUtcException3";
@ -1599,7 +1578,6 @@ namespace MonoTests.System.IO
}
[Test]
[Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM
public void GetLastAccessTimeUtc_Path_Whitespace ()
{
try {
@ -1615,7 +1593,6 @@ namespace MonoTests.System.IO
}
[Test]
[Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM
public void GetLastAccessTimeUtc_Path_InvalidPathChars ()
{
try {
@ -1824,7 +1801,6 @@ namespace MonoTests.System.IO
// SetCreationTime and SetCreationTimeUtc exceptions
[Test]
[Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
public void SetCreationTime_Path_Null ()
{
try {
@ -1839,7 +1815,6 @@ namespace MonoTests.System.IO
}
[Test]
[Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
public void SetCreationTime_Path_Empty ()
{
try {
@ -1855,7 +1830,6 @@ namespace MonoTests.System.IO
}
[Test]
[Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
public void SetCreationTime_Path_Whitespace ()
{
try {
@ -1871,7 +1845,6 @@ namespace MonoTests.System.IO
}
[Test]
[Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
public void SetCreationTime_Path_InvalidPathChars ()
{
// On Unix there are no invalid path chars.
@ -1891,7 +1864,6 @@ namespace MonoTests.System.IO
}
[Test]
[Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
public void SetCreationTime_Path_DoesNotExist ()
{
string path = TempFolder + Path.DirectorySeparatorChar + "SetCreationTimeFileNotFoundException1";
@ -1927,7 +1899,6 @@ namespace MonoTests.System.IO
// }
[Test]
[Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
public void SetCreationTime_FileLock ()
{
string path = TempFolder + Path.DirectorySeparatorChar + "CreationTimeIOException1";
@ -1954,7 +1925,6 @@ namespace MonoTests.System.IO
}
[Test]
[Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
public void SetCreationTimeUtc_Path_Null ()
{
try {
@ -1969,7 +1939,6 @@ namespace MonoTests.System.IO
}
[Test]
[Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
public void SetCreationTimeUtc_Path_Empty ()
{
try {
@ -1985,7 +1954,6 @@ namespace MonoTests.System.IO
}
[Test]
[Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
public void SetCreationTimeUtc_Path_Whitespace ()
{
try {
@ -2001,7 +1969,6 @@ namespace MonoTests.System.IO
}
[Test]
[Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
public void SetCreationTimeUtc_Path_InvalidPathChars ()
{
// On Unix there are no invalid path chars.
@ -2021,7 +1988,6 @@ namespace MonoTests.System.IO
}
[Test]
[Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
public void SetCreationTimeUtc_Path_DoesNotExist ()
{
string path = TempFolder + Path.DirectorySeparatorChar + "SetCreationTimeUtcFileNotFoundException1";
@ -2057,7 +2023,6 @@ namespace MonoTests.System.IO
// }
[Test]
[Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
public void SetCreationTimeUtc_FileLock ()
{
string path = TempFolder + Path.DirectorySeparatorChar + "SetCreationTimeUtcIOException1";
@ -2086,7 +2051,6 @@ namespace MonoTests.System.IO
// SetLastAccessTime and SetLastAccessTimeUtc exceptions
[Test]
[Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
public void SetLastAccessTime_Path_Null ()
{
try {
@ -2101,7 +2065,6 @@ namespace MonoTests.System.IO
}
[Test]
[Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
public void SetLastAccessTime_Path_Empty ()
{
try {
@ -2117,7 +2080,6 @@ namespace MonoTests.System.IO
}
[Test]
[Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
public void SetLastAccessTime_Path_Whitespace ()
{
try {
@ -2133,7 +2095,6 @@ namespace MonoTests.System.IO
}
[Test]
[Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
public void SetLastAccessTime_Path_InvalidPathChars ()
{
// On Unix there are no invalid path chars.
@ -2153,7 +2114,6 @@ namespace MonoTests.System.IO
}
[Test]
[Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
public void SetLastAccessTime_Path_DoesNotExist ()
{
string path = TempFolder + Path.DirectorySeparatorChar + "SetLastAccessTimeFileNotFoundException1";
@ -2189,7 +2149,6 @@ namespace MonoTests.System.IO
// }
[Test]
[Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
public void SetLastAccessTime_FileLock ()
{
string path = TempFolder + Path.DirectorySeparatorChar + "LastAccessIOException1";
@ -2216,7 +2175,6 @@ namespace MonoTests.System.IO
}
[Test]
[Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
public void SetLastAccessTimeUtc_Path_Null ()
{
try {
@ -2231,7 +2189,6 @@ namespace MonoTests.System.IO
}
[Test]
[Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
public void SetCLastAccessTimeUtc_Path_Empty ()
{
try {
@ -2247,7 +2204,6 @@ namespace MonoTests.System.IO
}
[Test]
[Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
public void SetLastAccessTimeUtc_Path_Whitespace ()
{
try {
@ -2263,7 +2219,6 @@ namespace MonoTests.System.IO
}
[Test]
[Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
public void SetLastAccessTimeUtc_Path_InvalidPathChars ()
{
// On Unix there are no invalid path chars.
@ -2283,7 +2238,6 @@ namespace MonoTests.System.IO
}
[Test]
[Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
public void SetLastAccessTimeUtc_Path_DoesNotExist ()
{
string path = TempFolder + Path.DirectorySeparatorChar + "SetLastAccessTimeUtcFileNotFoundException1";
@ -2319,7 +2273,6 @@ namespace MonoTests.System.IO
// }
[Test]
[Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
public void SetLastAccessTimeUtc_FileLock ()
{
string path = TempFolder + Path.DirectorySeparatorChar + "SetLastAccessTimeUtcIOException1";

View File

@ -545,6 +545,16 @@ namespace MonoTests.System.IO
Assert.AreEqual (Environment.CurrentDirectory, Path.GetFullPath ("."), "#03");
Assert.AreEqual (Path.Combine (Environment.CurrentDirectory, "hey"),
Path.GetFullPath ("hey"), "#04");
Assert.AreEqual ("/", Path.GetFullPath ("/"), "#01");
string curdir = Directory.GetCurrentDirectory ();
try {
Directory.SetCurrentDirectory ("/");
Assert.AreEqual ("/test.txt", Path.GetFullPath ("test.txt"), "xambug #833");
}
finally {
Directory.SetCurrentDirectory (curdir);
}
}
[Test]
@ -765,9 +775,7 @@ namespace MonoTests.System.IO
{
if (Windows) {
Assert.AreEqual (@"Z:\", Path.GetFullPath ("Z:"), "GetFullPath w#01");
#if !TARGET_JVM // Java full (canonical) path always starts with caps drive letter
Assert.AreEqual (@"c:\abc\def", Path.GetFullPath (@"c:\abc\def"), "GetFullPath w#02");
#endif
Assert.IsTrue (Path.GetFullPath (@"\").EndsWith (@"\"), "GetFullPath w#03");
// "\\\\" is not allowed
Assert.IsTrue (Path.GetFullPath ("/").EndsWith (@"\"), "GetFullPath w#05");
@ -1037,11 +1045,7 @@ namespace MonoTests.System.IO
string curdir = Directory.GetCurrentDirectory ();
try {
#if TARGET_JVM
string system = "C:\\WINDOWS\\system32\\";
#else
string system = Environment.SystemDirectory;
#endif
Directory.SetCurrentDirectory (system);
string drive = system.Substring (0, 2);
Assert.AreEqual (system, Path.GetFullPath (drive), "current dir");
@ -1062,11 +1066,7 @@ namespace MonoTests.System.IO
string curdir = Directory.GetCurrentDirectory ();
try {
#if TARGET_JVM
string system = "C:\\WINDOWS\\system32\\";
#else
string system = Environment.SystemDirectory;
#endif
Directory.SetCurrentDirectory (system);
// e.g. C:dir (no backslash) will return CurrentDirectory + dir
string dir = system.Substring (0, 2) + "dir";
@ -1078,9 +1078,6 @@ namespace MonoTests.System.IO
}
#endif
[Test]
#if TARGET_JVM
[Ignore("Java full (canonical) path always returns windows dir in caps")]
#endif
public void WindowsDriveC14N_77058 ()
{
// check for Unix platforms - see FAQ for more details

View File

@ -10,7 +10,7 @@
// Copyright (C) 2004, 2009 Novell (http://www.novell.com)
//
#if NET_2_0 && !TARGET_JVM
#if NET_2_0
using System;
using System.Collections;
using System.IO;