class InSequence

Defined at line 653 of file ../../third_party/googletest/src/googlemock/include/gmock/gmock-spec-builders.h

An object of this type causes all EXPECT_CALL() statements

encountered in its scope to be put in an anonymous sequence. The

work is done in the constructor and destructor. You should only

create an InSequence object on the stack.

The sole purpose for this class is to support easy definition of

sequential expectations, e.g.

{

InSequence dummy; // The name of the object doesn't matter.

// The following expectations must match in the order they appear.

EXPECT_CALL(a, Bar())...;

EXPECT_CALL(a, Baz())...;

...

EXPECT_CALL(b, Xyz())...;

}

You can create InSequence objects in multiple threads, as long as

they are used to affect different mock objects. The idea is that

each thread can create and set up its own mocks as if it's the only

thread. However, for clarity of your tests we recommend you to set

up mocks in the main thread unless you have a good reason not to do

so.

Public Methods

void InSequence ()
void ~InSequence ()