Commit 6641afb6 authored by Google Test Upstream's avatar Google Test Upstream Committed by Atkins, Charles Vernon
Browse files

GoogleTest 2018-03-19 (dccc2d67)

Code extracted from:

    https://github.com/google/googletest.git

at commit dccc2d67547a5a3a97e4f211f39df931c6fbd5d5 (master).

Upstream Shortlog
-----------------

Aleksey Kozin (1):
      06568301 TEST() arguments are invalid in an example

Alex Converse (1):
      deb99a9d Use wider types to prevent unsigned overflow diagnostics

Alex Yursha (1):
      4f68ab5b Fix ellipsis position in examples

Alexander Münch (1):
      62b167e4 Fix: Markdown in V1_7_Primer.md

Alexey Klimkin (1):
      3ec00523 Fix a typo

Alexey Sokolov (2):
      c9cf07a8 Make the failure messages from EXPECT_EQ and friends actually symmetric,
      092d0885 Add ability to throw from ASSERT

Alyssa Wilk (3):
      6e1970e2 Adding a flag option to change the default mock type
      a2803bc3 Handling invalid flag values
      fa5d3b38 Applying lint checks from upstream google3

Anders Sundman (asum) (1):
      11e1dd25 Removed trailing comma in enum

Arkadiy Shapkin (3):
      5dde668e AppVeyor MinGW-w64 test build
      77380cdd Enable C++11 features for VS2015 and VS2017
      2641b021 Fix tests with VS2015 and VS2017

Arkady Shapkin (6):
      1cff1460 Add links to IRC channel and Google Group
      88269cd3 Support x64 configuration for old VS2010 projects
      45287f3d Remove gtest VS2005 projects
      cb8ebf5c Support x64 configuration for old VS2015 projects
      840c711e Fix gmock tests when std::unary_function unavailable
      b153bfd8 Enable CI for VS2017

Benjamin Kircher (1):
      d4af64ca Remove redundant declaration

Bernhard Bauer (3):
      e7c9e80e Allow macros inside of parametrized test names.
      86e5f008 Add a non-parametrized test.
      7b70413e Allow macros inside of parametrized test names.

Brian Silverman (1):
      4d26df72 Speed up printing of characters which need hex escaping

Bryan Zimmerman (4):
      1ae4096b fix for VS2017 deprecation of ::tr1::tuple change static_cast to ImplicitCast_ for consitency fixes for building with path names containing spaces
      a7269e24 replaced back accidently removed static_cast with consistent ImplicitCast_
      3ea06317 remove implicit casts
      74a53063 remove extra line

