Presentation is loading. Please wait.

Presentation is loading. Please wait.

Google C++ Testing Framework Dr. Frank Xu Gannon University.

Similar presentations


Presentation on theme: "Google C++ Testing Framework Dr. Frank Xu Gannon University."— Presentation transcript:

1 Google C++ Testing Framework Dr. Frank Xu Gannon University

2 Overview Download Installation Compilation Test a demo

3 Download

4

5 Installation

6 Assume we are using MSVS Click msvs

7 Compilation

8

9

10

11 After compilation, you will see gtestd.lib

12 Demo Win32 Console Application

13 Important GTEST_ROOT C:\Users\Frank\Desktop\svnrepository\MyDoc\public_html\teaching \shared\software\gtest-1.5.0 Make sure you have GTEST_ROOT/include in the header search path so that the compiler can find when compiling your test. ◦ C:\Users\Frank\Desktop\svnrepository\MyDoc\public_htm l\teaching\shared\software\gtest-1.5.0\include Set up your test project to link with the Google Test library (for example, in Visual Studio, this is done by adding a dependency on gtest.vcproj). ◦ C:\Users\Frank\Desktop\svnrepository\MyDoc\public_htm l\teaching\shared\software\gtest- 1.5.0\msvc\gtest\Debug\gtestd.lib

14

15

16

17 Testing Greatest common divisor (gcd)

18 Generated Executable file

19 Execute Tests

20

21 Conclusion [TestCaseName , TestName] Confusing: ◦ [TestSuiteName , TestPurpose] ◦ {  test case 1  Test case 2 ◦ }


Download ppt "Google C++ Testing Framework Dr. Frank Xu Gannon University."

Similar presentations


Ads by Google