mirror of
https://github.com/google/googletest.git
synced 2025-01-14 00:20:57 +08:00
Adjust includes to use <> instead of "", consistent with quickstart pages.
Right now, gtest documentation uses different #include syntax. The quickstart pages (e.g., http://google.github.io/googletest/quickstart-bazel.html#create-and-run-a-binary) are checked in with `#include <gtest/gtest.h>` However, other documentation (such as the primer) uses `#include "gtest/gtest.h"` (e.g., https://google.github.io/googletest/primer.html#writing-the-main-function). PiperOrigin-RevId: 551878641 Change-Id: Iab93cc1da3ef4870a07b624071b75d6e9d3568c1
This commit is contained in:
parent
40412d8512
commit
c875c4e224
@ -20,7 +20,7 @@ class Foo {
|
|||||||
(note that `~Foo()` **must** be virtual) we can define its mock as
|
(note that `~Foo()` **must** be virtual) we can define its mock as
|
||||||
|
|
||||||
```cpp
|
```cpp
|
||||||
#include "gmock/gmock.h"
|
#include <gmock/gmock.h>
|
||||||
|
|
||||||
class MockFoo : public Foo {
|
class MockFoo : public Foo {
|
||||||
public:
|
public:
|
||||||
|
@ -3194,7 +3194,7 @@ You can unlock this power by running your test with the `--gmock_verbose=info`
|
|||||||
flag. For example, given the test program:
|
flag. For example, given the test program:
|
||||||
|
|
||||||
```cpp
|
```cpp
|
||||||
#include "gmock/gmock.h"
|
#include <gmock/gmock.h>
|
||||||
|
|
||||||
using ::testing::_;
|
using ::testing::_;
|
||||||
using ::testing::HasSubstr;
|
using ::testing::HasSubstr;
|
||||||
|
@ -164,7 +164,7 @@ follow:
|
|||||||
After the process, you should have something like:
|
After the process, you should have something like:
|
||||||
|
|
||||||
```cpp
|
```cpp
|
||||||
#include "gmock/gmock.h" // Brings in gMock.
|
#include <gmock/gmock.h> // Brings in gMock.
|
||||||
|
|
||||||
class MockTurtle : public Turtle {
|
class MockTurtle : public Turtle {
|
||||||
public:
|
public:
|
||||||
@ -224,8 +224,8 @@ Here's an example:
|
|||||||
|
|
||||||
```cpp
|
```cpp
|
||||||
#include "path/to/mock-turtle.h"
|
#include "path/to/mock-turtle.h"
|
||||||
#include "gmock/gmock.h"
|
#include <gmock/gmock.h>
|
||||||
#include "gtest/gtest.h"
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
using ::testing::AtLeast; // #1
|
using ::testing::AtLeast; // #1
|
||||||
|
|
||||||
|
@ -395,7 +395,7 @@ You can start from this boilerplate:
|
|||||||
```c++
|
```c++
|
||||||
#include "this/package/foo.h"
|
#include "this/package/foo.h"
|
||||||
|
|
||||||
#include "gtest/gtest.h"
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
namespace my {
|
namespace my {
|
||||||
namespace project {
|
namespace project {
|
||||||
|
@ -88,7 +88,7 @@ For example, the following code verifies that the string `value1` starts with
|
|||||||
10:
|
10:
|
||||||
|
|
||||||
```cpp
|
```cpp
|
||||||
#include "gmock/gmock.h"
|
#include <gmock/gmock.h>
|
||||||
|
|
||||||
using ::testing::AllOf;
|
using ::testing::AllOf;
|
||||||
using ::testing::Gt;
|
using ::testing::Gt;
|
||||||
|
@ -145,7 +145,7 @@ We list the most frequently used macros below. For a complete list, see file
|
|||||||
### Multi-threaded Tests
|
### Multi-threaded Tests
|
||||||
|
|
||||||
GoogleTest is thread-safe where the pthread library is available. After
|
GoogleTest is thread-safe where the pthread library is available. After
|
||||||
`#include "gtest/gtest.h"`, you can check the
|
`#include <gtest/gtest.h>`, you can check the
|
||||||
`GTEST_IS_THREADSAFE` macro to see whether this is the case (yes if the macro is
|
`GTEST_IS_THREADSAFE` macro to see whether this is the case (yes if the macro is
|
||||||
`#defined` to 1, no if it's undefined.).
|
`#defined` to 1, no if it's undefined.).
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user