1. 22 Mar, 2021 1 commit
    • Abseil Team's avatar
      Googletest export · 1a8ecf18
      Abseil Team authored
      Print std::u8string, std::u16string, and std::u32string as string literals
      
      Previously, these types were printed as "{ U+123, U+456, U+789 }". However,
      printed output in that form is difficult to compare against any literals that
      might be defined in code. Instead, just treat these types like std::string
      and std::wstring, escaping non-ASCII characters with a hexadecimal escape
      sequence.
      
      The tests have also been updated to cover the new functionality: as a bonus,
      the tests now also pass with the MSVC toolchain.
      
      Internally, the code has been reorganized to primarily operate in terms of
      char32_t, under the assumption that char32_t will always be at least as big
      as wchar_t. While that assumption is currently true, perhaps it won't be in
      the future...
      
      PiperOrigin-RevId: 364033132
      1a8ecf18
  2. 18 Feb, 2021 1 commit
    • Abseil Team's avatar
      Googletest export · daa0df7b
      Abseil Team authored
      Explicitly skip tests after fatal global environment setup errors
      
      Previously the tests were all skipped, but the resulting output claimed all
      tests passed.
      
      Before:
      ```
      [----------] Global test environment set-up.
      <failure message>
      [----------] Global test environment tear-down
      [==========] 1 test from 1 test suite ran. (83 ms total)
      [  PASSED  ] 1 test.
      [  FAILED  ] 0 tests, listed below:
      ```
      
      After:
      ```
      [==========] Running 1 test from 1 test suite.
      [----------] Global test environment set-up.
      <failure message>
      [----------] 1 test from SomeTest
      [ RUN      ] SomeTest.DoesFoo
      <...>: Skipped
      [  SKIPPED ] SomeTest.DoesFoo (0 ms)
      [----------] 1 test from SomeTest (0 ms total)
      
      [----------] Global test environment tear-down
      [==========] 1 test from 1 test suite ran. (68 ms total)
      [  PASSED  ] 0 tests.
      [  SKIPPED ] 1 test, listed below:
      [  SKIPPED ] SomeTest.DoesFoo
      [  FAILED  ] 0 tests, listed below:
      ```
      
      PiperOrigin-RevId: 358026389
      daa0df7b
  3. 22 Dec, 2020 1 commit
  4. 10 Dec, 2020 1 commit
    • dmauro's avatar
      Googletest export · fb4b3b6b
      dmauro authored
      Fix a missing Bazel build dependency
      
      PiperOrigin-RevId: 346783462
      fb4b3b6b
  5. 24 Mar, 2020 1 commit
    • Abseil Team's avatar
      Googletest export · 1ced315a
      Abseil Team authored
      Add --gtest_fail_fast support to googletest.
      
        - Analogous functionality to to golang -test.failfast and python --failfast
        - Stops test execution upon first test failure.
        - Also add support Bazel equivalent env var (TESTBRIDGE_TEST_RUNNER_FAIL_FAST)
      
      PiperOrigin-RevId: 302488880
      1ced315a
  6. 17 Mar, 2020 1 commit
  7. 07 Feb, 2020 1 commit
  8. 06 Dec, 2019 1 commit
    • Abseil Team's avatar
      Googletest export · 9ed99c6c
      Abseil Team authored
      Change googletest to notice failures during SetUpTestSuite() and TearDownTestSuite().
      
      Previously, errors that occurred during those functions were logged but otherwise ignored. After this change, such failures will cause the test to fail and a brief summary will be printed at the bottom of the test log.
      
      See https://github.com/google/googletest/issues/2330.
      
      PiperOrigin-RevId: 284033342
      9ed99c6c
  9. 17 Oct, 2019 1 commit
    • Alexey Spiridonov's avatar
      [googletest] Output skip message · cbf019de
      Alexey Spiridonov authored
      Closes #2208
      
      Previously, skip messages were invisible, so debugging skips was hard.
      
      Now we have this:
      
      ```
      $ ./googletest/gtest_skip_test
      Running main() from /home/lesha/github/snarkmaster/googletest/googletest/src/gtest_main.cc
      [==========] Running 3 tests from 2 test suites.
      [----------] Global test environment set-up.
      [----------] 1 test from SkipTest
      [ RUN      ] SkipTest.DoesSkip
      /home/lesha/github/snarkmaster/googletest/googletest/test/gtest_skip_test.cc:38: Skipped
      skipping single test
      [  SKIPPED ] SkipTest.DoesSkip (0 ms)
      [----------] 1 test from SkipTest (1 ms total)
      ...
      ```
      cbf019de
  10. 07 Aug, 2019 1 commit
  11. 30 Mar, 2019 1 commit
    • Enji Cooper's avatar
      Handle GTEST_SKIP() when calling `Environment::SetUp()` · 67c75ff8
      Enji Cooper authored
      
      
      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: default avatarEnji Cooper <yaneurabeya@gmail.com>
      67c75ff8
  12. 17 Dec, 2018 1 commit
  13. 07 Nov, 2018 1 commit
    • krzysio's avatar
      Googletest export · 105579a6
      krzysio authored
      Improve Bazel build files.
      
      New target gtest_prod allows access to the FRIEND_TEST macro without depending on the entirety of GTest in production executables. Additionally, duplicate config_setting rules were removed and formatting was adjusted.
      
      PiperOrigin-RevId: 220279205
      105579a6
  14. 11 Oct, 2018 2 commits
  15. 09 Oct, 2018 1 commit
  16. 02 Aug, 2018 3 commits
    • Gennadiy Civil's avatar
      · b929d557
      Gennadiy Civil authored
      cmake fixes
      b929d557
    • Gennadiy Civil's avatar
      · 94f2c6fa
      Gennadiy Civil authored
      fixes tests
      94f2c6fa
    • Gennadiy Civil's avatar
      · f3511bf1
      Gennadiy Civil authored
      cleaning up and adding test changes to CMake
      f3511bf1
  17. 01 Aug, 2018 12 commits
  18. 10 Jul, 2018 1 commit
    • Derek Mauro's avatar
      Adds stacktrace support from Abseil to Google Test · 4c417877
      Derek Mauro authored
      This change adds the ability to generate stacktraces in Google Test on
      both failures of assertions/expectations and on crashes. The
      stacktrace support is conditionally available only when using Abseil
      with Google Test.
      
      To use this support, run the test under Bazel with a command like this:
      
      bazel test --define absl=1 --test_env=GTEST_INSTALL_FAILURE_SIGNAL_HANDLER=1 //path/to/your:test
      
      The "--define absl=1" part enables stacktraces on assertion/expectation
      failures.
      
      The "--test_env=GTEST_INSTALL_FAILURE_SIGNAL_HANDLER=1" part enables
      the signal handler that logs a stacktrace in the event of a crash
      (this also requires the "--define absl=1" part). This is not the
      default since it may interfere with existing tests.
      4c417877
  19. 14 Jun, 2018 1 commit
    • Rohan Joyce's avatar
      Eliminate GTEST_TEST_FILTER_ENV_VAR_. · 0563b52d
      Rohan Joyce authored
      GTEST_TEST_FILTER_ENV_VAR_ was used to specify an environment variable to obtain
      the default test filter from. By default it was unset which broke
      "--test_filter" for bazel. This CL eliminates GTEST_TEST_FILTER_ENV_VAR_ and
      explicitly obtains the default test filter from the environment variable
      TESTBRIDGE_TEST_ONLY if it exists.
      0563b52d
  20. 22 Feb, 2018 1 commit
  21. 08 Feb, 2018 1 commit
  22. 18 Jan, 2018 1 commit
    • Gennadiy Civil's avatar
      · b1623e91
      Gennadiy Civil authored
      Adding python tests to Bazel build file. 
      b1623e91
  23. 09 Jan, 2018 1 commit
  24. 10 Aug, 2017 3 commits