@@ -60,7 +60,7 @@ public static void RunSemaphoreSlimTest1_Wait()
6060 RunSemaphoreSlimTest1_Wait_Helper ( 10 , 10 , 10 , true , null ) ;
6161 RunSemaphoreSlimTest1_Wait_Helper ( 1 , 10 , 10 , true , null ) ;
6262 RunSemaphoreSlimTest1_Wait_Helper ( 0 , 10 , 10 , false , null ) ;
63- RunSemaphoreSlimTest1_Wait_Helper ( 1 , 10 , new TimeSpan ( 0 , 0 , Timer . MaxSupportedTimeout ) , true , null ) ;
63+ RunSemaphoreSlimTest1_Wait_Helper ( 1 , 10 , TimeSpan . FromMilliseconds ( Timer . MaxSupportedTimeout ) , true , null ) ;
6464 }
6565
6666 [ Fact ]
@@ -69,7 +69,7 @@ public static void RunSemaphoreSlimTest1_Wait_NegativeCases()
6969 // Invalid timeout
7070 RunSemaphoreSlimTest1_Wait_Helper ( 10 , 10 , - 10 , true , typeof ( ArgumentOutOfRangeException ) ) ;
7171 RunSemaphoreSlimTest1_Wait_Helper
72- ( 10 , 10 , new TimeSpan ( 0 , 0 , Timer . MaxSupportedTimeout + 1 ) , true , typeof ( ArgumentOutOfRangeException ) ) ;
72+ ( 10 , 10 , TimeSpan . FromMilliseconds ( Timer . MaxSupportedTimeout + 1 ) , true , typeof ( ArgumentOutOfRangeException ) ) ;
7373 }
7474
7575 [ ConditionalFact ( typeof ( PlatformDetection ) , nameof ( PlatformDetection . IsThreadingSupported ) ) ]
@@ -88,7 +88,7 @@ public static void RunSemaphoreSlimTest1_WaitAsync()
8888 RunSemaphoreSlimTest1_WaitAsync_Helper ( 10 , 10 , 10 , true , null ) ;
8989 RunSemaphoreSlimTest1_WaitAsync_Helper ( 1 , 10 , 10 , true , null ) ;
9090 RunSemaphoreSlimTest1_WaitAsync_Helper ( 0 , 10 , 10 , false , null ) ;
91- RunSemaphoreSlimTest1_WaitAsync_Helper ( 1 , 10 , new TimeSpan ( 0 , 0 , Timer . MaxSupportedTimeout ) , true , null ) ;
91+ RunSemaphoreSlimTest1_WaitAsync_Helper ( 1 , 10 , TimeSpan . FromMilliseconds ( Timer . MaxSupportedTimeout ) , true , null ) ;
9292 }
9393
9494 [ ConditionalFact ( typeof ( PlatformDetection ) , nameof ( PlatformDetection . IsThreadingSupported ) ) ]
@@ -98,7 +98,7 @@ public static void RunSemaphoreSlimTest1_WaitAsync_NegativeCases()
9898 // Invalid timeout
9999 RunSemaphoreSlimTest1_WaitAsync_Helper ( 10 , 10 , - 10 , true , typeof ( ArgumentOutOfRangeException ) ) ;
100100 RunSemaphoreSlimTest1_WaitAsync_Helper
101- ( 10 , 10 , new TimeSpan ( 0 , 0 , Timer . MaxSupportedTimeout + 1 ) , true , typeof ( ArgumentOutOfRangeException ) ) ;
101+ ( 10 , 10 , TimeSpan . FromMilliseconds ( Timer . MaxSupportedTimeout + 1 ) , true , typeof ( ArgumentOutOfRangeException ) ) ;
102102 RunSemaphoreSlimTest1_WaitAsync2 ( ) ;
103103 }
104104
0 commit comments