1 / 21

Google C++ Testing Framework

Google C++ Testing Framework. Dr. Frank Xu Gannon University. Overview. Download Installation Compilation Test a demo. Download. Installation. Assume we are using MSVS Click msvs. Compilation. After compilation, you will see gtestd.lib. Demo. Win32 Console Application. I mportant.

sonora
Download Presentation

Google C++ Testing Framework

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

  2. Overview • Download • Installation • Compilation • Test a demo

  3. Download

  4. Installation

  5. Assume we are using MSVS Click msvs

  6. Compilation

  7. After compilation, you will see gtestd.lib

  8. Demo • Win32 Console Application

  9. 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 <gtest/gtest.h> when compiling your test. • C:\Users\Frank\Desktop\svnrepository\MyDoc\public_html\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_html\teaching\shared\software\gtest-1.5.0\msvc\gtest\Debug\gtestd.lib

  10. Testing Greatest common divisor (gcd)

  11. Generated Executable file

  12. Execute Tests

  13. Conclusion • [TestCaseName,TestName] • Confusing: • [TestSuiteName,TestPurpose] • { • test case 1 • Test case 2 • }

More Related