Abseil Team
e4ece4881d
Enable safe matcher casts from `Matcher<const T&>` to `Matcher<T>`.
...
PiperOrigin-RevId: 715826130
Change-Id: Id962fd456f6da21ea2a909f331f92d814f1dad46
4 months ago
Abseil Team
504ea69cf7
Document unexpected interaction with death test error code and gmock.
...
If you have a death test that uses mock objects, it's very likely that those mock objects are not properly cleaned up before death. The gMock atexit leak detector will call `_exit(1)`, overriding your expected exit code.
PiperOrigin-RevId: 713722657
Change-Id: I92a326f3923efc9f0e235d825616f3094eca995c
4 months ago
Abseil Team
f3c355f9dd
the public version already has the const qualifier
...
PiperOrigin-RevId: 706721910
Change-Id: I8a76a66d62028176a70678954f095ac70996cc9e
5 months ago
Abseil Team
79219e26e0
Update the links to ISTQB glossary.
...
PiperOrigin-RevId: 705108072
Change-Id: I209e7fb24bd093412dda1cd5eba10e9ccc2306f4
5 months ago
Abseil Team
1204d63444
Remove mention of using `ASSERT_...` statements inside custom matcher definitions.
...
PiperOrigin-RevId: 691994071
Change-Id: I63913152217c99b8c08ae6af8924bc28b02aa9d0
6 months ago
Peter Boström
5ed2186395
Use FAIL() in GTEST_SKIP() documentation
...
This replaces EXPECT_EQ(0, 1) which would fail if hit.
PiperOrigin-RevId: 690491467
Change-Id: Ieff4e616348254f29200e0ba1d9a6900a2eea130
7 months ago
Abseil Team
62df7bdbc1
This change adjusts how `ASSERT_NEAR` and `EXPECT_NEAR` treats infinity, such that `ASSERT_NEAR(inf, inf, 0)` passes. This makes the behavior more consistent with `ASSERT_EQ(inf, inf)` which succeeds.
...
Some examples of asserts that now pass:
```
ASSERT_NEAR(inf, inf, 0)
ASSERT_NEAR(-inf, inf, inf)
ASSERT_NEAR(inf, x, inf) // x is any finite floating point value
```
PiperOrigin-RevId: 685748133
Change-Id: I7b3af377773e8e0031e4c6b86830cbbf76bf20c6
7 months ago
Derek Mauro
ff233bdd4c
Update main to point to 1.15.2 patch release
...
PiperOrigin-RevId: 658382055
Change-Id: Ia5eed4bec26da8c8cbe29fbd3a41b44048c25e07
10 months ago
Derek Mauro
9ff2450a56
Update GoogleTest Bazel quickstart for Bzlmod
...
PiperOrigin-RevId: 652824490
Change-Id: I5e6f57004708e7fa62abb454db9bae81fa265c83
10 months ago
Derek Mauro
3ef16ef8b3
Fix the documentation that erroneously says you can use short versions
...
of help flags
Fixes #4564
PiperOrigin-RevId: 650730047
Change-Id: I3a52aca490338066c607e34ab20c827bfde5090d
10 months ago
Abseil Team
a7f443b80b
Mention the optional third argument to TYPED_TEST_SUITE
...
PiperOrigin-RevId: 637896001
Change-Id: Ia3a61ceec4b842e864a0cdfad13e9897bf0ecaaa
12 months ago
Abseil Team
2954cb8d87
Add example using EXPECT statement in custom matcher
...
`EXPECT_...` statements can be used inside matcher definitions – this is an important option that is glossed over in this documentation. Users should definitely be aware of this option, since writing custom messages to the `result_listener` can be very cumbersome (and unnecessary) sometimes.
This change adds a relevant example and includes the associated error message it provides on failure.
PiperOrigin-RevId: 630206661
Change-Id: Idee00ba77ce3c1245597aa082f9cd0efff16aceb
1 year ago
Krzysztof Kosiński
5197b1a8e6
Modify example in the primer to match Testing FAQ.
...
The CtorVsSetUp section of the FAQ says that constructors and destructors should be preferred over SetUp() and TearDown(), because they will automatically chain up to the fixture's base class, whereas for methods the user must remember to add the chaining manually.
PiperOrigin-RevId: 624273474
Change-Id: Ida41aae193d417eaf996587c7ae1a0099a8cab32
1 year ago
Abseil Team
b1a777f319
Fix https://github.com/google/googletest/issues/4423
...
PiperOrigin-RevId: 623407029
Change-Id: I3559f11e1c18a4f151d521c6ac115c358a11b40c
1 year ago
Abseil Team
9d43b27f7a
Revert incorrect update.
...
PiperOrigin-RevId: 609387046
Change-Id: I03e42c39011fc7e9715f896591a44ebede1933b2
1 year ago
Abseil Team
6eb225cb88
Add anchor for expectation ordering note
...
PiperOrigin-RevId: 606736565
Change-Id: Ifad0b34e1deeec1374377d733375c6210896d0d3
1 year ago
kaswhy
1cab76c7b8
Docs: Add mention of `gtest_recreate_environments_when_repeating`
1 year ago
kaswhy
778badf63a
Docs: add conditions for calling SetUp and TearDown()
1 year ago
Abseil Team
7f409cb3c0
Add a note about argv requiring NULL termination.
...
Fixes : #4434
PiperOrigin-RevId: 596960654
Change-Id: I1f70cc0801764fe0328030c46254f82eb9893a49
1 year ago
kaswhy
dda72ef321
Docs: add conditions for calling TearDown()
1 year ago
Abseil Team
96eadf659f
Minor documentation correction.
...
PiperOrigin-RevId: 593126348
Change-Id: I78e12ab5dd2e5acc69b21250bdb04e62990b6309
1 year ago
Derek Mauro
cde9a745a6
Fix broken links in primer.md
...
Closes #4432
PiperOrigin-RevId: 592335698
Change-Id: I9859451981f58f1426255067d702a0767718b1d5
1 year ago
Abseil Team
9bb354fa83
s/::testing::/testing::/ in test documentation outside of using statements to align with best practice
...
PiperOrigin-RevId: 574377544
Change-Id: I0ca69a3bf14cc1aab75784eba220a48bf50cef04
2 years ago
Dino Radakovic
beb552fb47
gmock_cook_book: Document `DoAll`'s return type requirement
...
The requirement is vaguely documented by "Only the return value of the last action in the sequence will be used.".
However, this can be misleading, as users could potentially expect default-constructed values to be returned in absence of a matching return type.
PiperOrigin-RevId: 570450839
Change-Id: Ibd98a6e6b2aaf2a8cfc15ed6aeab442526eab98e
2 years ago
Michael Hirshleifer
d1467f5813
GoogleTest FAQ: minor punctuation fixes
...
PiperOrigin-RevId: 565411290
Change-Id: I57e94c679183e39eec2a2835f330b52fc9302767
2 years ago
Michael Hirshleifer
728ec52d21
Remove Googletest FAQ entry for obsolete `ProtocolMessageEquals` and `ProtocolMessageEquiv`
...
* These long-dead variants of the proto matchers don't exist in the current version of Googletest.
* No evidence of external usage: [the only external references I see](https://www.google.com/search?q=%22protocolmessageequals%22+OR+%22protocolmessageequals%22 ) are copies of this guide. Possibly they were already removed by the time Googletest was publicly released.
PiperOrigin-RevId: 565358401
Change-Id: I61379b7333fa8ee19cd5520caedf2c539f54c2d7
2 years ago
sthd
f0eae4b399
changed http to https
2 years ago
Dino Radakovic
c374da15c5
googletest: Replace http with https in links to docs
...
This is a prerequisite for #4341
PiperOrigin-RevId: 559132807
Change-Id: Iadc961913e0ff107c5333dae17be5f8638663836
2 years ago
Elior Schneider
722daa3da6
Update advanced.md
...
http to https
2 years ago
sthd
8ca57f194a
Changed 2 public links from http to https
2 years ago
sthd
5b5ef29950
Changed 3 public links from http to https
2 years ago
Abseil Team
7e33b6a1c4
Specify SetUpTestSuite is required to be public.
...
PiperOrigin-RevId: 555578256
Change-Id: I9366fc99ae953c29e468fcddb4be203c9c05661b
2 years ago
Dino Radakovic
6abc9e3d79
Make references to `#include`s consistent across docs
...
PiperOrigin-RevId: 554561504
Change-Id: Ia02ab6ac646bf6637d6f500a4aaedd14e0a04798
2 years ago
Abseil Team
c875c4e224
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
2 years ago
Anton Sosnin
f014396910
Fix typo in gmock_cook_book.md
2 years ago
Abseil Team
251e720391
Change `::testing` to `testing` in Testing Reference doc
...
PiperOrigin-RevId: 544466397
Change-Id: Icb4d5fae38361cd75d47f908886831696eb2b1c9
2 years ago
Abseil Team
ec4fed9321
Update code examples in the gMock Cookbook following C++ best practices.
...
PiperOrigin-RevId: 542564354
Change-Id: Ia3307f13f845c662c88fb7303112f41ef8c56b28
2 years ago
Juan Ramos
4fed5f2850
cmake: Raise min to 3.6
...
From the CMake 3.27 release notes:
Compatibility with versions of CMake older than 3.5 is now
deprecated and will be removed from a future version. Calls to
cmake_minimum_required() or cmake_policy() that set the policy
version to an older value now issue a deprecation diagnostic.
This PR also removes manually setting policy CMP0048. This is
redundant since the CMake min is already 3.X
2 years ago
Abseil Team
65cfeca1a1
internal g3doc documentation change.
...
PiperOrigin-RevId: 539134110
Change-Id: I28041f77e18bc67aa0ffabdc7205e350deed22c8
2 years ago
Dino Radakovic
06f44bc951
Copy supported platforms from README onto https://google.github.io/googletest/platforms.html
...
PiperOrigin-RevId: 537016664
Change-Id: Ie62891a1061465a009b90feba0ccb91d85591160
2 years ago
Dino Radakovic
04cf298916
Provide example for setting C++ language standard in GoogleTest's Bazel quickstart and readme.
...
An equivalent for CMake was merged in aa99ce5a0d
Fixes #4254
PiperOrigin-RevId: 536759641
Change-Id: I8400064a24e0d78f17a0720046f505efa1167b4f
2 years ago
Shlomi Nissan
aa99ce5a0d
Add CXX_STANDARD_REQUIRED to CMake quickstart
2 years ago
Abseil Team
922e0b7d80
Update gMock Cookbook to reflect deprecation of testing::ByMove
...
PiperOrigin-RevId: 524868227
Change-Id: I702ede27570e3d3f06d534d6ccf8b39689105d07
2 years ago
Abseil Team
0cd05c6ea9
Update naming to "GoogleTest" in the GoogleTest Primer.
...
PiperOrigin-RevId: 520409541
Change-Id: I75a0b8615ece923137d4f5dcdb915f38e4c3b1b2
2 years ago
Abseil Team
e9fb5c7bac
Replace `const char*` with `absl::string_view` as the latter is preferred.
...
PiperOrigin-RevId: 519122695
Change-Id: I7dcf969d15d26ccc4b376e3ab6db7f4c08c7386f
2 years ago
Phoebe Liang
3288c4deae
Revise documentation to include AbslStringify
...
PiperOrigin-RevId: 518039451
Change-Id: Ife548d0f83266746ce1981bea31e70e6b43027c9
2 years ago
Abseil Team
555486f408
Rephrase the description of TEST_F() arguments for clarity.
...
PiperOrigin-RevId: 512937964
Change-Id: Ifa6369a80dc7d8efe60511417496d58317cfc28d
2 years ago
Abseil Team
95d8c7ac43
Reformat to current g3doc style guide. No content changes.
...
PiperOrigin-RevId: 512681427
Change-Id: I88b22d82430ed145b8342747adf300f3e734d43b
2 years ago
Abseil Team
d0ba3ccc76
Added a missing semicolon for GTEST_FLAG_SET code snippet.
...
PiperOrigin-RevId: 511858980
Change-Id: I0f9e6ffdeb8ae809d662eb3ff46eab5a109a8d93
2 years ago
Vũ Phạm
810fb81153
Fix typo
2 years ago