dimanche 3 juillet 2016

How to unit test my class without any unit test framework - visual studio setup

I have a c++ project in Visual Studio. It has 1 class and now I want to unit test that class. For that I have created another console application project in the same solution, and in that project created an object, called a method and asserted what it returns.

The only problem I am having is that linker complains as it does not have object files or .lib file from the original project that I am testing. How to export a lib and link it in test project? Or is there a better way to say test project to compile .cpp files for himself?

Please advice.

Aucun commentaire:

Enregistrer un commentaire