Getting Assert to work in Visual C++ Unit Tests?
- by garsh0p
I'm using Visual Studio 2008's built in testing framework in my Visual C++ project. I'm adding a new Test Project, then a new Unit Test. However, I can't use any of the functions provided by Assert. Assert shows up in the Intellisense, but I can't do anything with it. I've done unit tests fine in Visual C#. Am I forgetting to do anything?
EDIT:
There isn't much code because everything I'm doing is auto-generated by Visual Studio 2008. Here are the steps I'm doing:
File - New Project - Visual C++ - General - Empty Project
Right click solution in Solution Explorer - Add - New Project...
Visual C++ - Test - Test Project
Open UnitTest1.cpp (auto-generated)
Go to TestMethod1()
From here, when I try to use the Assert class (like Assert.AreEqual), I can't do it. If I do the same in a Visual C# project, it works fine.