Unverified Commit 6cacb419 authored by Gennadiy Civil's avatar Gennadiy Civil Committed by GitHub
Browse files

Merge branch 'master' into deprecate

parents fd4f7cc7 40904f89
...@@ -357,7 +357,7 @@ class FunctionMocker<R(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10)> : public ...@@ -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 // // error when trying to resolve between this and overload 4 in
// // 'gmock_GetName(WithoutMatchers(), nullptr)'. // // 'gmock_GetName(WithoutMatchers(), nullptr)'.
// MockSpec<string&()> gmock_GetName( // MockSpec<string&()> gmock_GetName(
// const WithoutMatchers&, const Function<string&()>*) const { // const WithoutMatchers&, const Function<string&()>*) const {
// // Removes const from this, calls overload 1 // // Removes const from this, calls overload 1
// return AdjustConstness_(this)->gmock_GetName(); // return AdjustConstness_(this)->gmock_GetName();
// } // }
...@@ -366,7 +366,7 @@ class FunctionMocker<R(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10)> : public ...@@ -366,7 +366,7 @@ class FunctionMocker<R(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10)> : public
// const string& gmock_GetName() const { ... } // const string& gmock_GetName() const { ... }
// // Overload 4 // // Overload 4
// MockSpec<const string&()> gmock_GetName( // 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 // // Does not remove const, calls overload 3
// return AdjustConstness_const(this)->gmock_GetName(); // return AdjustConstness_const(this)->gmock_GetName();
// } // }
......
...@@ -119,7 +119,7 @@ class FunctionMocker<R($As)> : public ...@@ -119,7 +119,7 @@ class FunctionMocker<R($As)> : public
// // error when trying to resolve between this and overload 4 in // // error when trying to resolve between this and overload 4 in
// // 'gmock_GetName(WithoutMatchers(), nullptr)'. // // 'gmock_GetName(WithoutMatchers(), nullptr)'.
// MockSpec<string&()> gmock_GetName( // MockSpec<string&()> gmock_GetName(
// const WithoutMatchers&, const Function<string&()>*) const { // const WithoutMatchers&, const Function<string&()>*) const {
// // Removes const from this, calls overload 1 // // Removes const from this, calls overload 1
// return AdjustConstness_(this)->gmock_GetName(); // return AdjustConstness_(this)->gmock_GetName();
// } // }
...@@ -128,7 +128,7 @@ class FunctionMocker<R($As)> : public ...@@ -128,7 +128,7 @@ class FunctionMocker<R($As)> : public
// const string& gmock_GetName() const { ... } // const string& gmock_GetName() const { ... }
// // Overload 4 // // Overload 4
// MockSpec<const string&()> gmock_GetName( // 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 // // Does not remove const, calls overload 3
// return AdjustConstness_const(this)->gmock_GetName(); // return AdjustConstness_const(this)->gmock_GetName();
// } // }
......
...@@ -33,13 +33,12 @@ ...@@ -33,13 +33,12 @@
// threads concurrently. // threads concurrently.
#include "gmock/gmock.h" #include "gmock/gmock.h"
#include "gtest/gtest.h" #include "gtest/gtest.h"
namespace testing { namespace testing {
namespace { namespace {
// From "gtest/internal/gtest-port.h". // From gtest-port.h.
using ::testing::internal::ThreadWithParam; using ::testing::internal::ThreadWithParam;
// The maximum number of test threads (not including helper threads) // The maximum number of test threads (not including helper threads)
......
...@@ -203,7 +203,7 @@ for more details. ...@@ -203,7 +203,7 @@ for more details.
If you're working with floating point numbers, you may want to use the floating 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 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` Macros in this section work with both narrow and wide string objects (`string`
and `wstring`). and `wstring`).
...@@ -219,18 +219,12 @@ as `ASSERT_EQ(expected, actual)`, so lots of existing code uses this order. Now ...@@ -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 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. two `string` objects, use `EXPECT_EQ`, `EXPECT_NE`, and etc instead.
| Fatal assertion | Nonfatal assertion | Verifies | | Fatal assertion | Nonfatal assertion | Verifies |
| ----------------------- | ----------------------- | ---------------------- | | ------------------------------- | ------------------------------- | -------------------------------------------------------- |
| `ASSERT_STREQ(str1, | `EXPECT_STREQ(str1, | the two C strings have | | `ASSERT_STREQ(str1, str2);` | `EXPECT_STREQ(str1, str2);` | the two C strings have the same content |
: str2);` : str2);` : the same content : | `ASSERT_STRNE(str1, str2);` | `EXPECT_STRNE(str1, str2);` | the two C strings have different contents |
| `ASSERT_STRNE(str1, | `EXPECT_STRNE(str1, | the two C strings have | | `ASSERT_STRCASEEQ(str1, str2);` | `EXPECT_STRCASEEQ(str1, str2);` | the two C strings have the same content, ignoring case |
: str2);` : str2);` : different contents : | `ASSERT_STRCASENE(str1, str2);` | `EXPECT_STRCASENE(str1, str2);` | the two C strings have different contents, ignoring case |
| `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 :
Note that "CASE" in an assertion name means that case is ignored. A `NULL` Note that "CASE" in an assertion name means that case is ignored. A `NULL`
pointer and an empty string are considered *different*. pointer and an empty string are considered *different*.
......
...@@ -34,8 +34,7 @@ ...@@ -34,8 +34,7 @@
// Google Test. They are subject to change without notice. They should not used // Google Test. They are subject to change without notice. They should not used
// by code external to Google Test. // by code external to Google Test.
// //
// This header file is #included by // This header file is #included by gtest-internal.h.
// gtest/internal/gtest-internal.h.
// It should not be #included by other files. // It should not be #included by other files.
#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_STRING_H_ #ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_STRING_H_
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
// //
// Author: wan@google.com (Zhanyong Wan) // Author: wan@google.com (Zhanyong Wan)
// //
// Unit test for gtest/gtest_prod.h. // Unit test for gtest_prod.h.
#include "production.h" #include "production.h"
#include "gtest/gtest.h" #include "gtest/gtest.h"
......
...@@ -35,8 +35,8 @@ ...@@ -35,8 +35,8 @@
#include "gtest/gtest.h" #include "gtest/gtest.h"
// Verifies that the command line flag variables can be accessed in // Verifies that the command line flag variables can be accessed in
// code once "gtest/gtest.h" has been // code once "gtest.h" has been #included.
// #included. Do not move it after other gtest #includes. // Do not move it after other gtest #includes.
TEST(CommandLineFlagsTest, CanBeAccessedInCodeOnceGTestHIsIncluded) { TEST(CommandLineFlagsTest, CanBeAccessedInCodeOnceGTestHIsIncluded) {
bool dummy = testing::GTEST_FLAG(also_run_disabled_tests) bool dummy = testing::GTEST_FLAG(also_run_disabled_tests)
|| testing::GTEST_FLAG(break_on_failure) || testing::GTEST_FLAG(break_on_failure)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment