Commit 2364acb0 authored by Abseil Team's avatar Abseil Team Committed by vslashg
Browse files

Googletest export

  - 345231254 Rollback to 7338 by Abseil Team <absl-team@google.com>
  - 345106443 BEGIN_PUBLIC by Abseil Team <absl-team@google.com>
  - 344882646 BEGIN_PUBLIC by dmauro <dmauro@google.com>
  - 344054658 BEGIN_PUBLIC by Abseil Team <absl-team@google.com>

PiperOrigin-RevId: 345231254
parent b1fbd33c
...@@ -26,17 +26,19 @@ matrix: ...@@ -26,17 +26,19 @@ matrix:
- os: linux - os: linux
dist: bionic dist: bionic
compiler: gcc compiler: gcc
env: BUILD_TYPE=Debug VERBOSE=1 CXX_FLAGS="-std=c++11 -Wdeprecated" env: BUILD_TYPE=Debug CXX_FLAGS="-std=c++11 -Wdeprecated"
- os: linux - os: linux
dist: bionic dist: bionic
compiler: clang compiler: clang
env: BUILD_TYPE=Release VERBOSE=1 CXX_FLAGS="-std=c++11 -Wdeprecated" NO_EXCEPTION=ON NO_RTTI=ON COMPILER_IS_GNUCXX=ON env: BUILD_TYPE=Release CXX_FLAGS="-std=c++11 -Wdeprecated" NO_EXCEPTION=ON NO_RTTI=ON COMPILER_IS_GNUCXX=ON
- os: osx - os: osx
osx_image: xcode12.2
compiler: gcc compiler: gcc
env: BUILD_TYPE=Release VERBOSE=1 CXX_FLAGS="-std=c++11 -Wdeprecated" HOMEBREW_LOGS=~/homebrew-logs HOMEBREW_TEMP=~/homebrew-temp env: BUILD_TYPE=Release CC=gcc-10 CXX=g++-10 CXX_FLAGS="-std=c++11 -Wdeprecated" HOMEBREW_LOGS=~/homebrew-logs HOMEBREW_TEMP=~/homebrew-temp
- os: osx - os: osx
osx_image: xcode12.2
compiler: clang compiler: clang
env: BUILD_TYPE=Release VERBOSE=1 CXX_FLAGS="-std=c++11 -Wdeprecated" HOMEBREW_LOGS=~/homebrew-logs HOMEBREW_TEMP=~/homebrew-temp env: BUILD_TYPE=Release CXX_FLAGS="-std=c++11 -Wdeprecated" HOMEBREW_LOGS=~/homebrew-logs HOMEBREW_TEMP=~/homebrew-temp
# These are the install and build (script) phases for the most common entries in the matrix. They could be included # These are the install and build (script) phases for the most common entries in the matrix. They could be included
# in each entry in the matrix, but that is just repetitive. # in each entry in the matrix, but that is just repetitive.
...@@ -56,9 +58,7 @@ addons: ...@@ -56,9 +58,7 @@ addons:
update: true update: true
homebrew: homebrew:
packages: packages:
- ccache - gcc@10
- gcc@4.9
- llvm@4
update: true update: true
notifications: notifications:
......
...@@ -33,15 +33,9 @@ ...@@ -33,15 +33,9 @@
# This file should be sourced, and not executed as a standalone script. # This file should be sourced, and not executed as a standalone script.
# #
# TODO() - we can check if this is being sourced using $BASH_VERSION and $BASH_SOURCE[0] != ${0}. if [ "${TRAVIS_OS_NAME}" != "osx" ]; then
# echo "Not a macOS build; skipping"
exit 0
if [ "${TRAVIS_OS_NAME}" = "osx" ]; then
if [ "$CXX" = "clang++" ]; then
# $PATH needs to be adjusted because the llvm tap doesn't install the
# package to /usr/local/bin, etc, like the gcc tap does.
# See: https://github.com/Homebrew/legacy-homebrew/issues/29733
clang_version=3.9
export PATH="/usr/local/opt/llvm@${clang_version}/bin:$PATH";
fi
fi fi
# This file is currently intentionally empty.
...@@ -36,5 +36,4 @@ if [ "${TRAVIS_OS_NAME}" != "osx" ]; then ...@@ -36,5 +36,4 @@ if [ "${TRAVIS_OS_NAME}" != "osx" ]; then
exit 0 exit 0
fi fi
brew update # This file is currently intentionally empty.
brew install ccache gcc@4.9
...@@ -31,10 +31,6 @@ ...@@ -31,10 +31,6 @@
set -e set -e
# ccache on OS X needs installation first
# reset ccache statistics
ccache --zero-stats
echo PATH=${PATH} echo PATH=${PATH}
echo "Compiler configuration:" echo "Compiler configuration:"
......
...@@ -244,13 +244,7 @@ function(cxx_executable name dir libs) ...@@ -244,13 +244,7 @@ function(cxx_executable name dir libs)
endfunction() endfunction()
# Sets PYTHONINTERP_FOUND and PYTHON_EXECUTABLE. # Sets PYTHONINTERP_FOUND and PYTHON_EXECUTABLE.
if ("${CMAKE_VERSION}" VERSION_LESS "3.12.0") find_package(PythonInterp)
find_package(PythonInterp)
else()
find_package(Python COMPONENTS Interpreter)
set(PYTHONINTERP_FOUND ${Python_Interpreter_FOUND})
set(PYTHON_EXECUTABLE ${Python_EXECUTABLE})
endif()
# cxx_test_with_flags(name cxx_flags libs srcs...) # cxx_test_with_flags(name cxx_flags libs srcs...)
# #
......
...@@ -217,18 +217,6 @@ particular, using it in googletest comparison assertions (`EXPECT_EQ`, etc) will ...@@ -217,18 +217,6 @@ particular, using it in googletest comparison assertions (`EXPECT_EQ`, etc) will
generate an "undefined reference" linker error. The fact that "it used to work" generate an "undefined reference" linker error. The fact that "it used to work"
doesn't mean it's valid. It just means that you were lucky. :-) doesn't mean it's valid. It just means that you were lucky. :-)
If the declaration of the static data member is `constexpr` then it is
implicitly an `inline` definition, and a separate definition in `foo.cc` is not
needed:
```c++
// foo.h
class Foo {
...
static constexpr int kBar = 100; // Defines kBar, no need to do it in foo.cc.
};
```
## Can I derive a test fixture from another? ## Can I derive a test fixture from another?
Yes. Yes.
......
# Googletest Primer # Googletest Primer
<!-- GOOGLETEST_CM0036 DO NOT DELETE -->
<!-- GOOGLETEST_CM0035 DO NOT DELETE --> <!-- GOOGLETEST_CM0035 DO NOT DELETE -->
## Introduction: Why googletest? ## Introduction: Why googletest?
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment