Merge 12b7f5dbf9f6bc5bb92bf74f351fb709c7f1f71a into 67cc66080d64e3fa5124fe57ed0cf15e2cecfdeb

This commit is contained in:
Brice Letcher 2020-03-25 14:44:19 +09:00 committed by GitHub
commit 4fe484048e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 239 additions and 0 deletions

View File

@ -1,5 +1,18 @@
## gMock Cheat Sheet ## gMock Cheat Sheet
## Contents
1. [Defining a Mock Class](#defining-a-mock-class)
1. [Using Mocks in Tests {#UsingMocks}](#using-mocks-in-tests-usingmocks)
1. [Setting Default Actions {#OnCall}](#setting-default-actions-oncall)
1. [Setting Expectations {#ExpectCall}](#setting-expectations-expectcall)
1. [Matchers {#MatcherList}](#matchers-matcherlist)
1. [Actions {#ActionList}](#actions-actionlist)
1. [Cardinalities {#CardinalityList}](#cardinalities-cardinalitylist)
1. [Expectation Order](#expectation-order)
1. [Verifying and Resetting a Mock](#verifying-and-resetting-a-mock)
1. [Mock Classes](#mock-classes)
1. [Flags](#flags)
<!-- GOOGLETEST_CM0019 DO NOT DELETE --> <!-- GOOGLETEST_CM0019 DO NOT DELETE -->
<!-- GOOGLETEST_CM0033 DO NOT DELETE --> <!-- GOOGLETEST_CM0033 DO NOT DELETE -->

View File

@ -1,5 +1,91 @@
# gMock Cookbook # gMock Cookbook
## Contents
1. [Creating Mock Classes](#creating-mock-classes)
1. [Dealing with unprotected commas](#dealing-with-unprotected-commas)
1. [Mocking Private or Protected Methods](#mocking-private-or-protected-methods)
1. [Mocking Overloaded Methods](#mocking-overloaded-methods)
1. [Mocking Class Templates](#mocking-class-templates)
1. [Mocking Non-virtual Methods {#MockingNonVirtualMethods}](#mocking-non-virtual-methods-mockingnonvirtualmethods)
1. [Mocking Free Functions](#mocking-free-functions)
1. [Old-Style `MOCK_METHODn` Macros](#old-style-mock_methodn-macros)
1. [The Nice, the Strict, and the Naggy {#NiceStrictNaggy}](#the-nice-the-strict-and-the-naggy-nicestrictnaggy)
1. [Simplifying the Interface without Breaking Existing Code {#SimplerInterfaces}](#simplifying-the-interface-without-breaking-existing-code-simplerinterfaces)
1. [Alternative to Mocking Concrete Classes](#alternative-to-mocking-concrete-classes)
1. [Delegating Calls to a Fake {#DelegatingToFake}](#delegating-calls-to-a-fake-delegatingtofake)
1. [Delegating Calls to a Real Object](#delegating-calls-to-a-real-object)
1. [Delegating Calls to a Parent Class](#delegating-calls-to-a-parent-class)
1. [Using Matchers](#using-matchers)
1. [Matching Argument Values Exactly](#matching-argument-values-exactly)
1. [Using Simple Matchers](#using-simple-matchers)
1. [Combining Matchers {#CombiningMatchers}](#combining-matchers-combiningmatchers)
1. [Casting Matchers {#SafeMatcherCast}](#casting-matchers-safematchercast)
1. [Selecting Between Overloaded Functions {#SelectOverload}](#selecting-between-overloaded-functions-selectoverload)
1. [Performing Different Actions Based on the Arguments](#performing-different-actions-based-on-the-arguments)
1. [Matching Multiple Arguments as a Whole](#matching-multiple-arguments-as-a-whole)
1. [Using Matchers as Predicates](#using-matchers-as-predicates)
1. [Using Matchers in googletest Assertions](#using-matchers-in-googletest-assertions)
1. [Using Predicates as Matchers](#using-predicates-as-matchers)
1. [Matching Arguments that Are Not Copyable](#matching-arguments-that-are-not-copyable)
1. [Validating a Member of an Object](#validating-a-member-of-an-object)
1. [Validating the Value Pointed to by a Pointer Argument](#validating-the-value-pointed-to-by-a-pointer-argument)
1. [Testing a Certain Property of an Object](#testing-a-certain-property-of-an-object)
1. [Matching Containers](#matching-containers)
1. [Sharing Matchers](#sharing-matchers)
1. [Matchers must have no side-effects {#PureMatchers}](#matchers-must-have-no-side-effects-purematchers)
1. [Setting Expectations](#setting-expectations)
1. [Knowing When to Expect {#UseOnCall}](#knowing-when-to-expect-useoncall)
1. [Ignoring Uninteresting Calls](#ignoring-uninteresting-calls)
1. [Disallowing Unexpected Calls](#disallowing-unexpected-calls)
1. [Understanding Uninteresting vs Unexpected Calls {#uninteresting-vs-unexpected}](#understanding-uninteresting-vs-unexpected-calls-uninteresting-vs-unexpected)
1. [Ignoring Uninteresting Arguments {#ParameterlessExpectations}](#ignoring-uninteresting-arguments-parameterlessexpectations)
1. [Expecting Ordered Calls {#OrderedCalls}](#expecting-ordered-calls-orderedcalls)
1. [Expecting Partially Ordered Calls {#PartialOrder}](#expecting-partially-ordered-calls-partialorder)
1. [Controlling When an Expectation Retires](#controlling-when-an-expectation-retires)
1. [Using Actions](#using-actions)
1. [Returning References from Mock Methods](#returning-references-from-mock-methods)
1. [Returning Live Values from Mock Methods](#returning-live-values-from-mock-methods)
1. [Combining Actions](#combining-actions)
1. [Verifying Complex Arguments {#SaveArgVerify}](#verifying-complex-arguments-saveargverify)
1. [Mocking Side Effects {#MockingSideEffects}](#mocking-side-effects-mockingsideeffects)
1. [Changing a Mock Object's Behavior Based on the State](#changing-a-mock-object's-behavior-based-on-the-state)
1. [Setting the Default Value for a Return Type {#DefaultValue}](#setting-the-default-value-for-a-return-type-defaultvalue)
1. [Setting the Default Actions for a Mock Method](#setting-the-default-actions-for-a-mock-method)
1. [Using Functions/Methods/Functors/Lambdas as Actions {#FunctionsAsActions}](#using-functionsmethodsfunctorslambdas-as-actions-functionsasactions)
1. [Using Functions with Extra Info as Actions](#using-functions-with-extra-info-as-actions)
1. [Invoking a Function/Method/Functor/Lambda/Callback Without Arguments](#invoking-a-functionmethodfunctorlambdacallback-without-arguments)
1. [Invoking an Argument of the Mock Function](#invoking-an-argument-of-the-mock-function)
1. [Ignoring an Action's Result](#ignoring-an-action's-result)
1. [Selecting an Action's Arguments {#SelectingArgs}](#selecting-an-action's-arguments-selectingargs)
1. [Ignoring Arguments in Action Functions](#ignoring-arguments-in-action-functions)
1. [Sharing Actions](#sharing-actions)
1. [Testing Asynchronous Behavior](#testing-asynchronous-behavior)
1. [Misc Recipes on Using gMock](#misc-recipes-on-using-gmock)
1. [Mocking Methods That Use Move-Only Types](#mocking-methods-that-use-move-only-types)
1. [Making the Compilation Faster](#making-the-compilation-faster)
1. [Forcing a Verification](#forcing-a-verification)
1. [Using Check Points {#UsingCheckPoints}](#using-check-points-usingcheckpoints)
1. [Mocking Destructors](#mocking-destructors)
1. [Using gMock and Threads {#UsingThreads}](#using-gmock-and-threads-usingthreads)
1. [Controlling How Much Information gMock Prints](#controlling-how-much-information-gmock-prints)
1. [Gaining Super Vision into Mock Calls](#gaining-super-vision-into-mock-calls)
1. [Running Tests in Emacs](#running-tests-in-emacs)
1. [Extending gMock](#extending-gmock)
1. [Writing New Matchers Quickly {#NewMatchers}](#writing-new-matchers-quickly-newmatchers)
1. [Writing New Parameterized Matchers Quickly](#writing-new-parameterized-matchers-quickly)
1. [Writing New Monomorphic Matchers](#writing-new-monomorphic-matchers)
1. [Writing New Polymorphic Matchers](#writing-new-polymorphic-matchers)
1. [Writing New Cardinalities](#writing-new-cardinalities)
1. [Writing New Actions Quickly {#QuickNewActions}](#writing-new-actions-quickly-quicknewactions)
1. [Restricting the Type of an Argument or Parameter in an ACTION](#restricting-the-type-of-an-argument-or-parameter-in-an-action)
1. [Writing New Action Templates Quickly](#writing-new-action-templates-quickly)
1. [Using the ACTION Object's Type](#using-the-action-object's-type)
1. [Writing New Monomorphic Actions {#NewMonoActions}](#writing-new-monomorphic-actions-newmonoactions)
1. [Writing New Polymorphic Actions {#NewPolyActions}](#writing-new-polymorphic-actions-newpolyactions)
1. [Teaching gMock How to Print Your Values](#teaching-gmock-how-to-print-your-values)
1. [Useful Mocks Created Using gMock](#useful-mocks-created-using-gmock)
1. [Mock std::function {#MockFunction}](#mock-stdfunction-mockfunction)
<!-- GOOGLETEST_CM0012 DO NOT DELETE --> <!-- GOOGLETEST_CM0012 DO NOT DELETE -->
You can find recipes for using gMock here. If you haven't yet, please read You can find recipes for using gMock here. If you haven't yet, please read

View File

@ -1,5 +1,14 @@
## gMock for Dummies {#GMockForDummies} ## gMock for Dummies {#GMockForDummies}
## Contents
1. [What Is gMock?](#what-is-gmock)
1. [Why gMock?](#why-gmock)
1. [Getting Started](#getting-started)
1. [A Case for Mock Turtles](#a-case-for-mock-turtles)
1. [Writing the Mock Class](#writing-the-mock-class)
1. [Using Mocks in Tests](#using-mocks-in-tests)
1. [Setting Expectations](#setting-expectations)
<!-- GOOGLETEST_CM0013 DO NOT DELETE --> <!-- GOOGLETEST_CM0013 DO NOT DELETE -->
### What Is gMock? ### What Is gMock?

View File

@ -1,5 +1,25 @@
## Legacy gMock FAQ {#GMockFaq} ## Legacy gMock FAQ {#GMockFaq}
## Contents
1. [When I call a method on my mock object, the method for the real object is invoked instead. What's the problem?](#when-i-call-a-method-on-my-mock-object-the-method-for-the-real-object-is-invoked-instead-what's-the-problem)
1. [Can I mock a variadic function?](#can-i-mock-a-variadic-function)
1. [MSVC gives me warning C4301 or C4373 when I define a mock method with a const parameter. Why?](#msvc-gives-me-warning-c4301-or-c4373-when-i-define-a-mock-method-with-a-const-parameter-why)
1. [I can't figure out why gMock thinks my expectations are not satisfied. What should I do?](#i-can't-figure-out-why-gmock-thinks-my-expectations-are-not-satisfied-what-should-i-do)
1. [My program crashed and `ScopedMockLog` spit out tons of messages. Is it a gMock bug?](#my-program-crashed-and-scopedmocklog-spit-out-tons-of-messages-is-it-a-gmock-bug)
1. [How can I assert that a function is NEVER called?](#how-can-i-assert-that-a-function-is-never-called)
1. [I have a failed test where gMock tells me TWICE that a particular expectation is not satisfied. Isn't this redundant?](#i-have-a-failed-test-where-gmock-tells-me-twice-that-a-particular-expectation-is-not-satisfied-isn't-this-redundant)
1. [I get a heapcheck failure when using a mock object, but using a real object is fine. What can be wrong?](#i-get-a-heapcheck-failure-when-using-a-mock-object-but-using-a-real-object-is-fine-what-can-be-wrong)
1. [The "newer expectations override older ones" rule makes writing expectations awkward. Why does gMock do that?](#the-newer-expectations-override-older-ones-rule-makes-writing-expectations-awkward-why-does-gmock-do-that)
1. [gMock prints a warning when a function without EXPECT_CALL is called, even if I have set its behavior using ON_CALL. Would it be reasonable not to show the warning in this case?](#gmock-prints-a-warning-when-a-function-without-expect_call-is-called-even-if-i-have-set-its-behavior-using-on_call-would-it-be-reasonable-not-to-show-the-warning-in-this-case)
1. [How can I delete the mock function's argument in an action?](#how-can-i-delete-the-mock-function's-argument-in-an-action)
1. [How can I perform an arbitrary action on a mock function's argument?](#how-can-i-perform-an-arbitrary-action-on-a-mock-function's-argument)
1. [My code calls a static/global function. Can I mock it?](#my-code-calls-a-staticglobal-function-can-i-mock-it)
1. [My mock object needs to do complex stuff. It's a lot of pain to specify the actions. gMock sucks!](#my-mock-object-needs-to-do-complex-stuff-it's-a-lot-of-pain-to-specify-the-actions-gmock-sucks)
1. [I got a warning "Uninteresting function call encountered - default action taken.." Should I panic?](#i-got-a-warning-uninteresting-function-call-encountered---default-action-taken-should-i-panic)
1. [I want to define a custom action. Should I use Invoke() or implement the ActionInterface interface?](#i-want-to-define-a-custom-action-should-i-use-invoke-or-implement-the-actioninterface-interface)
1. [I use SetArgPointee() in WillOnce(), but gcc complains about "conflicting return type specified". What does it mean?](#i-use-setargpointee-in-willonce-but-gcc-complains-about-conflicting-return-type-specified-what-does-it-mean)
1. [I have a huge mock class, and Microsoft Visual C++ runs out of memory when compiling it. What can I do?](#i-have-a-huge-mock-class-and-microsoft-visual-c++-runs-out-of-memory-when-compiling-it-what-can-i-do)
<!-- GOOGLETEST_CM0021 DO NOT DELETE --> <!-- GOOGLETEST_CM0021 DO NOT DELETE -->
### When I call a method on my mock object, the method for the real object is invoked instead. What's the problem? ### When I call a method on my mock object, the method for the real object is invoked instead. What's the problem?

View File

@ -2,6 +2,16 @@
# The Problem # The Problem
## Contents
1. [Our Solution](#our-solution)
1. [Highlights](#highlights)
1. [Examples](#examples)
1. [Constructs](#constructs)
1. [Grammar](#grammar)
1. [Code](#code)
1. [Real Examples](#real-examples)
1. [Tips](#tips)
Template and macro libraries often need to define many classes, functions, or Template and macro libraries often need to define many classes, functions, or
macros that vary only (or almost only) in the number of arguments they take. macros that vary only (or almost only) in the number of arguments they take.
It's a lot of repetitive, mechanical, and error-prone work. It's a lot of repetitive, mechanical, and error-prone work.

View File

@ -1,5 +1,53 @@
# Advanced googletest Topics # Advanced googletest Topics
## Contents
1. [Introduction](#introduction)
1. [More Assertions](#more-assertions)
1. [Explicit Success and Failure](#explicit-success-and-failure)
1. [Exception Assertions](#exception-assertions)
1. [Predicate Assertions for Better Error Messages](#predicate-assertions-for-better-error-messages)
1. [Floating-Point Comparison](#floating-point-comparison)
1. [Asserting Using gMock Matchers](#asserting-using-gmock-matchers)
1. [More String Assertions](#more-string-assertions)
1. [Windows HRESULT assertions](#windows-hresult-assertions)
1. [Type Assertions](#type-assertions)
1. [Assertion Placement](#assertion-placement)
1. [Teaching googletest How to Print Your Values](#teaching-googletest-how-to-print-your-values)
1. [Death Tests](#death-tests)
1. [How to Write a Death Test](#how-to-write-a-death-test)
1. [Death Test Naming](#death-test-naming)
1. [Regular Expression Syntax](#regular-expression-syntax)
1. [How It Works](#how-it-works)
1. [Death Tests And Threads](#death-tests-and-threads)
1. [Death Test Styles](#death-test-styles)
1. [Caveats](#caveats)
1. [Using Assertions in Sub-routines](#using-assertions-in-sub-routines)
1. [Adding Traces to Assertions](#adding-traces-to-assertions)
1. [Propagating Fatal Failures](#propagating-fatal-failures)
1. [Logging Additional Information](#logging-additional-information)
1. [Sharing Resources Between Tests in the Same Test Suite](#sharing-resources-between-tests-in-the-same-test-suite)
1. [Global Set-Up and Tear-Down](#global-set-up-and-tear-down)
1. [Value-Parameterized Tests](#value-parameterized-tests)
1. [How to Write Value-Parameterized Tests](#how-to-write-value-parameterized-tests)
1. [Creating Value-Parameterized Abstract Tests](#creating-value-parameterized-abstract-tests)
1. [Specifying Names for Value-Parameterized Test Parameters](#specifying-names-for-value-parameterized-test-parameters)
1. [Typed Tests](#typed-tests)
1. [Type-Parameterized Tests](#type-parameterized-tests)
1. [Testing Private Code](#testing-private-code)
1. ["Catching" Failures](#catching-failures)
1. [Registering tests programmatically](#registering-tests-programmatically)
1. [Getting the Current Test's Name](#getting-the-current-test's-name)
1. [Extending googletest by Handling Test Events](#extending-googletest-by-handling-test-events)
1. [Defining Event Listeners](#defining-event-listeners)
1. [Using Event Listeners](#using-event-listeners)
1. [Generating Failures in Listeners](#generating-failures-in-listeners)
1. [Running Test Programs: Advanced Options](#running-test-programs-advanced-options)
1. [Selecting Tests](#selecting-tests)
1. [Repeating the Tests](#repeating-the-tests)
1. [Shuffling the Tests](#shuffling-the-tests)
1. [Controlling Test Output](#controlling-test-output)
1. [Controlling How Failures Are Reported](#controlling-how-failures-are-reported)
<!-- GOOGLETEST_CM0016 DO NOT DELETE --> <!-- GOOGLETEST_CM0016 DO NOT DELETE -->
## Introduction ## Introduction

View File

@ -1,5 +1,36 @@
# Googletest FAQ # Googletest FAQ
## Contents
1. [Why should test suite names and test names not contain underscore?](#why-should-test-suite-names-and-test-names-not-contain-underscore)
1. [Why does googletest support `EXPECT_EQ(NULL, ptr)` and `ASSERT_EQ(NULL, ptr)` but not `EXPECT_NE(NULL, ptr)` and `ASSERT_NE(NULL, ptr)`?](#why-does-googletest-support-expect_eqnull-ptr-and-assert_eqnull-ptr-but-not-expect_nenull-ptr-and-assert_nenull-ptr)
1. [I need to test that different implementations of an interface satisfy some common requirements. Should I use typed tests or value-parameterized tests?](#i-need-to-test-that-different-implementations-of-an-interface-satisfy-some-common-requirements-should-i-use-typed-tests-or-value-parameterized-tests)
1. [I got some run-time errors about invalid proto descriptors when using `ProtocolMessageEquals`. Help!](#i-got-some-run-time-errors-about-invalid-proto-descriptors-when-using-protocolmessageequals-help)
1. [My death test modifies some state, but the change seems lost after the death test finishes. Why?](#my-death-test-modifies-some-state-but-the-change-seems-lost-after-the-death-test-finishes-why)
1. [EXPECT_EQ(htonl(blah), blah_blah) generates weird compiler errors in opt mode. Is this a googletest bug?](#expect_eqhtonlblah-blah_blah-generates-weird-compiler-errors-in-opt-mode-is-this-a-googletest-bug)
1. [The compiler complains about "undefined references" to some static const member variables, but I did define them in the class body. What's wrong?](#the-compiler-complains-about-undefined-references-to-some-static-const-member-variables-but-i-did-define-them-in-the-class-body-what's-wrong)
1. [Can I derive a test fixture from another?](#can-i-derive-a-test-fixture-from-another)
1. [My compiler complains "void value not ignored as it ought to be." What does this mean?](#my-compiler-complains-void-value-not-ignored-as-it-ought-to-be-what-does-this-mean)
1. [My death test hangs (or seg-faults). How do I fix it?](#my-death-test-hangs-or-seg-faults-how-do-i-fix-it)
1. [Should I use the constructor/destructor of the test fixture or SetUp()/TearDown()? {#CtorVsSetUp}](#should-i-use-the-constructordestructor-of-the-test-fixture-or-setupteardown-ctorvssetup)
1. [The compiler complains "no matching function to call" when I use ASSERT_PRED*. How do I fix it?](#the-compiler-complains-no-matching-function-to-call-when-i-use-assert_pred-how-do-i-fix-it)
1. [My compiler complains about "ignoring return value" when I call RUN_ALL_TESTS(). Why?](#my-compiler-complains-about-ignoring-return-value-when-i-call-run_all_tests-why)
1. [My compiler complains that a constructor (or destructor) cannot return a value. What's going on?](#my-compiler-complains-that-a-constructor-or-destructor-cannot-return-a-value-what's-going-on)
1. [My SetUp() function is not called. Why?](#my-setup-function-is-not-called-why)
1. [I have several test suites which share the same test fixture logic, do I have to define a new test fixture class for each of them? This seems pretty tedious.](#i-have-several-test-suites-which-share-the-same-test-fixture-logic-do-i-have-to-define-a-new-test-fixture-class-for-each-of-them-this-seems-pretty-tedious)
1. [googletest output is buried in a whole bunch of LOG messages. What do I do?](#googletest-output-is-buried-in-a-whole-bunch-of-log-messages-what-do-i-do)
1. [Why should I prefer test fixtures over global variables?](#why-should-i-prefer-test-fixtures-over-global-variables)
1. [What can the statement argument in ASSERT_DEATH() be?](#what-can-the-statement-argument-in-assert_death-be)
1. [I have a fixture class `FooTest`, but `TEST_F(FooTest, Bar)` gives me error ``"no matching function for call to `FooTest::FooTest()'"``. Why?](#i-have-a-fixture-class-footest-but-test_ffootest-bar-gives-me-error-no-matching-function-for-call-to-footestfootest'-why)
1. [Why does ASSERT_DEATH complain about previous threads that were already joined?](#why-does-assert_death-complain-about-previous-threads-that-were-already-joined)
1. [Why does googletest require the entire test suite, instead of individual tests, to be named *DeathTest when it uses ASSERT_DEATH?](#why-does-googletest-require-the-entire-test-suite-instead-of-individual-tests-to-be-named-deathtest-when-it-uses-assert_death)
1. [But I don't like calling my entire test suite \*DeathTest when it contains both death tests and non-death tests. What do I do?](#but-i-don't-like-calling-my-entire-test-suite-\deathtest-when-it-contains-both-death-tests-and-non-death-tests-what-do-i-do)
1. [googletest prints the LOG messages in a death test's child process only when the test fails. How can I see the LOG messages when the death test succeeds?](#googletest-prints-the-log-messages-in-a-death-test's-child-process-only-when-the-test-fails-how-can-i-see-the-log-messages-when-the-death-test-succeeds)
1. [The compiler complains about "no match for 'operator<<'" when I use an assertion. What gives?](#the-compiler-complains-about-no-match-for-'operator<<'-when-i-use-an-assertion-what-gives)
1. [How do I suppress the memory leak messages on Windows?](#how-do-i-suppress-the-memory-leak-messages-on-windows)
1. [How can my code detect if it is running in a test?](#how-can-my-code-detect-if-it-is-running-in-a-test)
1. [How do I temporarily disable a test?](#how-do-i-temporarily-disable-a-test)
1. [Is it OK if I have two separate `TEST(Foo, Bar)` test methods defined in different namespaces?](#is-it-ok-if-i-have-two-separate-testfoo-bar-test-methods-defined-in-different-namespaces)
<!-- GOOGLETEST_CM0014 DO NOT DELETE --> <!-- GOOGLETEST_CM0014 DO NOT DELETE -->
## Why should test suite names and test names not contain underscore? ## Why should test suite names and test names not contain underscore?

View File

@ -1,5 +1,13 @@
## Using GoogleTest from various build systems ## Using GoogleTest from various build systems
## Contents
1. [CMake](#cmake)
1. [Autotools](#autotools)
1. [Meson](#meson)
1. [Plain Makefiles](#plain-makefiles)
1. [Help! pkg-config can't find GoogleTest!](#help-pkg-config-can't-find-googletest)
1. [Using pkg-config in a cross-compilation setting](#using-pkg-config-in-a-cross-compilation-setting)
GoogleTest comes with pkg-config files that can be used to determine all GoogleTest comes with pkg-config files that can be used to determine all
necessary flags for compiling and linking to GoogleTest (and GoogleMock). necessary flags for compiling and linking to GoogleTest (and GoogleMock).
Pkg-config is a standardised plain-text format containing Pkg-config is a standardised plain-text format containing

View File

@ -1,5 +1,19 @@
# Googletest Primer # Googletest Primer
## Contents
1. [Introduction: Why googletest?](#introduction-why-googletest)
1. [Beware of the nomenclature](#beware-of-the-nomenclature)
1. [Basic Concepts](#basic-concepts)
1. [Assertions](#assertions)
1. [Basic Assertions](#basic-assertions)
1. [Binary Comparison](#binary-comparison)
1. [String Comparison](#string-comparison)
1. [Simple Tests](#simple-tests)
1. [Test Fixtures: Using the Same Data Configuration for Multiple Tests {#same-data-multiple-tests}](#test-fixtures-using-the-same-data-configuration-for-multiple-tests-same-data-multiple-tests)
1. [Invoking the Tests](#invoking-the-tests)
1. [Writing the main() Function](#writing-the-main-function)
1. [Known Limitations](#known-limitations)
## Introduction: Why googletest? ## Introduction: Why googletest?
*googletest* helps you write better C++ tests. *googletest* helps you write better C++ tests.