101 Commits

Author SHA1 Message Date
Enji Cooper
7e94c663ca Handle GTEST_SKIP() when calling Environment::SetUp()
gtest prior to this change would completely ignore `GTEST_SKIP()` if
called in `Environment::SetUp()`, instead of bailing out early, unlike
`Test::SetUp()`, which would cause the tests themselves to be skipped.
The only way (prior to this change) to skip the tests would be to
trigger a fatal error via `GTEST_FAIL()`.

Desirable behavior, in this case, when dealing with
`Environment::SetUp()` is to check for prerequisites on a system
(example, kernel supports a particular featureset, e.g., capsicum), and
skip the tests. The alternatives prior to this change would be
undesirable:

- Failing sends the wrong message to the test user, as the result of the
  tests is indeterminate, not failed.
- Having to add per-test class abstractions that override `SetUp()` to
  test for the capsicum feature set, then skip all of the tests in their
  respective SetUp fixtures, would be a lot of human and computational
  work; checking for the feature would need to be done for all of the
  tests, instead of once for all of the tests.

For those reasons, making `Environment::SetUp()` handle `GTEST_SKIP()`,
by not executing the testcases, is the most desirable solution.

In order to properly diagnose what happened when running the tests if
they are skipped, print out the diagnostics in an ad hoc manner.

Update the documentation to note this change and integrate a new test,
gtest_skip_in_environment_setup_test, into the test suite.

This change addresses #2189.

Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>
2019-03-30 11:38:03 -07:00
Gennadiy Civil
a8a90c741e Update googletest/docs/advanced.md
Co-Authored-By: antismap <michael.thenault@gmail.com>
2019-03-21 16:20:07 +01:00
antismap
c79579183d Note about INSTANTIATE_TEST_SUITE_P / INSTANTIATE_TEST_CASE_P keyword change
See https://github.com/google/googletest/issues/2065
2019-03-21 14:38:50 +01:00
Ryan Sinnet
42626f0be7 Fix grammatical error in primer.md 2019-02-25 08:03:28 -08:00
Keiichi Watanabe
f87f054960 Fix an invalid example of JSON report in advanced.md
This is just a mistake in the document. Google Test doesn't output
such an invalid JSON report.

