I'm trying to use Visual Assert for testing. Visual Studio says the method I want to test which is defined inside main.cpp is undefined in the Test Fixture.
MyFunctionTest.cpp:
#include <cfixcc.h>
class ExampleTest : public cfixcc::TestFixture
{
private:
public:
void Test()
{
CFIXCC_ASSERT_EQUALS(4, MyFuncti开发者_如何学JAVAon(2,2));
}
};
CFIXCC_BEGIN_CLASS(ExampleTest)
CFIXCC_METHOD(Test)
CFIXCC_END_CLASS()
I didn't make a separate project for tests so the two files are a part of the same project. How can I have MyFunction visible for Visual Assert to work properly?
#include
the header that declares MyFunction()
精彩评论