Blame googlemock/include/gmock/gmock.h

Packit bd1cd8
// Copyright 2007, Google Inc.
Packit bd1cd8
// All rights reserved.
Packit bd1cd8
//
Packit bd1cd8
// Redistribution and use in source and binary forms, with or without
Packit bd1cd8
// modification, are permitted provided that the following conditions are
Packit bd1cd8
// met:
Packit bd1cd8
//
Packit bd1cd8
//     * Redistributions of source code must retain the above copyright
Packit bd1cd8
// notice, this list of conditions and the following disclaimer.
Packit bd1cd8
//     * Redistributions in binary form must reproduce the above
Packit bd1cd8
// copyright notice, this list of conditions and the following disclaimer
Packit bd1cd8
// in the documentation and/or other materials provided with the
Packit bd1cd8
// distribution.
Packit bd1cd8
//     * Neither the name of Google Inc. nor the names of its
Packit bd1cd8
// contributors may be used to endorse or promote products derived from
Packit bd1cd8
// this software without specific prior written permission.
Packit bd1cd8
//
Packit bd1cd8
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
Packit bd1cd8
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
Packit bd1cd8
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
Packit bd1cd8
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
Packit bd1cd8
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
Packit bd1cd8
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
Packit bd1cd8
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
Packit bd1cd8
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
Packit bd1cd8
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
Packit bd1cd8
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
Packit bd1cd8
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Packit bd1cd8
//
Packit bd1cd8
// Author: wan@google.com (Zhanyong Wan)
Packit bd1cd8
Packit bd1cd8
// Google Mock - a framework for writing C++ mock classes.
Packit bd1cd8
//
Packit bd1cd8
// This is the main header file a user should include.
Packit bd1cd8
Packit bd1cd8
#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_H_
Packit bd1cd8
#define GMOCK_INCLUDE_GMOCK_GMOCK_H_
Packit bd1cd8
Packit bd1cd8
// This file implements the following syntax:
Packit bd1cd8
//
Packit bd1cd8
//   ON_CALL(mock_object.Method(...))
Packit bd1cd8
//     .With(...) ?
Packit bd1cd8
//     .WillByDefault(...);
Packit bd1cd8
//
Packit bd1cd8
// where With() is optional and WillByDefault() must appear exactly
Packit bd1cd8
// once.
Packit bd1cd8
//
Packit bd1cd8
//   EXPECT_CALL(mock_object.Method(...))
Packit bd1cd8
//     .With(...) ?
Packit bd1cd8
//     .Times(...) ?
Packit bd1cd8
//     .InSequence(...) *
Packit bd1cd8
//     .WillOnce(...) *
Packit bd1cd8
//     .WillRepeatedly(...) ?
Packit bd1cd8
//     .RetiresOnSaturation() ? ;
Packit bd1cd8
//
Packit bd1cd8
// where all clauses are optional and WillOnce() can be repeated.
Packit bd1cd8
Packit bd1cd8
#include "gmock/gmock-actions.h"
Packit bd1cd8
#include "gmock/gmock-cardinalities.h"
Packit bd1cd8
#include "gmock/gmock-generated-actions.h"
Packit bd1cd8
#include "gmock/gmock-generated-function-mockers.h"
Packit bd1cd8
#include "gmock/gmock-generated-nice-strict.h"
Packit bd1cd8
#include "gmock/gmock-generated-matchers.h"
Packit bd1cd8
#include "gmock/gmock-matchers.h"
Packit bd1cd8
#include "gmock/gmock-more-actions.h"
Packit bd1cd8
#include "gmock/gmock-more-matchers.h"
Packit bd1cd8
#include "gmock/internal/gmock-internal-utils.h"
Packit bd1cd8
Packit bd1cd8
namespace testing {
Packit bd1cd8
Packit bd1cd8
// Declares Google Mock flags that we want a user to use programmatically.
Packit bd1cd8
GMOCK_DECLARE_bool_(catch_leaked_mocks);
Packit bd1cd8
GMOCK_DECLARE_string_(verbose);
Packit bd1cd8
Packit bd1cd8
// Initializes Google Mock.  This must be called before running the
Packit bd1cd8
// tests.  In particular, it parses the command line for the flags
Packit bd1cd8
// that Google Mock recognizes.  Whenever a Google Mock flag is seen,
Packit bd1cd8
// it is removed from argv, and *argc is decremented.
Packit bd1cd8
//
Packit bd1cd8
// No value is returned.  Instead, the Google Mock flag variables are
Packit bd1cd8
// updated.
Packit bd1cd8
//
Packit bd1cd8
// Since Google Test is needed for Google Mock to work, this function
Packit bd1cd8
// also initializes Google Test and parses its flags, if that hasn't
Packit bd1cd8
// been done.
Packit bd1cd8
GTEST_API_ void InitGoogleMock(int* argc, char** argv);
Packit bd1cd8
Packit bd1cd8
// This overloaded version can be used in Windows programs compiled in
Packit bd1cd8
// UNICODE mode.
Packit bd1cd8
GTEST_API_ void InitGoogleMock(int* argc, wchar_t** argv);
Packit bd1cd8
Packit bd1cd8
}  // namespace testing
Packit bd1cd8
Packit bd1cd8
#endif  // GMOCK_INCLUDE_GMOCK_GMOCK_H_