Signed-off-by: Keiichi Watanabe <keiichiw@chromium.org>
2019-02-05 21:05:16 +09:00
Gennadiy Civil
9ece74a3f5 Repeat #2090
Testing
2019-01-30 14:44:27 -05:00
Gennadiy Civil
03b6431044 Update docs, TestCase->TestSuite 2019-01-03 17:18:03 -05:00
Gennadiy Civil
f09a820014 Update advanced.md
Fixes #1802
2018-10-23 17:27:38 -04:00
Gennadiy Civil
29a9246fae Update primer.md
fixes #1709
2018-10-05 16:23:08 -04:00
Arkady Shapkin
e7668ee9d7 Fix doc links 2018-09-04 23:07:18 +03:00
Gennadiy Civil
c95d015c7e Merge pull request #1803 from KindDragon/patch-2
Update documentation to syntax highlight code
2018-09-04 10:56:49 -04:00
Andrew Siplas
538e11c9b3 Fix #1805: add .md to hyperlink 2018-09-03 22:13:52 -04:00
Arkady Shapkin
33ca9f1dec Update documentation to syntax highlight code 2018-09-03 21:56:23 +03:00
Steven Santos Erenst
227d903b11 Fix broken FAQ link in primer.md
The current link pointed to a non existing section in the FAQ.
2018-08-28 21:03:19 -07:00
Vadim Kotov
4e5dc133a1 docs: fix more broken links to sections in Advanced guide 2018-08-20 16:20:14 +03:00
Vadim Kotov
4cc709baf5 docs: fixed broken references to sections in Advanced guide 2018-08-20 15:31:55 +03:00
Vadim Berezniker
9b39018356 std references shouldn't be fully qualified 2018-08-17 10:49:10 -07:00
Yi Zheng
7c8c23717e - Fix the broken markdown table
- Fix some format issue
2018-08-13 17:57:51 +08:00
Wiktor Garbacz
52d39c2417 docs: fix broken links 2018-08-09 13:14:36 +02:00
Piotr Kąkol
65e7d50e3e Updated broken and outdated URLs 2018-07-25 19:19:26 +02:00
Stian Valle
fcd6742ad3 Update primer.md 2018-07-21 15:50:45 +02:00
Stian Valle
b3acd3671f Update primer.md 2018-07-21 15:40:57 +02:00
Stian Valle
faa7d62f6d Update primer.md 2018-07-21 15:29:58 +02:00
Gennadiy Civil
6d6695fd8d Merge pull request #1667 from hckr/patch-1
Fix broken links to FAQ in primer.md
2018-07-18 10:21:46 -04:00
Gennadiy Civil
b4f8d06ba6 Docs sync 2018-07-17 17:47:25 -04:00
Jakub Młokosiewicz
3234ab691f Fix broken links to FAQ in primer.md 2018-07-17 00:49:31 +02:00
Gennadiy Civil
22d4a833e2 more formatting [skip ci] 2018-07-11 09:42:48 -04:00
Gennadiy Civil
3d486d0cda formatting, [ci skip] 2018-07-11 09:38:47 -04:00
Gennadiy Civil
43cd1434dc Fix heading
[skip ci]
2018-07-10 17:30:28 -04:00
Gennadiy Civil
f7d4c77b60 Docs sync
[ci skip]
2018-07-10 17:16:03 -04:00
Gennadiy Civil
a428939bae Docs sync/internal 2018-06-13 14:29:26 -04:00
Gennadiy Civil
4d7ac91e07 Doc sync/internal 2018-06-13 14:26:24 -04:00
Gennadiy Civil
b9d9de0877 Removed "Documentation.md" not adding value and not consitent with internal docs 2018-06-11 12:07:45 -04:00
Gennadiy Civil
635a404214 Rename Samples.md to samples.md and adjust the links 2018-06-11 11:54:27 -04:00
Gennadiy Civil
613825ad93 Rename FAQ.md to faq.md and adjust the links.
Part of documentation rationalization
2018-06-11 11:49:02 -04:00
Gennadiy Civil
e76e9b4789 Rename AdvancedGuide.md to advanced.md and adjust the links.
Part of documentation rationalization work
2018-06-11 11:40:35 -04:00
Gennadiy Civil
79abc0695c Rename "Primer.md" to "primer.md" and adjust links. Part of the documentaion rationalzation 2018-06-11 11:26:16 -04:00
Petr Hosek
e95050f496 Support JSON output format in addition to XML
This change allows emitting output in JSON format in addition to the
already supported XML format. The implementation as well as the file
structure is intentionally modelled after the XML one.
2018-02-28 00:48:41 -08:00
Aleksey Kozin
3357dad60d TEST() arguments are invalid in an example
Both names must be valid C++ identifiers, and they should not contain underscore (`_`)
2018-02-23 01:34:26 +03:00
Gennadiy Civil
c6e347c75f Merge branch 'master' into assert 2018-02-09 11:42:05 -05:00
Troy Holsapple
a2866dfdf5 Fixed typos 2018-02-07 22:06:00 -08:00
Alexey Sokolov
d20708cf0b Add ability to throw from ASSERT
while not losing benefits of EXPECT, and not killing the whole test,
as with --gtest_throw_on_failure.

183822976
2018-02-08 01:15:42 +00:00
LI Daobing
38205c4554 Update Documentation.md 2018-01-26 15:36:57 +08:00
Gennadiy Civil
6da2cd7c70 upstream cl 182543808 2018-01-24 13:04:36 -05:00
Fedor Trushkin
60922662fe Use fully qualified in examples 2018-01-18 10:38:25 +01:00
Fedor Trushkin
920639122c Document ScopedTrace utility 2018-01-18 10:34:05 +01:00
Carlos O'Ryan
3c218ff29c Refactor docs about contributions to CONTRIBUTING.md.
Per the review comments.
2017-12-11 19:33:27 -05:00
Herbert Thielen
beabbc7da6 remove markdown stars (bold) from code examples 2017-10-29 17:12:00 +01:00
Jonathan Wakely
c61e22b1fe Use gender-neutral pronouns in comments and docs 2017-09-27 13:31:13 +01:00
Gennadiy Civil
219f518967 Merge pull request #1241 from aninf-wo/hethi/issue-635-old-links
change links from former code.google.com to current github repository
2017-08-31 18:28:19 -04:00