Google test (Google C ++ testing framework)

Source: Internet
Author: User
Tags xunit
Google test is an informal term for Google C ++ testing framework and an open-source C ++ testing framework recently released by Google. It has the following features:

Google's framework for writing C ++ tests on a variety of platforms (Linux, Mac OS X, windows, cygwin, Windows CE, and Symbian ). based on the xunit architecture. supports automatic test distions, a rich set of assertions, user-defined assertions, death tests, fatal and non-fatal failures, type-parameterized tests, various options for running the tests, and XML test report generation.


Google The testing framework is on different platforms ( Linux , Mac OS X , Windows , Cygwin , Windows CE And Symbian ) For writing C ++ Generated by testing. It is based on Xunit The architecture testing framework supports automatic discovery and testing, a rich set of assertions, and user-defined assertions, Death Test, fatal and non-fatal failure, type parameterized test, various running test options and XML Test Report.

For more information, see its home page:

Http://code.google.com/p/googletest/

Note:
It is easier to use cppunit, boost. Test, and Google test.

The MFC output of cppunit needs to be modified in some places. The header file and implementation file must be modified, and different macro names must be used in different places. Different header files must be included, which is cumbersome.
 
Boost. Test inherits the tradition of boost libraries. Although it has not been carefully used, it can be seen from the documentation that it is still relatively complex.

Google test is relatively easy. It may be necessary to meet the thought transplanted by JUnit:ProgramYou can use JUnit in the simplest scenario without modifying the existingCodeYou do not need to know much about the library-related content and language features.

Google test's unit test only requires two macros, test () and test_f (). I really admire its conciseness.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.