Limitations of using C++/CLI with NUnit

后端 未结 5 2224
夕颜
夕颜 2021-02-15 14:49

This answer to a question about C++ unit test frameworks suggests a possibility that had not occurred to me before: using C++/CLI and NUnit to create unit tests for native C++ c

5条回答
  •  孤独总比滥情好
    2021-02-15 15:22

    We do this all of the time. We have many assemblies written with C++/CLI and use C# and NUnit to test them. Actually, since our goal is to provide assemblies that work well with C#, doing this makes sure that we have accomplished that.

    You can also write NUnit tests in C++/CLI and call unmanaged C++. Probably the best way is the keep your pure unmanaged C++ in a lib, and then make a test assembly that uses NUnit and links to the lib.

提交回复
热议问题