How do I deal with expected 'native' exceptions in C++/CLI unit tests?
===

I am using a C++/CLI test project in Visual Studio to test a C++/CLI class library. One of the functions in the class library should throw an exception when it is fed an invalid argument, and I want to test that it in fact throws that exception.

My first approach was to use the ExpectedException attribute, like this:

    [ExpectedException(std::invalid_argument::typeid)]

That actually compiles, but when I try to run the testcase, I get:

>    The ExpectedException attribute defined on test method ... threw an exception during >construction.
>    System.ArgumentException: The expected exception type must be System.Exception or a type >derived from System.Exception.

Of course I can just use a try /catch block and call Assert::Fail when the expected exception is not thrown, but I was wondering if there is a better way to do this.