Change `::testing` to `testing` in Testing Reference doc
PiperOrigin-RevId: 544466397
Change-Id: Icb4d5fae38361cd75d47f908886831696eb2b1c9
diff --git a/docs/reference/testing.md b/docs/reference/testing.md
index 877dfa3..17225a6 100644
--- a/docs/reference/testing.md
+++ b/docs/reference/testing.md
@@ -122,8 +122,8 @@
```cpp
INSTANTIATE_TEST_SUITE_P(
MyInstantiation, MyTestSuite,
- ::testing::Values(...),
- [](const ::testing::TestParamInfo<MyTestSuite::ParamType>& info) {
+ testing::Values(...),
+ [](const testing::TestParamInfo<MyTestSuite::ParamType>& info) {
// Can use info.param here to generate the test suffix
std::string name = ...
return name;
@@ -148,7 +148,7 @@
```cpp
template <typename T>
-class MyFixture : public ::testing::Test {
+class MyFixture : public testing::Test {
public:
...
using List = std::list<T>;
@@ -324,7 +324,7 @@
```cpp
namespace my_namespace {
-class MyClassTest : public ::testing::Test {
+class MyClassTest : public testing::Test {
...
};
@@ -387,7 +387,7 @@
### AssertionResult {#AssertionResult}
-`::testing::AssertionResult`
+`testing::AssertionResult`
A class for indicating whether an assertion was successful.
@@ -401,14 +401,14 @@
### AssertionException {#AssertionException}
-`::testing::AssertionException`
+`testing::AssertionException`
Exception which can be thrown from
[`TestEventListener::OnTestPartResult`](#TestEventListener::OnTestPartResult).
### EmptyTestEventListener {#EmptyTestEventListener}
-`::testing::EmptyTestEventListener`
+`testing::EmptyTestEventListener`
Provides an empty implementation of all methods in the
[`TestEventListener`](#TestEventListener) interface, such that a subclass only
@@ -416,7 +416,7 @@
### Environment {#Environment}
-`::testing::Environment`
+`testing::Environment`
Represents a global test environment. See
[Global Set-Up and Tear-Down](../advanced.md#global-set-up-and-tear-down).
@@ -437,7 +437,7 @@
### ScopedTrace {#ScopedTrace}
-`::testing::ScopedTrace`
+`testing::ScopedTrace`
An instance of this class causes a trace to be included in every test failure
message generated by code in the scope of the lifetime of the `ScopedTrace`
@@ -453,7 +453,7 @@
Example usage:
```cpp
-::testing::ScopedTrace trace("file.cc", 123, "message");
+testing::ScopedTrace trace("file.cc", 123, "message");
```
The resulting trace includes the given source file path and line number, and the
@@ -464,7 +464,7 @@
### Test {#Test}
-`::testing::Test`
+`testing::Test`
The abstract class that all tests inherit from. `Test` is not copyable.
@@ -552,7 +552,7 @@
### TestWithParam {#TestWithParam}
-`::testing::TestWithParam<T>`
+`testing::TestWithParam<T>`
A convenience class which inherits from both [`Test`](#Test) and
[`WithParamInterface<T>`](#WithParamInterface).
@@ -672,7 +672,7 @@
### TestInfo {#TestInfo}
-`::testing::TestInfo`
+`testing::TestInfo`
Stores information about a test.
@@ -751,7 +751,7 @@
### TestParamInfo {#TestParamInfo}
-`::testing::TestParamInfo<T>`
+`testing::TestParamInfo<T>`
Describes a parameter to a value-parameterized test. The type `T` is the type of
the parameter.
@@ -761,7 +761,7 @@
### UnitTest {#UnitTest}
-`::testing::UnitTest`
+`testing::UnitTest`
This class contains information about the test program.
@@ -929,7 +929,7 @@
### TestEventListener {#TestEventListener}
-`::testing::TestEventListener`
+`testing::TestEventListener`
The interface for tracing execution of tests. The methods below are listed in
the order the corresponding events are fired.
@@ -1027,7 +1027,7 @@
### TestEventListeners {#TestEventListeners}
-`::testing::TestEventListeners`
+`testing::TestEventListeners`
Lets users add listeners to track events in GoogleTest.
@@ -1072,7 +1072,7 @@
### TestPartResult {#TestPartResult}
-`::testing::TestPartResult`
+`testing::TestPartResult`
A copyable object representing the result of a test part (i.e. an assertion or
an explicit `FAIL()`, `ADD_FAILURE()`, or `SUCCESS()`).
@@ -1154,7 +1154,7 @@
### TestProperty {#TestProperty}
-`::testing::TestProperty`
+`testing::TestProperty`
A copyable object representing a user-specified test property which can be
output as a key/value string pair.
@@ -1181,7 +1181,7 @@
### TestResult {#TestResult}
-`::testing::TestResult`
+`testing::TestResult`
Contains information about the result of a single test.
@@ -1262,20 +1262,20 @@
### TimeInMillis {#TimeInMillis}
-`::testing::TimeInMillis`
+`testing::TimeInMillis`
An integer type representing time in milliseconds.
### Types {#Types}
-`::testing::Types<T...>`
+`testing::Types<T...>`
Represents a list of types for use in typed tests and type-parameterized tests.
The template argument `T...` can be any number of types, for example:
```
-::testing::Types<char, int, unsigned int>
+testing::Types<char, int, unsigned int>
```
See [Typed Tests](../advanced.md#typed-tests) and
@@ -1284,7 +1284,7 @@
### WithParamInterface {#WithParamInterface}
-`::testing::WithParamInterface<T>`
+`testing::WithParamInterface<T>`
The pure interface class that all value-parameterized tests inherit from.
@@ -1310,9 +1310,9 @@
### InitGoogleTest {#InitGoogleTest}
-`void ::testing::InitGoogleTest(int* argc, char** argv)` \
-`void ::testing::InitGoogleTest(int* argc, wchar_t** argv)` \
-`void ::testing::InitGoogleTest()`
+`void testing::InitGoogleTest(int* argc, char** argv)` \
+`void testing::InitGoogleTest(int* argc, wchar_t** argv)` \
+`void testing::InitGoogleTest()`
Initializes GoogleTest. This must be called before calling
[`RUN_ALL_TESTS()`](#RUN_ALL_TESTS). In particular, it parses the command line
@@ -1329,7 +1329,7 @@
### AddGlobalTestEnvironment {#AddGlobalTestEnvironment}
-`Environment* ::testing::AddGlobalTestEnvironment(Environment* env)`
+`Environment* testing::AddGlobalTestEnvironment(Environment* env)`
Adds a test environment to the test program. Must be called before
[`RUN_ALL_TESTS()`](#RUN_ALL_TESTS) is called. See
@@ -1342,7 +1342,7 @@
```cpp
template <typename Factory>
-TestInfo* ::testing::RegisterTest(const char* test_suite_name, const char* test_name,
+TestInfo* testing::RegisterTest(const char* test_suite_name, const char* test_name,
const char* type_param, const char* value_param,
const char* file, int line, Factory factory)
```
@@ -1381,27 +1381,27 @@
### AssertionSuccess {#AssertionSuccess}
-`AssertionResult ::testing::AssertionSuccess()`
+`AssertionResult testing::AssertionSuccess()`
Creates a successful assertion result. See
[`AssertionResult`](#AssertionResult).
### AssertionFailure {#AssertionFailure}
-`AssertionResult ::testing::AssertionFailure()`
+`AssertionResult testing::AssertionFailure()`
Creates a failed assertion result. Use the `<<` operator to store a failure
message:
```cpp
-::testing::AssertionFailure() << "My failure message";
+testing::AssertionFailure() << "My failure message";
```
See [`AssertionResult`](#AssertionResult).
### StaticAssertTypeEq {#StaticAssertTypeEq}
-`::testing::StaticAssertTypeEq<T1, T2>()`
+`testing::StaticAssertTypeEq<T1, T2>()`
Compile-time assertion for type equality. Compiles if and only if `T1` and `T2`
are the same type. The value it returns is irrelevant.
@@ -1410,7 +1410,7 @@
### PrintToString {#PrintToString}
-`std::string ::testing::PrintToString(x)`
+`std::string testing::PrintToString(x)`
Prints any value `x` using GoogleTest's value printer.
@@ -1420,7 +1420,7 @@
### PrintToStringParamName {#PrintToStringParamName}
-`std::string ::testing::PrintToStringParamName(TestParamInfo<T>& info)`
+`std::string testing::PrintToStringParamName(TestParamInfo<T>& info)`
A built-in parameterized test name generator which returns the result of
[`PrintToString`](#PrintToString) called on `info.param`. Does not work when the