Skip to content

Commit 251e720

Browse files
Abseil Teamcopybara-github
authored andcommitted
Change ::testing to testing in Testing Reference doc
PiperOrigin-RevId: 544466397 Change-Id: Icb4d5fae38361cd75d47f908886831696eb2b1c9
1 parent 687c589 commit 251e720

File tree

1 file changed

+35
-35
lines changed

1 file changed

+35
-35
lines changed

docs/reference/testing.md

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ custom function can be used for more control:
122122
```cpp
123123
INSTANTIATE_TEST_SUITE_P(
124124
MyInstantiation, MyTestSuite,
125-
::testing::Values(...),
126-
[](const ::testing::TestParamInfo<MyTestSuite::ParamType>& info) {
125+
testing::Values(...),
126+
[](const testing::TestParamInfo<MyTestSuite::ParamType>& info) {
127127
// Can use info.param here to generate the test suffix
128128
std::string name = ...
129129
return name;
@@ -148,7 +148,7 @@ type, for example:
148148

149149
```cpp
150150
template <typename T>
151-
class MyFixture : public ::testing::Test {
151+
class MyFixture : public testing::Test {
152152
public:
153153
...
154154
using List = std::list<T>;
@@ -324,7 +324,7 @@ Then the test code should look like:
324324
```cpp
325325
namespace my_namespace {
326326

327-
class MyClassTest : public ::testing::Test {
327+
class MyClassTest : public testing::Test {
328328
...
329329
};
330330

@@ -387,7 +387,7 @@ GoogleTest defines the following classes and types to help with writing tests.
387387
388388
### AssertionResult {#AssertionResult}
389389
390-
`::testing::AssertionResult`
390+
`testing::AssertionResult`
391391
392392
A class for indicating whether an assertion was successful.
393393
@@ -401,22 +401,22 @@ To create an instance of this class, use one of the factory functions
401401
402402
### AssertionException {#AssertionException}
403403
404-
`::testing::AssertionException`
404+
`testing::AssertionException`
405405
406406
Exception which can be thrown from
407407
[`TestEventListener::OnTestPartResult`](#TestEventListener::OnTestPartResult).
408408
409409
### EmptyTestEventListener {#EmptyTestEventListener}
410410
411-
`::testing::EmptyTestEventListener`
411+
`testing::EmptyTestEventListener`
412412
413413
Provides an empty implementation of all methods in the
414414
[`TestEventListener`](#TestEventListener) interface, such that a subclass only
415415
needs to override the methods it cares about.
416416
417417
### Environment {#Environment}
418418
419-
`::testing::Environment`
419+
`testing::Environment`
420420
421421
Represents a global test environment. See
422422
[Global Set-Up and Tear-Down](../advanced.md#global-set-up-and-tear-down).
@@ -437,7 +437,7 @@ Override this to define how to tear down the environment.
437437
438438
### ScopedTrace {#ScopedTrace}
439439
440-
`::testing::ScopedTrace`
440+
`testing::ScopedTrace`
441441
442442
An instance of this class causes a trace to be included in every test failure
443443
message generated by code in the scope of the lifetime of the `ScopedTrace`
@@ -453,7 +453,7 @@ ScopedTrace(const char* file, int line, const T& message)
453453
Example usage:
454454

455455
```cpp
456-
::testing::ScopedTrace trace("file.cc", 123, "message");
456+
testing::ScopedTrace trace("file.cc", 123, "message");
457457
```
458458
459459
The resulting trace includes the given source file path and line number, and the
@@ -464,7 +464,7 @@ See also [`SCOPED_TRACE`](#SCOPED_TRACE).
464464
465465
### Test {#Test}
466466
467-
`::testing::Test`
467+
`testing::Test`
468468
469469
The abstract class that all tests inherit from. `Test` is not copyable.
470470
@@ -552,7 +552,7 @@ after running each individual test.
552552
553553
### TestWithParam {#TestWithParam}
554554
555-
`::testing::TestWithParam<T>`
555+
`testing::TestWithParam<T>`
556556
557557
A convenience class which inherits from both [`Test`](#Test) and
558558
[`WithParamInterface<T>`](#WithParamInterface).
@@ -672,7 +672,7 @@ during execution of `SetUpTestSuite` and `TearDownTestSuite`.
672672
673673
### TestInfo {#TestInfo}
674674
675-
`::testing::TestInfo`
675+
`testing::TestInfo`
676676
677677
Stores information about a test.
678678
@@ -751,7 +751,7 @@ Returns the result of the test. See [`TestResult`](#TestResult).
751751
752752
### TestParamInfo {#TestParamInfo}
753753
754-
`::testing::TestParamInfo<T>`
754+
`testing::TestParamInfo<T>`
755755
756756
Describes a parameter to a value-parameterized test. The type `T` is the type of
757757
the parameter.
@@ -761,7 +761,7 @@ and its integer index respectively.
761761
762762
### UnitTest {#UnitTest}
763763
764-
`::testing::UnitTest`
764+
`testing::UnitTest`
765765
766766
This class contains information about the test program.
767767
@@ -929,7 +929,7 @@ GoogleTest. See [`TestEventListeners`](#TestEventListeners).
929929
930930
### TestEventListener {#TestEventListener}
931931
932-
`::testing::TestEventListener`
932+
`testing::TestEventListener`
933933
934934
The interface for tracing execution of tests. The methods below are listed in
935935
the order the corresponding events are fired.
@@ -1027,7 +1027,7 @@ Fired after all test activities have ended.
10271027
10281028
### TestEventListeners {#TestEventListeners}
10291029
1030-
`::testing::TestEventListeners`
1030+
`testing::TestEventListeners`
10311031
10321032
Lets users add listeners to track events in GoogleTest.
10331033
@@ -1072,7 +1072,7 @@ the caller and makes this function return `NULL` the next time.
10721072
10731073
### TestPartResult {#TestPartResult}
10741074
1075-
`::testing::TestPartResult`
1075+
`testing::TestPartResult`
10761076
10771077
A copyable object representing the result of a test part (i.e. an assertion or
10781078
an explicit `FAIL()`, `ADD_FAILURE()`, or `SUCCESS()`).
@@ -1154,7 +1154,7 @@ Returns true if and only if the test part failed.
11541154

11551155
### TestProperty {#TestProperty}
11561156

1157-
`::testing::TestProperty`
1157+
`testing::TestProperty`
11581158

11591159
A copyable object representing a user-specified test property which can be
11601160
output as a key/value string pair.
@@ -1181,7 +1181,7 @@ Sets a new value, overriding the previous one.
11811181

11821182
### TestResult {#TestResult}
11831183

1184-
`::testing::TestResult`
1184+
`testing::TestResult`
11851185

11861186
Contains information about the result of a single test.
11871187

@@ -1262,20 +1262,20 @@ range, aborts the program.
12621262

12631263
### TimeInMillis {#TimeInMillis}
12641264

1265-
`::testing::TimeInMillis`
1265+
`testing::TimeInMillis`
12661266

12671267
An integer type representing time in milliseconds.
12681268

12691269
### Types {#Types}
12701270

1271-
`::testing::Types<T...>`
1271+
`testing::Types<T...>`
12721272

12731273
Represents a list of types for use in typed tests and type-parameterized tests.
12741274

12751275
The template argument `T...` can be any number of types, for example:
12761276

12771277
```
1278-
::testing::Types<char, int, unsigned int>
1278+
testing::Types<char, int, unsigned int>
12791279
```
12801280

12811281
See [Typed Tests](../advanced.md#typed-tests) and
@@ -1284,7 +1284,7 @@ information.
12841284

12851285
### WithParamInterface {#WithParamInterface}
12861286

1287-
`::testing::WithParamInterface<T>`
1287+
`testing::WithParamInterface<T>`
12881288

12891289
The pure interface class that all value-parameterized tests inherit from.
12901290

@@ -1310,9 +1310,9 @@ tests.
13101310

13111311
### InitGoogleTest {#InitGoogleTest}
13121312

1313-
`void ::testing::InitGoogleTest(int* argc, char** argv)` \
1314-
`void ::testing::InitGoogleTest(int* argc, wchar_t** argv)` \
1315-
`void ::testing::InitGoogleTest()`
1313+
`void testing::InitGoogleTest(int* argc, char** argv)` \
1314+
`void testing::InitGoogleTest(int* argc, wchar_t** argv)` \
1315+
`void testing::InitGoogleTest()`
13161316

13171317
Initializes GoogleTest. This must be called before calling
13181318
[`RUN_ALL_TESTS()`](#RUN_ALL_TESTS). In particular, it parses the command line
@@ -1329,7 +1329,7 @@ platforms where there is no `argc`/`argv`.
13291329

13301330
### AddGlobalTestEnvironment {#AddGlobalTestEnvironment}
13311331

1332-
`Environment* ::testing::AddGlobalTestEnvironment(Environment* env)`
1332+
`Environment* testing::AddGlobalTestEnvironment(Environment* env)`
13331333

13341334
Adds a test environment to the test program. Must be called before
13351335
[`RUN_ALL_TESTS()`](#RUN_ALL_TESTS) is called. See
@@ -1342,7 +1342,7 @@ See also [`Environment`](#Environment).
13421342

13431343
```cpp
13441344
template <typename Factory>
1345-
TestInfo* ::testing::RegisterTest(const char* test_suite_name, const char* test_name,
1345+
TestInfo* testing::RegisterTest(const char* test_suite_name, const char* test_name,
13461346
const char* type_param, const char* value_param,
13471347
const char* file, int line, Factory factory)
13481348
```
@@ -1381,27 +1381,27 @@ an all-caps name.
13811381
13821382
### AssertionSuccess {#AssertionSuccess}
13831383
1384-
`AssertionResult ::testing::AssertionSuccess()`
1384+
`AssertionResult testing::AssertionSuccess()`
13851385
13861386
Creates a successful assertion result. See
13871387
[`AssertionResult`](#AssertionResult).
13881388
13891389
### AssertionFailure {#AssertionFailure}
13901390
1391-
`AssertionResult ::testing::AssertionFailure()`
1391+
`AssertionResult testing::AssertionFailure()`
13921392
13931393
Creates a failed assertion result. Use the `<<` operator to store a failure
13941394
message:
13951395
13961396
```cpp
1397-
::testing::AssertionFailure() << "My failure message";
1397+
testing::AssertionFailure() << "My failure message";
13981398
```
13991399

14001400
See [`AssertionResult`](#AssertionResult).
14011401

14021402
### StaticAssertTypeEq {#StaticAssertTypeEq}
14031403

1404-
`::testing::StaticAssertTypeEq<T1, T2>()`
1404+
`testing::StaticAssertTypeEq<T1, T2>()`
14051405

14061406
Compile-time assertion for type equality. Compiles if and only if `T1` and `T2`
14071407
are the same type. The value it returns is irrelevant.
@@ -1410,7 +1410,7 @@ See [Type Assertions](../advanced.md#type-assertions) for more information.
14101410

14111411
### PrintToString {#PrintToString}
14121412

1413-
`std::string ::testing::PrintToString(x)`
1413+
`std::string testing::PrintToString(x)`
14141414

14151415
Prints any value `x` using GoogleTest's value printer.
14161416

@@ -1420,7 +1420,7 @@ for more information.
14201420

14211421
### PrintToStringParamName {#PrintToStringParamName}
14221422

1423-
`std::string ::testing::PrintToStringParamName(TestParamInfo<T>& info)`
1423+
`std::string testing::PrintToStringParamName(TestParamInfo<T>& info)`
14241424

14251425
A built-in parameterized test name generator which returns the result of
14261426
[`PrintToString`](#PrintToString) called on `info.param`. Does not work when the

0 commit comments

Comments
 (0)