diff options
Diffstat (limited to 'tests/src/baseservices/threading/threadpool/bindhandle/bindhandlenull.cs')
-rw-r--r-- | tests/src/baseservices/threading/threadpool/bindhandle/bindhandlenull.cs | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/src/baseservices/threading/threadpool/bindhandle/bindhandlenull.cs b/tests/src/baseservices/threading/threadpool/bindhandle/bindhandlenull.cs new file mode 100644 index 0000000000..3eaee3d126 --- /dev/null +++ b/tests/src/baseservices/threading/threadpool/bindhandle/bindhandlenull.cs @@ -0,0 +1,33 @@ +// 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; + +class BindHandleNull +{ + public static int Main(string[] args) + { + return (new BindHandleNull().RunTest()); + } + + int RunTest() + { + try + { + ThreadPool.BindHandle(null); + } + catch (ArgumentNullException) + { + Console.WriteLine("Test passed"); + return (100); + } + catch(Exception e) + { + Console.WriteLine("Unexpected: {0}", e); + return (98); + } + return (97); + } +}
\ No newline at end of file |