简体   繁体   English

Visual Studio 2010的单元测试功能是否可用于本机C ++代码?

[英]Is Visual Studio 2010's unit testing feature usable for native C++ code?

它似乎主要是针对.net代码量身定制的。

Only managed C++ ( /clr:safe ): Unit Tests and C++ 只有托管C ++( /clr:safe ): 单元测试和C ++

You could use WinUnit (if you are not already): Simplified Unit Testing for Native C++ Applications 您可以使用WinUnit(如果您还没有):本机C ++应用程序的简化单元测试

You can't get the slick attribute-driven features of managed test frameworks with native unit test frameworks. 您无法使用本机单元测试框架获得托管测试框架的灵活属性驱动功能。 If you want a graphical runner which lets you select individual tests or fixtures within Visual Studio, grab the excellent, free Visual Assert . 如果您想要一个图形运行器,它允许您在Visual Studio中选择单个测试或灯具,请抓住优秀的免费Visual Assert It supports both the cfix framework and (via cfix) a WinUnit compatibility mode. 它支持cfix框架和(通过cfix)WinUnit兼容模式。 I've been happily using it for several months now in both 2008 and 2010. 我在2008年和2010年都很乐意使用它几个月了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在 Visual Studio Code 中对本机 C++ 进行单元测试 - Unit Testing Native C++ In Visual Studio Code 使用Visual Studio 2010对嵌入式C ++代码进行单元测试 - Unit Test Embedded C++ Code using Visual Studio 2010 Visual Studio 2010本机C ++代码覆盖率着色不起作用 - Visual Studio 2010 Native C++ Code Coverage Coloring Not Working Visual Studio是否有扩展可以优化C ++代码单元测试? - Is there any extension for visual studio to optimize C++ code unit testing? 单元测试本地C ++代码 - Unit testing native C++ code Visual Studio 2010 C ++代码格式化程序 - Visual Studio 2010 C++ code formatter 使用带有字符串而不是宽字符串的 Visual Studio 原生 C++ 单元测试框架 - Using Visual Studio native C++ unit testing framework with strings instead of wide strings 如何使用CppUnitTestFramework在Visual Studio本机C ++单元测试中获取$(ProjectDir)路径? - How to get the $(ProjectDir) path in a Visual Studio native C++ Unit Testing using CppUnitTestFramework? 使用Visual Studio 2010的CATCH单元测试套件 - CATCH Unit Testing Suite with Visual Studio 2010 在Visual Studio 2012中单元测试exe中的C ++代码时阻力最小的路径 - Path of least resistance when unit testing C++ code in an exe, in Visual Studio 2012
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM