"docs/gmock_for_dummies.md" did not exist on "de9675986f49becc83626820a6158686240ba30a"
  1. 18 Apr, 2019 5 commits
  2. 16 Apr, 2019 2 commits
    • Abseil Team's avatar
      Googletest export · 9f893b99
      Abseil Team authored
      [googletest] Fix death test condition.
      
      PiperOrigin-RevId: 243742424
      9f893b99
    • Abseil Team's avatar
      Googletest export · 6d668180
      Abseil Team authored
      Migrate ZX_WAIT_ASYNC_REPEATING to ZX_WAIT_ASYNC_ONCE
      
      ZX_WAIT_ASYNC_REPEATING is deprecated so convert code to use
      ZX_WAIT_ASYNC_ONCE instead.
      
      PiperOrigin-RevId: 243707147
      6d668180
  3. 12 Apr, 2019 2 commits
  4. 11 Apr, 2019 6 commits
  5. 09 Apr, 2019 2 commits
  6. 08 Apr, 2019 2 commits
  7. 07 Apr, 2019 1 commit
  8. 06 Apr, 2019 1 commit
    • Enji Cooper's avatar
      clang: fix `-Wsign-conversion` errors · 3829b84e
      Enji Cooper authored
      
      
      Cast some values as their unsigned equivalents or `size_t` to match the
      parameter type used for the template object under test. Also, provide
      UInt32 equivalent delegate methods for some callers (with
      int-equivalents for backwards compatibility).
      
      This closes #2146.
      Signed-off-by: default avatarEnji Cooper <yaneurabeya@gmail.com>
      3829b84e
  9. 05 Apr, 2019 2 commits
    • Gennadiy Civil's avatar
      Merge pull request #2148 from ngie-eign:clang-add-explicit-c++11-rtti-flag · 5ba69d5c
      Gennadiy Civil authored
      PiperOrigin-RevId: 242038269
      5ba69d5c
    • Abseil Team's avatar
      Googletest export · c061ffaf
      Abseil Team authored
      [fdio] Improve fdio_pipe_half signature, step 3.
      
      The return value on fdio_pipe_half conflated two things: the error code
      on failure (as a zx_status_t) or a file descriptor on success. This
      technically worked, because they're both ints, the error code was always
      negative, and the file descriptor always positive. However, the stated
      return type of zx_status_t was misleading. This changes the signature
      such that it always returns an actual zx_status_t, and the file
      descriptor is returned through a pointer argument.
      
      Also remove the last argument, since it was always given the same value.
      
      This needs to be done as a soft transition because it's called from the
      Dart runtime, from googletest, and from Crashpad, and Crashpad and
      Chromium both depend on googletest on Fuchsia. The steps are as follows:
      1) Add fdio_pipe_half2.
      2) Update Dart to use fdio_pipe_half2.
      3) Update googletest to use fdio_pipe_half2.
      4) Roll updated googletest into Chronium.
      5) Update Crashpad to use fdio_pipe_half2 and roll updated googletest into it.
      6) Update fdio_pipe_half to match fdio_pipe_half2.
      7) Update Dart to use fdio_pipe_half again.
      8) Update googletest to use fdio_pipe_half again.
      9) Roll updated googletest into Chronium.
      10) Update Crashpad to use fdio_pipe_half again and roll updated googletest into it.
      11) Remove fdio_pipe_half2.
      
      This is step 3.
      
      PiperOrigin-RevId: 241957137
      c061ffaf
  10. 04 Apr, 2019 1 commit
    • Enji Cooper's avatar
      clang: explicitly enable/disable RTTI support with the compiler · 7475ba50
      Enji Cooper authored
      
      
      Add `-frtti` to the compiler with the base flags case so that RTTI is
      enabled by default with clang. Add its inverse analog,
      `cxx_no_rtti_flags` in order to test the case with RTTI off, similar to
      gcc.
      
      This reduces the amount of testing/support overhead needed in the
      non-RTTI case with clang, as the tests currently fail when these two
      features are off with version 1.8.1. This something I used in when
      investigating test failures on FreeBSD, as the tests that rely on
      RTTI were failing with googletest 1.8.1 on the OS platform.
      
      More investigation is being done to determine how this should be fixed
      on FreeBSD 11.2-RELEASE with ports, as the package doesn't currently
      compile the tests, and when enabled (based on my WIP diff), the tests
      fail in similar ways.
      Signed-off-by: default avatarEnji Cooper <yaneurabeya@gmail.com>
      7475ba50
  11. 03 Apr, 2019 2 commits
  12. 01 Apr, 2019 3 commits
    • Abseil Team's avatar
      Googletest export · b617b277
      Abseil Team authored
      Add HWASan annotations.
      
      These mirror existing ASan annotations.
      
      HWASan uses memory (address) tagging to detect memory errors:
      https://clang.llvm.org/docs/HardwareAssistedAddressSanitizerDesign.html
      
      It inserts a random tag in the MSB of heap and stack allocation addresses. This tag dominates pointer comparison in StackGrowsDown(), making the result non-deterministic, and entirely unrelated to the actual stack growth direction. The function attribute disables this behavior.
      
      The annotations in gtest-printers are there because the printers are used to basically dump memory. The sanitizers may have ideas why this memory should not be accessed, and that is counter productive. In particular, the test may access only part of an array, but in case of a test failure gtest will dump the entire array which may contain uninitialized bytes - that's what SANITIZE_MEMORY annotation is for. There are similar reasons for ADDRESS and THREAD annotations. HWADDRESS in its current implementation can not cause issues there, I believe, but it falls under the same umbrella of tools whose checking should not apply to test printers because it is not the code under test.
      
      PiperOrigin-RevId: 241379822
      b617b277
    • Gennadiy Civil's avatar
      2efd659a
    • Abseil Team's avatar
      Googletest export · d9825431
      Abseil Team authored
      Remove support for "global" ::string and ::wstring types.
      This support existed for legacy codebases that existed from before namespaces
      where a thing. It is no longer necessary.
      
      PiperOrigin-RevId: 241335738
      d9825431
  13. 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
  14. 29 Mar, 2019 1 commit
    • Enji Cooper's avatar
      Prefix googletest binaries under its own subtree instead of `gtest` · 9b6de41b
      Enji Cooper authored
      Building all test binaries under their respective subtrees makes
      building the project via cmake easier to grok without additional hacks.
      In particular, when dealing with the conversion I proposed in
      https://reviews.freebsd.org/D19430
      
       (switching from autotools to cmake),
      I ran into unexpected gtest prefixing under the googlemock directory, as
      opposed to the googletest directory. Example:
      
      Before: `googlemock/gtest/googletest-break-on-failure-unittest_`
      After:  `googletest/googletest-break-on-failure-unittest_`
      
      The latter form is easier to translate to packaging manifests when
      building googlemock is disabled, as well as enabled, as the path remains
      consistent when the feature flag is disabled.
      Signed-off-by: default avatarEnji Cooper <yaneurabeya@gmail.com>
      9b6de41b
  15. 28 Mar, 2019 3 commits
  16. 26 Mar, 2019 2 commits
  17. 21 Mar, 2019 4 commits