diff options
author | Dan Moseley <danmose@microsoft.com> | 2018-03-29 12:32:50 +0300 |
---|---|---|
committer | Jan Vorlicek <janvorli@microsoft.com> | 2018-03-29 12:32:50 +0300 |
commit | 2c0a662262a6ad8bfdfb97dd786db2734c24754b (patch) | |
tree | 6c23ccceb8105085e2ac3679e7dbd70bd0f522a8 /src/System.IO.FileSystem/tests | |
parent | 76e8479ce3f6e8764dbf244b7db5d58faf9217ec (diff) |
Prevent CMake 2.8 tests failing for unused variable (causing millisec to be dropped from stat calls) (#28573)
* Prevent CMake 2.8 tests failing for unused variable
* Make sterror_r test fail as it should
* Reenable tests
Diffstat (limited to 'src/System.IO.FileSystem/tests')
-rw-r--r-- | src/System.IO.FileSystem/tests/Base/BaseGetSetTimes.cs | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/System.IO.FileSystem/tests/Base/BaseGetSetTimes.cs b/src/System.IO.FileSystem/tests/Base/BaseGetSetTimes.cs index 3de4d1a6ee..865cde2ad8 100644 --- a/src/System.IO.FileSystem/tests/Base/BaseGetSetTimes.cs +++ b/src/System.IO.FileSystem/tests/Base/BaseGetSetTimes.cs @@ -86,8 +86,8 @@ namespace System.IO.Tests DateTime time = function.Getter(item); msec = time.Millisecond; - //if (msec != 0) - // break; + if (msec != 0) + break; // This case should only happen 1/1000 times, unless the OS/Filesystem does // not support millisecond granularity. @@ -98,14 +98,12 @@ namespace System.IO.Tests // If it's the OS/Filesystem often returns 0 for the millisecond part, this may // help prove it. This should only be written 1/1000 runs, unless the test is going to // fail. - //Console.WriteLine($"TimesIncludeMillisecondPart got a file time of {time.ToString("o")}"); Console.WriteLine($"## TimesIncludeMillisecondPart got a file time of {time.ToString("o")} on {driveFormat}"); item = GetExistingItem(); // try a new file/directory } - // Temporarily disabled while investigating failures in #27662 - // Assert.NotEqual(0, msec); + Assert.NotEqual(0, msec); }); } @@ -131,11 +129,6 @@ namespace System.IO.Tests // If it's 1/1000, or low granularity, this may help: Thread.Sleep(1234); - // If it's the OS/Filesystem often returns 0 for the millisecond part, this may - // help prove it. This should only be written 1/1000 runs, unless the test is going to - // fail. - Console.WriteLine($"TimesIncludeMillisecondPart got a file time of {time.ToString("o")}"); - item = GetExistingItem(); // try a new file/directory } |