Answered by:
Native C/C++ Testing in VS2008/VS2010

Question
-
Hello,
I have tried to create some unit tests using the VS2010 Beta 2 for native code - but it appears that I have to have the code able to be run by the clr. Is there anyway to have native C code that is not managed to be tested using VS2010 or VS2008?
If so are there any documents that describe how to do this.
Right now I have a legacy (not under test) application that I want to place under test. The code is primarily C code - it is compiled as one exe and all local code is added to the project (no local libraries or Dlls). Some of the code is used by other applications and cant be easily modified - the main code and a portion of it can be converted to C++. It compiles under VS2010 and has mixed C++ and C code - my aim is to convert as much as possible to C++ but ideally get it under test first.
Can I do this? Do I have to create a DLL to be used by the unit test framework? Are there any videos/blogs/websites that show information on how to do this?Thursday, January 28, 2010 10:04 PM
Answers
-
Hello,
We don't support unit tests for native code in VS 2008 or VS 2010. We're working on it for future releases.
Thanks,
David Gorena Elizondo
[MSFT] Visual Studio Team Test- Proposed as answer by David Gorena Elizondo - MSFT Friday, January 29, 2010 3:06 AM
- Marked as answer by Abhishek Agrawal [MSFT] Monday, September 20, 2010 2:53 PM
Friday, January 29, 2010 3:06 AM
All replies
-
Hello,
We don't support unit tests for native code in VS 2008 or VS 2010. We're working on it for future releases.
Thanks,
David Gorena Elizondo
[MSFT] Visual Studio Team Test- Proposed as answer by David Gorena Elizondo - MSFT Friday, January 29, 2010 3:06 AM
- Marked as answer by Abhishek Agrawal [MSFT] Monday, September 20, 2010 2:53 PM
Friday, January 29, 2010 3:06 AM -
Hello,
you can use this one,
"Simplified Unit Testing for Native C++ Applicationsby
Maria Blees"Thursday, July 1, 2010 12:08 PM -
How about this to test expose an interface dll that can be used for C#. Theres various methods which you can pick to your liking.
Monday, August 9, 2010 7:52 AM