Add delegate and MethodInfo invoke special case tests for optional parameters and...
authorvitek-karas <vitek.karas@microsoft.com>
Thu, 14 Jul 2016 15:31:50 +0000 (08:31 -0700)
committervitek-karas <vitek.karas@microsoft.com>
Thu, 14 Jul 2016 15:31:50 +0000 (08:31 -0700)
commitbe1fa5f23d71508c101e0c3d476dfe1167faa2ff
tree6bfcb4090118e7f7f585b672e0d554d05f30c75c
parent80ae999ec1191061390dd2034f4a5fc1044f2d84
Add delegate and MethodInfo invoke special case tests for optional parameters and args handling.

Adds the same set of tests for both MethodInfo.Invoke and
Delegate.DynamicInvoke.
- Tests around optional parameters and the behavior when passing Missing
as a value for it.
- Tests around handling of the arguments to the invoke method, it should
be able to consume arrays convertible to object[].

Commit migrated from https://github.com/dotnet/corefx/commit/6681e3cf43437a90d5fad72db11daf536675bc6d
src/libraries/System.Reflection/tests/MethodInfo/MethodInfo_InvokeTests.cs
src/libraries/System.Runtime/tests/System/DelegateTests.cs