@@ -122,8 +122,8 @@ custom function can be used for more control:
122
122
```cpp
123
123
INSTANTIATE_TEST_SUITE_P(
124
124
MyInstantiation, MyTestSuite,
125
- :: testing::Values(...),
126
- [](const :: testing::TestParamInfo<MyTestSuite::ParamType>& info) {
125
+ testing::Values(...),
126
+ [](const testing::TestParamInfo<MyTestSuite::ParamType>& info) {
127
127
// Can use info.param here to generate the test suffix
128
128
std::string name = ...
129
129
return name;
@@ -148,7 +148,7 @@ type, for example:
148
148
149
149
``` cpp
150
150
template <typename T>
151
- class MyFixture : public :: testing::Test {
151
+ class MyFixture : public testing ::Test {
152
152
public:
153
153
...
154
154
using List = std::list<T >;
@@ -324,7 +324,7 @@ Then the test code should look like:
324
324
``` cpp
325
325
namespace my_namespace {
326
326
327
- class MyClassTest : public :: testing::Test {
327
+ class MyClassTest : public testing::Test {
328
328
...
329
329
};
330
330
@@ -387,7 +387,7 @@ GoogleTest defines the following classes and types to help with writing tests.
387
387
388
388
### AssertionResult {#AssertionResult}
389
389
390
- `:: testing::AssertionResult`
390
+ `testing::AssertionResult`
391
391
392
392
A class for indicating whether an assertion was successful.
393
393
@@ -401,22 +401,22 @@ To create an instance of this class, use one of the factory functions
401
401
402
402
### AssertionException {#AssertionException}
403
403
404
- `:: testing::AssertionException`
404
+ `testing::AssertionException`
405
405
406
406
Exception which can be thrown from
407
407
[`TestEventListener::OnTestPartResult`](#TestEventListener::OnTestPartResult).
408
408
409
409
### EmptyTestEventListener {#EmptyTestEventListener}
410
410
411
- `:: testing::EmptyTestEventListener`
411
+ `testing::EmptyTestEventListener`
412
412
413
413
Provides an empty implementation of all methods in the
414
414
[`TestEventListener`](#TestEventListener) interface, such that a subclass only
415
415
needs to override the methods it cares about.
416
416
417
417
### Environment {#Environment}
418
418
419
- `:: testing::Environment`
419
+ `testing::Environment`
420
420
421
421
Represents a global test environment. See
422
422
[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.
437
437
438
438
### ScopedTrace {#ScopedTrace}
439
439
440
- `:: testing::ScopedTrace`
440
+ `testing::ScopedTrace`
441
441
442
442
An instance of this class causes a trace to be included in every test failure
443
443
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)
453
453
Example usage:
454
454
455
455
``` cpp
456
- :: testing::ScopedTrace trace ("file.cc", 123, "message");
456
+ testing::ScopedTrace trace ("file.cc", 123, "message");
457
457
```
458
458
459
459
The resulting trace includes the given source file path and line number, and the
@@ -464,7 +464,7 @@ See also [`SCOPED_TRACE`](#SCOPED_TRACE).
464
464
465
465
### Test {#Test}
466
466
467
- `:: testing::Test`
467
+ `testing::Test`
468
468
469
469
The abstract class that all tests inherit from. `Test` is not copyable.
470
470
@@ -552,7 +552,7 @@ after running each individual test.
552
552
553
553
### TestWithParam {#TestWithParam}
554
554
555
- `:: testing::TestWithParam<T>`
555
+ `testing::TestWithParam<T>`
556
556
557
557
A convenience class which inherits from both [`Test`](#Test) and
558
558
[`WithParamInterface<T>`](#WithParamInterface).
@@ -672,7 +672,7 @@ during execution of `SetUpTestSuite` and `TearDownTestSuite`.
672
672
673
673
### TestInfo {#TestInfo}
674
674
675
- `:: testing::TestInfo`
675
+ `testing::TestInfo`
676
676
677
677
Stores information about a test.
678
678
@@ -751,7 +751,7 @@ Returns the result of the test. See [`TestResult`](#TestResult).
751
751
752
752
### TestParamInfo {#TestParamInfo}
753
753
754
- `:: testing::TestParamInfo<T>`
754
+ `testing::TestParamInfo<T>`
755
755
756
756
Describes a parameter to a value-parameterized test. The type `T` is the type of
757
757
the parameter.
@@ -761,7 +761,7 @@ and its integer index respectively.
761
761
762
762
### UnitTest {#UnitTest}
763
763
764
- `:: testing::UnitTest`
764
+ `testing::UnitTest`
765
765
766
766
This class contains information about the test program.
767
767
@@ -929,7 +929,7 @@ GoogleTest. See [`TestEventListeners`](#TestEventListeners).
929
929
930
930
### TestEventListener {#TestEventListener}
931
931
932
- `:: testing::TestEventListener`
932
+ `testing::TestEventListener`
933
933
934
934
The interface for tracing execution of tests. The methods below are listed in
935
935
the order the corresponding events are fired.
@@ -1027,7 +1027,7 @@ Fired after all test activities have ended.
1027
1027
1028
1028
### TestEventListeners {#TestEventListeners}
1029
1029
1030
- `:: testing::TestEventListeners`
1030
+ `testing::TestEventListeners`
1031
1031
1032
1032
Lets users add listeners to track events in GoogleTest.
1033
1033
@@ -1072,7 +1072,7 @@ the caller and makes this function return `NULL` the next time.
1072
1072
1073
1073
### TestPartResult {#TestPartResult}
1074
1074
1075
- `:: testing::TestPartResult`
1075
+ `testing::TestPartResult`
1076
1076
1077
1077
A copyable object representing the result of a test part (i.e. an assertion or
1078
1078
an explicit `FAIL()`, `ADD_FAILURE()`, or `SUCCESS()`).
@@ -1154,7 +1154,7 @@ Returns true if and only if the test part failed.
1154
1154
1155
1155
### TestProperty {#TestProperty}
1156
1156
1157
- ` :: testing::TestProperty`
1157
+ ` testing::TestProperty `
1158
1158
1159
1159
A copyable object representing a user-specified test property which can be
1160
1160
output as a key/value string pair.
@@ -1181,7 +1181,7 @@ Sets a new value, overriding the previous one.
1181
1181
1182
1182
### TestResult {#TestResult}
1183
1183
1184
- ` :: testing::TestResult`
1184
+ ` testing::TestResult `
1185
1185
1186
1186
Contains information about the result of a single test.
1187
1187
@@ -1262,20 +1262,20 @@ range, aborts the program.
1262
1262
1263
1263
### TimeInMillis {#TimeInMillis}
1264
1264
1265
- ` :: testing::TimeInMillis`
1265
+ ` testing::TimeInMillis `
1266
1266
1267
1267
An integer type representing time in milliseconds.
1268
1268
1269
1269
### Types {#Types}
1270
1270
1271
- ` :: testing::Types<T...>`
1271
+ ` testing::Types<T...> `
1272
1272
1273
1273
Represents a list of types for use in typed tests and type-parameterized tests.
1274
1274
1275
1275
The template argument ` T... ` can be any number of types, for example:
1276
1276
1277
1277
```
1278
- :: testing::Types<char, int, unsigned int>
1278
+ testing::Types<char, int, unsigned int>
1279
1279
```
1280
1280
1281
1281
See [ Typed Tests] ( ../advanced.md#typed-tests ) and
@@ -1284,7 +1284,7 @@ information.
1284
1284
1285
1285
### WithParamInterface {#WithParamInterface}
1286
1286
1287
- ` :: testing::WithParamInterface<T>`
1287
+ ` testing::WithParamInterface<T> `
1288
1288
1289
1289
The pure interface class that all value-parameterized tests inherit from.
1290
1290
@@ -1310,9 +1310,9 @@ tests.
1310
1310
1311
1311
### InitGoogleTest {#InitGoogleTest}
1312
1312
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() `
1316
1316
1317
1317
Initializes GoogleTest. This must be called before calling
1318
1318
[ ` RUN_ALL_TESTS() ` ] ( #RUN_ALL_TESTS ) . In particular, it parses the command line
@@ -1329,7 +1329,7 @@ platforms where there is no `argc`/`argv`.
1329
1329
1330
1330
### AddGlobalTestEnvironment {#AddGlobalTestEnvironment}
1331
1331
1332
- ` Environment* :: testing::AddGlobalTestEnvironment(Environment* env) `
1332
+ ` Environment* testing::AddGlobalTestEnvironment(Environment* env) `
1333
1333
1334
1334
Adds a test environment to the test program. Must be called before
1335
1335
[ ` RUN_ALL_TESTS() ` ] ( #RUN_ALL_TESTS ) is called. See
@@ -1342,7 +1342,7 @@ See also [`Environment`](#Environment).
1342
1342
1343
1343
``` cpp
1344
1344
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,
1346
1346
const char* type_param, const char* value_param,
1347
1347
const char* file, int line, Factory factory)
1348
1348
```
@@ -1381,27 +1381,27 @@ an all-caps name.
1381
1381
1382
1382
### AssertionSuccess {#AssertionSuccess}
1383
1383
1384
- ` AssertionResult :: testing::AssertionSuccess() `
1384
+ `AssertionResult testing::AssertionSuccess()`
1385
1385
1386
1386
Creates a successful assertion result. See
1387
1387
[`AssertionResult`](#AssertionResult).
1388
1388
1389
1389
### AssertionFailure {#AssertionFailure}
1390
1390
1391
- ` AssertionResult :: testing::AssertionFailure() `
1391
+ `AssertionResult testing::AssertionFailure()`
1392
1392
1393
1393
Creates a failed assertion result. Use the `<<` operator to store a failure
1394
1394
message:
1395
1395
1396
1396
```cpp
1397
- :: testing::AssertionFailure () << "My failure message";
1397
+ testing::AssertionFailure() << "My failure message";
1398
1398
```
1399
1399
1400
1400
See [ ` AssertionResult ` ] ( #AssertionResult ) .
1401
1401
1402
1402
### StaticAssertTypeEq {#StaticAssertTypeEq}
1403
1403
1404
- ` :: testing::StaticAssertTypeEq<T1, T2>()`
1404
+ ` testing::StaticAssertTypeEq<T1, T2>() `
1405
1405
1406
1406
Compile-time assertion for type equality. Compiles if and only if ` T1 ` and ` T2 `
1407
1407
are the same type. The value it returns is irrelevant.
@@ -1410,7 +1410,7 @@ See [Type Assertions](../advanced.md#type-assertions) for more information.
1410
1410
1411
1411
### PrintToString {#PrintToString}
1412
1412
1413
- ` std::string :: testing::PrintToString(x) `
1413
+ ` std::string testing::PrintToString(x) `
1414
1414
1415
1415
Prints any value ` x ` using GoogleTest's value printer.
1416
1416
@@ -1420,7 +1420,7 @@ for more information.
1420
1420
1421
1421
### PrintToStringParamName {#PrintToStringParamName}
1422
1422
1423
- ` std::string :: testing::PrintToStringParamName(TestParamInfo<T>& info) `
1423
+ ` std::string testing::PrintToStringParamName(TestParamInfo<T>& info) `
1424
1424
1425
1425
A built-in parameterized test name generator which returns the result of
1426
1426
[ ` PrintToString ` ] ( #PrintToString ) called on ` info.param ` . Does not work when the
0 commit comments