summaryrefslogtreecommitdiff
path: root/tests/src/baseservices/threading/monitor/pulseall/pulseallnull.cs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/src/baseservices/threading/monitor/pulseall/pulseallnull.cs')
-rw-r--r--tests/src/baseservices/threading/monitor/pulseall/pulseallnull.cs26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/src/baseservices/threading/monitor/pulseall/pulseallnull.cs b/tests/src/baseservices/threading/monitor/pulseall/pulseallnull.cs
new file mode 100644
index 0000000000..6c95478930
--- /dev/null
+++ b/tests/src/baseservices/threading/monitor/pulseall/pulseallnull.cs
@@ -0,0 +1,26 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+using System;
+using System.Threading;
+
+public class Test
+{
+
+ public static int Main()
+ {
+ try
+ {
+ Monitor.PulseAll(null);
+ Console.WriteLine("Failed to throw exception on Monitor.PulseAll");
+ return 1;
+ }
+ catch(ArgumentNullException)
+ {
+ //Expected
+ }
+ return 100;
+ }
+
+}
+