Carlos O'Ryan (20):
      280b2270 Fix table formatting.
      1dde1eed Fix typos too s/destoyed/destroyed/
      f20797bd Same fixes for "current" version.
      2fcbc0c1 Remove silly claim that C++ lacks lambdas.
      0ffd8629 More tables that did not render correctly.
      aea8580e Run autoconf from top-level directory.
      4aa05bd4 Only switch to g++-4.9 on Linux.
      cf3adad5 Add licenses() directive for googlemock/tests.
      e22d344c Add Apache-2.0 LICENSE file.
      bc3320b7 Implement bazel-based builds in Travis.
      11841175 Wrong LICENSE file, sorry.  Corrected. [skip ci]
      c82cd5e4 Also add documentation around becoming a contributor.
      23a014ab Refactor docs about contributions to CONTRIBUTING.md.
      75b85d53 Create a autotools-based build for Travis.
      ec2b0c39 Build both googletest and googlemock.
      9cee677c Optimize build matrix (#1)
      d3acb4ba Fixed output and test for 'enabled_on_pr'
      adfdc65c Fixed test for pull request.
      67d6e467 Use correct name for build event types.
      3431b699 Add options to parallelize builds.

Che-Hsun Liu (1):
      509f7fe8 Update googletest README.md

Chris-Sharpe (1):
      19cace28 Colouring in help text

Christophe Vidal (1):
      623616a5 Fixed typo

Claus Stovgaard (1):
      68f19fac Moved the ignoring of *.pyc files to top level for also covering googlemock python scripts.

Dariusz Ostolski (1):
      ecb1c3dd #1282: Doc typo fix

David Benjamin (5):
      ca6a70c6 Pass MSVC's C4826 warning.
      bcd35523 Avoid warning C4619 in MSVC 2017.
      90244a6a Fix testing::Combine on MSVC 2017.
      b3d9be5c Pass the -Wmissing-declarations warning.
      1acf8c75 Also define GTEST_ATTRIBUTE_PRINTF_ in clang-cl.

David Neto (1):
      20074be1 Use DEBUG_POSTFIX instead of CMAKE_DEBUG_POSTFIX

David Seifert (2):
      8604c4ad Add support for pkgconfig
      9cacce4e Add documentation for pkg-config

Dawid Kurek (1):
      51d92b2c Replace html entities with their equivalents

Edgar Riba (1):
      21ccd610 update README.md with tiny-dnn

Eduardo Caceres (1):
      854b28f1 Minor style fixes

Eduardo Cáceres (1):
      67fcf007 Punctuation

Fedor Trushkin (3):
      9c82e774 Expose ScopedTrace utility in public interface
      354fc8d8 Document ScopedTrace utility
      8e862211 Use fully qualified  in examples

Gallaecio (1):
      194e3c81 Fix WhenSorted() documentation example

Gasprd Petit (1):
      f6dde80e Removed flush scopes around GTEST_LOG(FATAL) and exit call since FATAL is expected to abort()

Gennadiy Civil (102):
      4e284ee6 Update WORKSPACE
      1fe692ce Update README.md
      026735da Proposing these changes, please review
      3cf65b5d Added "explicit" as per compiler suggestion
      c4e01616 removed internal link ( not allowed in OSS)
      fa70b84a Removed "Trivial"
      d30a37e7 Revert "Allow macros inside of parametrized test names."
      dfed97a6 Workaround for Travis issue https://github.com/travis-ci/travis-ci/issues/8552
      34aaf58c Revert "Workaround for Travis issue https://github.com/travis-ci/travis-ci/is…"
      54c2648b Workaround for Travis issue https://goo.gl/d5eV8o
      8a48f0ed Update gtest-param-test.h.pump
      a7fceb4a Update gtest-param-test.h.pump
      1c09831a upstreaming cl 124976692
      19b5774c code cleanup in preparation for merges, cl 180857299
      67476c14 Revert one file for now
      91ba05cc Small cleanups, merge
      258fd6e1 cleanup, merge
      9fce984a wip, cleanups/merge
      5eecadf6 Revert one file
      2ad5661d Upstream of cl 129104714
      d237297c code merge, cleanups
      6eccdb7b Update .travis.yml
      f33902b9 revert googletest/test/gtest-param-test_test.cc
      d630a8bd code merges, cleanup
      62dbaa29 revert
      6a26e47c Code merge, upstreaming accumulated changes, cleanup
      481fe944 More merge, cleanup
      1d757db6 More merge, cleanup
      6914ae23 Upstream cl 103120214
      2982dc1a Trying to fix travis
      29f94e01 Update .travis.yml
      cfd29e04 Update .travis.yml
      73d1251f Update .travis.yml
      ed8d02cf Update .travis.yml
      93b77987 continue upstream/merge, etc
      da1f7fe1 Code merging
      d629744e More code merges
      5f4ce9d8 Test files for corresponding changes
      f45c22c4 Test files for corresponding changes
      6befe422 Test files for corresponding changes
      304be8f0 Test files for corresponding changes
      b9e29783 Reverting some changes, need to make the merge compile
      6d04de74 Reverting some changes, need to make the merge compile
      9195571c Reverting some changes, need to make the merge compile
      08b323f7 Reverting some changes, need to make the merge compile
      b1623e91 Adding python tests to Bazel build file.
      8d707dfe code merge
      a0435a54 merging
      9bc86661 more merging
      f1c87ad9 merges, cl/155419551 and other
      bbb17ad0 more code merge
      6723b6c5 Merging, upstream http://cl/182836545
      80defcec Many code merge/upstream changes
      06c3cce8 revert, lets get this compiled
      e29805aa upstream cl 182543808
      b9651c04 placating gcc and its overzeauls size comparison warnings
      7cced896 Remove Visual Studio 10,11,12 from build matrix
      b3a2048b Update README.md
      fbb48a77 Code merges
      6c0c3896 Adding tests to googlemock bazel
      2a468302 Ability to optionally depend on Abseil plus upstream of 183716547
      e55fded0 Code merges
      e6ec8bc5 Merges and also adding new bazel build mode
      a3c73ed2 Include MSVC14 on PRs as well
      ec7faa94 merges
      49fc378e merges
      575c0812 merging
      d84f58ab Merging, coniniue
      225e6741 moving JoinAsTuple to internal
      9e072812 merges
      e76f4ee9 clang warning https://travis-ci.org/google/googletest/jobs/340978022
      a66d2090 clang warning 'https://travis-ci.org/google/googletest/jobs/340987201'
      2a23ca00 https://travis-ci.org/google/googletest/jobs/340995238
      d7c966c4 clang warnings
      3b1fe3ec clang warnings
      30d276da cxxx11
      ab186a8c merges
      06972419 merging, cleaning up
      09581b38 cleanup/merges
      a3e322b2 cleanup, merges
      df656324 merges
      b7e0294c merging unitests
      3299a238 merging unittests - 2
      29e9ca87 merging unitests, check
      004f6a00 merging unitests - check 4
      4dbb4371 merging unittests - 5
      2bd1750b gmock merging -2
      0d5e01ad Merges-1
      dbf63e38 merges-2
      83859284 merges-3
      086825de merges-6
      995a9dfa merges-7
      89d6f70f merges-8
      e8919006 Merging, XML tests
      cf9d6344 merges-port(1)
      af463c43 More merges, removing old dead code
      a719320a fixing, was removing too much
      2814b4b0 merging, merging
      262aaf2f erging, cont
      a178cc7e merge, again, IsRecursiveContainer
      080fcbe0 cl 189032107
      a3c2e107 cl 189032107, again

Gregory Pakosz (1):
      7990f566 Re-enable MSVC++ C4389 warning in CmdHelperEq()

Hector Dearman (2):
      24054ff0 Fixed misspelling in assertion message.
      41ad243d Fix typo in gmock-actions.h

Henry Schreiner (1):
      5518a1d3 Adding CMake visibility policy setting

Herbert Thielen (44):
      f6ac9a30 remove obsolete reference to SVN trunk
      b3908406 remove doc of former versions
      58b42274 remove obsolete reference to SVN trunk and fix link to pump manual
      6b896774 remove doc of former versions
      ec19d455 fix links to Google C++ Style Guide
      212f4d79 fix small typo in comment
      0f702ceb add note about different definitions of Test Case
      33edcaed be more specific on Test Case
      c09e9e64 clarify distinction regarding Test Case
      dc7214f2 say "former version" instead of "released version"
      daaed2b6 fix typo in comment and string (SetUpTestCase)
      b567aadd remove unused TestCase import
      fe760e9c fix typo: xUnit
      83647185 remove non-existing gmock_build_samples switch
      4a451575 switch on verbose make
      d33861dc run combined build only
      29c07aa9 remove Yob's comma mentioned in issue #1105
      bb8399e1 use plural verb as mentioned in issue #1105
      cc246ecb use build type set in .travis.yml
      dae044d4 use upper-case build type
      f0c72bfe fix SetUp/TearDownTestCase() in AdvancedGuide
      7529c8aa remove obsolete comment regarding python tests on linux
      73d58dd4 ask cmake for per-configuration output subdir
      47ad2993 Revert "ask cmake for per-configuration output subdir"
      9ba7946b create different python based tests for single and multi configuration build generators
      14cf7f57 fix example's comment
      e033d8c7 change links from former code.google.com to current github repository
      d15b8b45 switch one build to Release mode
      520ad96b treat all warnings as errors for GCC (-Werror)
      8abacca5 avoid -Wshadow warning on GCC
      55fd999a avoid warning about unused variable
      48b06628 cache ccache
      d96a038e set MAKEFLAGS to use multiple processors on Travis CI
      98f2f152 install ccache on travis osx build slave
      fe97312e limit processors to use in Travis build to 4
      aa0b5458 remove GTEST_HAS_PARAM_TESTS
      e8c6942a remove obsolete link_directories command
      83d8dd0e call clang via ccache on Linux
      56f8222a show ccache statistics in log
      dd8e4a63 reset ccache statistics at install
      beca85ff drop unused valgrind package from installation
      be94bf50 remove unused variables from travis environment
      6c0146fd use GTEST_ATTRIBUTE_UNUSED_ instead of dummy function
      8866af03 remove markdown stars (bold) from code examples

Joe Alam (1):
      4597ec58 Updated README with information about C runtime dynamic/static linking issues in Windows

Joel Laity (1):
      568958e9 Fixed cmake policy issue

Jonathan Wakely (1):
      b70cf1a6 Use gender-neutral pronouns in comments and docs

Jose Nino (2):
      38ec2a1d docs: fix broken link from dummies guide to cook book
      5c279131 docs: fix broken link

Jérémie Delaitre (1):
      96977463 Fix the link to the float comparison article

Kamil Rytarowski (1):
      fac0dfbe Add NetBSD support

LI Daobing (1):
      efd49c2d Update Documentation.md

Li Peng (1):
      266a185a remove duplicated words

Loo Rong Jie (1):
      cbd15d41 [Bazel] Detect Windows with cpu value x64_windows and x64_windows_msvc

Manoj Gupta (1):
      1beff241 googletest: Add GTEST_API_ attribute to ThreadLocal class.

Manuel VIVES (1):
      b68f1e76 Fix policy issue with old cmakes

Manuel Vives (1):
      a7ab054f Issue 709: Fix Cmake policy 0048

Marzo Sette Torres Junior (1):
      f700442d Clarifying language

Matthew Woehlke (2):
      0e8e0e07 Fix library install destinations
      9469fb68 Fix problem installing gtest when gmock enabled

Maurice Gilden (6):
      5b4166f0 Add function name to exception if there's no default action
      95f18d99 adds test for NiceMock with unknown return value
      cc999000 Fix test if exceptions are not supported
      36777251 Switch return type to class without default constructor
      b0ed43e7 Change tabs to spaces in test case
      1ee80796 Remove unused variable

Nic Holthaus (2):
      c88525f3 added related open source project
      1d1b306d made capitalization more consistent with other projects.

Olivier Clavel (2):
      fa892afc Wrong version reported (1.7.0 should be 1.8.0)
      b74070cf googlemock version must be changed as well

Peter Boström (1):
      1b39c3dc Add gtest-parallel to open-source projects.

Peter Collingbourne (3):
      ba99a04b Check whether _MSC_VER is defined when detecting presence of cxxabi.h under libc++.
      f9155307 Pass -EHs-c- to disable exceptions with MSVC.
      3498a1ac Use _CPPUNWIND instead of _HAS_EXCEPTIONS with MSVC.

Petr Hosek (2):
      6baf17e9 Support JSON output format in addition to XML
      7a2050d4 Use a full message in the JSON output for failures

Romain Geissler (2):
      20e2de7d Remove gcc 6 misleading indentations.
      0663ce90 Fix double free when building Gtest/GMock in shared libraries and linking a test executable with both.

Roman Lebedev (1):
      1a62d1b0 CMake: use threads if allowed and found, not just if found.

Roman Perepelitsa (1):
      966b549c Support ref-qualified member functions in Property().

Ross Wang (1):
      0b6d9475 Update Primer.md

Sam Lunt (1):
      f46bd00e make includes system

Scott Graham (3):
      c3d1d335 Detect Fuchsia, and set GTEST_HAS_PTHREAD on GTEST_OS_FUCHSIA
      0eb49f4d Note that it is preferable for Googlers to create a CL internally first
      567b40ee Try to handle unsigned wchar_t (arm) a bit better

Shlomi Fish (1):
      aac40333 Correct some typos in a comment

Simon Glass (1):
      0fdf78b9 Fix a few documentation nits in the mock dummies guide

Stefano Soffia (1):
      b8ac390a Fix test build issue with GCC7.2.

Stepan Khapugin (1):
      9a8794fa add a cast

Tobias Markus (1):
      08d76be4 Performance fixes reported by cppcheck

Troy Holsapple (1):
      c8510504 Fixed typos

Victor Costan (3):
      b3a1759e Fix std::iscntrl use in gtest-printers.cc
      8a615871 Fix unused function warning on Mac OS.
      84ec2e03 Switch default death test style back to "fast".

Vincent Palancher (1):
      4568374a Fixes a typo in FAQ.md

Wojciech Mamrak (3):
      8d9d6bb0 Improved description of VS std::tuple support
      3464f76e Improved description of VS std::tuple support
      57bb0bbb Remove C4996 warning in VS2017

Xiaoyi Zhang (2):
      190e2cdd Add matcher for std::variant.
      2eb31c18 Add documentation for VariantWith.

Zhongming Qu (2):
      9538687a Remove trailing whitespaces in BUILD.bazel
      99d0ef39 Also can build when included in source.

Zulkarnine Mahmud (7):
      649aa295 Fix background color in ColoredPrintf
      365df114 Add background_mask instead of using magic number
      271fb8ff Fix a problem when bg_color == fg_color
      26b7ac3b Add helper functions for text color calculation
      6a75e3c1 Remove unnecessary const
      a6b146df Fix assumption for foreground bit offset
      2960aa54 Remove duplicate code

bartshappee (1):
      bef93f32 Fix small typo SeArrayArgument

bryanzim (1):
      e17907da Update internal_utils.cmake

danilcha (4):
      b2521c89 Update README.md
      b6c4d434 Update README.md
      81bc8765 Added explicit gtest library dependency
      5ff68057 Again rewrote everything

drgler (2):
      484ec91c Infinite Loop when calling a mock function that takes boost::filesystem::path as parameter #521: Add is_same type trait
      71ca4bae Infinite Loop when calling a mock function that takes boost::filesystem::path as parameter #521: Add is_same type trait and prevent infinite loops for recursive containers

gpetit (5):
      c113a715 Added support for WINAPI_PARTITION_TV_TITLE which is defined on XboxOne
      8f04622c Use GTEST_LOG instead of printf
      ca76206f Removed extra colon in error log
      569d713a Added support for WINAPI_PARTITION_TV_TITLE which is defined on XboxOne
      33d73d42 Added support for WINAPI_PARTITION_TV_TITLE which is defined on XboxOne

iignatev (1):
      7fbc5986 enable null detection on Solaris Studio 12u4+

lipk (1):
      dca9d5fc Remove unnecessary 'the'.

ly2048 (1):
      9681b4c8 Add explicit `CMAKE_DEBUG_POSTFIX` option

mehagar (1):
      ff726322 Fix typo in AdvancedGuide.md

misterg (23):
      f63e2a14 WIP
      b3edada2 WIP
      6615f7df WIP
      aa31cb67 WIP
      52a9c14c Samples changes upstreaming
      aecea384 Samples changes upstreaming
      8815087c WIP
      c75de0aa WIP, windows testing
      a2006b2a WIP, windows testing
      40a909b4 WIP, windows testing
      e66b6bc8 WIP, win testing
      ab8f2b0d WIP, win testing
      ac885f3a WIP
      4f5c01b4 Added googlemock tests
      5a5e3c17 Added googlemock tests
      66a03695 WIP
      b98e30b4 Initial Revision, review 164634031
      cb5b0543 Added Copyright
      c3f65335 Addressing comments
      97a84988 Addressing Comments
      a4121dd5 Change AppVeyor Status Badge to point to new AppVeyor Project Location
      3f3a3ada Change AppVeyor Status Badge to point to new AppVeyor Project Location
      e7734fb8 OSS Sync, cl 163329677

nicolacavallini (1):
      2eaab215 added link to sample 6 in the  documentation of typed test

srz_zumix (1):
      75b683df Fix or condition typo ( '|' -> '||' )

stkhapugin@chromium.org (1):
      cf512a09 Swap reinterpret_cast for static_cast

tommyleo2 (1):
      82396f2d Update Primer.md

vpfautz (1):
      a2451c74 Fixed some typos

whame (1):
      82447f23 Fixes issue #826 by treating MinGW as "non-Windows" when determining colored output
parent 6b21fe5d
# Ignore CI build directory
build/
xcuserdata
cmake-build-debug/
.idea/
bazel-bin
bazel-genfiles
bazel-googletest
bazel-out
bazel-testlogs
# python
*.pyc
# Visual Studio files
*.sdf
*.opensdf
*.VC.opendb
*.suo
*.user
_ReSharper.Caches/
Win32-Debug/
Win32-Release/
x64-Debug/
x64-Release/
# Ignore autoconf / automake files
Makefile.in
aclocal.m4
configure
build-aux/
autom4te.cache/
googletest/m4/libtool.m4
googletest/m4/ltoptions.m4
googletest/m4/ltsugar.m4
googletest/m4/ltversion.m4
googletest/m4/lt~obsolete.m4
# Ignore generated directories.
googlemock/fused-src/
googletest/fused-src/
......@@ -3,15 +3,67 @@
# This file can be validated on:
# http://lint.travis-ci.org/
sudo: false
language: cpp
# Define the matrix explicitly, manually expanding the combinations of (os, compiler, env).
# It is more tedious, but grants us far more flexibility.
matrix:
include:
- os: linux
compiler: gcc
sudo : true
install: ./ci/install-linux.sh && ./ci/log-config.sh
script: ./ci/build-linux-bazel.sh
- os: linux
compiler: clang
sudo : true
install: ./ci/install-linux.sh && ./ci/log-config.sh
script: ./ci/build-linux-bazel.sh
- os: linux
group: deprecated-2017Q4
compiler: gcc
install: ./ci/install-linux.sh && ./ci/log-config.sh
script: ./ci/build-linux-autotools.sh
- os: linux
group: deprecated-2017Q4
compiler: gcc
env: BUILD_TYPE=Debug VERBOSE=1 CXX_FLAGS=-std=c++11
- os: linux
group: deprecated-2017Q4
compiler: clang
env: BUILD_TYPE=Debug VERBOSE=1
- os: linux
group: deprecated-2017Q4
compiler: clang
env: BUILD_TYPE=Release VERBOSE=1 CXX_FLAGS=-std=c++11
- os: osx
compiler: gcc
env: BUILD_TYPE=Debug VERBOSE=1
if: type != pull_request
- os: osx
compiler: gcc
env: BUILD_TYPE=Release VERBOSE=1 CXX_FLAGS=-std=c++11
if: type != pull_request
- os: osx
compiler: clang
env: BUILD_TYPE=Debug VERBOSE=1
if: type != pull_request
- os: osx
compiler: clang
env: BUILD_TYPE=Release VERBOSE=1 CXX_FLAGS=-std=c++11
if: type != pull_request
# 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.
install:
# /usr/bin/gcc is 4.6 always, but gcc-X.Y is available.
- if [ "$CXX" = "g++" ]; then export CXX="g++-4.9" CC="gcc-4.9"; fi
# /usr/bin/clang is 3.4, lets override with modern one.
- if [ "$CXX" = "clang++" ] && [ "$TRAVIS_OS_NAME" = "linux" ]; then export CXX="clang++-3.7" CC="clang-3.7"; fi
- echo ${PATH}
- echo ${CXX}
- ${CXX} --version
- ${CXX} -v
- ./ci/install-${TRAVIS_OS_NAME}.sh
- . ./ci/env-${TRAVIS_OS_NAME}.sh
- ./ci/log-config.sh
script: ./ci/travis.sh
# For sudo=false builds this section installs the necessary dependencies.
addons:
apt:
# List of whitelisted in travis packages for ubuntu-precise can be found here:
......@@ -22,25 +74,8 @@ addons:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.7
packages:
- gcc-4.9
- g++-4.9
- clang-3.7
- valgrind
os:
- linux
- osx
language: cpp
compiler:
- gcc
- clang
script: ./travis.sh
env:
matrix:
- GTEST_TARGET=googletest SHARED_LIB=OFF STATIC_LIB=ON CMAKE_PKG=OFF BUILD_TYPE=debug VERBOSE_MAKE=true VERBOSE
- GTEST_TARGET=googlemock SHARED_LIB=OFF STATIC_LIB=ON CMAKE_PKG=OFF BUILD_TYPE=debug VERBOSE_MAKE=true VERBOSE
- GTEST_TARGET=googlemock SHARED_LIB=OFF STATIC_LIB=ON CMAKE_PKG=OFF BUILD_TYPE=debug CXX_FLAGS=-std=c++11 VERBOSE_MAKE=true VERBOSE
# - GTEST_TARGET=googletest SHARED_LIB=ON STATIC_LIB=ON CMAKE_PKG=ON BUILD_TYPE=release VERBOSE_MAKE=false
# - GTEST_TARGET=googlemock SHARED_LIB=ON STATIC_LIB=ON CMAKE_PKG=ON BUILD_TYPE=release VERBOSE_MAKE=false
notifications:
email: false
sudo: false
# Copyright 2017 Google Inc.
# All Rights Reserved.
#
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following disclaimer
# in the documentation and/or other materials provided with the
# distribution.
# * Neither the name of Google Inc. nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# Author: misterg@google.com (Gennadiy Civil)
#
# Bazel Build for Google C++ Testing Framework(Google Test)
package(default_visibility = ["//visibility:public"])
licenses(["notice"])
config_setting(
name = "windows",
values = { "cpu": "x64_windows" },
)
config_setting(
name = "windows_msvc",
values = {"cpu": "x64_windows_msvc"},
)
config_setting(
name = "has_absl",
values = {"define": "absl=1"},
)
# Google Test including Google Mock
cc_library(
name = "gtest",
srcs = glob(
include = [
"googletest/src/*.cc",
"googletest/src/*.h",
"googletest/include/gtest/**/*.h",
"googlemock/src/*.cc",
"googlemock/include/gmock/**/*.h",
],
exclude = [
"googletest/src/gtest-all.cc",
"googletest/src/gtest_main.cc",
"googlemock/src/gmock-all.cc",
"googlemock/src/gmock_main.cc",
],
),
hdrs =glob([
"googletest/include/gtest/*.h",
"googlemock/include/gmock/*.h",
]),
copts = select(
{
":windows": [],
":windows_msvc": [],
"//conditions:default": ["-pthread"],
},
),
includes = [
"googlemock",
"googlemock/include",
"googletest",
"googletest/include",
],
linkopts = select({
":windows": [],
":windows_msvc": [],
"//conditions:default": [
"-pthread",
],
}),
defines = select ({
":has_absl": [
"GTEST_HAS_ABSL=1",
],
"//conditions:default": [],
}
),
deps = select ({
":has_absl": [
"@com_google_absl//absl/types:optional",
"@com_google_absl//absl/strings"
],
"//conditions:default": [],
}
)
)
cc_library(
name = "gtest_main",
srcs = [
"googlemock/src/gmock_main.cc",
],
deps = [":gtest"],
)
# The following rules build samples of how to use gTest.
cc_library(
name = "gtest_sample_lib",
srcs = [
"googletest/samples/sample1.cc",
"googletest/samples/sample2.cc",
"googletest/samples/sample4.cc",
],
hdrs = [
"googletest/samples/prime_tables.h",
"googletest/samples/sample1.h",
"googletest/samples/sample2.h",
"googletest/samples/sample3-inl.h",
"googletest/samples/sample4.h",
],
)
cc_test(
name = "gtest_samples",
size = "small",
#All Samples except:
#sample9 ( main )
#sample10 (main and takes a command line option and needs to be separate)
srcs = [
"googletest/samples/sample1_unittest.cc",
"googletest/samples/sample2_unittest.cc",
"googletest/samples/sample3_unittest.cc",
"googletest/samples/sample4_unittest.cc",
"googletest/samples/sample5_unittest.cc",
"googletest/samples/sample6_unittest.cc",
"googletest/samples/sample7_unittest.cc",
"googletest/samples/sample8_unittest.cc",
],
deps = [
"gtest_sample_lib",
":gtest_main",
],
)
cc_test(
name = "sample9_unittest",
size = "small",
srcs = ["googletest/samples/sample9_unittest.cc"],
deps = [":gtest"],
)
cc_test(
name = "sample10_unittest",
size = "small",
srcs = ["googletest/samples/sample10_unittest.cc"],
deps = [
":gtest",
],
)
cmake_minimum_required(VERSION 2.6.4)
if (POLICY CMP0048)
cmake_policy(SET CMP0048 NEW)
endif (POLICY CMP0048)
project( googletest-distribution )
enable_testing()
include(CMakeDependentOption)
if (CMAKE_VERSION VERSION_LESS 2.8.5)
set(CMAKE_INSTALL_BINDIR "bin" CACHE STRING "User executables (bin)")
set(CMAKE_INSTALL_LIBDIR "lib${LIB_SUFFIX}" CACHE STRING "Object code libraries (lib)")
set(CMAKE_INSTALL_INCLUDEDIR "include" CACHE STRING "C header files (include)")
mark_as_advanced(CMAKE_INSTALL_BINDIR CMAKE_INSTALL_LIBDIR CMAKE_INSTALL_INCLUDEDIR)
else()
include(GNUInstallDirs)
endif()
option(BUILD_GTEST "Builds the googletest subproject" OFF)
#Note that googlemock target already builds googletest
option(BUILD_GMOCK "Builds the googlemock subproject" ON)
cmake_dependent_option(INSTALL_GTEST "Enable installation of googletest. (Projects embedding googletest may want to turn this OFF.)" ON "BUILD_GTEST OR BUILD_GMOCK" OFF)
cmake_dependent_option(INSTALL_GMOCK "Enable installation of googlemock. (Projects embedding googlemock may want to turn this OFF.)" ON "BUILD_GMOCK" OFF)
if(BUILD_GMOCK)
add_subdirectory( googlemock )
elseif(BUILD_GTEST)
......
# How to become a contributor and submit your own code
## Contributor License Agreements
We'd love to accept your patches! Before we can take them, we
have to jump a couple of legal hurdles.
Please fill out either the individual or corporate Contributor License Agreement
(CLA).
* If you are an individual writing original source code and you're sure you
own the intellectual property, then you'll need to sign an
[individual CLA](https://developers.google.com/open-source/cla/individual).
* If you work for a company that wants to allow you to contribute your work,
then you'll need to sign a
[corporate CLA](https://developers.google.com/open-source/cla/corporate).
Follow either of the two links above to access the appropriate CLA and
instructions for how to sign and return it. Once we receive it, we'll be able to
accept your pull requests.
## Contributing A Patch
1. Submit an issue describing your proposed change to the
[issue tracker](https://github.com/google/googletest).
1. Please don't mix more than one logical change per submittal,
because it makes the history hard to follow. If you want to make a
change that doesn't have a corresponding issue in the issue
tracker, please create one.
1. Also, coordinate with team members that are listed on the issue in
question. This ensures that work isn't being duplicated and
communicating your plan early also generally leads to better
patches.
1. If your proposed change is accepted, and you haven't already done so, sign a
Contributor License Agreement (see details above).
1. Fork the desired repo, develop and test your code changes.
1. Ensure that your code adheres to the existing style in the sample to which
you are contributing.
1. Ensure that your code has an appropriate set of unit tests which all pass.
1. Submit a pull request.
If you are a Googler, it is preferable to first create an internal change and
have it reviewed and submitted, and then create an upstreaming pull
request here.
## The Google Test and Google Mock Communities ##
The Google Test community exists primarily through the
[discussion group](http://groups.google.com/group/googletestframework)
and the GitHub repository.
Likewise, the Google Mock community exists primarily through their own
[discussion group](http://groups.google.com/group/googlemock).
You are definitely encouraged to contribute to the
discussion and you can also help us to keep the effectiveness of the
group high by following and promoting the guidelines listed here.
### Please Be Friendly ###
Showing courtesy and respect to others is a vital part of the Google
culture, and we strongly encourage everyone participating in Google
Test development to join us in accepting nothing less. Of course,
being courteous is not the same as failing to constructively disagree
with each other, but it does mean that we should be respectful of each
other when enumerating the 42 technical reasons that a particular
proposal may not be the best choice. There's never a reason to be
antagonistic or dismissive toward anyone who is sincerely trying to
contribute to a discussion.
Sure, C++ testing is serious business and all that, but it's also
a lot of fun. Let's keep it that way. Let's strive to be one of the
friendliest communities in all of open source.
As always, discuss Google Test in the official GoogleTest discussion group.
You don't have to actually submit code in order to sign up. Your participation
itself is a valuable contribution.
## Style
To keep the source consistent, readable, diffable and easy to merge,
we use a fairly rigid coding style, as defined by the [google-styleguide](https://github.com/google/styleguide) project. All patches will be expected
to conform to the style outlined [here](https://google.github.io/styleguide/cppguide.html).
## Requirements for Contributors ###
If you plan to contribute a patch, you need to build Google Test,
Google Mock, and their own tests from a git checkout, which has
further requirements:
* [Python](https://www.python.org/) v2.3 or newer (for running some of
the tests and re-generating certain source files from templates)
* [CMake](https://cmake.org/) v2.6.4 or newer
* [GNU Build System](https://en.wikipedia.org/wiki/GNU_Build_System)
including automake (>= 1.9), autoconf (>= 2.59), and
libtool / libtoolize.
## Developing Google Test ##
This section discusses how to make your own changes to Google Test.
### Testing Google Test Itself ###
To make sure your changes work as intended and don't break existing
functionality, you'll want to compile and run Google Test's own tests.
For that you can use CMake:
mkdir mybuild
cd mybuild
cmake -Dgtest_build_tests=ON ${GTEST_DIR}
Make sure you have Python installed, as some of Google Test's tests
are written in Python. If the cmake command complains about not being
able to find Python (`Could NOT find PythonInterp (missing:
PYTHON_EXECUTABLE)`), try telling it explicitly where your Python
executable can be found:
cmake -DPYTHON_EXECUTABLE=path/to/python -Dgtest_build_tests=ON ${GTEST_DIR}
Next, you can build Google Test and all of its own tests. On \*nix,
this is usually done by 'make'. To run the tests, do
make test
All tests should pass.
### Regenerating Source Files ##
Some of Google Test's source files are generated from templates (not
in the C++ sense) using a script.
For example, the
file include/gtest/internal/gtest-type-util.h.pump is used to generate
gtest-type-util.h in the same directory.
You don't need to worry about regenerating the source files
unless you need to modify them. You would then modify the
corresponding `.pump` files and run the '[pump.py](googletest/scripts/pump.py)'
generator script. See the [Pump Manual](googletest/docs/PumpManual.md).
## Developing Google Mock ###
This section discusses how to make your own changes to Google Mock.
#### Testing Google Mock Itself ####
To make sure your changes work as intended and don't break existing
functionality, you'll want to compile and run Google Test's own tests.
For that you'll need Autotools. First, make sure you have followed
the instructions above to configure Google Mock.
Then, create a build output directory and enter it. Next,
${GMOCK_DIR}/configure # try --help for more info
Once you have successfully configured Google Mock, the build steps are
standard for GNU-style OSS packages.
make # Standard makefile following GNU conventions
make check # Builds and runs all tests - all should pass.
Note that when building your project against Google Mock, you are building
against Google Test as well. There is no need to configure Google Test
separately.
Copyright 2008, Google Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
## Process this file with automake to produce Makefile.in
ACLOCAL_AMFLAGS = -I m4
AUTOMAKE_OPTIONS = foreign
# Build . before src so that our all-local and clean-local hooks kicks in at
# the right time.
SUBDIRS = googletest googlemock
EXTRA_DIST = \
BUILD.bazel \
CMakeLists.txt \
README.md \
WORKSPACE
......@@ -2,7 +2,7 @@
# Google Test #
[![Build Status](https://travis-ci.org/google/googletest.svg?branch=master)](https://travis-ci.org/google/googletest)
[![Build status](https://ci.appveyor.com/api/projects/status/4o38plt0xbo1ubc8/branch/master?svg=true)](https://ci.appveyor.com/project/BillyDonahue/googletest/branch/master)
[![Build status](https://ci.appveyor.com/api/projects/status/4o38plt0xbo1ubc8/branch/master?svg=true)](https://ci.appveyor.com/project/GoogleTestAppVeyor/googletest/branch/master)
Welcome to **Google Test**, Google's C++ test framework!
......@@ -12,7 +12,7 @@ maintain and release them together.
Please see the project page above for more information as well as the
mailing list for questions, discussions, and development. There is
also an IRC channel on OFTC (irc.oftc.net) #gtest available. Please
also an IRC channel on [OFTC](https://webchat.oftc.net/) (irc.oftc.net) #gtest available. Please
join us!
Getting started information for **Google Test** is available in the
......@@ -26,7 +26,7 @@ in its interior [googletest/README.md](googletest/README.md) file.
## Features ##
* An [XUnit](https://en.wikipedia.org/wiki/XUnit) test framework.
* An [xUnit](https://en.wikipedia.org/wiki/XUnit) test framework.
* Test discovery.
* A rich set of assertions.
* User-defined assertions.
......@@ -60,9 +60,12 @@ the following notable projects:
* [Protocol Buffers](https://github.com/google/protobuf), Google's data
interchange format.
* The [OpenCV](http://opencv.org/) computer vision library.
* [tiny-dnn](https://github.com/tiny-dnn/tiny-dnn): header only, dependency-free deep learning framework in C++11.
## Related Open Source Projects ##
[GTest Runner](https://github.com/nholthaus/gtest-runner) is a Qt5 based automated test-runner and Graphical User Interface with powerful features for Windows and Linux platforms.
[Google Test UI](https://github.com/ospector/gtest-gbar) is test runner that runs
your test binary, allows you to track its progress via a progress bar, and
displays a list of test failures. Clicking on one shows failure text. Google
......@@ -73,6 +76,9 @@ listener for Google Test that implements the
[TAP protocol](https://en.wikipedia.org/wiki/Test_Anything_Protocol) for test
result output. If your test runner understands TAP, you may find it useful.
[gtest-parallel](https://github.com/google/gtest-parallel) is a test runner that
runs tests from your binary in parallel to provide significant speed-up.
## Requirements ##
Google Test is designed to have fairly minimal requirements to build
......@@ -82,7 +88,7 @@ effort to support other platforms (e.g. Solaris, AIX, and z/OS).
However, since core members of the Google Test project have no access
to these platforms, Google Test may have outstanding issues there. If
you notice any problems on your platform, please notify
<googletestframework@googlegroups.com>. Patches for fixing them are
[googletestframework@googlegroups.com](https://groups.google.com/forum/#!forum/googletestframework). Patches for fixing them are
even more welcome!
### Linux Requirements ###
......@@ -97,7 +103,7 @@ package (as described below):
### Windows Requirements ###
* Microsoft Visual C++ v7.1 or newer
* Microsoft Visual C++ 2015 or newer
### Cygwin Requirements ###
......@@ -108,35 +114,9 @@ package (as described below):
* Mac OS X v10.4 Tiger or newer
* Xcode Developer Tools
### Requirements for Contributors ###
We welcome patches. If you plan to contribute a patch, you need to
build Google Test and its own tests from a git checkout (described
below), which has further requirements: