Testing the .cpp How-To Module

Good. I made a screen scripting program in C ++. Now how to make unit test.cpp? where will i start

+3
source share
5 answers

There are several module testing modules that can help you test your code.

Check out: Google Test (Google C ++ Testing Framework), which can be found at http://code.google.com/p/googletest/

and Google Mock (Google C ++ Mocking Framework) at http://code.google.com/p/googlemock/ , which will help you check the flow of applications by creating object mockups for your classes.

( Mock- http://en.wikipedia.org/wiki/Mock_object)

GoogleTest , , CxxTest (http://cxxtest.tigris.org/).

!

Tal.

+9

, /, , , () /API , .

, " ". (/) "" (SUT). " " , , , SUT.

, SUT. , SUT -, , SUT "SetMemberObj (aMockInstance)" -. SUT , , .lib, , SUT .

, SUT; , , , , , SUT.

, SUT. .exe, SUT , stdout / . , .

+4

CppUnit - ++ JUnit .

+1

++, . - , ++ .

+1

Here are training videos demonstrating test development in C ++: http://www.vimeo.com/album/254486

0
source

Source: https://habr.com/ru/post/1757488/


All Articles