@@ -60,7 +60,7 @@ public static void RunSemaphoreSlimTest1_Wait()
60
60
RunSemaphoreSlimTest1_Wait_Helper ( 10 , 10 , 10 , true , null ) ;
61
61
RunSemaphoreSlimTest1_Wait_Helper ( 1 , 10 , 10 , true , null ) ;
62
62
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 ) ;
64
64
}
65
65
66
66
[ Fact ]
@@ -69,7 +69,7 @@ public static void RunSemaphoreSlimTest1_Wait_NegativeCases()
69
69
// Invalid timeout
70
70
RunSemaphoreSlimTest1_Wait_Helper ( 10 , 10 , - 10 , true , typeof ( ArgumentOutOfRangeException ) ) ;
71
71
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 ) ) ;
73
73
}
74
74
75
75
[ ConditionalFact ( typeof ( PlatformDetection ) , nameof ( PlatformDetection . IsThreadingSupported ) ) ]
@@ -88,7 +88,7 @@ public static void RunSemaphoreSlimTest1_WaitAsync()
88
88
RunSemaphoreSlimTest1_WaitAsync_Helper ( 10 , 10 , 10 , true , null ) ;
89
89
RunSemaphoreSlimTest1_WaitAsync_Helper ( 1 , 10 , 10 , true , null ) ;
90
90
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 ) ;
92
92
}
93
93
94
94
[ ConditionalFact ( typeof ( PlatformDetection ) , nameof ( PlatformDetection . IsThreadingSupported ) ) ]
@@ -98,7 +98,7 @@ public static void RunSemaphoreSlimTest1_WaitAsync_NegativeCases()
98
98
// Invalid timeout
99
99
RunSemaphoreSlimTest1_WaitAsync_Helper ( 10 , 10 , - 10 , true , typeof ( ArgumentOutOfRangeException ) ) ;
100
100
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 ) ) ;
102
102
RunSemaphoreSlimTest1_WaitAsync2 ( ) ;
103
103
}
104
104
0 commit comments