1. 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
  2. 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
  3. 28 Mar, 2019 3 commits
  4. 26 Mar, 2019 2 commits
  5. 21 Mar, 2019 6 commits
  6. 20 Mar, 2019 1 commit
  7. 19 Mar, 2019 1 commit
  8. 15 Mar, 2019 1 commit
  9. 05 Mar, 2019 3 commits
    • Gennadiy Civil's avatar
      Merge pull request #2158 from CarloWood:master · 8b6d3f9c
      Gennadiy Civil authored
      PiperOrigin-RevId: 236716851
      8b6d3f9c
    • Abseil Team's avatar
      Googletest export · 3dd2e841
      Abseil Team authored
      Fix emission of -Wzero-as-null-pointer-constant when comparing integers.
      
      The following code fails to compile:
      
      #pragma clang diagnostic error "-Wzero-as-null-pointer-constant"
      void foo() {
        EXPECT_EQ(0, 0);
      }
      
      This happens because gtest checks the first argument to EXPECT_EQ and
      ASSERT_EQ is a null pointer constant. The magic it does to do this causes the
      warning to be emitted.
      
      This patch removes that check. It replaces the explicit check with a Compare
      overload that can only be selected when 0 or nullptr is passed on the LHS
      with a pointer on the right.
      
      This patch does not suppress -Wzero-as-null-pointer-constant when users
      are actually using it as NULL.
      
      PiperOrigin-RevId: 236654634
      3dd2e841
    • Abseil Team's avatar
      Googletest export · a1dd0778
      Abseil Team authored
      Build gmock cleanly with clang -Wextra-semi and -Wextra-semi-stmt
      
      Extends 56ef07a2 to take -Wc++98-compat-extra-semi
      (https://reviews.llvm.org/D43162) and -Wextra-semi-stmt
      (https://reviews.llvm.org/D52695) into account.
      
      For https://crbug.com/926235.
      
      PiperOrigin-RevId: 236643095
      a1dd0778
  10. 01 Mar, 2019 3 commits
    • Abseil Team's avatar
      Googletest export · db9b85e2
      Abseil Team authored
      Let embedders customize GTEST_INTERNAL_DEPRECATED().
      
      GTEST_INTERNAL_DEPRECATED is currently used to nudge googletest users to migrate off old TEST_CASE macros to the new TEST_SUITE macros. This move is non-trivial for Chromium (see https://crbug.com/925652), and might be difficult for other big projects with many dependencies.
      
      This CL facilitates moving off of deprecated APIs by making it possible for an embedder to define GTEST_INTERNAL_DEPRECATED() in gtest/internal/custom/gtest-port.h. Example usage:
      
      1) #define GTEST_INTERNAL_DEPRECATED() to nothing, to disable deprecation warnings while migrating off googletest's deprecated APIs. This can be preferable to having to disable all deprecation warnings (-Wno-error=deprecated or -Wno-deprecated-declarations).
      
      2) #define GTEST_INTERNAL_DEPRECATED() for an unsupported compiler.
      
      PiperOrigin-RevId: 236171043
      db9b85e2
    • Abseil Team's avatar
      Googletest export · 56ef07a2
      Abseil Team authored
      Build gmock cleanly with clang -Wextra-semi
      
      For https://crbug.com/926235.
      From https://github.com/google/googletest/pull/2139.
      Fixes https://github.com/google/googletest/issues/2138.
      
      PiperOrigin-RevId: 235832527
      56ef07a2
    • Carlo Wood's avatar
      Minor build system fixes. · fc979623
      Carlo Wood authored
      fc979623
  11. 25 Feb, 2019 3 commits
  12. 22 Feb, 2019 2 commits
  13. 21 Feb, 2019 2 commits
  14. 20 Feb, 2019 6 commits
  15. 19 Feb, 2019 2 commits
  16. 13 Feb, 2019 1 commit