Merge branch 'master' into deprecate
This commit is contained in:
commit
6cacb41935
|
@ -357,7 +357,7 @@ class FunctionMocker<R(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10)> : public
|
|||
// // error when trying to resolve between this and overload 4 in
|
||||
// // 'gmock_GetName(WithoutMatchers(), nullptr)'.
|
||||
// MockSpec<string&()> gmock_GetName(
|
||||
// const WithoutMatchers&, const Function<string&()>*) const {
|
||||
// const WithoutMatchers&, const Function<string&()>*) const {
|
||||
// // Removes const from this, calls overload 1
|
||||
// return AdjustConstness_(this)->gmock_GetName();
|
||||
// }
|
||||
|
@ -366,7 +366,7 @@ class FunctionMocker<R(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10)> : public
|
|||
// const string& gmock_GetName() const { ... }
|
||||
// // Overload 4
|
||||
// MockSpec<const string&()> gmock_GetName(
|
||||
// const WithoutMatchers&, const Function<const string&()>*) const {
|
||||
// const WithoutMatchers&, const Function<const string&()>*) const {
|
||||
// // Does not remove const, calls overload 3
|
||||
// return AdjustConstness_const(this)->gmock_GetName();
|
||||
// }
|
||||
|
|
|
@ -119,7 +119,7 @@ class FunctionMocker<R($As)> : public
|
|||
// // error when trying to resolve between this and overload 4 in
|
||||
// // 'gmock_GetName(WithoutMatchers(), nullptr)'.
|
||||
// MockSpec<string&()> gmock_GetName(
|
||||
// const WithoutMatchers&, const Function<string&()>*) const {
|
||||
// const WithoutMatchers&, const Function<string&()>*) const {
|
||||
// // Removes const from this, calls overload 1
|
||||
// return AdjustConstness_(this)->gmock_GetName();
|
||||
// }
|
||||
|
@ -128,7 +128,7 @@ class FunctionMocker<R($As)> : public
|
|||
// const string& gmock_GetName() const { ... }
|
||||
// // Overload 4
|
||||
// MockSpec<const string&()> gmock_GetName(
|
||||
// const WithoutMatchers&, const Function<const string&()>*) const {
|
||||
// const WithoutMatchers&, const Function<const string&()>*) const {
|
||||
// // Does not remove const, calls overload 3
|
||||
// return AdjustConstness_const(this)->gmock_GetName();
|
||||
// }
|
||||
|
|
|
@ -33,13 +33,12 @@
|
|||
// threads concurrently.
|
||||
|
||||
#include "gmock/gmock.h"
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
namespace testing {
|
||||
namespace {
|
||||
|
||||
// From "gtest/internal/gtest-port.h".
|
||||
// From gtest-port.h.
|
||||
using ::testing::internal::ThreadWithParam;
|
||||
|
||||
// The maximum number of test threads (not including helper threads)
|
||||
|
|
|
@ -203,7 +203,7 @@ for more details.
|
|||
|
||||
If you're working with floating point numbers, you may want to use the floating
|
||||
point variations of some of these macros in order to avoid problems caused by
|
||||
rounding. See [Advanced googletest Topics](advanced) for details.
|
||||
rounding. See [Advanced googletest Topics](advanced.md) for details.
|
||||
|
||||
Macros in this section work with both narrow and wide string objects (`string`
|
||||
and `wstring`).
|
||||
|
@ -219,18 +219,12 @@ as `ASSERT_EQ(expected, actual)`, so lots of existing code uses this order. Now
|
|||
The assertions in this group compare two **C strings**. If you want to compare
|
||||
two `string` objects, use `EXPECT_EQ`, `EXPECT_NE`, and etc instead.
|
||||
|
||||
| Fatal assertion | Nonfatal assertion | Verifies |
|
||||
| ----------------------- | ----------------------- | ---------------------- |
|
||||
| `ASSERT_STREQ(str1, | `EXPECT_STREQ(str1, | the two C strings have |
|
||||
: str2);` : str2);` : the same content :
|
||||
| `ASSERT_STRNE(str1, | `EXPECT_STRNE(str1, | the two C strings have |
|
||||
: str2);` : str2);` : different contents :
|
||||
| `ASSERT_STRCASEEQ(str1, | `EXPECT_STRCASEEQ(str1, | the two C strings have |
|
||||
: str2);` : str2);` : the same content, :
|
||||
: : : ignoring case :
|
||||
| `ASSERT_STRCASENE(str1, | `EXPECT_STRCASENE(str1, | the two C strings have |
|
||||
: str2);` : str2);` : different contents, :
|
||||
: : : ignoring case :
|
||||
| Fatal assertion | Nonfatal assertion | Verifies |
|
||||
| ------------------------------- | ------------------------------- | -------------------------------------------------------- |
|
||||
| `ASSERT_STREQ(str1, str2);` | `EXPECT_STREQ(str1, str2);` | the two C strings have the same content |
|
||||
| `ASSERT_STRNE(str1, str2);` | `EXPECT_STRNE(str1, str2);` | the two C strings have different contents |
|
||||
| `ASSERT_STRCASEEQ(str1, str2);` | `EXPECT_STRCASEEQ(str1, str2);` | the two C strings have the same content, ignoring case |
|
||||
| `ASSERT_STRCASENE(str1, str2);` | `EXPECT_STRCASENE(str1, str2);` | the two C strings have different contents, ignoring case |
|
||||
|
||||
Note that "CASE" in an assertion name means that case is ignored. A `NULL`
|
||||
pointer and an empty string are considered *different*.
|
||||
|
|
|
@ -34,8 +34,7 @@
|
|||
// Google Test. They are subject to change without notice. They should not used
|
||||
// by code external to Google Test.
|
||||
//
|
||||
// This header file is #included by
|
||||
// gtest/internal/gtest-internal.h.
|
||||
// This header file is #included by gtest-internal.h.
|
||||
// It should not be #included by other files.
|
||||
|
||||
#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_STRING_H_
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
//
|
||||
// Author: wan@google.com (Zhanyong Wan)
|
||||
//
|
||||
// Unit test for gtest/gtest_prod.h.
|
||||
// Unit test for gtest_prod.h.
|
||||
|
||||
#include "production.h"
|
||||
#include "gtest/gtest.h"
|
||||
|
|
|
@ -35,8 +35,8 @@
|
|||
#include "gtest/gtest.h"
|
||||
|
||||
// Verifies that the command line flag variables can be accessed in
|
||||
// code once "gtest/gtest.h" has been
|
||||
// #included. Do not move it after other gtest #includes.
|
||||
// code once "gtest.h" has been #included.
|
||||
// Do not move it after other gtest #includes.
|
||||
TEST(CommandLineFlagsTest, CanBeAccessedInCodeOnceGTestHIsIncluded) {
|
||||
bool dummy = testing::GTEST_FLAG(also_run_disabled_tests)
|
||||
|| testing::GTEST_FLAG(break_on_failure)
|
||||
|
|
Loading…
Reference in New Issue
Block a user