Merge lp:~renatofilho/sync-monitor/disable-sync-for-canonical into lp:sync-monitor

Proposed by Renato Araujo Oliveira Filho
Status: Rejected
Rejected by: Renato Araujo Oliveira Filho
Proposed branch: lp:~renatofilho/sync-monitor/disable-sync-for-canonical
Merge into: lp:sync-monitor
Diff against target: 68184 lines (+98/-67193)
161 files modified
3rd_party/CMakeLists.txt (+0/-1)
3rd_party/gmock/CMakeLists.txt (+0/-171)
3rd_party/gmock/gtest/CHANGES (+0/-153)
3rd_party/gmock/gtest/CMakeLists.txt (+0/-250)
3rd_party/gmock/gtest/CONTRIBUTORS (+0/-37)
3rd_party/gmock/gtest/Makefile.am (+0/-305)
3rd_party/gmock/gtest/README (+0/-435)
3rd_party/gmock/gtest/cmake/internal_utils.cmake (+0/-227)
3rd_party/gmock/gtest/codegear/gtest_all.cc (+0/-38)
3rd_party/gmock/gtest/codegear/gtest_link.cc (+0/-40)
3rd_party/gmock/gtest/configure.ac (+0/-68)
3rd_party/gmock/gtest/include/gtest/gtest-death-test.h (+0/-294)
3rd_party/gmock/gtest/include/gtest/gtest-message.h (+0/-250)
3rd_party/gmock/gtest/include/gtest/gtest-param-test.h (+0/-1421)
3rd_party/gmock/gtest/include/gtest/gtest-param-test.h.pump (+0/-487)
3rd_party/gmock/gtest/include/gtest/gtest-printers.h (+0/-855)
3rd_party/gmock/gtest/include/gtest/gtest-spi.h (+0/-232)
3rd_party/gmock/gtest/include/gtest/gtest-test-part.h (+0/-179)
3rd_party/gmock/gtest/include/gtest/gtest-typed-test.h (+0/-259)
3rd_party/gmock/gtest/include/gtest/gtest.h (+0/-2291)
3rd_party/gmock/gtest/include/gtest/gtest_pred_impl.h (+0/-358)
3rd_party/gmock/gtest/include/gtest/gtest_prod.h (+0/-58)
3rd_party/gmock/gtest/include/gtest/internal/gtest-death-test-internal.h (+0/-319)
3rd_party/gmock/gtest/include/gtest/internal/gtest-filepath.h (+0/-206)
3rd_party/gmock/gtest/include/gtest/internal/gtest-internal.h (+0/-1147)
3rd_party/gmock/gtest/include/gtest/internal/gtest-linked_ptr.h (+0/-233)
3rd_party/gmock/gtest/include/gtest/internal/gtest-param-util-generated.h (+0/-5143)
3rd_party/gmock/gtest/include/gtest/internal/gtest-param-util-generated.h.pump (+0/-301)
3rd_party/gmock/gtest/include/gtest/internal/gtest-param-util.h (+0/-619)
3rd_party/gmock/gtest/include/gtest/internal/gtest-port.h (+0/-1947)
3rd_party/gmock/gtest/include/gtest/internal/gtest-string.h (+0/-167)
3rd_party/gmock/gtest/include/gtest/internal/gtest-tuple.h (+0/-1012)
3rd_party/gmock/gtest/include/gtest/internal/gtest-tuple.h.pump (+0/-339)
3rd_party/gmock/gtest/include/gtest/internal/gtest-type-util.h (+0/-3331)
3rd_party/gmock/gtest/include/gtest/internal/gtest-type-util.h.pump (+0/-297)
3rd_party/gmock/gtest/m4/acx_pthread.m4 (+0/-363)
3rd_party/gmock/gtest/m4/gtest.m4 (+0/-74)
3rd_party/gmock/gtest/make/Makefile (+0/-82)
3rd_party/gmock/gtest/samples/prime_tables.h (+0/-123)
3rd_party/gmock/gtest/samples/sample1.cc (+0/-68)
3rd_party/gmock/gtest/samples/sample1.h (+0/-43)
3rd_party/gmock/gtest/samples/sample10_unittest.cc (+0/-144)
3rd_party/gmock/gtest/samples/sample1_unittest.cc (+0/-153)
3rd_party/gmock/gtest/samples/sample2.cc (+0/-56)
3rd_party/gmock/gtest/samples/sample2.h (+0/-85)
3rd_party/gmock/gtest/samples/sample2_unittest.cc (+0/-109)
3rd_party/gmock/gtest/samples/sample3-inl.h (+0/-172)
3rd_party/gmock/gtest/samples/sample3_unittest.cc (+0/-151)
3rd_party/gmock/gtest/samples/sample4.cc (+0/-46)
3rd_party/gmock/gtest/samples/sample4.h (+0/-53)
3rd_party/gmock/gtest/samples/sample4_unittest.cc (+0/-45)
3rd_party/gmock/gtest/samples/sample5_unittest.cc (+0/-199)
3rd_party/gmock/gtest/samples/sample6_unittest.cc (+0/-224)
3rd_party/gmock/gtest/samples/sample7_unittest.cc (+0/-130)
3rd_party/gmock/gtest/samples/sample8_unittest.cc (+0/-173)
3rd_party/gmock/gtest/samples/sample9_unittest.cc (+0/-160)
3rd_party/gmock/gtest/scripts/fuse_gtest_files.py (+0/-250)
3rd_party/gmock/gtest/scripts/gen_gtest_pred_impl.py (+0/-730)
3rd_party/gmock/gtest/scripts/gtest-config.in (+0/-274)
3rd_party/gmock/gtest/scripts/pump.py (+0/-855)
3rd_party/gmock/gtest/scripts/test/Makefile (+0/-59)
3rd_party/gmock/gtest/scripts/upload.py (+0/-1387)
3rd_party/gmock/gtest/scripts/upload_gtest.py (+0/-78)
3rd_party/gmock/gtest/src/gtest-all.cc (+0/-48)
3rd_party/gmock/gtest/src/gtest-death-test.cc (+0/-1344)
3rd_party/gmock/gtest/src/gtest-filepath.cc (+0/-382)
3rd_party/gmock/gtest/src/gtest-internal-inl.h (+0/-1218)
3rd_party/gmock/gtest/src/gtest-port.cc (+0/-805)
3rd_party/gmock/gtest/src/gtest-printers.cc (+0/-363)
3rd_party/gmock/gtest/src/gtest-test-part.cc (+0/-110)
3rd_party/gmock/gtest/src/gtest-typed-test.cc (+0/-110)
3rd_party/gmock/gtest/src/gtest.cc (+0/-4961)
3rd_party/gmock/gtest/src/gtest_main.cc (+0/-38)
3rd_party/gmock/gtest/test/gtest-death-test_ex_test.cc (+0/-93)
3rd_party/gmock/gtest/test/gtest-death-test_test.cc (+0/-1368)
3rd_party/gmock/gtest/test/gtest-filepath_test.cc (+0/-680)
3rd_party/gmock/gtest/test/gtest-linked_ptr_test.cc (+0/-154)
3rd_party/gmock/gtest/test/gtest-listener_test.cc (+0/-310)
3rd_party/gmock/gtest/test/gtest-message_test.cc (+0/-159)
3rd_party/gmock/gtest/test/gtest-options_test.cc (+0/-215)
3rd_party/gmock/gtest/test/gtest-param-test2_test.cc (+0/-65)
3rd_party/gmock/gtest/test/gtest-param-test_test.cc (+0/-904)
3rd_party/gmock/gtest/test/gtest-param-test_test.h (+0/-57)
3rd_party/gmock/gtest/test/gtest-port_test.cc (+0/-1253)
3rd_party/gmock/gtest/test/gtest-printers_test.cc (+0/-1566)
3rd_party/gmock/gtest/test/gtest-test-part_test.cc (+0/-208)
3rd_party/gmock/gtest/test/gtest-tuple_test.cc (+0/-320)
3rd_party/gmock/gtest/test/gtest-typed-test2_test.cc (+0/-45)
3rd_party/gmock/gtest/test/gtest-typed-test_test.cc (+0/-360)
3rd_party/gmock/gtest/test/gtest-typed-test_test.h (+0/-66)
3rd_party/gmock/gtest/test/gtest-unittest-api_test.cc (+0/-341)
3rd_party/gmock/gtest/test/gtest_all_test.cc (+0/-47)
3rd_party/gmock/gtest/test/gtest_break_on_failure_unittest.py (+0/-218)
3rd_party/gmock/gtest/test/gtest_break_on_failure_unittest_.cc (+0/-88)
3rd_party/gmock/gtest/test/gtest_catch_exceptions_test.py (+0/-223)
3rd_party/gmock/gtest/test/gtest_catch_exceptions_test_.cc (+0/-311)
3rd_party/gmock/gtest/test/gtest_color_test.py (+0/-130)
3rd_party/gmock/gtest/test/gtest_color_test_.cc (+0/-71)
3rd_party/gmock/gtest/test/gtest_env_var_test.py (+0/-103)
3rd_party/gmock/gtest/test/gtest_env_var_test_.cc (+0/-126)
3rd_party/gmock/gtest/test/gtest_environment_test.cc (+0/-192)
3rd_party/gmock/gtest/test/gtest_filter_unittest.py (+0/-633)
3rd_party/gmock/gtest/test/gtest_filter_unittest_.cc (+0/-140)
3rd_party/gmock/gtest/test/gtest_help_test.py (+0/-172)
3rd_party/gmock/gtest/test/gtest_help_test_.cc (+0/-46)
3rd_party/gmock/gtest/test/gtest_list_tests_unittest.py (+0/-207)
3rd_party/gmock/gtest/test/gtest_list_tests_unittest_.cc (+0/-157)
3rd_party/gmock/gtest/test/gtest_main_unittest.cc (+0/-45)
3rd_party/gmock/gtest/test/gtest_no_test_unittest.cc (+0/-56)
3rd_party/gmock/gtest/test/gtest_output_test.py (+0/-335)
3rd_party/gmock/gtest/test/gtest_output_test_.cc (+0/-1034)
3rd_party/gmock/gtest/test/gtest_output_test_golden_lin.txt (+0/-720)
3rd_party/gmock/gtest/test/gtest_pred_impl_unittest.cc (+0/-2427)
3rd_party/gmock/gtest/test/gtest_prod_test.cc (+0/-57)
3rd_party/gmock/gtest/test/gtest_repeat_test.cc (+0/-253)
3rd_party/gmock/gtest/test/gtest_shuffle_test.py (+0/-325)
3rd_party/gmock/gtest/test/gtest_shuffle_test_.cc (+0/-103)
3rd_party/gmock/gtest/test/gtest_sole_header_test.cc (+0/-57)
3rd_party/gmock/gtest/test/gtest_stress_test.cc (+0/-256)
3rd_party/gmock/gtest/test/gtest_test_utils.py (+0/-305)
3rd_party/gmock/gtest/test/gtest_throw_on_failure_ex_test.cc (+0/-92)
3rd_party/gmock/gtest/test/gtest_throw_on_failure_test.py (+0/-171)
3rd_party/gmock/gtest/test/gtest_throw_on_failure_test_.cc (+0/-72)
3rd_party/gmock/gtest/test/gtest_uninitialized_test.py (+0/-70)
3rd_party/gmock/gtest/test/gtest_uninitialized_test_.cc (+0/-43)
3rd_party/gmock/gtest/test/gtest_unittest.cc (+0/-7415)
3rd_party/gmock/gtest/test/gtest_xml_outfile1_test_.cc (+0/-49)
3rd_party/gmock/gtest/test/gtest_xml_outfile2_test_.cc (+0/-49)
3rd_party/gmock/gtest/test/gtest_xml_outfiles_test.py (+0/-132)
3rd_party/gmock/gtest/test/gtest_xml_output_unittest.py (+0/-307)
3rd_party/gmock/gtest/test/gtest_xml_output_unittest_.cc (+0/-181)
3rd_party/gmock/gtest/test/gtest_xml_test_utils.py (+0/-194)
3rd_party/gmock/gtest/test/production.cc (+0/-36)
3rd_party/gmock/gtest/test/production.h (+0/-55)
3rd_party/gmock/gtest/xcode/Config/DebugProject.xcconfig (+0/-30)
3rd_party/gmock/gtest/xcode/Config/FrameworkTarget.xcconfig (+0/-17)
3rd_party/gmock/gtest/xcode/Config/General.xcconfig (+0/-41)
3rd_party/gmock/gtest/xcode/Config/ReleaseProject.xcconfig (+0/-32)
3rd_party/gmock/gtest/xcode/Config/StaticLibraryTarget.xcconfig (+0/-18)
3rd_party/gmock/gtest/xcode/Config/TestTarget.xcconfig (+0/-8)
3rd_party/gmock/gtest/xcode/Resources/Info.plist (+0/-30)
3rd_party/gmock/gtest/xcode/Samples/FrameworkSample/Info.plist (+0/-28)
3rd_party/gmock/gtest/xcode/Samples/FrameworkSample/runtests.sh (+0/-62)
3rd_party/gmock/gtest/xcode/Samples/FrameworkSample/widget.cc (+0/-63)
3rd_party/gmock/gtest/xcode/Samples/FrameworkSample/widget.h (+0/-59)
3rd_party/gmock/gtest/xcode/Samples/FrameworkSample/widget_test.cc (+0/-68)
3rd_party/gmock/gtest/xcode/Scripts/runtests.sh (+0/-65)
3rd_party/gmock/gtest/xcode/Scripts/versiongenerate.py (+0/-100)
3rd_party/gmock/src/gmock-all.cc (+0/-47)
3rd_party/gmock/src/gmock-cardinalities.cc (+0/-156)
3rd_party/gmock/src/gmock-internal-utils.cc (+0/-174)
3rd_party/gmock/src/gmock-matchers.cc (+0/-137)
3rd_party/gmock/src/gmock-spec-builders.cc (+0/-813)
3rd_party/gmock/src/gmock.cc (+0/-182)
3rd_party/gmock/src/gmock_main.cc (+0/-54)
CMakeLists.txt (+6/-1)
cmake/FindGtest.cmake (+68/-0)
src/sync-account.cpp (+5/-1)
src/sync-daemon.cpp (+9/-3)
src/sync-daemon.h (+1/-0)
tests/unittest/CMakeLists.txt (+9/-2)
To merge this branch: bzr merge lp:~renatofilho/sync-monitor/disable-sync-for-canonical
Reviewer Review Type Date Requested Status
Charles Kerr (community) Approve
system-apps-ci-bot continuous-integration Approve
Review via email: mp+320933@code.launchpad.net

Commit message

Does not sync canonical accounts due bug #1628040.

Description of the change

Does not sync canonical accounts due bug #1628040.

To post a comment you must log in.
Revision history for this message
system-apps-ci-bot (system-apps-ci-bot) wrote :

FAILED: Continuous integration, rev:100
https://jenkins.canonical.com/system-apps/job/lp-sync-monitor-ci/1/
Executed test runs:
    FAILURE: https://jenkins.canonical.com/system-apps/job/build/2354/console
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-0-fetch/2354
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2172
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2172/artifact/output/*zip*/output.zip
    FAILURE: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=zesty/2172/console
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2172
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2172/artifact/output/*zip*/output.zip
    FAILURE: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=zesty/2172/console
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/2172
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/2172/artifact/output/*zip*/output.zip
    FAILURE: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=zesty/2172/console

Click here to trigger a rebuild:
https://jenkins.canonical.com/system-apps/job/lp-sync-monitor-ci/1/rebuild

review: Needs Fixing (continuous-integration)
101. By Renato Araujo Oliveira Filho

Use gmock from system intead of keep a copy internally.

102. By Renato Araujo Oliveira Filho

Add more debug messages.

Revision history for this message
system-apps-ci-bot (system-apps-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
103. By Renato Araujo Oliveira Filho

Add missing files.

Revision history for this message
system-apps-ci-bot (system-apps-ci-bot) wrote :

PASSED: Continuous integration, rev:103
https://jenkins.canonical.com/system-apps/job/lp-sync-monitor-ci/3/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build/2356
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-0-fetch/2356
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2174
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2174/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=zesty/2174
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=zesty/2174/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2174
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2174/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=zesty/2174
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=zesty/2174/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/2174
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/2174/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=zesty/2174
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=zesty/2174/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/system-apps/job/lp-sync-monitor-ci/3/rebuild

review: Approve (continuous-integration)
104. By Renato Araujo Oliveira Filho

Only syncs calendars owned by the user.

Revision history for this message
system-apps-ci-bot (system-apps-ci-bot) wrote :

PASSED: Continuous integration, rev:104
https://jenkins.canonical.com/system-apps/job/lp-sync-monitor-ci/4/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build/2357
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-0-fetch/2357
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2175
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2175/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=zesty/2175
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=zesty/2175/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2175
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2175/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=zesty/2175
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=zesty/2175/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/2175
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/2175/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=zesty/2175
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=zesty/2175/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/system-apps/job/lp-sync-monitor-ci/4/rebuild

review: Approve (continuous-integration)
Revision history for this message
Charles Kerr (charlesk) wrote :

The gmock removal should have gone in a separate branch, IMO. This makes it harder to see the actual ~20 line patch

As to the actual patch... I'm a little worried that we carve out this special case, this patch looks like it cures the symptom rather than the underlying sync bug.

Still, as long as this is understood to be a temporary workaround for the inbox spam, and that this will be cleaned up when the sync bug is fixed, I'm OK with a temporary.

review: Approve
Revision history for this message
Renato Araujo Oliveira Filho (renatofilho) wrote :

Unmerged revisions

104. By Renato Araujo Oliveira Filho

Only syncs calendars owned by the user.

103. By Renato Araujo Oliveira Filho

Add missing files.

102. By Renato Araujo Oliveira Filho

Add more debug messages.

101. By Renato Araujo Oliveira Filho

Use gmock from system intead of keep a copy internally.

100. By Renato Araujo Oliveira Filho

Does not sync canonical accounts due bug #1628040.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file '3rd_party/CMakeLists.txt'
--- 3rd_party/CMakeLists.txt 2014-04-07 19:51:32 +0000
+++ 3rd_party/CMakeLists.txt 2017-03-27 13:27:39 +0000
@@ -1,2 +1,1 @@
1add_subdirectory(syncevolution-qt)1add_subdirectory(syncevolution-qt)
2add_subdirectory(gmock)
32
=== removed directory '3rd_party/gmock'
=== removed file '3rd_party/gmock/CMakeLists.txt'
--- 3rd_party/gmock/CMakeLists.txt 2014-04-07 19:53:07 +0000
+++ 3rd_party/gmock/CMakeLists.txt 1970-01-01 00:00:00 +0000
@@ -1,171 +0,0 @@
1########################################################################
2# CMake build script for Google Mock.
3#
4# To run the tests for Google Mock itself on Linux, use 'make test' or
5# ctest. You can select which tests to run using 'ctest -R regex'.
6# For more options, run 'ctest --help'.
7
8# BUILD_SHARED_LIBS is a standard CMake variable, but we declare it here to
9# make it prominent in the GUI.
10option(BUILD_SHARED_LIBS "Build shared libraries (DLLs)." OFF)
11
12option(gmock_build_tests "Build all of Google Mock's own tests." OFF)
13
14# A directory to find Google Test sources.
15if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/gtest/CMakeLists.txt")
16 set(gtest_dir gtest)
17else()
18 set(gtest_dir ../gtest)
19endif()
20
21# Defines pre_project_set_up_hermetic_build() and set_up_hermetic_build().
22include("${gtest_dir}/cmake/hermetic_build.cmake" OPTIONAL)
23
24if (COMMAND pre_project_set_up_hermetic_build)
25 # Google Test also calls hermetic setup functions from add_subdirectory,
26 # although its changes will not affect things at the current scope.
27 pre_project_set_up_hermetic_build()
28endif()
29
30########################################################################
31#
32# Project-wide settings
33
34# Name of the project.
35#
36# CMake files in this project can refer to the root source directory
37# as ${gmock_SOURCE_DIR} and to the root binary directory as
38# ${gmock_BINARY_DIR}.
39# Language "C" is required for find_package(Threads).
40project(gmock CXX C)
41cmake_minimum_required(VERSION 2.6.2)
42
43if (COMMAND set_up_hermetic_build)
44 set_up_hermetic_build()
45endif()
46
47# Instructs CMake to process Google Test's CMakeLists.txt and add its
48# targets to the current scope. We are placing Google Test's binary
49# directory in a subdirectory of our own as VC compilation may break
50# if they are the same (the default).
51add_subdirectory("${gtest_dir}" "${gmock_BINARY_DIR}/gtest")
52
53# Although Google Test's CMakeLists.txt calls this function, the
54# changes there don't affect the current scope. Therefore we have to
55# call it again here.
56config_compiler_and_linker() # from ${gtest_dir}/cmake/internal_utils.cmake
57
58# Adds Google Mock's and Google Test's header directories to the search path.
59include_directories("${gmock_SOURCE_DIR}/include"
60 "${gmock_SOURCE_DIR}"
61 "${gtest_SOURCE_DIR}/include"
62 # This directory is needed to build directly from Google
63 # Test sources.
64 "${gtest_SOURCE_DIR}")
65
66########################################################################
67#
68# Defines the gmock & gmock_main libraries. User tests should link
69# with one of them.
70
71# Google Mock libraries. We build them using more strict warnings than what
72# are used for other targets, to ensure that Google Mock can be compiled by
73# a user aggressive about warnings.
74cxx_library(gmock
75 "${cxx_strict}"
76 "${gtest_dir}/src/gtest-all.cc"
77 src/gmock-all.cc)
78
79cxx_library(gmock_main
80 "${cxx_strict}"
81 "${gtest_dir}/src/gtest-all.cc"
82 src/gmock-all.cc
83 src/gmock_main.cc)
84
85########################################################################
86#
87# Google Mock's own tests.
88#
89# You can skip this section if you aren't interested in testing
90# Google Mock itself.
91#
92# The tests are not built by default. To build them, set the
93# gmock_build_tests option to ON. You can do it by running ccmake
94# or specifying the -Dgmock_build_tests=ON flag when running cmake.
95
96if (gmock_build_tests)
97 # This must be set in the root directory for the tests to be run by
98 # 'make test' or ctest.
99 enable_testing()
100
101 ############################################################
102 # C++ tests built with standard compiler flags.
103
104 cxx_test(gmock-actions_test gmock_main)
105 cxx_test(gmock-cardinalities_test gmock_main)
106 cxx_test(gmock_ex_test gmock_main)
107 cxx_test(gmock-generated-actions_test gmock_main)
108 cxx_test(gmock-generated-function-mockers_test gmock_main)
109 cxx_test(gmock-generated-internal-utils_test gmock_main)
110 cxx_test(gmock-generated-matchers_test gmock_main)
111 cxx_test(gmock-internal-utils_test gmock_main)
112 cxx_test(gmock-matchers_test gmock_main)
113 cxx_test(gmock-more-actions_test gmock_main)
114 cxx_test(gmock-nice-strict_test gmock_main)
115 cxx_test(gmock-port_test gmock_main)
116 cxx_test(gmock-spec-builders_test gmock_main)
117 cxx_test(gmock_link_test gmock_main test/gmock_link2_test.cc)
118 cxx_test(gmock_test gmock_main)
119
120 if (CMAKE_USE_PTHREADS_INIT)
121 cxx_test(gmock_stress_test gmock)
122 endif()
123
124 # gmock_all_test is commented to save time building and running tests.
125 # Uncomment if necessary.
126 # cxx_test(gmock_all_test gmock_main)
127
128 ############################################################
129 # C++ tests built with non-standard compiler flags.
130
131 cxx_library(gmock_main_no_exception "${cxx_no_exception}"
132 "${gtest_dir}/src/gtest-all.cc" src/gmock-all.cc src/gmock_main.cc)
133
134 cxx_library(gmock_main_no_rtti "${cxx_no_rtti}"
135 "${gtest_dir}/src/gtest-all.cc" src/gmock-all.cc src/gmock_main.cc)
136
137 cxx_library(gmock_main_use_own_tuple "${cxx_use_own_tuple}"
138 "${gtest_dir}/src/gtest-all.cc" src/gmock-all.cc src/gmock_main.cc)
139
140 cxx_test_with_flags(gmock-more-actions_no_exception_test "${cxx_no_exception}"
141 gmock_main_no_exception test/gmock-more-actions_test.cc)
142
143 cxx_test_with_flags(gmock_no_rtti_test "${cxx_no_rtti}"
144 gmock_main_no_rtti test/gmock-spec-builders_test.cc)
145
146 cxx_test_with_flags(gmock_use_own_tuple_test "${cxx_use_own_tuple}"
147 gmock_main_use_own_tuple test/gmock-spec-builders_test.cc)
148
149 cxx_shared_library(shared_gmock_main "${cxx_default}"
150 "${gtest_dir}/src/gtest-all.cc" src/gmock-all.cc src/gmock_main.cc)
151
152 # Tests that a binary can be built with Google Mock as a shared library. On
153 # some system configurations, it may not possible to run the binary without
154 # knowing more details about the system configurations. We do not try to run
155 # this binary. To get a more robust shared library coverage, configure with
156 # -DBUILD_SHARED_LIBS=ON.
157 cxx_executable_with_flags(shared_gmock_test_ "${cxx_default}"
158 shared_gmock_main test/gmock-spec-builders_test.cc)
159 set_target_properties(shared_gmock_test_
160 PROPERTIES
161 COMPILE_DEFINITIONS "GTEST_LINKED_AS_SHARED_LIBRARY=1")
162
163 ############################################################
164 # Python tests.
165
166 cxx_executable(gmock_leak_test_ test gmock_main)
167 py_test(gmock_leak_test)
168
169 cxx_executable(gmock_output_test_ test gmock)
170 py_test(gmock_output_test)
171endif()
1720
=== removed directory '3rd_party/gmock/gtest'
=== removed file '3rd_party/gmock/gtest/CHANGES'
--- 3rd_party/gmock/gtest/CHANGES 2014-04-07 19:53:07 +0000
+++ 3rd_party/gmock/gtest/CHANGES 1970-01-01 00:00:00 +0000
@@ -1,153 +0,0 @@
1Changes for 1.7.0:
2
3* New feature: death tests are supported on OpenBSD and in iOS
4 simulator now.
5* New feature: Test::RecordProperty() can now be used outside of the
6 lifespan of a test method, in which case it will be attributed to
7 the current test case or the test program in the XML report.
8* New feature (potentially breaking): --gtest_list_tests now prints
9 the type parameters and value parameters for each test.
10* Improvement: char pointers and char arrays are now escaped properly
11 in failure messages.
12* Improvement: failure summary in XML reports now includes file and
13 line information.
14* Improvement: the <testsuites> XML element now has a timestamp attribute.
15* Improvement: When --gtest_filter is specified, XML report now doesn't
16 contain information about tests that are filtered out.
17* Fixed the bug where long --gtest_filter flag values are truncated in
18 death tests.
19* Potentially breaking change: RUN_ALL_TESTS() is now implemented as a
20 function instead of a macro in order to work better with Clang.
21* Compatibility fixes with C++ 11 and various platforms.
22* Bug/warning fixes.
23
24Changes for 1.6.0:
25
26* New feature: ADD_FAILURE_AT() for reporting a test failure at the
27 given source location -- useful for writing testing utilities.
28* New feature: the universal value printer is moved from Google Mock
29 to Google Test.
30* New feature: type parameters and value parameters are reported in
31 the XML report now.
32* A gtest_disable_pthreads CMake option.
33* Colored output works in GNU Screen sessions now.
34* Parameters of value-parameterized tests are now printed in the
35 textual output.
36* Failures from ad hoc test assertions run before RUN_ALL_TESTS() are
37 now correctly reported.
38* Arguments of ASSERT_XY and EXPECT_XY no longer need to support << to
39 ostream.
40* More complete handling of exceptions.
41* GTEST_ASSERT_XY can be used instead of ASSERT_XY in case the latter
42 name is already used by another library.
43* --gtest_catch_exceptions is now true by default, allowing a test
44 program to continue after an exception is thrown.
45* Value-parameterized test fixtures can now derive from Test and
46 WithParamInterface<T> separately, easing conversion of legacy tests.
47* Death test messages are clearly marked to make them more
48 distinguishable from other messages.
49* Compatibility fixes for Android, Google Native Client, MinGW, HP UX,
50 PowerPC, Lucid autotools, libCStd, Sun C++, Borland C++ Builder (Code Gear),
51 IBM XL C++ (Visual Age C++), and C++0x.
52* Bug fixes and implementation clean-ups.
53* Potentially incompatible changes: disables the harmful 'make install'
54 command in autotools.
55
56Changes for 1.5.0:
57
58 * New feature: assertions can be safely called in multiple threads
59 where the pthreads library is available.
60 * New feature: predicates used inside EXPECT_TRUE() and friends
61 can now generate custom failure messages.
62 * New feature: Google Test can now be compiled as a DLL.
63 * New feature: fused source files are included.
64 * New feature: prints help when encountering unrecognized Google Test flags.
65 * Experimental feature: CMake build script (requires CMake 2.6.4+).
66 * Experimental feature: the Pump script for meta programming.
67 * double values streamed to an assertion are printed with enough precision
68 to differentiate any two different values.
69 * Google Test now works on Solaris and AIX.
70 * Build and test script improvements.
71 * Bug fixes and implementation clean-ups.
72
73 Potentially breaking changes:
74
75 * Stopped supporting VC++ 7.1 with exceptions disabled.
76 * Dropped support for 'make install'.
77
78Changes for 1.4.0:
79
80 * New feature: the event listener API
81 * New feature: test shuffling
82 * New feature: the XML report format is closer to junitreport and can
83 be parsed by Hudson now.
84 * New feature: when a test runs under Visual Studio, its failures are
85 integrated in the IDE.
86 * New feature: /MD(d) versions of VC++ projects.
87 * New feature: elapsed time for the tests is printed by default.
88 * New feature: comes with a TR1 tuple implementation such that Boost
89 is no longer needed for Combine().
90 * New feature: EXPECT_DEATH_IF_SUPPORTED macro and friends.
91 * New feature: the Xcode project can now produce static gtest
92 libraries in addition to a framework.
93 * Compatibility fixes for Solaris, Cygwin, minGW, Windows Mobile,
94 Symbian, gcc, and C++Builder.
95 * Bug fixes and implementation clean-ups.
96
97Changes for 1.3.0:
98
99 * New feature: death tests on Windows, Cygwin, and Mac.
100 * New feature: ability to use Google Test assertions in other testing
101 frameworks.
102 * New feature: ability to run disabled test via
103 --gtest_also_run_disabled_tests.
104 * New feature: the --help flag for printing the usage.
105 * New feature: access to Google Test flag values in user code.
106 * New feature: a script that packs Google Test into one .h and one
107 .cc file for easy deployment.
108 * New feature: support for distributing test functions to multiple
109 machines (requires support from the test runner).
110 * Bug fixes and implementation clean-ups.
111
112Changes for 1.2.1:
113
114 * Compatibility fixes for Linux IA-64 and IBM z/OS.
115 * Added support for using Boost and other TR1 implementations.
116 * Changes to the build scripts to support upcoming release of Google C++
117 Mocking Framework.
118 * Added Makefile to the distribution package.
119 * Improved build instructions in README.
120
121Changes for 1.2.0:
122
123 * New feature: value-parameterized tests.
124 * New feature: the ASSERT/EXPECT_(NON)FATAL_FAILURE(_ON_ALL_THREADS)
125 macros.
126 * Changed the XML report format to match JUnit/Ant's.
127 * Added tests to the Xcode project.
128 * Added scons/SConscript for building with SCons.
129 * Added src/gtest-all.cc for building Google Test from a single file.
130 * Fixed compatibility with Solaris and z/OS.
131 * Enabled running Python tests on systems with python 2.3 installed,
132 e.g. Mac OS X 10.4.
133 * Bug fixes.
134
135Changes for 1.1.0:
136
137 * New feature: type-parameterized tests.
138 * New feature: exception assertions.
139 * New feature: printing elapsed time of tests.
140 * Improved the robustness of death tests.
141 * Added an Xcode project and samples.
142 * Adjusted the output format on Windows to be understandable by Visual Studio.
143 * Minor bug fixes.
144
145Changes for 1.0.1:
146
147 * Added project files for Visual Studio 7.1.
148 * Fixed issues with compiling on Mac OS X.
149 * Fixed issues with compiling on Cygwin.
150
151Changes for 1.0.0:
152
153 * Initial Open Source release of Google Test
1540
=== removed file '3rd_party/gmock/gtest/CMakeLists.txt'
--- 3rd_party/gmock/gtest/CMakeLists.txt 2014-04-07 19:53:07 +0000
+++ 3rd_party/gmock/gtest/CMakeLists.txt 1970-01-01 00:00:00 +0000
@@ -1,250 +0,0 @@
1########################################################################
2# CMake build script for Google Test.
3#
4# To run the tests for Google Test itself on Linux, use 'make test' or
5# ctest. You can select which tests to run using 'ctest -R regex'.
6# For more options, run 'ctest --help'.
7
8# BUILD_SHARED_LIBS is a standard CMake variable, but we declare it here to
9# make it prominent in the GUI.
10option(BUILD_SHARED_LIBS "Build shared libraries (DLLs)." OFF)
11
12# When other libraries are using a shared version of runtime libraries,
13# Google Test also has to use one.
14option(
15 gtest_force_shared_crt
16 "Use shared (DLL) run-time lib even when Google Test is built as static lib."
17 OFF)
18
19option(gtest_build_tests "Build all of gtest's own tests." OFF)
20
21option(gtest_build_samples "Build gtest's sample programs." OFF)
22
23option(gtest_disable_pthreads "Disable uses of pthreads in gtest." OFF)
24
25# Defines pre_project_set_up_hermetic_build() and set_up_hermetic_build().
26include(cmake/hermetic_build.cmake OPTIONAL)
27
28if (COMMAND pre_project_set_up_hermetic_build)
29 pre_project_set_up_hermetic_build()
30endif()
31
32########################################################################
33#
34# Project-wide settings
35
36# Name of the project.
37#
38# CMake files in this project can refer to the root source directory
39# as ${gtest_SOURCE_DIR} and to the root binary directory as
40# ${gtest_BINARY_DIR}.
41# Language "C" is required for find_package(Threads).
42project(gtest CXX C)
43cmake_minimum_required(VERSION 2.6.2)
44
45if (COMMAND set_up_hermetic_build)
46 set_up_hermetic_build()
47endif()
48
49# Define helper functions and macros used by Google Test.
50include(cmake/internal_utils.cmake)
51
52config_compiler_and_linker() # Defined in internal_utils.cmake.
53
54# Where Google Test's .h files can be found.
55include_directories(
56 ${gtest_SOURCE_DIR}/include
57 ${gtest_SOURCE_DIR})
58
59# Where Google Test's libraries can be found.
60link_directories(${gtest_BINARY_DIR}/src)
61
62########################################################################
63#
64# Defines the gtest & gtest_main libraries. User tests should link
65# with one of them.
66
67# Google Test libraries. We build them using more strict warnings than what
68# are used for other targets, to ensure that gtest can be compiled by a user
69# aggressive about warnings.
70cxx_library(gtest "${cxx_strict}" src/gtest-all.cc)
71cxx_library(gtest_main "${cxx_strict}" src/gtest_main.cc)
72target_link_libraries(gtest_main gtest)
73
74########################################################################
75#
76# Samples on how to link user tests with gtest or gtest_main.
77#
78# They are not built by default. To build them, set the
79# gtest_build_samples option to ON. You can do it by running ccmake
80# or specifying the -Dbuild_gtest_samples=ON flag when running cmake.
81
82if (gtest_build_samples)
83 cxx_executable(sample1_unittest samples gtest_main samples/sample1.cc)
84 cxx_executable(sample2_unittest samples gtest_main samples/sample2.cc)
85 cxx_executable(sample3_unittest samples gtest_main)
86 cxx_executable(sample4_unittest samples gtest_main samples/sample4.cc)
87 cxx_executable(sample5_unittest samples gtest_main samples/sample1.cc)
88 cxx_executable(sample6_unittest samples gtest_main)
89 cxx_executable(sample7_unittest samples gtest_main)
90 cxx_executable(sample8_unittest samples gtest_main)
91 cxx_executable(sample9_unittest samples gtest)
92 cxx_executable(sample10_unittest samples gtest)
93endif()
94
95########################################################################
96#
97# Google Test's own tests.
98#
99# You can skip this section if you aren't interested in testing
100# Google Test itself.
101#
102# The tests are not built by default. To build them, set the
103# gtest_build_tests option to ON. You can do it by running ccmake
104# or specifying the -Dgtest_build_tests=ON flag when running cmake.
105
106if (gtest_build_tests)
107 # This must be set in the root directory for the tests to be run by
108 # 'make test' or ctest.
109 enable_testing()
110
111 ############################################################
112 # C++ tests built with standard compiler flags.
113
114 cxx_test(gtest-death-test_test gtest_main)
115 cxx_test(gtest_environment_test gtest)
116 cxx_test(gtest-filepath_test gtest_main)
117 cxx_test(gtest-linked_ptr_test gtest_main)
118 cxx_test(gtest-listener_test gtest_main)
119 cxx_test(gtest_main_unittest gtest_main)
120 cxx_test(gtest-message_test gtest_main)
121 cxx_test(gtest_no_test_unittest gtest)
122 cxx_test(gtest-options_test gtest_main)
123 cxx_test(gtest-param-test_test gtest
124 test/gtest-param-test2_test.cc)
125 cxx_test(gtest-port_test gtest_main)
126 cxx_test(gtest_pred_impl_unittest gtest_main)
127 cxx_test(gtest-printers_test gtest_main)
128 cxx_test(gtest_prod_test gtest_main
129 test/production.cc)
130 cxx_test(gtest_repeat_test gtest)
131 cxx_test(gtest_sole_header_test gtest_main)
132 cxx_test(gtest_stress_test gtest)
133 cxx_test(gtest-test-part_test gtest_main)
134 cxx_test(gtest_throw_on_failure_ex_test gtest)
135 cxx_test(gtest-typed-test_test gtest_main
136 test/gtest-typed-test2_test.cc)
137 cxx_test(gtest_unittest gtest_main)
138 cxx_test(gtest-unittest-api_test gtest)
139
140 ############################################################
141 # C++ tests built with non-standard compiler flags.
142
143 # MSVC 7.1 does not support STL with exceptions disabled.
144 if (NOT MSVC OR MSVC_VERSION GREATER 1310)
145 cxx_library(gtest_no_exception "${cxx_no_exception}"
146 src/gtest-all.cc)
147 cxx_library(gtest_main_no_exception "${cxx_no_exception}"
148 src/gtest-all.cc src/gtest_main.cc)
149 endif()
150 cxx_library(gtest_main_no_rtti "${cxx_no_rtti}"
151 src/gtest-all.cc src/gtest_main.cc)
152
153 cxx_test_with_flags(gtest-death-test_ex_nocatch_test
154 "${cxx_exception} -DGTEST_ENABLE_CATCH_EXCEPTIONS_=0"
155 gtest test/gtest-death-test_ex_test.cc)
156 cxx_test_with_flags(gtest-death-test_ex_catch_test
157 "${cxx_exception} -DGTEST_ENABLE_CATCH_EXCEPTIONS_=1"
158 gtest test/gtest-death-test_ex_test.cc)
159
160 cxx_test_with_flags(gtest_no_rtti_unittest "${cxx_no_rtti}"
161 gtest_main_no_rtti test/gtest_unittest.cc)
162
163 cxx_shared_library(gtest_dll "${cxx_default}"
164 src/gtest-all.cc src/gtest_main.cc)
165
166 cxx_executable_with_flags(gtest_dll_test_ "${cxx_default}"
167 gtest_dll test/gtest_all_test.cc)
168 set_target_properties(gtest_dll_test_
169 PROPERTIES
170 COMPILE_DEFINITIONS "GTEST_LINKED_AS_SHARED_LIBRARY=1")
171
172 if (NOT MSVC OR NOT MSVC_VERSION EQUAL 1600)
173 # The C++ Standard specifies tuple_element<int, class>.
174 # Yet MSVC 10's <utility> declares tuple_element<size_t, class>.
175 # That declaration conflicts with our own standard-conforming
176 # tuple implementation. Therefore using our own tuple with
177 # MSVC 10 doesn't compile.
178 cxx_library(gtest_main_use_own_tuple "${cxx_use_own_tuple}"
179 src/gtest-all.cc src/gtest_main.cc)
180
181 cxx_test_with_flags(gtest-tuple_test "${cxx_use_own_tuple}"
182 gtest_main_use_own_tuple test/gtest-tuple_test.cc)
183
184 cxx_test_with_flags(gtest_use_own_tuple_test "${cxx_use_own_tuple}"
185 gtest_main_use_own_tuple
186 test/gtest-param-test_test.cc test/gtest-param-test2_test.cc)
187 endif()
188
189 ############################################################
190 # Python tests.
191
192 cxx_executable(gtest_break_on_failure_unittest_ test gtest)
193 py_test(gtest_break_on_failure_unittest)
194
195 # MSVC 7.1 does not support STL with exceptions disabled.
196 if (NOT MSVC OR MSVC_VERSION GREATER 1310)
197 cxx_executable_with_flags(
198 gtest_catch_exceptions_no_ex_test_
199 "${cxx_no_exception}"
200 gtest_main_no_exception
201 test/gtest_catch_exceptions_test_.cc)
202 endif()
203
204 cxx_executable_with_flags(
205 gtest_catch_exceptions_ex_test_
206 "${cxx_exception}"
207 gtest_main
208 test/gtest_catch_exceptions_test_.cc)
209 py_test(gtest_catch_exceptions_test)
210
211 cxx_executable(gtest_color_test_ test gtest)
212 py_test(gtest_color_test)
213
214 cxx_executable(gtest_env_var_test_ test gtest)
215 py_test(gtest_env_var_test)
216
217 cxx_executable(gtest_filter_unittest_ test gtest)
218 py_test(gtest_filter_unittest)
219
220 cxx_executable(gtest_help_test_ test gtest_main)
221 py_test(gtest_help_test)
222
223 cxx_executable(gtest_list_tests_unittest_ test gtest)
224 py_test(gtest_list_tests_unittest)
225
226 cxx_executable(gtest_output_test_ test gtest)
227 py_test(gtest_output_test)
228
229 cxx_executable(gtest_shuffle_test_ test gtest)
230 py_test(gtest_shuffle_test)
231
232 # MSVC 7.1 does not support STL with exceptions disabled.
233 if (NOT MSVC OR MSVC_VERSION GREATER 1310)
234 cxx_executable(gtest_throw_on_failure_test_ test gtest_no_exception)
235 set_target_properties(gtest_throw_on_failure_test_
236 PROPERTIES
237 COMPILE_FLAGS "${cxx_no_exception}")
238 py_test(gtest_throw_on_failure_test)
239 endif()
240
241 cxx_executable(gtest_uninitialized_test_ test gtest)
242 py_test(gtest_uninitialized_test)
243
244 cxx_executable(gtest_xml_outfile1_test_ test gtest_main)
245 cxx_executable(gtest_xml_outfile2_test_ test gtest_main)
246 py_test(gtest_xml_outfiles_test)
247
248 cxx_executable(gtest_xml_output_unittest_ test gtest)
249 py_test(gtest_xml_output_unittest)
250endif()
2510
=== removed file '3rd_party/gmock/gtest/CONTRIBUTORS'
--- 3rd_party/gmock/gtest/CONTRIBUTORS 2014-04-07 19:53:07 +0000
+++ 3rd_party/gmock/gtest/CONTRIBUTORS 1970-01-01 00:00:00 +0000
@@ -1,37 +0,0 @@
1# This file contains a list of people who've made non-trivial
2# contribution to the Google C++ Testing Framework project. People
3# who commit code to the project are encouraged to add their names
4# here. Please keep the list sorted by first names.
5
6Ajay Joshi <jaj@google.com>
7Balázs Dán <balazs.dan@gmail.com>
8Bharat Mediratta <bharat@menalto.com>
9Chandler Carruth <chandlerc@google.com>
10Chris Prince <cprince@google.com>
11Chris Taylor <taylorc@google.com>
12Dan Egnor <egnor@google.com>
13Eric Roman <eroman@chromium.org>
14Hady Zalek <hady.zalek@gmail.com>
15Jeffrey Yasskin <jyasskin@google.com>
16Jói Sigurðsson <joi@google.com>
17Keir Mierle <mierle@gmail.com>
18Keith Ray <keith.ray@gmail.com>
19Kenton Varda <kenton@google.com>
20Manuel Klimek <klimek@google.com>
21Markus Heule <markus.heule@gmail.com>
22Mika Raento <mikie@iki.fi>
23Miklós Fazekas <mfazekas@szemafor.com>
24Pasi Valminen <pasi.valminen@gmail.com>
25Patrick Hanna <phanna@google.com>
26Patrick Riley <pfr@google.com>
27Peter Kaminski <piotrk@google.com>
28Preston Jackson <preston.a.jackson@gmail.com>
29Rainer Klaffenboeck <rainer.klaffenboeck@dynatrace.com>
30Russ Cox <rsc@google.com>
31Russ Rufer <russ@pentad.com>
32Sean Mcafee <eefacm@gmail.com>
33Sigurður Ásgeirsson <siggi@google.com>
34Tracy Bialik <tracy@pentad.com>
35Vadim Berman <vadimb@google.com>
36Vlad Losev <vladl@google.com>
37Zhanyong Wan <wan@google.com>
380
=== removed file '3rd_party/gmock/gtest/Makefile.am'
--- 3rd_party/gmock/gtest/Makefile.am 2014-04-07 19:53:07 +0000
+++ 3rd_party/gmock/gtest/Makefile.am 1970-01-01 00:00:00 +0000
@@ -1,305 +0,0 @@
1# Automake file
2
3ACLOCAL_AMFLAGS = -I m4
4
5# Nonstandard package files for distribution
6EXTRA_DIST = \
7 CHANGES \
8 CONTRIBUTORS \
9 LICENSE \
10 include/gtest/gtest-param-test.h.pump \
11 include/gtest/internal/gtest-param-util-generated.h.pump \
12 include/gtest/internal/gtest-tuple.h.pump \
13 include/gtest/internal/gtest-type-util.h.pump \
14 make/Makefile \
15 scripts/fuse_gtest_files.py \
16 scripts/gen_gtest_pred_impl.py \
17 scripts/pump.py \
18 scripts/test/Makefile
19
20# gtest source files that we don't compile directly. They are
21# #included by gtest-all.cc.
22GTEST_SRC = \
23 src/gtest-death-test.cc \
24 src/gtest-filepath.cc \
25 src/gtest-internal-inl.h \
26 src/gtest-port.cc \
27 src/gtest-printers.cc \
28 src/gtest-test-part.cc \
29 src/gtest-typed-test.cc \
30 src/gtest.cc
31
32EXTRA_DIST += $(GTEST_SRC)
33
34# Sample files that we don't compile.
35EXTRA_DIST += \
36 samples/prime_tables.h \
37 samples/sample2_unittest.cc \
38 samples/sample3_unittest.cc \
39 samples/sample4_unittest.cc \
40 samples/sample5_unittest.cc \
41 samples/sample6_unittest.cc \
42 samples/sample7_unittest.cc \
43 samples/sample8_unittest.cc \
44 samples/sample9_unittest.cc
45
46# C++ test files that we don't compile directly.
47EXTRA_DIST += \
48 test/gtest-death-test_ex_test.cc \
49 test/gtest-death-test_test.cc \
50 test/gtest-filepath_test.cc \
51 test/gtest-linked_ptr_test.cc \
52 test/gtest-listener_test.cc \
53 test/gtest-message_test.cc \
54 test/gtest-options_test.cc \
55 test/gtest-param-test2_test.cc \
56 test/gtest-param-test2_test.cc \
57 test/gtest-param-test_test.cc \
58 test/gtest-param-test_test.cc \
59 test/gtest-param-test_test.h \
60 test/gtest-port_test.cc \
61 test/gtest-printers_test.cc \
62 test/gtest-test-part_test.cc \
63 test/gtest-tuple_test.cc \
64 test/gtest-typed-test2_test.cc \
65 test/gtest-typed-test_test.cc \
66 test/gtest-typed-test_test.h \
67 test/gtest-unittest-api_test.cc \
68 test/gtest_break_on_failure_unittest_.cc \
69 test/gtest_catch_exceptions_test_.cc \
70 test/gtest_color_test_.cc \
71 test/gtest_env_var_test_.cc \
72 test/gtest_environment_test.cc \
73 test/gtest_filter_unittest_.cc \
74 test/gtest_help_test_.cc \
75 test/gtest_list_tests_unittest_.cc \
76 test/gtest_main_unittest.cc \
77 test/gtest_no_test_unittest.cc \
78 test/gtest_output_test_.cc \
79 test/gtest_pred_impl_unittest.cc \
80 test/gtest_prod_test.cc \
81 test/gtest_repeat_test.cc \
82 test/gtest_shuffle_test_.cc \
83 test/gtest_sole_header_test.cc \
84 test/gtest_stress_test.cc \
85 test/gtest_throw_on_failure_ex_test.cc \
86 test/gtest_throw_on_failure_test_.cc \
87 test/gtest_uninitialized_test_.cc \
88 test/gtest_unittest.cc \
89 test/gtest_unittest.cc \
90 test/gtest_xml_outfile1_test_.cc \
91 test/gtest_xml_outfile2_test_.cc \
92 test/gtest_xml_output_unittest_.cc \
93 test/production.cc \
94 test/production.h
95
96# Python tests that we don't run.
97EXTRA_DIST += \
98 test/gtest_break_on_failure_unittest.py \
99 test/gtest_catch_exceptions_test.py \
100 test/gtest_color_test.py \
101 test/gtest_env_var_test.py \
102 test/gtest_filter_unittest.py \
103 test/gtest_help_test.py \
104 test/gtest_list_tests_unittest.py \
105 test/gtest_output_test.py \
106 test/gtest_output_test_golden_lin.txt \
107 test/gtest_shuffle_test.py \
108 test/gtest_test_utils.py \
109 test/gtest_throw_on_failure_test.py \
110 test/gtest_uninitialized_test.py \
111 test/gtest_xml_outfiles_test.py \
112 test/gtest_xml_output_unittest.py \
113 test/gtest_xml_test_utils.py
114
115# CMake script
116EXTRA_DIST += \
117 CMakeLists.txt \
118 cmake/internal_utils.cmake
119
120# MSVC project files
121EXTRA_DIST += \
122 msvc/gtest-md.sln \
123 msvc/gtest-md.vcproj \
124 msvc/gtest.sln \
125 msvc/gtest.vcproj \
126 msvc/gtest_main-md.vcproj \
127 msvc/gtest_main.vcproj \
128 msvc/gtest_prod_test-md.vcproj \
129 msvc/gtest_prod_test.vcproj \
130 msvc/gtest_unittest-md.vcproj \
131 msvc/gtest_unittest.vcproj
132
133# xcode project files
134EXTRA_DIST += \
135 xcode/Config/DebugProject.xcconfig \
136 xcode/Config/FrameworkTarget.xcconfig \
137 xcode/Config/General.xcconfig \
138 xcode/Config/ReleaseProject.xcconfig \
139 xcode/Config/StaticLibraryTarget.xcconfig \
140 xcode/Config/TestTarget.xcconfig \
141 xcode/Resources/Info.plist \
142 xcode/Scripts/runtests.sh \
143 xcode/Scripts/versiongenerate.py \
144 xcode/gtest.xcodeproj/project.pbxproj
145
146# xcode sample files
147EXTRA_DIST += \
148 xcode/Samples/FrameworkSample/Info.plist \
149 xcode/Samples/FrameworkSample/WidgetFramework.xcodeproj/project.pbxproj \
150 xcode/Samples/FrameworkSample/runtests.sh \
151 xcode/Samples/FrameworkSample/widget.cc \
152 xcode/Samples/FrameworkSample/widget.h \
153 xcode/Samples/FrameworkSample/widget_test.cc
154
155# C++Builder project files
156EXTRA_DIST += \
157 codegear/gtest.cbproj \
158 codegear/gtest.groupproj \
159 codegear/gtest_all.cc \
160 codegear/gtest_link.cc \
161 codegear/gtest_main.cbproj \
162 codegear/gtest_unittest.cbproj
163
164# Distribute and install M4 macro
165m4datadir = $(datadir)/aclocal
166m4data_DATA = m4/gtest.m4
167EXTRA_DIST += $(m4data_DATA)
168
169# We define the global AM_CPPFLAGS as everything we compile includes from these
170# directories.
171AM_CPPFLAGS = -I$(srcdir) -I$(srcdir)/include
172
173# Modifies compiler and linker flags for pthreads compatibility.
174if HAVE_PTHREADS
175 AM_CXXFLAGS = @PTHREAD_CFLAGS@ -DGTEST_HAS_PTHREAD=1
176 AM_LIBS = @PTHREAD_LIBS@
177else
178 AM_CXXFLAGS = -DGTEST_HAS_PTHREAD=0
179endif
180
181# Build rules for libraries.
182lib_LTLIBRARIES = lib/libgtest.la lib/libgtest_main.la
183
184lib_libgtest_la_SOURCES = src/gtest-all.cc
185
186pkginclude_HEADERS = \
187 include/gtest/gtest-death-test.h \
188 include/gtest/gtest-message.h \
189 include/gtest/gtest-param-test.h \
190 include/gtest/gtest-printers.h \
191 include/gtest/gtest-spi.h \
192 include/gtest/gtest-test-part.h \
193 include/gtest/gtest-typed-test.h \
194 include/gtest/gtest.h \
195 include/gtest/gtest_pred_impl.h \
196 include/gtest/gtest_prod.h
197
198pkginclude_internaldir = $(pkgincludedir)/internal
199pkginclude_internal_HEADERS = \
200 include/gtest/internal/gtest-death-test-internal.h \
201 include/gtest/internal/gtest-filepath.h \
202 include/gtest/internal/gtest-internal.h \
203 include/gtest/internal/gtest-linked_ptr.h \
204 include/gtest/internal/gtest-param-util-generated.h \
205 include/gtest/internal/gtest-param-util.h \
206 include/gtest/internal/gtest-port.h \
207 include/gtest/internal/gtest-string.h \
208 include/gtest/internal/gtest-tuple.h \
209 include/gtest/internal/gtest-type-util.h
210
211lib_libgtest_main_la_SOURCES = src/gtest_main.cc
212lib_libgtest_main_la_LIBADD = lib/libgtest.la
213
214# Bulid rules for samples and tests. Automake's naming for some of
215# these variables isn't terribly obvious, so this is a brief
216# reference:
217#
218# TESTS -- Programs run automatically by "make check"
219# check_PROGRAMS -- Programs built by "make check" but not necessarily run
220
221noinst_LTLIBRARIES = samples/libsamples.la
222
223samples_libsamples_la_SOURCES = \
224 samples/sample1.cc \
225 samples/sample1.h \
226 samples/sample2.cc \
227 samples/sample2.h \
228 samples/sample3-inl.h \
229 samples/sample4.cc \
230 samples/sample4.h
231
232TESTS=
233TESTS_ENVIRONMENT = GTEST_SOURCE_DIR="$(srcdir)/test" \
234 GTEST_BUILD_DIR="$(top_builddir)/test"
235check_PROGRAMS=
236
237# A simple sample on using gtest.
238TESTS += samples/sample1_unittest
239check_PROGRAMS += samples/sample1_unittest
240samples_sample1_unittest_SOURCES = samples/sample1_unittest.cc
241samples_sample1_unittest_LDADD = lib/libgtest_main.la \
242 lib/libgtest.la \
243 samples/libsamples.la
244
245# Another sample. It also verifies that libgtest works.
246TESTS += samples/sample10_unittest
247check_PROGRAMS += samples/sample10_unittest
248samples_sample10_unittest_SOURCES = samples/sample10_unittest.cc
249samples_sample10_unittest_LDADD = lib/libgtest.la
250
251# This tests most constructs of gtest and verifies that libgtest_main
252# and libgtest work.
253TESTS += test/gtest_all_test
254check_PROGRAMS += test/gtest_all_test
255test_gtest_all_test_SOURCES = test/gtest_all_test.cc
256test_gtest_all_test_LDADD = lib/libgtest_main.la \
257 lib/libgtest.la
258
259# Tests that fused gtest files compile and work.
260FUSED_GTEST_SRC = \
261 fused-src/gtest/gtest-all.cc \
262 fused-src/gtest/gtest.h \
263 fused-src/gtest/gtest_main.cc
264
265if HAVE_PYTHON
266TESTS += test/fused_gtest_test
267check_PROGRAMS += test/fused_gtest_test
268test_fused_gtest_test_SOURCES = $(FUSED_GTEST_SRC) \
269 samples/sample1.cc samples/sample1_unittest.cc
270test_fused_gtest_test_CPPFLAGS = -I"$(srcdir)/fused-src"
271
272# Build rules for putting fused Google Test files into the distribution
273# package. The user can also create those files by manually running
274# scripts/fuse_gtest_files.py.
275$(test_fused_gtest_test_SOURCES): fused-gtest
276
277fused-gtest: $(pkginclude_HEADERS) $(pkginclude_internal_HEADERS) \
278 $(GTEST_SRC) src/gtest-all.cc src/gtest_main.cc \
279 scripts/fuse_gtest_files.py
280 mkdir -p "$(srcdir)/fused-src"
281 chmod -R u+w "$(srcdir)/fused-src"
282 rm -f "$(srcdir)/fused-src/gtest/gtest-all.cc"
283 rm -f "$(srcdir)/fused-src/gtest/gtest.h"
284 "$(srcdir)/scripts/fuse_gtest_files.py" "$(srcdir)/fused-src"
285 cp -f "$(srcdir)/src/gtest_main.cc" "$(srcdir)/fused-src/gtest/"
286
287maintainer-clean-local:
288 rm -rf "$(srcdir)/fused-src"
289endif
290
291# Death tests may produce core dumps in the build directory. In case
292# this happens, clean them to keep distcleancheck happy.
293CLEANFILES = core
294
295# Disables 'make install' as installing a compiled version of Google
296# Test can lead to undefined behavior due to violation of the
297# One-Definition Rule.
298
299install-exec-local:
300 echo "'make install' is dangerous and not supported. Instead, see README for how to integrate Google Test into your build system."
301 false
302
303install-data-local:
304 echo "'make install' is dangerous and not supported. Instead, see README for how to integrate Google Test into your build system."
305 false
3060
=== removed file '3rd_party/gmock/gtest/README'
--- 3rd_party/gmock/gtest/README 2014-04-07 19:53:07 +0000
+++ 3rd_party/gmock/gtest/README 1970-01-01 00:00:00 +0000
@@ -1,435 +0,0 @@
1Google C++ Testing Framework
2============================
3
4http://code.google.com/p/googletest/
5
6Overview
7--------
8
9Google's framework for writing C++ tests on a variety of platforms
10(Linux, Mac OS X, Windows, Windows CE, Symbian, etc). Based on the
11xUnit architecture. Supports automatic test discovery, a rich set of
12assertions, user-defined assertions, death tests, fatal and non-fatal
13failures, various options for running the tests, and XML test report
14generation.
15
16Please see the project page above for more information as well as the
17mailing list for questions, discussions, and development. There is
18also an IRC channel on OFTC (irc.oftc.net) #gtest available. Please
19join us!
20
21Requirements for End Users
22--------------------------
23
24Google Test is designed to have fairly minimal requirements to build
25and use with your projects, but there are some. Currently, we support
26Linux, Windows, Mac OS X, and Cygwin. We will also make our best
27effort to support other platforms (e.g. Solaris, AIX, and z/OS).
28However, since core members of the Google Test project have no access
29to these platforms, Google Test may have outstanding issues there. If
30you notice any problems on your platform, please notify
31googletestframework@googlegroups.com. Patches for fixing them are
32even more welcome!
33
34### Linux Requirements ###
35
36These are the base requirements to build and use Google Test from a source
37package (as described below):
38 * GNU-compatible Make or gmake
39 * POSIX-standard shell
40 * POSIX(-2) Regular Expressions (regex.h)
41 * A C++98-standard-compliant compiler
42
43### Windows Requirements ###
44
45 * Microsoft Visual C++ 7.1 or newer
46
47### Cygwin Requirements ###
48
49 * Cygwin 1.5.25-14 or newer
50
51### Mac OS X Requirements ###
52
53 * Mac OS X 10.4 Tiger or newer
54 * Developer Tools Installed
55
56Also, you'll need CMake 2.6.4 or higher if you want to build the
57samples using the provided CMake script, regardless of the platform.
58
59Requirements for Contributors
60-----------------------------
61
62We welcome patches. If you plan to contribute a patch, you need to
63build Google Test and its own tests from an SVN checkout (described
64below), which has further requirements:
65
66 * Python version 2.3 or newer (for running some of the tests and
67 re-generating certain source files from templates)
68 * CMake 2.6.4 or newer
69
70Getting the Source
71------------------
72
73There are two primary ways of getting Google Test's source code: you
74can download a stable source release in your preferred archive format,
75or directly check out the source from our Subversion (SVN) repositary.
76The SVN checkout requires a few extra steps and some extra software
77packages on your system, but lets you track the latest development and
78make patches much more easily, so we highly encourage it.
79
80### Source Package ###
81
82Google Test is released in versioned source packages which can be
83downloaded from the download page [1]. Several different archive
84formats are provided, but the only difference is the tools used to
85manipulate them, and the size of the resulting file. Download
86whichever you are most comfortable with.
87
88 [1] http://code.google.com/p/googletest/downloads/list
89
90Once the package is downloaded, expand it using whichever tools you
91prefer for that type. This will result in a new directory with the
92name "gtest-X.Y.Z" which contains all of the source code. Here are
93some examples on Linux:
94
95 tar -xvzf gtest-X.Y.Z.tar.gz
96 tar -xvjf gtest-X.Y.Z.tar.bz2
97 unzip gtest-X.Y.Z.zip
98
99### SVN Checkout ###
100
101To check out the main branch (also known as the "trunk") of Google
102Test, run the following Subversion command:
103
104 svn checkout http://googletest.googlecode.com/svn/trunk/ gtest-svn
105
106Setting up the Build
107--------------------
108
109To build Google Test and your tests that use it, you need to tell your
110build system where to find its headers and source files. The exact
111way to do it depends on which build system you use, and is usually
112straightforward.
113
114### Generic Build Instructions ###
115
116Suppose you put Google Test in directory ${GTEST_DIR}. To build it,
117create a library build target (or a project as called by Visual Studio
118and Xcode) to compile
119
120 ${GTEST_DIR}/src/gtest-all.cc
121
122with ${GTEST_DIR}/include in the system header search path and ${GTEST_DIR}
123in the normal header search path. Assuming a Linux-like system and gcc,
124something like the following will do:
125
126 g++ -isystem ${GTEST_DIR}/include -I${GTEST_DIR} \
127 -pthread -c ${GTEST_DIR}/src/gtest-all.cc
128 ar -rv libgtest.a gtest-all.o
129
130(We need -pthread as Google Test uses threads.)
131
132Next, you should compile your test source file with
133${GTEST_DIR}/include in the system header search path, and link it
134with gtest and any other necessary libraries:
135
136 g++ -isystem ${GTEST_DIR}/include -pthread path/to/your_test.cc libgtest.a \
137 -o your_test
138
139As an example, the make/ directory contains a Makefile that you can
140use to build Google Test on systems where GNU make is available
141(e.g. Linux, Mac OS X, and Cygwin). It doesn't try to build Google
142Test's own tests. Instead, it just builds the Google Test library and
143a sample test. You can use it as a starting point for your own build
144script.
145
146If the default settings are correct for your environment, the
147following commands should succeed:
148
149 cd ${GTEST_DIR}/make
150 make
151 ./sample1_unittest
152
153If you see errors, try to tweak the contents of make/Makefile to make
154them go away. There are instructions in make/Makefile on how to do
155it.
156
157### Using CMake ###
158
159Google Test comes with a CMake build script (CMakeLists.txt) that can
160be used on a wide range of platforms ("C" stands for cross-platofrm.).
161If you don't have CMake installed already, you can download it for
162free from http://www.cmake.org/.
163
164CMake works by generating native makefiles or build projects that can
165be used in the compiler environment of your choice. The typical
166workflow starts with:
167
168 mkdir mybuild # Create a directory to hold the build output.
169 cd mybuild
170 cmake ${GTEST_DIR} # Generate native build scripts.
171
172If you want to build Google Test's samples, you should replace the
173last command with
174
175 cmake -Dgtest_build_samples=ON ${GTEST_DIR}
176
177If you are on a *nix system, you should now see a Makefile in the
178current directory. Just type 'make' to build gtest.
179
180If you use Windows and have Vistual Studio installed, a gtest.sln file
181and several .vcproj files will be created. You can then build them
182using Visual Studio.
183
184On Mac OS X with Xcode installed, a .xcodeproj file will be generated.
185
186### Legacy Build Scripts ###
187
188Before settling on CMake, we have been providing hand-maintained build
189projects/scripts for Visual Studio, Xcode, and Autotools. While we
190continue to provide them for convenience, they are not actively
191maintained any more. We highly recommend that you follow the
192instructions in the previous two sections to integrate Google Test
193with your existing build system.
194
195If you still need to use the legacy build scripts, here's how:
196
197The msvc\ folder contains two solutions with Visual C++ projects.
198Open the gtest.sln or gtest-md.sln file using Visual Studio, and you
199are ready to build Google Test the same way you build any Visual
200Studio project. Files that have names ending with -md use DLL
201versions of Microsoft runtime libraries (the /MD or the /MDd compiler
202option). Files without that suffix use static versions of the runtime
203libraries (the /MT or the /MTd option). Please note that one must use
204the same option to compile both gtest and the test code. If you use
205Visual Studio 2005 or above, we recommend the -md version as /MD is
206the default for new projects in these versions of Visual Studio.
207
208On Mac OS X, open the gtest.xcodeproj in the xcode/ folder using
209Xcode. Build the "gtest" target. The universal binary framework will
210end up in your selected build directory (selected in the Xcode
211"Preferences..." -> "Building" pane and defaults to xcode/build).
212Alternatively, at the command line, enter:
213
214 xcodebuild
215
216This will build the "Release" configuration of gtest.framework in your
217default build location. See the "xcodebuild" man page for more
218information about building different configurations and building in
219different locations.
220
221If you wish to use the Google Test Xcode project with Xcode 4.x and
222above, you need to either:
223 * update the SDK configuration options in xcode/Config/General.xconfig.
224 Comment options SDKROOT, MACOS_DEPLOYMENT_TARGET, and GCC_VERSION. If
225 you choose this route you lose the ability to target earlier versions
226 of MacOS X.
227 * Install an SDK for an earlier version. This doesn't appear to be
228 supported by Apple, but has been reported to work
229 (http://stackoverflow.com/questions/5378518).
230
231Tweaking Google Test
232--------------------
233
234Google Test can be used in diverse environments. The default
235configuration may not work (or may not work well) out of the box in
236some environments. However, you can easily tweak Google Test by
237defining control macros on the compiler command line. Generally,
238these macros are named like GTEST_XYZ and you define them to either 1
239or 0 to enable or disable a certain feature.
240
241We list the most frequently used macros below. For a complete list,
242see file include/gtest/internal/gtest-port.h.
243
244### Choosing a TR1 Tuple Library ###
245
246Some Google Test features require the C++ Technical Report 1 (TR1)
247tuple library, which is not yet available with all compilers. The
248good news is that Google Test implements a subset of TR1 tuple that's
249enough for its own need, and will automatically use this when the
250compiler doesn't provide TR1 tuple.
251
252Usually you don't need to care about which tuple library Google Test
253uses. However, if your project already uses TR1 tuple, you need to
254tell Google Test to use the same TR1 tuple library the rest of your
255project uses, or the two tuple implementations will clash. To do
256that, add
257
258 -DGTEST_USE_OWN_TR1_TUPLE=0
259
260to the compiler flags while compiling Google Test and your tests. If
261you want to force Google Test to use its own tuple library, just add
262
263 -DGTEST_USE_OWN_TR1_TUPLE=1
264
265to the compiler flags instead.
266
267If you don't want Google Test to use tuple at all, add
268
269 -DGTEST_HAS_TR1_TUPLE=0
270
271and all features using tuple will be disabled.
272
273### Multi-threaded Tests ###
274
275Google Test is thread-safe where the pthread library is available.
276After #include "gtest/gtest.h", you can check the GTEST_IS_THREADSAFE
277macro to see whether this is the case (yes if the macro is #defined to
2781, no if it's undefined.).
279
280If Google Test doesn't correctly detect whether pthread is available
281in your environment, you can force it with
282
283 -DGTEST_HAS_PTHREAD=1
284
285or
286
287 -DGTEST_HAS_PTHREAD=0
288
289When Google Test uses pthread, you may need to add flags to your
290compiler and/or linker to select the pthread library, or you'll get
291link errors. If you use the CMake script or the deprecated Autotools
292script, this is taken care of for you. If you use your own build
293script, you'll need to read your compiler and linker's manual to
294figure out what flags to add.
295
296### As a Shared Library (DLL) ###
297
298Google Test is compact, so most users can build and link it as a
299static library for the simplicity. You can choose to use Google Test
300as a shared library (known as a DLL on Windows) if you prefer.
301
302To compile *gtest* as a shared library, add
303
304 -DGTEST_CREATE_SHARED_LIBRARY=1
305
306to the compiler flags. You'll also need to tell the linker to produce
307a shared library instead - consult your linker's manual for how to do
308it.
309
310To compile your *tests* that use the gtest shared library, add
311
312 -DGTEST_LINKED_AS_SHARED_LIBRARY=1
313
314to the compiler flags.
315
316Note: while the above steps aren't technically necessary today when
317using some compilers (e.g. GCC), they may become necessary in the
318future, if we decide to improve the speed of loading the library (see
319http://gcc.gnu.org/wiki/Visibility for details). Therefore you are
320recommended to always add the above flags when using Google Test as a
321shared library. Otherwise a future release of Google Test may break
322your build script.
323
324### Avoiding Macro Name Clashes ###
325
326In C++, macros don't obey namespaces. Therefore two libraries that
327both define a macro of the same name will clash if you #include both
328definitions. In case a Google Test macro clashes with another
329library, you can force Google Test to rename its macro to avoid the
330conflict.
331
332Specifically, if both Google Test and some other code define macro
333FOO, you can add
334
335 -DGTEST_DONT_DEFINE_FOO=1
336
337to the compiler flags to tell Google Test to change the macro's name
338from FOO to GTEST_FOO. Currently FOO can be FAIL, SUCCEED, or TEST.
339For example, with -DGTEST_DONT_DEFINE_TEST=1, you'll need to write
340
341 GTEST_TEST(SomeTest, DoesThis) { ... }
342
343instead of
344
345 TEST(SomeTest, DoesThis) { ... }
346
347in order to define a test.
348
349Upgrating from an Earlier Version
350---------------------------------
351
352We strive to keep Google Test releases backward compatible.
353Sometimes, though, we have to make some breaking changes for the
354users' long-term benefits. This section describes what you'll need to
355do if you are upgrading from an earlier version of Google Test.
356
357### Upgrading from 1.3.0 or Earlier ###
358
359You may need to explicitly enable or disable Google Test's own TR1
360tuple library. See the instructions in section "Choosing a TR1 Tuple
361Library".
362
363### Upgrading from 1.4.0 or Earlier ###
364
365The Autotools build script (configure + make) is no longer officially
366supportted. You are encouraged to migrate to your own build system or
367use CMake. If you still need to use Autotools, you can find
368instructions in the README file from Google Test 1.4.0.
369
370On platforms where the pthread library is available, Google Test uses
371it in order to be thread-safe. See the "Multi-threaded Tests" section
372for what this means to your build script.
373
374If you use Microsoft Visual C++ 7.1 with exceptions disabled, Google
375Test will no longer compile. This should affect very few people, as a
376large portion of STL (including <string>) doesn't compile in this mode
377anyway. We decided to stop supporting it in order to greatly simplify
378Google Test's implementation.
379
380Developing Google Test
381----------------------
382
383This section discusses how to make your own changes to Google Test.
384
385### Testing Google Test Itself ###
386
387To make sure your changes work as intended and don't break existing
388functionality, you'll want to compile and run Google Test's own tests.
389For that you can use CMake:
390
391 mkdir mybuild
392 cd mybuild
393 cmake -Dgtest_build_tests=ON ${GTEST_DIR}
394
395Make sure you have Python installed, as some of Google Test's tests
396are written in Python. If the cmake command complains about not being
397able to find Python ("Could NOT find PythonInterp (missing:
398PYTHON_EXECUTABLE)"), try telling it explicitly where your Python
399executable can be found:
400
401 cmake -DPYTHON_EXECUTABLE=path/to/python -Dgtest_build_tests=ON ${GTEST_DIR}
402
403Next, you can build Google Test and all of its own tests. On *nix,
404this is usually done by 'make'. To run the tests, do
405
406 make test
407
408All tests should pass.
409
410### Regenerating Source Files ###
411
412Some of Google Test's source files are generated from templates (not
413in the C++ sense) using a script. A template file is named FOO.pump,
414where FOO is the name of the file it will generate. For example, the
415file include/gtest/internal/gtest-type-util.h.pump is used to generate
416gtest-type-util.h in the same directory.
417
418Normally you don't need to worry about regenerating the source files,
419unless you need to modify them. In that case, you should modify the
420corresponding .pump files instead and run the pump.py Python script to
421regenerate them. You can find pump.py in the scripts/ directory.
422Read the Pump manual [2] for how to use it.
423
424 [2] http://code.google.com/p/googletest/wiki/PumpManual
425
426### Contributing a Patch ###
427
428We welcome patches. Please read the Google Test developer's guide [3]
429for how you can contribute. In particular, make sure you have signed
430the Contributor License Agreement, or we won't be able to accept the
431patch.
432
433 [3] http://code.google.com/p/googletest/wiki/GoogleTestDevGuide
434
435Happy testing!
4360
=== removed directory '3rd_party/gmock/gtest/build-aux'
=== removed file '3rd_party/gmock/gtest/build-aux/.keep'
=== removed directory '3rd_party/gmock/gtest/cmake'
=== removed file '3rd_party/gmock/gtest/cmake/internal_utils.cmake'
--- 3rd_party/gmock/gtest/cmake/internal_utils.cmake 2014-04-07 19:53:07 +0000
+++ 3rd_party/gmock/gtest/cmake/internal_utils.cmake 1970-01-01 00:00:00 +0000
@@ -1,227 +0,0 @@
1# Defines functions and macros useful for building Google Test and
2# Google Mock.
3#
4# Note:
5#
6# - This file will be run twice when building Google Mock (once via
7# Google Test's CMakeLists.txt, and once via Google Mock's).
8# Therefore it shouldn't have any side effects other than defining
9# the functions and macros.
10#
11# - The functions/macros defined in this file may depend on Google
12# Test and Google Mock's option() definitions, and thus must be
13# called *after* the options have been defined.
14
15# Tweaks CMake's default compiler/linker settings to suit Google Test's needs.
16#
17# This must be a macro(), as inside a function string() can only
18# update variables in the function scope.
19macro(fix_default_compiler_settings_)
20 if (MSVC)
21 # For MSVC, CMake sets certain flags to defaults we want to override.
22 # This replacement code is taken from sample in the CMake Wiki at
23 # http://www.cmake.org/Wiki/CMake_FAQ#Dynamic_Replace.
24 foreach (flag_var
25 CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
26 CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO)
27 if (NOT BUILD_SHARED_LIBS AND NOT gtest_force_shared_crt)
28 # When Google Test is built as a shared library, it should also use
29 # shared runtime libraries. Otherwise, it may end up with multiple
30 # copies of runtime library data in different modules, resulting in
31 # hard-to-find crashes. When it is built as a static library, it is
32 # preferable to use CRT as static libraries, as we don't have to rely
33 # on CRT DLLs being available. CMake always defaults to using shared
34 # CRT libraries, so we override that default here.
35 string(REPLACE "/MD" "-MT" ${flag_var} "${${flag_var}}")
36 endif()
37
38 # We prefer more strict warning checking for building Google Test.
39 # Replaces /W3 with /W4 in defaults.
40 string(REPLACE "/W3" "-W4" ${flag_var} "${${flag_var}}")
41 endforeach()
42 endif()
43endmacro()
44
45# Defines the compiler/linker flags used to build Google Test and
46# Google Mock. You can tweak these definitions to suit your need. A
47# variable's value is empty before it's explicitly assigned to.
48macro(config_compiler_and_linker)
49 if (NOT gtest_disable_pthreads)
50 # Defines CMAKE_USE_PTHREADS_INIT and CMAKE_THREAD_LIBS_INIT.
51 find_package(Threads)
52 endif()
53
54 fix_default_compiler_settings_()
55 if (MSVC)
56 # Newlines inside flags variables break CMake's NMake generator.
57 # TODO(vladl@google.com): Add -RTCs and -RTCu to debug builds.
58 set(cxx_base_flags "-GS -W4 -WX -wd4127 -wd4251 -wd4275 -nologo -J -Zi")
59 if (MSVC_VERSION LESS 1400)
60 # Suppress spurious warnings MSVC 7.1 sometimes issues.
61 # Forcing value to bool.
62 set(cxx_base_flags "${cxx_base_flags} -wd4800")
63 # Copy constructor and assignment operator could not be generated.
64 set(cxx_base_flags "${cxx_base_flags} -wd4511 -wd4512")
65 # Compatibility warnings not applicable to Google Test.
66 # Resolved overload was found by argument-dependent lookup.
67 set(cxx_base_flags "${cxx_base_flags} -wd4675")
68 endif()
69 set(cxx_base_flags "${cxx_base_flags} -D_UNICODE -DUNICODE -DWIN32 -D_WIN32")
70 set(cxx_base_flags "${cxx_base_flags} -DSTRICT -DWIN32_LEAN_AND_MEAN")
71 set(cxx_exception_flags "-EHsc -D_HAS_EXCEPTIONS=1")
72 set(cxx_no_exception_flags "-D_HAS_EXCEPTIONS=0")
73 set(cxx_no_rtti_flags "-GR-")
74 elseif (CMAKE_COMPILER_IS_GNUCXX)
75 set(cxx_base_flags "-Wall -Wshadow")
76 set(cxx_exception_flags "-fexceptions")
77 set(cxx_no_exception_flags "-fno-exceptions")
78 # Until version 4.3.2, GCC doesn't define a macro to indicate
79 # whether RTTI is enabled. Therefore we define GTEST_HAS_RTTI
80 # explicitly.
81 set(cxx_no_rtti_flags "-fno-rtti -DGTEST_HAS_RTTI=0")
82 set(cxx_strict_flags
83 "-Wextra -Wno-unused-parameter -Wno-missing-field-initializers")
84 elseif (CMAKE_CXX_COMPILER_ID STREQUAL "SunPro")
85 set(cxx_exception_flags "-features=except")
86 # Sun Pro doesn't provide macros to indicate whether exceptions and
87 # RTTI are enabled, so we define GTEST_HAS_* explicitly.
88 set(cxx_no_exception_flags "-features=no%except -DGTEST_HAS_EXCEPTIONS=0")
89 set(cxx_no_rtti_flags "-features=no%rtti -DGTEST_HAS_RTTI=0")
90 elseif (CMAKE_CXX_COMPILER_ID STREQUAL "VisualAge" OR
91 CMAKE_CXX_COMPILER_ID STREQUAL "XL")
92 # CMake 2.8 changes Visual Age's compiler ID to "XL".
93 set(cxx_exception_flags "-qeh")
94 set(cxx_no_exception_flags "-qnoeh")
95 # Until version 9.0, Visual Age doesn't define a macro to indicate
96 # whether RTTI is enabled. Therefore we define GTEST_HAS_RTTI
97 # explicitly.
98 set(cxx_no_rtti_flags "-qnortti -DGTEST_HAS_RTTI=0")
99 elseif (CMAKE_CXX_COMPILER_ID STREQUAL "HP")
100 set(cxx_base_flags "-AA -mt")
101 set(cxx_exception_flags "-DGTEST_HAS_EXCEPTIONS=1")
102 set(cxx_no_exception_flags "+noeh -DGTEST_HAS_EXCEPTIONS=0")
103 # RTTI can not be disabled in HP aCC compiler.
104 set(cxx_no_rtti_flags "")
105 endif()
106
107 if (CMAKE_USE_PTHREADS_INIT) # The pthreads library is available and allowed.
108 set(cxx_base_flags "${cxx_base_flags} -DGTEST_HAS_PTHREAD=1")
109 else()
110 set(cxx_base_flags "${cxx_base_flags} -DGTEST_HAS_PTHREAD=0")
111 endif()
112
113 # For building gtest's own tests and samples.
114 set(cxx_exception "${CMAKE_CXX_FLAGS} ${cxx_base_flags} ${cxx_exception_flags}")
115 set(cxx_no_exception
116 "${CMAKE_CXX_FLAGS} ${cxx_base_flags} ${cxx_no_exception_flags}")
117 set(cxx_default "${cxx_exception}")
118 set(cxx_no_rtti "${cxx_default} ${cxx_no_rtti_flags}")
119 set(cxx_use_own_tuple "${cxx_default} -DGTEST_USE_OWN_TR1_TUPLE=1")
120
121 # For building the gtest libraries.
122 set(cxx_strict "${cxx_default} ${cxx_strict_flags}")
123endmacro()
124
125# Defines the gtest & gtest_main libraries. User tests should link
126# with one of them.
127function(cxx_library_with_type name type cxx_flags)
128 # type can be either STATIC or SHARED to denote a static or shared library.
129 # ARGN refers to additional arguments after 'cxx_flags'.
130 add_library(${name} ${type} ${ARGN})
131 set_target_properties(${name}
132 PROPERTIES
133 COMPILE_FLAGS "${cxx_flags}")
134 if (BUILD_SHARED_LIBS OR type STREQUAL "SHARED")
135 set_target_properties(${name}
136 PROPERTIES
137 COMPILE_DEFINITIONS "GTEST_CREATE_SHARED_LIBRARY=1")
138 endif()
139 if (CMAKE_USE_PTHREADS_INIT)
140 target_link_libraries(${name} ${CMAKE_THREAD_LIBS_INIT})
141 endif()
142endfunction()
143
144########################################################################
145#
146# Helper functions for creating build targets.
147
148function(cxx_shared_library name cxx_flags)
149 cxx_library_with_type(${name} SHARED "${cxx_flags}" ${ARGN})
150endfunction()
151
152function(cxx_library name cxx_flags)
153 cxx_library_with_type(${name} "" "${cxx_flags}" ${ARGN})
154endfunction()
155
156# cxx_executable_with_flags(name cxx_flags libs srcs...)
157#
158# creates a named C++ executable that depends on the given libraries and
159# is built from the given source files with the given compiler flags.
160function(cxx_executable_with_flags name cxx_flags libs)
161 add_executable(${name} ${ARGN})
162 if (cxx_flags)
163 set_target_properties(${name}
164 PROPERTIES
165 COMPILE_FLAGS "${cxx_flags}")
166 endif()
167 if (BUILD_SHARED_LIBS)
168 set_target_properties(${name}
169 PROPERTIES
170 COMPILE_DEFINITIONS "GTEST_LINKED_AS_SHARED_LIBRARY=1")
171 endif()
172 # To support mixing linking in static and dynamic libraries, link each
173 # library in with an extra call to target_link_libraries.
174 foreach (lib "${libs}")
175 target_link_libraries(${name} ${lib})
176 endforeach()
177endfunction()
178
179# cxx_executable(name dir lib srcs...)
180#
181# creates a named target that depends on the given libs and is built
182# from the given source files. dir/name.cc is implicitly included in
183# the source file list.
184function(cxx_executable name dir libs)
185 cxx_executable_with_flags(
186 ${name} "${cxx_default}" "${libs}" "${dir}/${name}.cc" ${ARGN})
187endfunction()
188
189# Sets PYTHONINTERP_FOUND and PYTHON_EXECUTABLE.
190find_package(PythonInterp)
191
192# cxx_test_with_flags(name cxx_flags libs srcs...)
193#
194# creates a named C++ test that depends on the given libs and is built
195# from the given source files with the given compiler flags.
196function(cxx_test_with_flags name cxx_flags libs)
197 cxx_executable_with_flags(${name} "${cxx_flags}" "${libs}" ${ARGN})
198 add_test(${name} ${name})
199endfunction()
200
201# cxx_test(name libs srcs...)
202#
203# creates a named test target that depends on the given libs and is
204# built from the given source files. Unlike cxx_test_with_flags,
205# test/name.cc is already implicitly included in the source file list.
206function(cxx_test name libs)
207 cxx_test_with_flags("${name}" "${cxx_default}" "${libs}"
208 "test/${name}.cc" ${ARGN})
209endfunction()
210
211# py_test(name)
212#
213# creates a Python test with the given name whose main module is in
214# test/name.py. It does nothing if Python is not installed.
215function(py_test name)
216 # We are not supporting Python tests on Linux yet as they consider
217 # all Linux environments to be google3 and try to use google3 features.
218 if (PYTHONINTERP_FOUND)
219 # ${CMAKE_BINARY_DIR} is known at configuration time, so we can
220 # directly bind it from cmake. ${CTEST_CONFIGURATION_TYPE} is known
221 # only at ctest runtime (by calling ctest -c <Configuration>), so
222 # we have to escape $ to delay variable substitution here.
223 add_test(${name}
224 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test/${name}.py
225 --build_dir=${CMAKE_CURRENT_BINARY_DIR}/\${CTEST_CONFIGURATION_TYPE})
226 endif()
227endfunction()
2280
=== removed directory '3rd_party/gmock/gtest/codegear'
=== removed file '3rd_party/gmock/gtest/codegear/gtest_all.cc'
--- 3rd_party/gmock/gtest/codegear/gtest_all.cc 2014-04-07 19:53:07 +0000
+++ 3rd_party/gmock/gtest/codegear/gtest_all.cc 1970-01-01 00:00:00 +0000
@@ -1,38 +0,0 @@
1// Copyright 2009, Google Inc.
2// All rights reserved.
3//
4// Redistribution and use in source and binary forms, with or without
5// modification, are permitted provided that the following conditions are
6// met:
7//
8// * Redistributions of source code must retain the above copyright
9// notice, this list of conditions and the following disclaimer.
10// * Redistributions in binary form must reproduce the above
11// copyright notice, this list of conditions and the following disclaimer
12// in the documentation and/or other materials provided with the
13// distribution.
14// * Neither the name of Google Inc. nor the names of its
15// contributors may be used to endorse or promote products derived from
16// this software without specific prior written permission.
17//
18// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29//
30// Author: Josh Kelley (joshkel@gmail.com)
31//
32// Google C++ Testing Framework (Google Test)
33//
34// C++Builder's IDE cannot build a static library from files with hyphens
35// in their name. See http://qc.codegear.com/wc/qcmain.aspx?d=70977 .
36// This file serves as a workaround.
37
38#include "src/gtest-all.cc"
390
=== removed file '3rd_party/gmock/gtest/codegear/gtest_link.cc'
--- 3rd_party/gmock/gtest/codegear/gtest_link.cc 2014-04-07 19:53:07 +0000
+++ 3rd_party/gmock/gtest/codegear/gtest_link.cc 1970-01-01 00:00:00 +0000
@@ -1,40 +0,0 @@
1// Copyright 2009, Google Inc.
2// All rights reserved.
3//
4// Redistribution and use in source and binary forms, with or without
5// modification, are permitted provided that the following conditions are
6// met:
7//
8// * Redistributions of source code must retain the above copyright
9// notice, this list of conditions and the following disclaimer.
10// * Redistributions in binary form must reproduce the above
11// copyright notice, this list of conditions and the following disclaimer
12// in the documentation and/or other materials provided with the
13// distribution.
14// * Neither the name of Google Inc. nor the names of its
15// contributors may be used to endorse or promote products derived from
16// this software without specific prior written permission.
17//
18// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29//
30// Author: Josh Kelley (joshkel@gmail.com)
31//
32// Google C++ Testing Framework (Google Test)
33//
34// Links gtest.lib and gtest_main.lib into the current project in C++Builder.
35// This means that these libraries can't be renamed, but it's the only way to
36// ensure that Debug versus Release test builds are linked against the
37// appropriate Debug or Release build of the libraries.
38
39#pragma link "gtest.lib"
40#pragma link "gtest_main.lib"
410
=== removed file '3rd_party/gmock/gtest/configure.ac'
--- 3rd_party/gmock/gtest/configure.ac 2014-04-07 19:53:07 +0000
+++ 3rd_party/gmock/gtest/configure.ac 1970-01-01 00:00:00 +0000
@@ -1,68 +0,0 @@
1m4_include(m4/acx_pthread.m4)
2
3# At this point, the Xcode project assumes the version string will be three
4# integers separated by periods and surrounded by square brackets (e.g.
5# "[1.0.1]"). It also asumes that there won't be any closing parenthesis
6# between "AC_INIT(" and the closing ")" including comments and strings.
7AC_INIT([Google C++ Testing Framework],
8 [1.7.0],
9 [googletestframework@googlegroups.com],
10 [gtest])
11
12# Provide various options to initialize the Autoconf and configure processes.
13AC_PREREQ([2.59])
14AC_CONFIG_SRCDIR([./LICENSE])
15AC_CONFIG_MACRO_DIR([m4])
16AC_CONFIG_AUX_DIR([build-aux])
17AC_CONFIG_HEADERS([build-aux/config.h])
18AC_CONFIG_FILES([Makefile])
19AC_CONFIG_FILES([scripts/gtest-config], [chmod +x scripts/gtest-config])
20
21# Initialize Automake with various options. We require at least v1.9, prevent
22# pedantic complaints about package files, and enable various distribution
23# targets.
24AM_INIT_AUTOMAKE([1.9 dist-bzip2 dist-zip foreign subdir-objects])
25
26# Check for programs used in building Google Test.
27AC_PROG_CC
28AC_PROG_CXX
29AC_LANG([C++])
30AC_PROG_LIBTOOL
31
32# TODO(chandlerc@google.com): Currently we aren't running the Python tests
33# against the interpreter detected by AM_PATH_PYTHON, and so we condition
34# HAVE_PYTHON by requiring "python" to be in the PATH, and that interpreter's
35# version to be >= 2.3. This will allow the scripts to use a "/usr/bin/env"
36# hashbang.
37PYTHON= # We *do not* allow the user to specify a python interpreter
38AC_PATH_PROG([PYTHON],[python],[:])
39AS_IF([test "$PYTHON" != ":"],
40 [AM_PYTHON_CHECK_VERSION([$PYTHON],[2.3],[:],[PYTHON=":"])])
41AM_CONDITIONAL([HAVE_PYTHON],[test "$PYTHON" != ":"])
42
43# Configure pthreads.
44AC_ARG_WITH([pthreads],
45 [AS_HELP_STRING([--with-pthreads],
46 [use pthreads (default is yes)])],
47 [with_pthreads=$withval],
48 [with_pthreads=check])
49
50have_pthreads=no
51AS_IF([test "x$with_pthreads" != "xno"],
52 [ACX_PTHREAD(
53 [],
54 [AS_IF([test "x$with_pthreads" != "xcheck"],
55 [AC_MSG_FAILURE(
56 [--with-pthreads was specified, but unable to be used])])])
57 have_pthreads="$acx_pthread_ok"])
58AM_CONDITIONAL([HAVE_PTHREADS],[test "x$have_pthreads" = "xyes"])
59AC_SUBST(PTHREAD_CFLAGS)
60AC_SUBST(PTHREAD_LIBS)
61
62# TODO(chandlerc@google.com) Check for the necessary system headers.
63
64# TODO(chandlerc@google.com) Check the types, structures, and other compiler
65# and architecture characteristics.
66
67# Output the generated files. No further autoconf macros may be used.
68AC_OUTPUT
690
=== removed directory '3rd_party/gmock/gtest/include'
=== removed directory '3rd_party/gmock/gtest/include/gtest'
=== removed file '3rd_party/gmock/gtest/include/gtest/gtest-death-test.h'
--- 3rd_party/gmock/gtest/include/gtest/gtest-death-test.h 2014-04-07 19:53:07 +0000
+++ 3rd_party/gmock/gtest/include/gtest/gtest-death-test.h 1970-01-01 00:00:00 +0000
@@ -1,294 +0,0 @@
1// Copyright 2005, Google Inc.
2// All rights reserved.
3//
4// Redistribution and use in source and binary forms, with or without
5// modification, are permitted provided that the following conditions are
6// met:
7//
8// * Redistributions of source code must retain the above copyright
9// notice, this list of conditions and the following disclaimer.
10// * Redistributions in binary form must reproduce the above
11// copyright notice, this list of conditions and the following disclaimer
12// in the documentation and/or other materials provided with the
13// distribution.
14// * Neither the name of Google Inc. nor the names of its
15// contributors may be used to endorse or promote products derived from
16// this software without specific prior written permission.
17//
18// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29//
30// Author: wan@google.com (Zhanyong Wan)
31//
32// The Google C++ Testing Framework (Google Test)
33//
34// This header file defines the public API for death tests. It is
35// #included by gtest.h so a user doesn't need to include this
36// directly.
37
38#ifndef GTEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H_
39#define GTEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H_
40
41#include "gtest/internal/gtest-death-test-internal.h"
42
43namespace testing {
44
45// This flag controls the style of death tests. Valid values are "threadsafe",
46// meaning that the death test child process will re-execute the test binary
47// from the start, running only a single death test, or "fast",
48// meaning that the child process will execute the test logic immediately
49// after forking.
50GTEST_DECLARE_string_(death_test_style);
51
52#if GTEST_HAS_DEATH_TEST
53
54namespace internal {
55
56// Returns a Boolean value indicating whether the caller is currently
57// executing in the context of the death test child process. Tools such as
58// Valgrind heap checkers may need this to modify their behavior in death
59// tests. IMPORTANT: This is an internal utility. Using it may break the
60// implementation of death tests. User code MUST NOT use it.
61GTEST_API_ bool InDeathTestChild();
62
63} // namespace internal
64
65// The following macros are useful for writing death tests.
66
67// Here's what happens when an ASSERT_DEATH* or EXPECT_DEATH* is
68// executed:
69//
70// 1. It generates a warning if there is more than one active
71// thread. This is because it's safe to fork() or clone() only
72// when there is a single thread.
73//
74// 2. The parent process clone()s a sub-process and runs the death
75// test in it; the sub-process exits with code 0 at the end of the
76// death test, if it hasn't exited already.
77//
78// 3. The parent process waits for the sub-process to terminate.
79//
80// 4. The parent process checks the exit code and error message of
81// the sub-process.
82//
83// Examples:
84//
85// ASSERT_DEATH(server.SendMessage(56, "Hello"), "Invalid port number");
86// for (int i = 0; i < 5; i++) {
87// EXPECT_DEATH(server.ProcessRequest(i),
88// "Invalid request .* in ProcessRequest()")
89// << "Failed to die on request " << i;
90// }
91//
92// ASSERT_EXIT(server.ExitNow(), ::testing::ExitedWithCode(0), "Exiting");
93//
94// bool KilledBySIGHUP(int exit_code) {
95// return WIFSIGNALED(exit_code) && WTERMSIG(exit_code) == SIGHUP;
96// }
97//
98// ASSERT_EXIT(client.HangUpServer(), KilledBySIGHUP, "Hanging up!");
99//
100// On the regular expressions used in death tests:
101//
102// On POSIX-compliant systems (*nix), we use the <regex.h> library,
103// which uses the POSIX extended regex syntax.
104//
105// On other platforms (e.g. Windows), we only support a simple regex
106// syntax implemented as part of Google Test. This limited
107// implementation should be enough most of the time when writing
108// death tests; though it lacks many features you can find in PCRE
109// or POSIX extended regex syntax. For example, we don't support
110// union ("x|y"), grouping ("(xy)"), brackets ("[xy]"), and
111// repetition count ("x{5,7}"), among others.
112//
113// Below is the syntax that we do support. We chose it to be a
114// subset of both PCRE and POSIX extended regex, so it's easy to
115// learn wherever you come from. In the following: 'A' denotes a
116// literal character, period (.), or a single \\ escape sequence;
117// 'x' and 'y' denote regular expressions; 'm' and 'n' are for
118// natural numbers.
119//
120// c matches any literal character c
121// \\d matches any decimal digit
122// \\D matches any character that's not a decimal digit
123// \\f matches \f
124// \\n matches \n
125// \\r matches \r
126// \\s matches any ASCII whitespace, including \n
127// \\S matches any character that's not a whitespace
128// \\t matches \t
129// \\v matches \v
130// \\w matches any letter, _, or decimal digit
131// \\W matches any character that \\w doesn't match
132// \\c matches any literal character c, which must be a punctuation
133// . matches any single character except \n
134// A? matches 0 or 1 occurrences of A
135// A* matches 0 or many occurrences of A
136// A+ matches 1 or many occurrences of A
137// ^ matches the beginning of a string (not that of each line)
138// $ matches the end of a string (not that of each line)
139// xy matches x followed by y
140//
141// If you accidentally use PCRE or POSIX extended regex features
142// not implemented by us, you will get a run-time failure. In that
143// case, please try to rewrite your regular expression within the
144// above syntax.
145//
146// This implementation is *not* meant to be as highly tuned or robust
147// as a compiled regex library, but should perform well enough for a
148// death test, which already incurs significant overhead by launching
149// a child process.
150//
151// Known caveats:
152//
153// A "threadsafe" style death test obtains the path to the test
154// program from argv[0] and re-executes it in the sub-process. For
155// simplicity, the current implementation doesn't search the PATH
156// when launching the sub-process. This means that the user must
157// invoke the test program via a path that contains at least one
158// path separator (e.g. path/to/foo_test and
159// /absolute/path/to/bar_test are fine, but foo_test is not). This
160// is rarely a problem as people usually don't put the test binary
161// directory in PATH.
162//
163// TODO(wan@google.com): make thread-safe death tests search the PATH.
164
165// Asserts that a given statement causes the program to exit, with an
166// integer exit status that satisfies predicate, and emitting error output
167// that matches regex.
168# define ASSERT_EXIT(statement, predicate, regex) \
169 GTEST_DEATH_TEST_(statement, predicate, regex, GTEST_FATAL_FAILURE_)
170
171// Like ASSERT_EXIT, but continues on to successive tests in the
172// test case, if any:
173# define EXPECT_EXIT(statement, predicate, regex) \
174 GTEST_DEATH_TEST_(statement, predicate, regex, GTEST_NONFATAL_FAILURE_)
175
176// Asserts that a given statement causes the program to exit, either by
177// explicitly exiting with a nonzero exit code or being killed by a
178// signal, and emitting error output that matches regex.
179# define ASSERT_DEATH(statement, regex) \
180 ASSERT_EXIT(statement, ::testing::internal::ExitedUnsuccessfully, regex)
181
182// Like ASSERT_DEATH, but continues on to successive tests in the
183// test case, if any:
184# define EXPECT_DEATH(statement, regex) \
185 EXPECT_EXIT(statement, ::testing::internal::ExitedUnsuccessfully, regex)
186
187// Two predicate classes that can be used in {ASSERT,EXPECT}_EXIT*:
188
189// Tests that an exit code describes a normal exit with a given exit code.
190class GTEST_API_ ExitedWithCode {
191 public:
192 explicit ExitedWithCode(int exit_code);
193 bool operator()(int exit_status) const;
194 private:
195 // No implementation - assignment is unsupported.
196 void operator=(const ExitedWithCode& other);
197
198 const int exit_code_;
199};
200
201# if !GTEST_OS_WINDOWS
202// Tests that an exit code describes an exit due to termination by a
203// given signal.
204class GTEST_API_ KilledBySignal {
205 public:
206 explicit KilledBySignal(int signum);
207 bool operator()(int exit_status) const;
208 private:
209 const int signum_;
210};
211# endif // !GTEST_OS_WINDOWS
212
213// EXPECT_DEBUG_DEATH asserts that the given statements die in debug mode.
214// The death testing framework causes this to have interesting semantics,
215// since the sideeffects of the call are only visible in opt mode, and not
216// in debug mode.
217//
218// In practice, this can be used to test functions that utilize the
219// LOG(DFATAL) macro using the following style:
220//
221// int DieInDebugOr12(int* sideeffect) {
222// if (sideeffect) {
223// *sideeffect = 12;
224// }
225// LOG(DFATAL) << "death";
226// return 12;
227// }
228//
229// TEST(TestCase, TestDieOr12WorksInDgbAndOpt) {
230// int sideeffect = 0;
231// // Only asserts in dbg.
232// EXPECT_DEBUG_DEATH(DieInDebugOr12(&sideeffect), "death");
233//
234// #ifdef NDEBUG
235// // opt-mode has sideeffect visible.
236// EXPECT_EQ(12, sideeffect);
237// #else
238// // dbg-mode no visible sideeffect.
239// EXPECT_EQ(0, sideeffect);
240// #endif
241// }
242//
243// This will assert that DieInDebugReturn12InOpt() crashes in debug
244// mode, usually due to a DCHECK or LOG(DFATAL), but returns the
245// appropriate fallback value (12 in this case) in opt mode. If you
246// need to test that a function has appropriate side-effects in opt
247// mode, include assertions against the side-effects. A general
248// pattern for this is:
249//
250// EXPECT_DEBUG_DEATH({
251// // Side-effects here will have an effect after this statement in
252// // opt mode, but none in debug mode.
253// EXPECT_EQ(12, DieInDebugOr12(&sideeffect));
254// }, "death");
255//
256# ifdef NDEBUG
257
258# define EXPECT_DEBUG_DEATH(statement, regex) \
259 GTEST_EXECUTE_STATEMENT_(statement, regex)
260
261# define ASSERT_DEBUG_DEATH(statement, regex) \
262 GTEST_EXECUTE_STATEMENT_(statement, regex)
263
264# else
265
266# define EXPECT_DEBUG_DEATH(statement, regex) \
267 EXPECT_DEATH(statement, regex)
268
269# define ASSERT_DEBUG_DEATH(statement, regex) \
270 ASSERT_DEATH(statement, regex)
271
272# endif // NDEBUG for EXPECT_DEBUG_DEATH
273#endif // GTEST_HAS_DEATH_TEST
274
275// EXPECT_DEATH_IF_SUPPORTED(statement, regex) and
276// ASSERT_DEATH_IF_SUPPORTED(statement, regex) expand to real death tests if
277// death tests are supported; otherwise they just issue a warning. This is
278// useful when you are combining death test assertions with normal test
279// assertions in one test.
280#if GTEST_HAS_DEATH_TEST
281# define EXPECT_DEATH_IF_SUPPORTED(statement, regex) \
282 EXPECT_DEATH(statement, regex)
283# define ASSERT_DEATH_IF_SUPPORTED(statement, regex) \
284 ASSERT_DEATH(statement, regex)
285#else
286# define EXPECT_DEATH_IF_SUPPORTED(statement, regex) \
287 GTEST_UNSUPPORTED_DEATH_TEST_(statement, regex, )
288# define ASSERT_DEATH_IF_SUPPORTED(statement, regex) \
289 GTEST_UNSUPPORTED_DEATH_TEST_(statement, regex, return)
290#endif
291
292} // namespace testing
293
294#endif // GTEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H_
2950
=== removed file '3rd_party/gmock/gtest/include/gtest/gtest-message.h'
--- 3rd_party/gmock/gtest/include/gtest/gtest-message.h 2014-04-07 19:53:07 +0000
+++ 3rd_party/gmock/gtest/include/gtest/gtest-message.h 1970-01-01 00:00:00 +0000
@@ -1,250 +0,0 @@
1// Copyright 2005, Google Inc.
2// All rights reserved.
3//
4// Redistribution and use in source and binary forms, with or without
5// modification, are permitted provided that the following conditions are
6// met:
7//
8// * Redistributions of source code must retain the above copyright
9// notice, this list of conditions and the following disclaimer.
10// * Redistributions in binary form must reproduce the above
11// copyright notice, this list of conditions and the following disclaimer
12// in the documentation and/or other materials provided with the
13// distribution.
14// * Neither the name of Google Inc. nor the names of its
15// contributors may be used to endorse or promote products derived from
16// this software without specific prior written permission.
17//
18// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29//
30// Author: wan@google.com (Zhanyong Wan)
31//
32// The Google C++ Testing Framework (Google Test)
33//
34// This header file defines the Message class.
35//
36// IMPORTANT NOTE: Due to limitation of the C++ language, we have to
37// leave some internal implementation details in this header file.
38// They are clearly marked by comments like this:
39//
40// // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
41//
42// Such code is NOT meant to be used by a user directly, and is subject
43// to CHANGE WITHOUT NOTICE. Therefore DO NOT DEPEND ON IT in a user
44// program!
45
46#ifndef GTEST_INCLUDE_GTEST_GTEST_MESSAGE_H_
47#define GTEST_INCLUDE_GTEST_GTEST_MESSAGE_H_
48
49#include <limits>
50
51#include "gtest/internal/gtest-port.h"
52
53// Ensures that there is at least one operator<< in the global namespace.
54// See Message& operator<<(...) below for why.
55void operator<<(const testing::internal::Secret&, int);
56
57namespace testing {
58
59// The Message class works like an ostream repeater.
60//
61// Typical usage:
62//
63// 1. You stream a bunch of values to a Message object.
64// It will remember the text in a stringstream.
65// 2. Then you stream the Message object to an ostream.
66// This causes the text in the Message to be streamed
67// to the ostream.
68//
69// For example;
70//
71// testing::Message foo;
72// foo << 1 << " != " << 2;
73// std::cout << foo;
74//
75// will print "1 != 2".
76//
77// Message is not intended to be inherited from. In particular, its
78// destructor is not virtual.
79//
80// Note that stringstream behaves differently in gcc and in MSVC. You
81// can stream a NULL char pointer to it in the former, but not in the
82// latter (it causes an access violation if you do). The Message
83// class hides this difference by treating a NULL char pointer as
84// "(null)".
85class GTEST_API_ Message {
86 private:
87 // The type of basic IO manipulators (endl, ends, and flush) for
88 // narrow streams.
89 typedef std::ostream& (*BasicNarrowIoManip)(std::ostream&);
90
91 public:
92 // Constructs an empty Message.
93 Message();
94
95 // Copy constructor.
96 Message(const Message& msg) : ss_(new ::std::stringstream) { // NOLINT
97 *ss_ << msg.GetString();
98 }
99
100 // Constructs a Message from a C-string.
101 explicit Message(const char* str) : ss_(new ::std::stringstream) {
102 *ss_ << str;
103 }
104
105#if GTEST_OS_SYMBIAN
106 // Streams a value (either a pointer or not) to this object.
107 template <typename T>
108 inline Message& operator <<(const T& value) {
109 StreamHelper(typename internal::is_pointer<T>::type(), value);
110 return *this;
111 }
112#else
113 // Streams a non-pointer value to this object.
114 template <typename T>
115 inline Message& operator <<(const T& val) {
116 // Some libraries overload << for STL containers. These
117 // overloads are defined in the global namespace instead of ::std.
118 //
119 // C++'s symbol lookup rule (i.e. Koenig lookup) says that these
120 // overloads are visible in either the std namespace or the global
121 // namespace, but not other namespaces, including the testing
122 // namespace which Google Test's Message class is in.
123 //
124 // To allow STL containers (and other types that has a << operator
125 // defined in the global namespace) to be used in Google Test
126 // assertions, testing::Message must access the custom << operator
127 // from the global namespace. With this using declaration,
128 // overloads of << defined in the global namespace and those
129 // visible via Koenig lookup are both exposed in this function.
130 using ::operator <<;
131 *ss_ << val;
132 return *this;
133 }
134
135 // Streams a pointer value to this object.
136 //
137 // This function is an overload of the previous one. When you
138 // stream a pointer to a Message, this definition will be used as it
139 // is more specialized. (The C++ Standard, section
140 // [temp.func.order].) If you stream a non-pointer, then the
141 // previous definition will be used.
142 //
143 // The reason for this overload is that streaming a NULL pointer to
144 // ostream is undefined behavior. Depending on the compiler, you
145 // may get "0", "(nil)", "(null)", or an access violation. To
146 // ensure consistent result across compilers, we always treat NULL
147 // as "(null)".
148 template <typename T>
149 inline Message& operator <<(T* const& pointer) { // NOLINT
150 if (pointer == NULL) {
151 *ss_ << "(null)";
152 } else {
153 *ss_ << pointer;
154 }
155 return *this;
156 }
157#endif // GTEST_OS_SYMBIAN
158
159 // Since the basic IO manipulators are overloaded for both narrow
160 // and wide streams, we have to provide this specialized definition
161 // of operator <<, even though its body is the same as the
162 // templatized version above. Without this definition, streaming
163 // endl or other basic IO manipulators to Message will confuse the
164 // compiler.
165 Message& operator <<(BasicNarrowIoManip val) {
166 *ss_ << val;
167 return *this;
168 }
169
170 // Instead of 1/0, we want to see true/false for bool values.
171 Message& operator <<(bool b) {
172 return *this << (b ? "true" : "false");
173 }
174
175 // These two overloads allow streaming a wide C string to a Message
176 // using the UTF-8 encoding.
177 Message& operator <<(const wchar_t* wide_c_str);
178 Message& operator <<(wchar_t* wide_c_str);
179
180#if GTEST_HAS_STD_WSTRING
181 // Converts the given wide string to a narrow string using the UTF-8
182 // encoding, and streams the result to this Message object.
183 Message& operator <<(const ::std::wstring& wstr);
184#endif // GTEST_HAS_STD_WSTRING
185
186#if GTEST_HAS_GLOBAL_WSTRING
187 // Converts the given wide string to a narrow string using the UTF-8
188 // encoding, and streams the result to this Message object.
189 Message& operator <<(const ::wstring& wstr);
190#endif // GTEST_HAS_GLOBAL_WSTRING
191
192 // Gets the text streamed to this object so far as an std::string.
193 // Each '\0' character in the buffer is replaced with "\\0".
194 //
195 // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
196 std::string GetString() const;
197
198 private:
199
200#if GTEST_OS_SYMBIAN
201 // These are needed as the Nokia Symbian Compiler cannot decide between
202 // const T& and const T* in a function template. The Nokia compiler _can_
203 // decide between class template specializations for T and T*, so a
204 // tr1::type_traits-like is_pointer works, and we can overload on that.
205 template <typename T>
206 inline void StreamHelper(internal::true_type /*is_pointer*/, T* pointer) {
207 if (pointer == NULL) {
208 *ss_ << "(null)";
209 } else {
210 *ss_ << pointer;
211 }
212 }
213 template <typename T>
214 inline void StreamHelper(internal::false_type /*is_pointer*/,
215 const T& value) {
216 // See the comments in Message& operator <<(const T&) above for why
217 // we need this using statement.
218 using ::operator <<;
219 *ss_ << value;
220 }
221#endif // GTEST_OS_SYMBIAN
222
223 // We'll hold the text streamed to this object here.
224 const internal::scoped_ptr< ::std::stringstream> ss_;
225
226 // We declare (but don't implement) this to prevent the compiler
227 // from implementing the assignment operator.
228 void operator=(const Message&);
229};
230
231// Streams a Message to an ostream.
232inline std::ostream& operator <<(std::ostream& os, const Message& sb) {
233 return os << sb.GetString();
234}
235
236namespace internal {
237
238// Converts a streamable value to an std::string. A NULL pointer is
239// converted to "(null)". When the input value is a ::string,
240// ::std::string, ::wstring, or ::std::wstring object, each NUL
241// character in it is replaced with "\\0".
242template <typename T>
243std::string StreamableToString(const T& streamable) {
244 return (Message() << streamable).GetString();
245}
246
247} // namespace internal
248} // namespace testing
249
250#endif // GTEST_INCLUDE_GTEST_GTEST_MESSAGE_H_
2510
=== removed file '3rd_party/gmock/gtest/include/gtest/gtest-param-test.h'
--- 3rd_party/gmock/gtest/include/gtest/gtest-param-test.h 2014-04-07 19:53:07 +0000
+++ 3rd_party/gmock/gtest/include/gtest/gtest-param-test.h 1970-01-01 00:00:00 +0000
@@ -1,1421 +0,0 @@
1// This file was GENERATED by command:
2// pump.py gtest-param-test.h.pump
3// DO NOT EDIT BY HAND!!!
4
5// Copyright 2008, Google Inc.
6// All rights reserved.
7//
8// Redistribution and use in source and binary forms, with or without
9// modification, are permitted provided that the following conditions are
10// met:
11//
12// * Redistributions of source code must retain the above copyright
13// notice, this list of conditions and the following disclaimer.
14// * Redistributions in binary form must reproduce the above
15// copyright notice, this list of conditions and the following disclaimer
16// in the documentation and/or other materials provided with the
17// distribution.
18// * Neither the name of Google Inc. nor the names of its
19// contributors may be used to endorse or promote products derived from
20// this software without specific prior written permission.
21//
22// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
25// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
26// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
28// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
32// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33//
34// Authors: vladl@google.com (Vlad Losev)
35//
36// Macros and functions for implementing parameterized tests
37// in Google C++ Testing Framework (Google Test)
38//
39// This file is generated by a SCRIPT. DO NOT EDIT BY HAND!
40//
41#ifndef GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_
42#define GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_
43
44
45// Value-parameterized tests allow you to test your code with different
46// parameters without writing multiple copies of the same test.
47//
48// Here is how you use value-parameterized tests:
49
50#if 0
51
52// To write value-parameterized tests, first you should define a fixture
53// class. It is usually derived from testing::TestWithParam<T> (see below for
54// another inheritance scheme that's sometimes useful in more complicated
55// class hierarchies), where the type of your parameter values.
56// TestWithParam<T> is itself derived from testing::Test. T can be any
57// copyable type. If it's a raw pointer, you are responsible for managing the
58// lifespan of the pointed values.
59
60class FooTest : public ::testing::TestWithParam<const char*> {
61 // You can implement all the usual class fixture members here.
62};
63
64// Then, use the TEST_P macro to define as many parameterized tests
65// for this fixture as you want. The _P suffix is for "parameterized"
66// or "pattern", whichever you prefer to think.
67
68TEST_P(FooTest, DoesBlah) {
69 // Inside a test, access the test parameter with the GetParam() method
70 // of the TestWithParam<T> class:
71 EXPECT_TRUE(foo.Blah(GetParam()));
72 ...
73}
74
75TEST_P(FooTest, HasBlahBlah) {
76 ...
77}
78
79// Finally, you can use INSTANTIATE_TEST_CASE_P to instantiate the test
80// case with any set of parameters you want. Google Test defines a number
81// of functions for generating test parameters. They return what we call
82// (surprise!) parameter generators. Here is a summary of them, which
83// are all in the testing namespace:
84//
85//
86// Range(begin, end [, step]) - Yields values {begin, begin+step,
87// begin+step+step, ...}. The values do not
88// include end. step defaults to 1.
89// Values(v1, v2, ..., vN) - Yields values {v1, v2, ..., vN}.
90// ValuesIn(container) - Yields values from a C-style array, an STL
91// ValuesIn(begin,end) container, or an iterator range [begin, end).
92// Bool() - Yields sequence {false, true}.
93// Combine(g1, g2, ..., gN) - Yields all combinations (the Cartesian product
94// for the math savvy) of the values generated
95// by the N generators.
96//
97// For more details, see comments at the definitions of these functions below
98// in this file.
99//
100// The following statement will instantiate tests from the FooTest test case
101// each with parameter values "meeny", "miny", and "moe".
102
103INSTANTIATE_TEST_CASE_P(InstantiationName,
104 FooTest,
105 Values("meeny", "miny", "moe"));
106
107// To distinguish different instances of the pattern, (yes, you
108// can instantiate it more then once) the first argument to the
109// INSTANTIATE_TEST_CASE_P macro is a prefix that will be added to the
110// actual test case name. Remember to pick unique prefixes for different
111// instantiations. The tests from the instantiation above will have
112// these names:
113//
114// * InstantiationName/FooTest.DoesBlah/0 for "meeny"
115// * InstantiationName/FooTest.DoesBlah/1 for "miny"
116// * InstantiationName/FooTest.DoesBlah/2 for "moe"
117// * InstantiationName/FooTest.HasBlahBlah/0 for "meeny"
118// * InstantiationName/FooTest.HasBlahBlah/1 for "miny"
119// * InstantiationName/FooTest.HasBlahBlah/2 for "moe"
120//
121// You can use these names in --gtest_filter.
122//
123// This statement will instantiate all tests from FooTest again, each
124// with parameter values "cat" and "dog":
125
126const char* pets[] = {"cat", "dog"};
127INSTANTIATE_TEST_CASE_P(AnotherInstantiationName, FooTest, ValuesIn(pets));
128
129// The tests from the instantiation above will have these names:
130//
131// * AnotherInstantiationName/FooTest.DoesBlah/0 for "cat"
132// * AnotherInstantiationName/FooTest.DoesBlah/1 for "dog"
133// * AnotherInstantiationName/FooTest.HasBlahBlah/0 for "cat"
134// * AnotherInstantiationName/FooTest.HasBlahBlah/1 for "dog"
135//
136// Please note that INSTANTIATE_TEST_CASE_P will instantiate all tests
137// in the given test case, whether their definitions come before or
138// AFTER the INSTANTIATE_TEST_CASE_P statement.
139//
140// Please also note that generator expressions (including parameters to the
141// generators) are evaluated in InitGoogleTest(), after main() has started.
142// This allows the user on one hand, to adjust generator parameters in order
143// to dynamically determine a set of tests to run and on the other hand,
144// give the user a chance to inspect the generated tests with Google Test
145// reflection API before RUN_ALL_TESTS() is executed.
146//
147// You can see samples/sample7_unittest.cc and samples/sample8_unittest.cc
148// for more examples.
149//
150// In the future, we plan to publish the API for defining new parameter
151// generators. But for now this interface remains part of the internal
152// implementation and is subject to change.
153//
154//
155// A parameterized test fixture must be derived from testing::Test and from
156// testing::WithParamInterface<T>, where T is the type of the parameter
157// values. Inheriting from TestWithParam<T> satisfies that requirement because
158// TestWithParam<T> inherits from both Test and WithParamInterface. In more
159// complicated hierarchies, however, it is occasionally useful to inherit
160// separately from Test and WithParamInterface. For example:
161
162class BaseTest : public ::testing::Test {
163 // You can inherit all the usual members for a non-parameterized test
164 // fixture here.
165};
166
167class DerivedTest : public BaseTest, public ::testing::WithParamInterface<int> {
168 // The usual test fixture members go here too.
169};
170
171TEST_F(BaseTest, HasFoo) {
172 // This is an ordinary non-parameterized test.
173}
174
175TEST_P(DerivedTest, DoesBlah) {
176 // GetParam works just the same here as if you inherit from TestWithParam.
177 EXPECT_TRUE(foo.Blah(GetParam()));
178}
179
180#endif // 0
181
182#include "gtest/internal/gtest-port.h"
183
184#if !GTEST_OS_SYMBIAN
185# include <utility>
186#endif
187
188// scripts/fuse_gtest.py depends on gtest's own header being #included
189// *unconditionally*. Therefore these #includes cannot be moved
190// inside #if GTEST_HAS_PARAM_TEST.
191#include "gtest/internal/gtest-internal.h"
192#include "gtest/internal/gtest-param-util.h"
193#include "gtest/internal/gtest-param-util-generated.h"
194
195#if GTEST_HAS_PARAM_TEST
196
197namespace testing {
198
199// Functions producing parameter generators.
200//
201// Google Test uses these generators to produce parameters for value-
202// parameterized tests. When a parameterized test case is instantiated
203// with a particular generator, Google Test creates and runs tests
204// for each element in the sequence produced by the generator.
205//
206// In the following sample, tests from test case FooTest are instantiated
207// each three times with parameter values 3, 5, and 8:
208//
209// class FooTest : public TestWithParam<int> { ... };
210//
211// TEST_P(FooTest, TestThis) {
212// }
213// TEST_P(FooTest, TestThat) {
214// }
215// INSTANTIATE_TEST_CASE_P(TestSequence, FooTest, Values(3, 5, 8));
216//
217
218// Range() returns generators providing sequences of values in a range.
219//
220// Synopsis:
221// Range(start, end)
222// - returns a generator producing a sequence of values {start, start+1,
223// start+2, ..., }.
224// Range(start, end, step)
225// - returns a generator producing a sequence of values {start, start+step,
226// start+step+step, ..., }.
227// Notes:
228// * The generated sequences never include end. For example, Range(1, 5)
229// returns a generator producing a sequence {1, 2, 3, 4}. Range(1, 9, 2)
230// returns a generator producing {1, 3, 5, 7}.
231// * start and end must have the same type. That type may be any integral or
232// floating-point type or a user defined type satisfying these conditions:
233// * It must be assignable (have operator=() defined).
234// * It must have operator+() (operator+(int-compatible type) for
235// two-operand version).
236// * It must have operator<() defined.
237// Elements in the resulting sequences will also have that type.
238// * Condition start < end must be satisfied in order for resulting sequences
239// to contain any elements.
240//
241template <typename T, typename IncrementT>
242internal::ParamGenerator<T> Range(T start, T end, IncrementT step) {
243 return internal::ParamGenerator<T>(
244 new internal::RangeGenerator<T, IncrementT>(start, end, step));
245}
246
247template <typename T>
248internal::ParamGenerator<T> Range(T start, T end) {
249 return Range(start, end, 1);
250}
251
252// ValuesIn() function allows generation of tests with parameters coming from
253// a container.
254//
255// Synopsis:
256// ValuesIn(const T (&array)[N])
257// - returns a generator producing sequences with elements from
258// a C-style array.
259// ValuesIn(const Container& container)
260// - returns a generator producing sequences with elements from
261// an STL-style container.
262// ValuesIn(Iterator begin, Iterator end)
263// - returns a generator producing sequences with elements from
264// a range [begin, end) defined by a pair of STL-style iterators. These
265// iterators can also be plain C pointers.
266//
267// Please note that ValuesIn copies the values from the containers
268// passed in and keeps them to generate tests in RUN_ALL_TESTS().
269//
270// Examples:
271//
272// This instantiates tests from test case StringTest
273// each with C-string values of "foo", "bar", and "baz":
274//
275// const char* strings[] = {"foo", "bar", "baz"};
276// INSTANTIATE_TEST_CASE_P(StringSequence, SrtingTest, ValuesIn(strings));
277//
278// This instantiates tests from test case StlStringTest
279// each with STL strings with values "a" and "b":
280//
281// ::std::vector< ::std::string> GetParameterStrings() {
282// ::std::vector< ::std::string> v;
283// v.push_back("a");
284// v.push_back("b");
285// return v;
286// }
287//
288// INSTANTIATE_TEST_CASE_P(CharSequence,
289// StlStringTest,
290// ValuesIn(GetParameterStrings()));
291//
292//
293// This will also instantiate tests from CharTest
294// each with parameter values 'a' and 'b':
295//
296// ::std::list<char> GetParameterChars() {
297// ::std::list<char> list;
298// list.push_back('a');
299// list.push_back('b');
300// return list;
301// }
302// ::std::list<char> l = GetParameterChars();
303// INSTANTIATE_TEST_CASE_P(CharSequence2,
304// CharTest,
305// ValuesIn(l.begin(), l.end()));
306//
307template <typename ForwardIterator>
308internal::ParamGenerator<
309 typename ::testing::internal::IteratorTraits<ForwardIterator>::value_type>
310ValuesIn(ForwardIterator begin, ForwardIterator end) {
311 typedef typename ::testing::internal::IteratorTraits<ForwardIterator>
312 ::value_type ParamType;
313 return internal::ParamGenerator<ParamType>(
314 new internal::ValuesInIteratorRangeGenerator<ParamType>(begin, end));
315}
316
317template <typename T, size_t N>
318internal::ParamGenerator<T> ValuesIn(const T (&array)[N]) {
319 return ValuesIn(array, array + N);
320}
321
322template <class Container>
323internal::ParamGenerator<typename Container::value_type> ValuesIn(
324 const Container& container) {
325 return ValuesIn(container.begin(), container.end());
326}
327
328// Values() allows generating tests from explicitly specified list of
329// parameters.
330//
331// Synopsis:
332// Values(T v1, T v2, ..., T vN)
333// - returns a generator producing sequences with elements v1, v2, ..., vN.
334//
335// For example, this instantiates tests from test case BarTest each
336// with values "one", "two", and "three":
337//
338// INSTANTIATE_TEST_CASE_P(NumSequence, BarTest, Values("one", "two", "three"));
339//
340// This instantiates tests from test case BazTest each with values 1, 2, 3.5.
341// The exact type of values will depend on the type of parameter in BazTest.
342//
343// INSTANTIATE_TEST_CASE_P(FloatingNumbers, BazTest, Values(1, 2, 3.5));
344//
345// Currently, Values() supports from 1 to 50 parameters.
346//
347template <typename T1>
348internal::ValueArray1<T1> Values(T1 v1) {
349 return internal::ValueArray1<T1>(v1);
350}
351
352template <typename T1, typename T2>
353internal::ValueArray2<T1, T2> Values(T1 v1, T2 v2) {
354 return internal::ValueArray2<T1, T2>(v1, v2);
355}
356
357template <typename T1, typename T2, typename T3>
358internal::ValueArray3<T1, T2, T3> Values(T1 v1, T2 v2, T3 v3) {
359 return internal::ValueArray3<T1, T2, T3>(v1, v2, v3);
360}
361
362template <typename T1, typename T2, typename T3, typename T4>
363internal::ValueArray4<T1, T2, T3, T4> Values(T1 v1, T2 v2, T3 v3, T4 v4) {
364 return internal::ValueArray4<T1, T2, T3, T4>(v1, v2, v3, v4);
365}
366
367template <typename T1, typename T2, typename T3, typename T4, typename T5>
368internal::ValueArray5<T1, T2, T3, T4, T5> Values(T1 v1, T2 v2, T3 v3, T4 v4,
369 T5 v5) {
370 return internal::ValueArray5<T1, T2, T3, T4, T5>(v1, v2, v3, v4, v5);
371}
372
373template <typename T1, typename T2, typename T3, typename T4, typename T5,
374 typename T6>
375internal::ValueArray6<T1, T2, T3, T4, T5, T6> Values(T1 v1, T2 v2, T3 v3,
376 T4 v4, T5 v5, T6 v6) {
377 return internal::ValueArray6<T1, T2, T3, T4, T5, T6>(v1, v2, v3, v4, v5, v6);
378}
379
380template <typename T1, typename T2, typename T3, typename T4, typename T5,
381 typename T6, typename T7>
382internal::ValueArray7<T1, T2, T3, T4, T5, T6, T7> Values(T1 v1, T2 v2, T3 v3,
383 T4 v4, T5 v5, T6 v6, T7 v7) {
384 return internal::ValueArray7<T1, T2, T3, T4, T5, T6, T7>(v1, v2, v3, v4, v5,
385 v6, v7);
386}
387
388template <typename T1, typename T2, typename T3, typename T4, typename T5,
389 typename T6, typename T7, typename T8>
390internal::ValueArray8<T1, T2, T3, T4, T5, T6, T7, T8> Values(T1 v1, T2 v2,
391 T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8) {
392 return internal::ValueArray8<T1, T2, T3, T4, T5, T6, T7, T8>(v1, v2, v3, v4,
393 v5, v6, v7, v8);
394}
395
396template <typename T1, typename T2, typename T3, typename T4, typename T5,
397 typename T6, typename T7, typename T8, typename T9>
398internal::ValueArray9<T1, T2, T3, T4, T5, T6, T7, T8, T9> Values(T1 v1, T2 v2,
399 T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9) {
400 return internal::ValueArray9<T1, T2, T3, T4, T5, T6, T7, T8, T9>(v1, v2, v3,
401 v4, v5, v6, v7, v8, v9);
402}
403
404template <typename T1, typename T2, typename T3, typename T4, typename T5,
405 typename T6, typename T7, typename T8, typename T9, typename T10>
406internal::ValueArray10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> Values(T1 v1,
407 T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10) {
408 return internal::ValueArray10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(v1,
409 v2, v3, v4, v5, v6, v7, v8, v9, v10);
410}
411
412template <typename T1, typename T2, typename T3, typename T4, typename T5,
413 typename T6, typename T7, typename T8, typename T9, typename T10,
414 typename T11>
415internal::ValueArray11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10,
416 T11> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
417 T10 v10, T11 v11) {
418 return internal::ValueArray11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10,
419 T11>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11);
420}
421
422template <typename T1, typename T2, typename T3, typename T4, typename T5,
423 typename T6, typename T7, typename T8, typename T9, typename T10,
424 typename T11, typename T12>
425internal::ValueArray12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
426 T12> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
427 T10 v10, T11 v11, T12 v12) {
428 return internal::ValueArray12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
429 T12>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12);
430}
431
432template <typename T1, typename T2, typename T3, typename T4, typename T5,
433 typename T6, typename T7, typename T8, typename T9, typename T10,
434 typename T11, typename T12, typename T13>
435internal::ValueArray13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
436 T13> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
437 T10 v10, T11 v11, T12 v12, T13 v13) {
438 return internal::ValueArray13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
439 T12, T13>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13);
440}
441
442template <typename T1, typename T2, typename T3, typename T4, typename T5,
443 typename T6, typename T7, typename T8, typename T9, typename T10,
444 typename T11, typename T12, typename T13, typename T14>
445internal::ValueArray14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
446 T14> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
447 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14) {
448 return internal::ValueArray14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
449 T12, T13, T14>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13,
450 v14);
451}
452
453template <typename T1, typename T2, typename T3, typename T4, typename T5,
454 typename T6, typename T7, typename T8, typename T9, typename T10,
455 typename T11, typename T12, typename T13, typename T14, typename T15>
456internal::ValueArray15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
457 T14, T15> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8,
458 T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15) {
459 return internal::ValueArray15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
460 T12, T13, T14, T15>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12,
461 v13, v14, v15);
462}
463
464template <typename T1, typename T2, typename T3, typename T4, typename T5,
465 typename T6, typename T7, typename T8, typename T9, typename T10,
466 typename T11, typename T12, typename T13, typename T14, typename T15,
467 typename T16>
468internal::ValueArray16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
469 T14, T15, T16> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7,
470 T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
471 T16 v16) {
472 return internal::ValueArray16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
473 T12, T13, T14, T15, T16>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11,
474 v12, v13, v14, v15, v16);
475}
476
477template <typename T1, typename T2, typename T3, typename T4, typename T5,
478 typename T6, typename T7, typename T8, typename T9, typename T10,
479 typename T11, typename T12, typename T13, typename T14, typename T15,
480 typename T16, typename T17>
481internal::ValueArray17<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
482 T14, T15, T16, T17> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7,
483 T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
484 T16 v16, T17 v17) {
485 return internal::ValueArray17<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
486 T12, T13, T14, T15, T16, T17>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10,
487 v11, v12, v13, v14, v15, v16, v17);
488}
489
490template <typename T1, typename T2, typename T3, typename T4, typename T5,
491 typename T6, typename T7, typename T8, typename T9, typename T10,
492 typename T11, typename T12, typename T13, typename T14, typename T15,
493 typename T16, typename T17, typename T18>
494internal::ValueArray18<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
495 T14, T15, T16, T17, T18> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6,
496 T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
497 T16 v16, T17 v17, T18 v18) {
498 return internal::ValueArray18<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
499 T12, T13, T14, T15, T16, T17, T18>(v1, v2, v3, v4, v5, v6, v7, v8, v9,
500 v10, v11, v12, v13, v14, v15, v16, v17, v18);
501}
502
503template <typename T1, typename T2, typename T3, typename T4, typename T5,
504 typename T6, typename T7, typename T8, typename T9, typename T10,
505 typename T11, typename T12, typename T13, typename T14, typename T15,
506 typename T16, typename T17, typename T18, typename T19>
507internal::ValueArray19<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
508 T14, T15, T16, T17, T18, T19> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5,
509 T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14,
510 T15 v15, T16 v16, T17 v17, T18 v18, T19 v19) {
511 return internal::ValueArray19<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
512 T12, T13, T14, T15, T16, T17, T18, T19>(v1, v2, v3, v4, v5, v6, v7, v8,
513 v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19);
514}
515
516template <typename T1, typename T2, typename T3, typename T4, typename T5,
517 typename T6, typename T7, typename T8, typename T9, typename T10,
518 typename T11, typename T12, typename T13, typename T14, typename T15,
519 typename T16, typename T17, typename T18, typename T19, typename T20>
520internal::ValueArray20<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
521 T14, T15, T16, T17, T18, T19, T20> Values(T1 v1, T2 v2, T3 v3, T4 v4,
522 T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13,
523 T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20) {
524 return internal::ValueArray20<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
525 T12, T13, T14, T15, T16, T17, T18, T19, T20>(v1, v2, v3, v4, v5, v6, v7,
526 v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20);
527}
528
529template <typename T1, typename T2, typename T3, typename T4, typename T5,
530 typename T6, typename T7, typename T8, typename T9, typename T10,
531 typename T11, typename T12, typename T13, typename T14, typename T15,
532 typename T16, typename T17, typename T18, typename T19, typename T20,
533 typename T21>
534internal::ValueArray21<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
535 T14, T15, T16, T17, T18, T19, T20, T21> Values(T1 v1, T2 v2, T3 v3, T4 v4,
536 T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13,
537 T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21) {
538 return internal::ValueArray21<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
539 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21>(v1, v2, v3, v4, v5, v6,
540 v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21);
541}
542
543template <typename T1, typename T2, typename T3, typename T4, typename T5,
544 typename T6, typename T7, typename T8, typename T9, typename T10,
545 typename T11, typename T12, typename T13, typename T14, typename T15,
546 typename T16, typename T17, typename T18, typename T19, typename T20,
547 typename T21, typename T22>
548internal::ValueArray22<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
549 T14, T15, T16, T17, T18, T19, T20, T21, T22> Values(T1 v1, T2 v2, T3 v3,
550 T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12,
551 T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20,
552 T21 v21, T22 v22) {
553 return internal::ValueArray22<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
554 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22>(v1, v2, v3, v4,
555 v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19,
556 v20, v21, v22);
557}
558
559template <typename T1, typename T2, typename T3, typename T4, typename T5,
560 typename T6, typename T7, typename T8, typename T9, typename T10,
561 typename T11, typename T12, typename T13, typename T14, typename T15,
562 typename T16, typename T17, typename T18, typename T19, typename T20,
563 typename T21, typename T22, typename T23>
564internal::ValueArray23<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
565 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23> Values(T1 v1, T2 v2,
566 T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12,
567 T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20,
568 T21 v21, T22 v22, T23 v23) {
569 return internal::ValueArray23<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
570 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23>(v1, v2, v3,
571 v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19,
572 v20, v21, v22, v23);
573}
574
575template <typename T1, typename T2, typename T3, typename T4, typename T5,
576 typename T6, typename T7, typename T8, typename T9, typename T10,
577 typename T11, typename T12, typename T13, typename T14, typename T15,
578 typename T16, typename T17, typename T18, typename T19, typename T20,
579 typename T21, typename T22, typename T23, typename T24>
580internal::ValueArray24<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
581 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24> Values(T1 v1, T2 v2,
582 T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12,
583 T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20,
584 T21 v21, T22 v22, T23 v23, T24 v24) {
585 return internal::ValueArray24<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
586 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24>(v1, v2,
587 v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18,
588 v19, v20, v21, v22, v23, v24);
589}
590
591template <typename T1, typename T2, typename T3, typename T4, typename T5,
592 typename T6, typename T7, typename T8, typename T9, typename T10,
593 typename T11, typename T12, typename T13, typename T14, typename T15,
594 typename T16, typename T17, typename T18, typename T19, typename T20,
595 typename T21, typename T22, typename T23, typename T24, typename T25>
596internal::ValueArray25<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
597 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25> Values(T1 v1,
598 T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11,
599 T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19,
600 T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25) {
601 return internal::ValueArray25<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
602 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25>(v1,
603 v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17,
604 v18, v19, v20, v21, v22, v23, v24, v25);
605}
606
607template <typename T1, typename T2, typename T3, typename T4, typename T5,
608 typename T6, typename T7, typename T8, typename T9, typename T10,
609 typename T11, typename T12, typename T13, typename T14, typename T15,
610 typename T16, typename T17, typename T18, typename T19, typename T20,
611 typename T21, typename T22, typename T23, typename T24, typename T25,
612 typename T26>
613internal::ValueArray26<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
614 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
615 T26> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
616 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
617 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
618 T26 v26) {
619 return internal::ValueArray26<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
620 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
621 T26>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15,
622 v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26);
623}
624
625template <typename T1, typename T2, typename T3, typename T4, typename T5,
626 typename T6, typename T7, typename T8, typename T9, typename T10,
627 typename T11, typename T12, typename T13, typename T14, typename T15,
628 typename T16, typename T17, typename T18, typename T19, typename T20,
629 typename T21, typename T22, typename T23, typename T24, typename T25,
630 typename T26, typename T27>
631internal::ValueArray27<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
632 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
633 T27> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
634 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
635 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
636 T26 v26, T27 v27) {
637 return internal::ValueArray27<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
638 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
639 T26, T27>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14,
640 v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27);
641}
642
643template <typename T1, typename T2, typename T3, typename T4, typename T5,
644 typename T6, typename T7, typename T8, typename T9, typename T10,
645 typename T11, typename T12, typename T13, typename T14, typename T15,
646 typename T16, typename T17, typename T18, typename T19, typename T20,
647 typename T21, typename T22, typename T23, typename T24, typename T25,
648 typename T26, typename T27, typename T28>
649internal::ValueArray28<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
650 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
651 T28> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
652 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
653 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
654 T26 v26, T27 v27, T28 v28) {
655 return internal::ValueArray28<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
656 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
657 T26, T27, T28>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13,
658 v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27,
659 v28);
660}
661
662template <typename T1, typename T2, typename T3, typename T4, typename T5,
663 typename T6, typename T7, typename T8, typename T9, typename T10,
664 typename T11, typename T12, typename T13, typename T14, typename T15,
665 typename T16, typename T17, typename T18, typename T19, typename T20,
666 typename T21, typename T22, typename T23, typename T24, typename T25,
667 typename T26, typename T27, typename T28, typename T29>
668internal::ValueArray29<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
669 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
670 T29> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
671 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
672 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
673 T26 v26, T27 v27, T28 v28, T29 v29) {
674 return internal::ValueArray29<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
675 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
676 T26, T27, T28, T29>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12,
677 v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26,
678 v27, v28, v29);
679}
680
681template <typename T1, typename T2, typename T3, typename T4, typename T5,
682 typename T6, typename T7, typename T8, typename T9, typename T10,
683 typename T11, typename T12, typename T13, typename T14, typename T15,
684 typename T16, typename T17, typename T18, typename T19, typename T20,
685 typename T21, typename T22, typename T23, typename T24, typename T25,
686 typename T26, typename T27, typename T28, typename T29, typename T30>
687internal::ValueArray30<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
688 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
689 T29, T30> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8,
690 T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16,
691 T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24,
692 T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30) {
693 return internal::ValueArray30<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
694 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
695 T26, T27, T28, T29, T30>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11,
696 v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25,
697 v26, v27, v28, v29, v30);
698}
699
700template <typename T1, typename T2, typename T3, typename T4, typename T5,
701 typename T6, typename T7, typename T8, typename T9, typename T10,
702 typename T11, typename T12, typename T13, typename T14, typename T15,
703 typename T16, typename T17, typename T18, typename T19, typename T20,
704 typename T21, typename T22, typename T23, typename T24, typename T25,
705 typename T26, typename T27, typename T28, typename T29, typename T30,
706 typename T31>
707internal::ValueArray31<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
708 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
709 T29, T30, T31> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7,
710 T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
711 T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23,
712 T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31) {
713 return internal::ValueArray31<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
714 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
715 T26, T27, T28, T29, T30, T31>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10,
716 v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24,
717 v25, v26, v27, v28, v29, v30, v31);
718}
719
720template <typename T1, typename T2, typename T3, typename T4, typename T5,
721 typename T6, typename T7, typename T8, typename T9, typename T10,
722 typename T11, typename T12, typename T13, typename T14, typename T15,
723 typename T16, typename T17, typename T18, typename T19, typename T20,
724 typename T21, typename T22, typename T23, typename T24, typename T25,
725 typename T26, typename T27, typename T28, typename T29, typename T30,
726 typename T31, typename T32>
727internal::ValueArray32<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
728 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
729 T29, T30, T31, T32> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7,
730 T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
731 T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23,
732 T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31,
733 T32 v32) {
734 return internal::ValueArray32<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
735 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
736 T26, T27, T28, T29, T30, T31, T32>(v1, v2, v3, v4, v5, v6, v7, v8, v9,
737 v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23,
738 v24, v25, v26, v27, v28, v29, v30, v31, v32);
739}
740
741template <typename T1, typename T2, typename T3, typename T4, typename T5,
742 typename T6, typename T7, typename T8, typename T9, typename T10,
743 typename T11, typename T12, typename T13, typename T14, typename T15,
744 typename T16, typename T17, typename T18, typename T19, typename T20,
745 typename T21, typename T22, typename T23, typename T24, typename T25,
746 typename T26, typename T27, typename T28, typename T29, typename T30,
747 typename T31, typename T32, typename T33>
748internal::ValueArray33<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
749 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
750 T29, T30, T31, T32, T33> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6,
751 T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
752 T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23,
753 T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31,
754 T32 v32, T33 v33) {
755 return internal::ValueArray33<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
756 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
757 T26, T27, T28, T29, T30, T31, T32, T33>(v1, v2, v3, v4, v5, v6, v7, v8,
758 v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23,
759 v24, v25, v26, v27, v28, v29, v30, v31, v32, v33);
760}
761
762template <typename T1, typename T2, typename T3, typename T4, typename T5,
763 typename T6, typename T7, typename T8, typename T9, typename T10,
764 typename T11, typename T12, typename T13, typename T14, typename T15,
765 typename T16, typename T17, typename T18, typename T19, typename T20,
766 typename T21, typename T22, typename T23, typename T24, typename T25,
767 typename T26, typename T27, typename T28, typename T29, typename T30,
768 typename T31, typename T32, typename T33, typename T34>
769internal::ValueArray34<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
770 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
771 T29, T30, T31, T32, T33, T34> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5,
772 T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14,
773 T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22,
774 T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30,
775 T31 v31, T32 v32, T33 v33, T34 v34) {
776 return internal::ValueArray34<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
777 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
778 T26, T27, T28, T29, T30, T31, T32, T33, T34>(v1, v2, v3, v4, v5, v6, v7,
779 v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22,
780 v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34);
781}
782
783template <typename T1, typename T2, typename T3, typename T4, typename T5,
784 typename T6, typename T7, typename T8, typename T9, typename T10,
785 typename T11, typename T12, typename T13, typename T14, typename T15,
786 typename T16, typename T17, typename T18, typename T19, typename T20,
787 typename T21, typename T22, typename T23, typename T24, typename T25,
788 typename T26, typename T27, typename T28, typename T29, typename T30,
789 typename T31, typename T32, typename T33, typename T34, typename T35>
790internal::ValueArray35<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
791 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
792 T29, T30, T31, T32, T33, T34, T35> Values(T1 v1, T2 v2, T3 v3, T4 v4,
793 T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13,
794 T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21,
795 T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29,
796 T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35) {
797 return internal::ValueArray35<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
798 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
799 T26, T27, T28, T29, T30, T31, T32, T33, T34, T35>(v1, v2, v3, v4, v5, v6,
800 v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21,
801 v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35);
802}
803
804template <typename T1, typename T2, typename T3, typename T4, typename T5,
805 typename T6, typename T7, typename T8, typename T9, typename T10,
806 typename T11, typename T12, typename T13, typename T14, typename T15,
807 typename T16, typename T17, typename T18, typename T19, typename T20,
808 typename T21, typename T22, typename T23, typename T24, typename T25,
809 typename T26, typename T27, typename T28, typename T29, typename T30,
810 typename T31, typename T32, typename T33, typename T34, typename T35,
811 typename T36>
812internal::ValueArray36<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
813 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
814 T29, T30, T31, T32, T33, T34, T35, T36> Values(T1 v1, T2 v2, T3 v3, T4 v4,
815 T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13,
816 T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21,
817 T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29,
818 T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36) {
819 return internal::ValueArray36<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
820 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
821 T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36>(v1, v2, v3, v4,
822 v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19,
823 v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33,
824 v34, v35, v36);
825}
826
827template <typename T1, typename T2, typename T3, typename T4, typename T5,
828 typename T6, typename T7, typename T8, typename T9, typename T10,
829 typename T11, typename T12, typename T13, typename T14, typename T15,
830 typename T16, typename T17, typename T18, typename T19, typename T20,
831 typename T21, typename T22, typename T23, typename T24, typename T25,
832 typename T26, typename T27, typename T28, typename T29, typename T30,
833 typename T31, typename T32, typename T33, typename T34, typename T35,
834 typename T36, typename T37>
835internal::ValueArray37<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
836 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
837 T29, T30, T31, T32, T33, T34, T35, T36, T37> Values(T1 v1, T2 v2, T3 v3,
838 T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12,
839 T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20,
840 T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28,
841 T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36,
842 T37 v37) {
843 return internal::ValueArray37<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
844 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
845 T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37>(v1, v2, v3,
846 v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19,
847 v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33,
848 v34, v35, v36, v37);
849}
850
851template <typename T1, typename T2, typename T3, typename T4, typename T5,
852 typename T6, typename T7, typename T8, typename T9, typename T10,
853 typename T11, typename T12, typename T13, typename T14, typename T15,
854 typename T16, typename T17, typename T18, typename T19, typename T20,
855 typename T21, typename T22, typename T23, typename T24, typename T25,
856 typename T26, typename T27, typename T28, typename T29, typename T30,
857 typename T31, typename T32, typename T33, typename T34, typename T35,
858 typename T36, typename T37, typename T38>
859internal::ValueArray38<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
860 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
861 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38> Values(T1 v1, T2 v2,
862 T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12,
863 T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20,
864 T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28,
865 T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36,
866 T37 v37, T38 v38) {
867 return internal::ValueArray38<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
868 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
869 T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38>(v1, v2,
870 v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18,
871 v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32,
872 v33, v34, v35, v36, v37, v38);
873}
874
875template <typename T1, typename T2, typename T3, typename T4, typename T5,
876 typename T6, typename T7, typename T8, typename T9, typename T10,
877 typename T11, typename T12, typename T13, typename T14, typename T15,
878 typename T16, typename T17, typename T18, typename T19, typename T20,
879 typename T21, typename T22, typename T23, typename T24, typename T25,
880 typename T26, typename T27, typename T28, typename T29, typename T30,
881 typename T31, typename T32, typename T33, typename T34, typename T35,
882 typename T36, typename T37, typename T38, typename T39>
883internal::ValueArray39<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
884 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
885 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39> Values(T1 v1, T2 v2,
886 T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12,
887 T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20,
888 T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28,
889 T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36,
890 T37 v37, T38 v38, T39 v39) {
891 return internal::ValueArray39<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
892 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
893 T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39>(v1,
894 v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17,
895 v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31,
896 v32, v33, v34, v35, v36, v37, v38, v39);
897}
898
899template <typename T1, typename T2, typename T3, typename T4, typename T5,
900 typename T6, typename T7, typename T8, typename T9, typename T10,
901 typename T11, typename T12, typename T13, typename T14, typename T15,
902 typename T16, typename T17, typename T18, typename T19, typename T20,
903 typename T21, typename T22, typename T23, typename T24, typename T25,
904 typename T26, typename T27, typename T28, typename T29, typename T30,
905 typename T31, typename T32, typename T33, typename T34, typename T35,
906 typename T36, typename T37, typename T38, typename T39, typename T40>
907internal::ValueArray40<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
908 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
909 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40> Values(T1 v1,
910 T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11,
911 T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19,
912 T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27,
913 T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35,
914 T36 v36, T37 v37, T38 v38, T39 v39, T40 v40) {
915 return internal::ValueArray40<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
916 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
917 T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
918 T40>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15,
919 v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29,
920 v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40);
921}
922
923template <typename T1, typename T2, typename T3, typename T4, typename T5,
924 typename T6, typename T7, typename T8, typename T9, typename T10,
925 typename T11, typename T12, typename T13, typename T14, typename T15,
926 typename T16, typename T17, typename T18, typename T19, typename T20,
927 typename T21, typename T22, typename T23, typename T24, typename T25,
928 typename T26, typename T27, typename T28, typename T29, typename T30,
929 typename T31, typename T32, typename T33, typename T34, typename T35,
930 typename T36, typename T37, typename T38, typename T39, typename T40,
931 typename T41>
932internal::ValueArray41<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
933 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
934 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
935 T41> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
936 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
937 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
938 T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
939 T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41) {
940 return internal::ValueArray41<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
941 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
942 T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
943 T40, T41>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14,
944 v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28,
945 v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41);
946}
947
948template <typename T1, typename T2, typename T3, typename T4, typename T5,
949 typename T6, typename T7, typename T8, typename T9, typename T10,
950 typename T11, typename T12, typename T13, typename T14, typename T15,
951 typename T16, typename T17, typename T18, typename T19, typename T20,
952 typename T21, typename T22, typename T23, typename T24, typename T25,
953 typename T26, typename T27, typename T28, typename T29, typename T30,
954 typename T31, typename T32, typename T33, typename T34, typename T35,
955 typename T36, typename T37, typename T38, typename T39, typename T40,
956 typename T41, typename T42>
957internal::ValueArray42<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
958 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
959 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,
960 T42> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
961 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
962 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
963 T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
964 T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
965 T42 v42) {
966 return internal::ValueArray42<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
967 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
968 T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
969 T40, T41, T42>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13,
970 v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27,
971 v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41,
972 v42);
973}
974
975template <typename T1, typename T2, typename T3, typename T4, typename T5,
976 typename T6, typename T7, typename T8, typename T9, typename T10,
977 typename T11, typename T12, typename T13, typename T14, typename T15,
978 typename T16, typename T17, typename T18, typename T19, typename T20,
979 typename T21, typename T22, typename T23, typename T24, typename T25,
980 typename T26, typename T27, typename T28, typename T29, typename T30,
981 typename T31, typename T32, typename T33, typename T34, typename T35,
982 typename T36, typename T37, typename T38, typename T39, typename T40,
983 typename T41, typename T42, typename T43>
984internal::ValueArray43<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
985 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
986 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,
987 T43> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
988 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
989 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
990 T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
991 T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
992 T42 v42, T43 v43) {
993 return internal::ValueArray43<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
994 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
995 T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
996 T40, T41, T42, T43>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12,
997 v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26,
998 v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40,
999 v41, v42, v43);
1000}
1001
1002template <typename T1, typename T2, typename T3, typename T4, typename T5,
1003 typename T6, typename T7, typename T8, typename T9, typename T10,
1004 typename T11, typename T12, typename T13, typename T14, typename T15,
1005 typename T16, typename T17, typename T18, typename T19, typename T20,
1006 typename T21, typename T22, typename T23, typename T24, typename T25,
1007 typename T26, typename T27, typename T28, typename T29, typename T30,
1008 typename T31, typename T32, typename T33, typename T34, typename T35,
1009 typename T36, typename T37, typename T38, typename T39, typename T40,
1010 typename T41, typename T42, typename T43, typename T44>
1011internal::ValueArray44<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
1012 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
1013 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
1014 T44> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
1015 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
1016 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
1017 T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
1018 T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
1019 T42 v42, T43 v43, T44 v44) {
1020 return internal::ValueArray44<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
1021 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
1022 T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
1023 T40, T41, T42, T43, T44>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11,
1024 v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25,
1025 v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39,
1026 v40, v41, v42, v43, v44);
1027}
1028
1029template <typename T1, typename T2, typename T3, typename T4, typename T5,
1030 typename T6, typename T7, typename T8, typename T9, typename T10,
1031 typename T11, typename T12, typename T13, typename T14, typename T15,
1032 typename T16, typename T17, typename T18, typename T19, typename T20,
1033 typename T21, typename T22, typename T23, typename T24, typename T25,
1034 typename T26, typename T27, typename T28, typename T29, typename T30,
1035 typename T31, typename T32, typename T33, typename T34, typename T35,
1036 typename T36, typename T37, typename T38, typename T39, typename T40,
1037 typename T41, typename T42, typename T43, typename T44, typename T45>
1038internal::ValueArray45<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
1039 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
1040 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
1041 T44, T45> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8,
1042 T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16,
1043 T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24,
1044 T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32,
1045 T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40,
1046 T41 v41, T42 v42, T43 v43, T44 v44, T45 v45) {
1047 return internal::ValueArray45<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
1048 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
1049 T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
1050 T40, T41, T42, T43, T44, T45>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10,
1051 v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24,
1052 v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38,
1053 v39, v40, v41, v42, v43, v44, v45);
1054}
1055
1056template <typename T1, typename T2, typename T3, typename T4, typename T5,
1057 typename T6, typename T7, typename T8, typename T9, typename T10,
1058 typename T11, typename T12, typename T13, typename T14, typename T15,
1059 typename T16, typename T17, typename T18, typename T19, typename T20,
1060 typename T21, typename T22, typename T23, typename T24, typename T25,
1061 typename T26, typename T27, typename T28, typename T29, typename T30,
1062 typename T31, typename T32, typename T33, typename T34, typename T35,
1063 typename T36, typename T37, typename T38, typename T39, typename T40,
1064 typename T41, typename T42, typename T43, typename T44, typename T45,
1065 typename T46>
1066internal::ValueArray46<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
1067 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
1068 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
1069 T44, T45, T46> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7,
1070 T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
1071 T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23,
1072 T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31,
1073 T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39,
1074 T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45, T46 v46) {
1075 return internal::ValueArray46<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
1076 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
1077 T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
1078 T40, T41, T42, T43, T44, T45, T46>(v1, v2, v3, v4, v5, v6, v7, v8, v9,
1079 v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23,
1080 v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37,
1081 v38, v39, v40, v41, v42, v43, v44, v45, v46);
1082}
1083
1084template <typename T1, typename T2, typename T3, typename T4, typename T5,
1085 typename T6, typename T7, typename T8, typename T9, typename T10,
1086 typename T11, typename T12, typename T13, typename T14, typename T15,
1087 typename T16, typename T17, typename T18, typename T19, typename T20,
1088 typename T21, typename T22, typename T23, typename T24, typename T25,
1089 typename T26, typename T27, typename T28, typename T29, typename T30,
1090 typename T31, typename T32, typename T33, typename T34, typename T35,
1091 typename T36, typename T37, typename T38, typename T39, typename T40,
1092 typename T41, typename T42, typename T43, typename T44, typename T45,
1093 typename T46, typename T47>
1094internal::ValueArray47<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
1095 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
1096 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
1097 T44, T45, T46, T47> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7,
1098 T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
1099 T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23,
1100 T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31,
1101 T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39,
1102 T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47) {
1103 return internal::ValueArray47<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
1104 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
1105 T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
1106 T40, T41, T42, T43, T44, T45, T46, T47>(v1, v2, v3, v4, v5, v6, v7, v8,
1107 v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23,
1108 v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37,
1109 v38, v39, v40, v41, v42, v43, v44, v45, v46, v47);
1110}
1111
1112template <typename T1, typename T2, typename T3, typename T4, typename T5,
1113 typename T6, typename T7, typename T8, typename T9, typename T10,
1114 typename T11, typename T12, typename T13, typename T14, typename T15,
1115 typename T16, typename T17, typename T18, typename T19, typename T20,
1116 typename T21, typename T22, typename T23, typename T24, typename T25,
1117 typename T26, typename T27, typename T28, typename T29, typename T30,
1118 typename T31, typename T32, typename T33, typename T34, typename T35,
1119 typename T36, typename T37, typename T38, typename T39, typename T40,
1120 typename T41, typename T42, typename T43, typename T44, typename T45,
1121 typename T46, typename T47, typename T48>
1122internal::ValueArray48<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
1123 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
1124 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
1125 T44, T45, T46, T47, T48> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6,
1126 T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
1127 T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23,
1128 T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31,
1129 T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39,
1130 T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47,
1131 T48 v48) {
1132 return internal::ValueArray48<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
1133 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
1134 T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
1135 T40, T41, T42, T43, T44, T45, T46, T47, T48>(v1, v2, v3, v4, v5, v6, v7,
1136 v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22,
1137 v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36,
1138 v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48);
1139}
1140
1141template <typename T1, typename T2, typename T3, typename T4, typename T5,
1142 typename T6, typename T7, typename T8, typename T9, typename T10,
1143 typename T11, typename T12, typename T13, typename T14, typename T15,
1144 typename T16, typename T17, typename T18, typename T19, typename T20,
1145 typename T21, typename T22, typename T23, typename T24, typename T25,
1146 typename T26, typename T27, typename T28, typename T29, typename T30,
1147 typename T31, typename T32, typename T33, typename T34, typename T35,
1148 typename T36, typename T37, typename T38, typename T39, typename T40,
1149 typename T41, typename T42, typename T43, typename T44, typename T45,
1150 typename T46, typename T47, typename T48, typename T49>
1151internal::ValueArray49<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
1152 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
1153 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
1154 T44, T45, T46, T47, T48, T49> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5,
1155 T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14,
1156 T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22,
1157 T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30,
1158 T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38,
1159 T39 v39, T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45, T46 v46,
1160 T47 v47, T48 v48, T49 v49) {
1161 return internal::ValueArray49<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
1162 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
1163 T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
1164 T40, T41, T42, T43, T44, T45, T46, T47, T48, T49>(v1, v2, v3, v4, v5, v6,
1165 v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21,
1166 v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35,
1167 v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49);
1168}
1169
1170template <typename T1, typename T2, typename T3, typename T4, typename T5,
1171 typename T6, typename T7, typename T8, typename T9, typename T10,
1172 typename T11, typename T12, typename T13, typename T14, typename T15,
1173 typename T16, typename T17, typename T18, typename T19, typename T20,
1174 typename T21, typename T22, typename T23, typename T24, typename T25,
1175 typename T26, typename T27, typename T28, typename T29, typename T30,
1176 typename T31, typename T32, typename T33, typename T34, typename T35,
1177 typename T36, typename T37, typename T38, typename T39, typename T40,
1178 typename T41, typename T42, typename T43, typename T44, typename T45,
1179 typename T46, typename T47, typename T48, typename T49, typename T50>
1180internal::ValueArray50<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
1181 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
1182 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
1183 T44, T45, T46, T47, T48, T49, T50> Values(T1 v1, T2 v2, T3 v3, T4 v4,
1184 T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13,
1185 T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21,
1186 T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29,
1187 T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37,
1188 T38 v38, T39 v39, T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45,
1189 T46 v46, T47 v47, T48 v48, T49 v49, T50 v50) {
1190 return internal::ValueArray50<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
1191 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
1192 T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
1193 T40, T41, T42, T43, T44, T45, T46, T47, T48, T49, T50>(v1, v2, v3, v4,
1194 v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19,
1195 v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33,
1196 v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47,
1197 v48, v49, v50);
1198}
1199
1200// Bool() allows generating tests with parameters in a set of (false, true).
1201//
1202// Synopsis:
1203// Bool()
1204// - returns a generator producing sequences with elements {false, true}.
1205//
1206// It is useful when testing code that depends on Boolean flags. Combinations
1207// of multiple flags can be tested when several Bool()'s are combined using
1208// Combine() function.
1209//
1210// In the following example all tests in the test case FlagDependentTest
1211// will be instantiated twice with parameters false and true.
1212//
1213// class FlagDependentTest : public testing::TestWithParam<bool> {
1214// virtual void SetUp() {
1215// external_flag = GetParam();
1216// }
1217// }
1218// INSTANTIATE_TEST_CASE_P(BoolSequence, FlagDependentTest, Bool());
1219//
1220inline internal::ParamGenerator<bool> Bool() {
1221 return Values(false, true);
1222}
1223
1224# if GTEST_HAS_COMBINE
1225// Combine() allows the user to combine two or more sequences to produce
1226// values of a Cartesian product of those sequences' elements.
1227//
1228// Synopsis:
1229// Combine(gen1, gen2, ..., genN)
1230// - returns a generator producing sequences with elements coming from
1231// the Cartesian product of elements from the sequences generated by
1232// gen1, gen2, ..., genN. The sequence elements will have a type of
1233// tuple<T1, T2, ..., TN> where T1, T2, ..., TN are the types
1234// of elements from sequences produces by gen1, gen2, ..., genN.
1235//
1236// Combine can have up to 10 arguments. This number is currently limited
1237// by the maximum number of elements in the tuple implementation used by Google
1238// Test.
1239//
1240// Example:
1241//
1242// This will instantiate tests in test case AnimalTest each one with
1243// the parameter values tuple("cat", BLACK), tuple("cat", WHITE),
1244// tuple("dog", BLACK), and tuple("dog", WHITE):
1245//
1246// enum Color { BLACK, GRAY, WHITE };
1247// class AnimalTest
1248// : public testing::TestWithParam<tuple<const char*, Color> > {...};
1249//
1250// TEST_P(AnimalTest, AnimalLooksNice) {...}
1251//
1252// INSTANTIATE_TEST_CASE_P(AnimalVariations, AnimalTest,
1253// Combine(Values("cat", "dog"),
1254// Values(BLACK, WHITE)));
1255//
1256// This will instantiate tests in FlagDependentTest with all variations of two
1257// Boolean flags:
1258//
1259// class FlagDependentTest
1260// : public testing::TestWithParam<tuple<bool, bool> > {
1261// virtual void SetUp() {
1262// // Assigns external_flag_1 and external_flag_2 values from the tuple.
1263// tie(external_flag_1, external_flag_2) = GetParam();
1264// }
1265// };
1266//
1267// TEST_P(FlagDependentTest, TestFeature1) {
1268// // Test your code using external_flag_1 and external_flag_2 here.
1269// }
1270// INSTANTIATE_TEST_CASE_P(TwoBoolSequence, FlagDependentTest,
1271// Combine(Bool(), Bool()));
1272//
1273template <typename Generator1, typename Generator2>
1274internal::CartesianProductHolder2<Generator1, Generator2> Combine(
1275 const Generator1& g1, const Generator2& g2) {
1276 return internal::CartesianProductHolder2<Generator1, Generator2>(
1277 g1, g2);
1278}
1279
1280template <typename Generator1, typename Generator2, typename Generator3>
1281internal::CartesianProductHolder3<Generator1, Generator2, Generator3> Combine(
1282 const Generator1& g1, const Generator2& g2, const Generator3& g3) {
1283 return internal::CartesianProductHolder3<Generator1, Generator2, Generator3>(
1284 g1, g2, g3);
1285}
1286
1287template <typename Generator1, typename Generator2, typename Generator3,
1288 typename Generator4>
1289internal::CartesianProductHolder4<Generator1, Generator2, Generator3,
1290 Generator4> Combine(
1291 const Generator1& g1, const Generator2& g2, const Generator3& g3,
1292 const Generator4& g4) {
1293 return internal::CartesianProductHolder4<Generator1, Generator2, Generator3,
1294 Generator4>(
1295 g1, g2, g3, g4);
1296}
1297
1298template <typename Generator1, typename Generator2, typename Generator3,
1299 typename Generator4, typename Generator5>
1300internal::CartesianProductHolder5<Generator1, Generator2, Generator3,
1301 Generator4, Generator5> Combine(
1302 const Generator1& g1, const Generator2& g2, const Generator3& g3,
1303 const Generator4& g4, const Generator5& g5) {
1304 return internal::CartesianProductHolder5<Generator1, Generator2, Generator3,
1305 Generator4, Generator5>(
1306 g1, g2, g3, g4, g5);
1307}
1308
1309template <typename Generator1, typename Generator2, typename Generator3,
1310 typename Generator4, typename Generator5, typename Generator6>
1311internal::CartesianProductHolder6<Generator1, Generator2, Generator3,
1312 Generator4, Generator5, Generator6> Combine(
1313 const Generator1& g1, const Generator2& g2, const Generator3& g3,
1314 const Generator4& g4, const Generator5& g5, const Generator6& g6) {
1315 return internal::CartesianProductHolder6<Generator1, Generator2, Generator3,
1316 Generator4, Generator5, Generator6>(
1317 g1, g2, g3, g4, g5, g6);
1318}
1319
1320template <typename Generator1, typename Generator2, typename Generator3,
1321 typename Generator4, typename Generator5, typename Generator6,
1322 typename Generator7>
1323internal::CartesianProductHolder7<Generator1, Generator2, Generator3,
1324 Generator4, Generator5, Generator6, Generator7> Combine(
1325 const Generator1& g1, const Generator2& g2, const Generator3& g3,
1326 const Generator4& g4, const Generator5& g5, const Generator6& g6,
1327 const Generator7& g7) {
1328 return internal::CartesianProductHolder7<Generator1, Generator2, Generator3,
1329 Generator4, Generator5, Generator6, Generator7>(
1330 g1, g2, g3, g4, g5, g6, g7);
1331}
1332
1333template <typename Generator1, typename Generator2, typename Generator3,
1334 typename Generator4, typename Generator5, typename Generator6,
1335 typename Generator7, typename Generator8>
1336internal::CartesianProductHolder8<Generator1, Generator2, Generator3,
1337 Generator4, Generator5, Generator6, Generator7, Generator8> Combine(
1338 const Generator1& g1, const Generator2& g2, const Generator3& g3,
1339 const Generator4& g4, const Generator5& g5, const Generator6& g6,
1340 const Generator7& g7, const Generator8& g8) {
1341 return internal::CartesianProductHolder8<Generator1, Generator2, Generator3,
1342 Generator4, Generator5, Generator6, Generator7, Generator8>(
1343 g1, g2, g3, g4, g5, g6, g7, g8);
1344}
1345
1346template <typename Generator1, typename Generator2, typename Generator3,
1347 typename Generator4, typename Generator5, typename Generator6,
1348 typename Generator7, typename Generator8, typename Generator9>
1349internal::CartesianProductHolder9<Generator1, Generator2, Generator3,
1350 Generator4, Generator5, Generator6, Generator7, Generator8,
1351 Generator9> Combine(
1352 const Generator1& g1, const Generator2& g2, const Generator3& g3,
1353 const Generator4& g4, const Generator5& g5, const Generator6& g6,
1354 const Generator7& g7, const Generator8& g8, const Generator9& g9) {
1355 return internal::CartesianProductHolder9<Generator1, Generator2, Generator3,
1356 Generator4, Generator5, Generator6, Generator7, Generator8, Generator9>(
1357 g1, g2, g3, g4, g5, g6, g7, g8, g9);
1358}
1359
1360template <typename Generator1, typename Generator2, typename Generator3,
1361 typename Generator4, typename Generator5, typename Generator6,
1362 typename Generator7, typename Generator8, typename Generator9,
1363 typename Generator10>
1364internal::CartesianProductHolder10<Generator1, Generator2, Generator3,
1365 Generator4, Generator5, Generator6, Generator7, Generator8, Generator9,
1366 Generator10> Combine(
1367 const Generator1& g1, const Generator2& g2, const Generator3& g3,
1368 const Generator4& g4, const Generator5& g5, const Generator6& g6,
1369 const Generator7& g7, const Generator8& g8, const Generator9& g9,
1370 const Generator10& g10) {
1371 return internal::CartesianProductHolder10<Generator1, Generator2, Generator3,
1372 Generator4, Generator5, Generator6, Generator7, Generator8, Generator9,
1373 Generator10>(
1374 g1, g2, g3, g4, g5, g6, g7, g8, g9, g10);
1375}
1376# endif // GTEST_HAS_COMBINE
1377
1378
1379
1380# define TEST_P(test_case_name, test_name) \
1381 class GTEST_TEST_CLASS_NAME_(test_case_name, test_name) \
1382 : public test_case_name { \
1383 public: \
1384 GTEST_TEST_CLASS_NAME_(test_case_name, test_name)() {} \
1385 virtual void TestBody(); \
1386 private: \
1387 static int AddToRegistry() { \
1388 ::testing::UnitTest::GetInstance()->parameterized_test_registry(). \
1389 GetTestCasePatternHolder<test_case_name>(\
1390 #test_case_name, __FILE__, __LINE__)->AddTestPattern(\
1391 #test_case_name, \
1392 #test_name, \
1393 new ::testing::internal::TestMetaFactory< \
1394 GTEST_TEST_CLASS_NAME_(test_case_name, test_name)>()); \
1395 return 0; \
1396 } \
1397 static int gtest_registering_dummy_; \
1398 GTEST_DISALLOW_COPY_AND_ASSIGN_(\
1399 GTEST_TEST_CLASS_NAME_(test_case_name, test_name)); \
1400 }; \
1401 int GTEST_TEST_CLASS_NAME_(test_case_name, \
1402 test_name)::gtest_registering_dummy_ = \
1403 GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::AddToRegistry(); \
1404 void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::TestBody()
1405
1406# define INSTANTIATE_TEST_CASE_P(prefix, test_case_name, generator) \
1407 ::testing::internal::ParamGenerator<test_case_name::ParamType> \
1408 gtest_##prefix##test_case_name##_EvalGenerator_() { return generator; } \
1409 int gtest_##prefix##test_case_name##_dummy_ = \
1410 ::testing::UnitTest::GetInstance()->parameterized_test_registry(). \
1411 GetTestCasePatternHolder<test_case_name>(\
1412 #test_case_name, __FILE__, __LINE__)->AddTestCaseInstantiation(\
1413 #prefix, \
1414 &gtest_##prefix##test_case_name##_EvalGenerator_, \
1415 __FILE__, __LINE__)
1416
1417} // namespace testing
1418
1419#endif // GTEST_HAS_PARAM_TEST
1420
1421#endif // GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_
14220
=== removed file '3rd_party/gmock/gtest/include/gtest/gtest-param-test.h.pump'
--- 3rd_party/gmock/gtest/include/gtest/gtest-param-test.h.pump 2014-04-07 19:53:07 +0000
+++ 3rd_party/gmock/gtest/include/gtest/gtest-param-test.h.pump 1970-01-01 00:00:00 +0000
@@ -1,487 +0,0 @@
1$$ -*- mode: c++; -*-
2$var n = 50 $$ Maximum length of Values arguments we want to support.
3$var maxtuple = 10 $$ Maximum number of Combine arguments we want to support.
4// Copyright 2008, Google Inc.
5// All rights reserved.
6//
7// Redistribution and use in source and binary forms, with or without
8// modification, are permitted provided that the following conditions are
9// met:
10//
11// * Redistributions of source code must retain the above copyright
12// notice, this list of conditions and the following disclaimer.
13// * Redistributions in binary form must reproduce the above
14// copyright notice, this list of conditions and the following disclaimer
15// in the documentation and/or other materials provided with the
16// distribution.
17// * Neither the name of Google Inc. nor the names of its
18// contributors may be used to endorse or promote products derived from
19// this software without specific prior written permission.
20//
21// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32//
33// Authors: vladl@google.com (Vlad Losev)
34//
35// Macros and functions for implementing parameterized tests
36// in Google C++ Testing Framework (Google Test)
37//
38// This file is generated by a SCRIPT. DO NOT EDIT BY HAND!
39//
40#ifndef GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_
41#define GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_
42
43
44// Value-parameterized tests allow you to test your code with different
45// parameters without writing multiple copies of the same test.
46//
47// Here is how you use value-parameterized tests:
48
49#if 0
50
51// To write value-parameterized tests, first you should define a fixture
52// class. It is usually derived from testing::TestWithParam<T> (see below for
53// another inheritance scheme that's sometimes useful in more complicated
54// class hierarchies), where the type of your parameter values.
55// TestWithParam<T> is itself derived from testing::Test. T can be any
56// copyable type. If it's a raw pointer, you are responsible for managing the
57// lifespan of the pointed values.
58
59class FooTest : public ::testing::TestWithParam<const char*> {
60 // You can implement all the usual class fixture members here.
61};
62
63// Then, use the TEST_P macro to define as many parameterized tests
64// for this fixture as you want. The _P suffix is for "parameterized"
65// or "pattern", whichever you prefer to think.
66
67TEST_P(FooTest, DoesBlah) {
68 // Inside a test, access the test parameter with the GetParam() method
69 // of the TestWithParam<T> class:
70 EXPECT_TRUE(foo.Blah(GetParam()));
71 ...
72}
73
74TEST_P(FooTest, HasBlahBlah) {
75 ...
76}
77
78// Finally, you can use INSTANTIATE_TEST_CASE_P to instantiate the test
79// case with any set of parameters you want. Google Test defines a number
80// of functions for generating test parameters. They return what we call
81// (surprise!) parameter generators. Here is a summary of them, which
82// are all in the testing namespace:
83//
84//
85// Range(begin, end [, step]) - Yields values {begin, begin+step,
86// begin+step+step, ...}. The values do not
87// include end. step defaults to 1.
88// Values(v1, v2, ..., vN) - Yields values {v1, v2, ..., vN}.
89// ValuesIn(container) - Yields values from a C-style array, an STL
90// ValuesIn(begin,end) container, or an iterator range [begin, end).
91// Bool() - Yields sequence {false, true}.
92// Combine(g1, g2, ..., gN) - Yields all combinations (the Cartesian product
93// for the math savvy) of the values generated
94// by the N generators.
95//
96// For more details, see comments at the definitions of these functions below
97// in this file.
98//
99// The following statement will instantiate tests from the FooTest test case
100// each with parameter values "meeny", "miny", and "moe".
101
102INSTANTIATE_TEST_CASE_P(InstantiationName,
103 FooTest,
104 Values("meeny", "miny", "moe"));
105
106// To distinguish different instances of the pattern, (yes, you
107// can instantiate it more then once) the first argument to the
108// INSTANTIATE_TEST_CASE_P macro is a prefix that will be added to the
109// actual test case name. Remember to pick unique prefixes for different
110// instantiations. The tests from the instantiation above will have
111// these names:
112//
113// * InstantiationName/FooTest.DoesBlah/0 for "meeny"
114// * InstantiationName/FooTest.DoesBlah/1 for "miny"
115// * InstantiationName/FooTest.DoesBlah/2 for "moe"
116// * InstantiationName/FooTest.HasBlahBlah/0 for "meeny"
117// * InstantiationName/FooTest.HasBlahBlah/1 for "miny"
118// * InstantiationName/FooTest.HasBlahBlah/2 for "moe"
119//
120// You can use these names in --gtest_filter.
121//
122// This statement will instantiate all tests from FooTest again, each
123// with parameter values "cat" and "dog":
124
125const char* pets[] = {"cat", "dog"};
126INSTANTIATE_TEST_CASE_P(AnotherInstantiationName, FooTest, ValuesIn(pets));
127
128// The tests from the instantiation above will have these names:
129//
130// * AnotherInstantiationName/FooTest.DoesBlah/0 for "cat"
131// * AnotherInstantiationName/FooTest.DoesBlah/1 for "dog"
132// * AnotherInstantiationName/FooTest.HasBlahBlah/0 for "cat"
133// * AnotherInstantiationName/FooTest.HasBlahBlah/1 for "dog"
134//
135// Please note that INSTANTIATE_TEST_CASE_P will instantiate all tests
136// in the given test case, whether their definitions come before or
137// AFTER the INSTANTIATE_TEST_CASE_P statement.
138//
139// Please also note that generator expressions (including parameters to the
140// generators) are evaluated in InitGoogleTest(), after main() has started.
141// This allows the user on one hand, to adjust generator parameters in order
142// to dynamically determine a set of tests to run and on the other hand,
143// give the user a chance to inspect the generated tests with Google Test
144// reflection API before RUN_ALL_TESTS() is executed.
145//
146// You can see samples/sample7_unittest.cc and samples/sample8_unittest.cc
147// for more examples.
148//
149// In the future, we plan to publish the API for defining new parameter
150// generators. But for now this interface remains part of the internal
151// implementation and is subject to change.
152//
153//
154// A parameterized test fixture must be derived from testing::Test and from
155// testing::WithParamInterface<T>, where T is the type of the parameter
156// values. Inheriting from TestWithParam<T> satisfies that requirement because
157// TestWithParam<T> inherits from both Test and WithParamInterface. In more
158// complicated hierarchies, however, it is occasionally useful to inherit
159// separately from Test and WithParamInterface. For example:
160
161class BaseTest : public ::testing::Test {
162 // You can inherit all the usual members for a non-parameterized test
163 // fixture here.
164};
165
166class DerivedTest : public BaseTest, public ::testing::WithParamInterface<int> {
167 // The usual test fixture members go here too.
168};
169
170TEST_F(BaseTest, HasFoo) {
171 // This is an ordinary non-parameterized test.
172}
173
174TEST_P(DerivedTest, DoesBlah) {
175 // GetParam works just the same here as if you inherit from TestWithParam.
176 EXPECT_TRUE(foo.Blah(GetParam()));
177}
178
179#endif // 0
180
181#include "gtest/internal/gtest-port.h"
182
183#if !GTEST_OS_SYMBIAN
184# include <utility>
185#endif
186
187// scripts/fuse_gtest.py depends on gtest's own header being #included
188// *unconditionally*. Therefore these #includes cannot be moved
189// inside #if GTEST_HAS_PARAM_TEST.
190#include "gtest/internal/gtest-internal.h"
191#include "gtest/internal/gtest-param-util.h"
192#include "gtest/internal/gtest-param-util-generated.h"
193
194#if GTEST_HAS_PARAM_TEST
195
196namespace testing {
197
198// Functions producing parameter generators.
199//
200// Google Test uses these generators to produce parameters for value-
201// parameterized tests. When a parameterized test case is instantiated
202// with a particular generator, Google Test creates and runs tests
203// for each element in the sequence produced by the generator.
204//
205// In the following sample, tests from test case FooTest are instantiated
206// each three times with parameter values 3, 5, and 8:
207//
208// class FooTest : public TestWithParam<int> { ... };
209//
210// TEST_P(FooTest, TestThis) {
211// }
212// TEST_P(FooTest, TestThat) {
213// }
214// INSTANTIATE_TEST_CASE_P(TestSequence, FooTest, Values(3, 5, 8));
215//
216
217// Range() returns generators providing sequences of values in a range.
218//
219// Synopsis:
220// Range(start, end)
221// - returns a generator producing a sequence of values {start, start+1,
222// start+2, ..., }.
223// Range(start, end, step)
224// - returns a generator producing a sequence of values {start, start+step,
225// start+step+step, ..., }.
226// Notes:
227// * The generated sequences never include end. For example, Range(1, 5)
228// returns a generator producing a sequence {1, 2, 3, 4}. Range(1, 9, 2)
229// returns a generator producing {1, 3, 5, 7}.
230// * start and end must have the same type. That type may be any integral or
231// floating-point type or a user defined type satisfying these conditions:
232// * It must be assignable (have operator=() defined).
233// * It must have operator+() (operator+(int-compatible type) for
234// two-operand version).
235// * It must have operator<() defined.
236// Elements in the resulting sequences will also have that type.
237// * Condition start < end must be satisfied in order for resulting sequences
238// to contain any elements.
239//
240template <typename T, typename IncrementT>
241internal::ParamGenerator<T> Range(T start, T end, IncrementT step) {
242 return internal::ParamGenerator<T>(
243 new internal::RangeGenerator<T, IncrementT>(start, end, step));
244}
245
246template <typename T>
247internal::ParamGenerator<T> Range(T start, T end) {
248 return Range(start, end, 1);
249}
250
251// ValuesIn() function allows generation of tests with parameters coming from
252// a container.
253//
254// Synopsis:
255// ValuesIn(const T (&array)[N])
256// - returns a generator producing sequences with elements from
257// a C-style array.
258// ValuesIn(const Container& container)
259// - returns a generator producing sequences with elements from
260// an STL-style container.
261// ValuesIn(Iterator begin, Iterator end)
262// - returns a generator producing sequences with elements from
263// a range [begin, end) defined by a pair of STL-style iterators. These
264// iterators can also be plain C pointers.
265//
266// Please note that ValuesIn copies the values from the containers
267// passed in and keeps them to generate tests in RUN_ALL_TESTS().
268//
269// Examples:
270//
271// This instantiates tests from test case StringTest
272// each with C-string values of "foo", "bar", and "baz":
273//
274// const char* strings[] = {"foo", "bar", "baz"};
275// INSTANTIATE_TEST_CASE_P(StringSequence, SrtingTest, ValuesIn(strings));
276//
277// This instantiates tests from test case StlStringTest
278// each with STL strings with values "a" and "b":
279//
280// ::std::vector< ::std::string> GetParameterStrings() {
281// ::std::vector< ::std::string> v;
282// v.push_back("a");
283// v.push_back("b");
284// return v;
285// }
286//
287// INSTANTIATE_TEST_CASE_P(CharSequence,
288// StlStringTest,
289// ValuesIn(GetParameterStrings()));
290//
291//
292// This will also instantiate tests from CharTest
293// each with parameter values 'a' and 'b':
294//
295// ::std::list<char> GetParameterChars() {
296// ::std::list<char> list;
297// list.push_back('a');
298// list.push_back('b');
299// return list;
300// }
301// ::std::list<char> l = GetParameterChars();
302// INSTANTIATE_TEST_CASE_P(CharSequence2,
303// CharTest,
304// ValuesIn(l.begin(), l.end()));
305//
306template <typename ForwardIterator>
307internal::ParamGenerator<
308 typename ::testing::internal::IteratorTraits<ForwardIterator>::value_type>
309ValuesIn(ForwardIterator begin, ForwardIterator end) {
310 typedef typename ::testing::internal::IteratorTraits<ForwardIterator>
311 ::value_type ParamType;
312 return internal::ParamGenerator<ParamType>(
313 new internal::ValuesInIteratorRangeGenerator<ParamType>(begin, end));
314}
315
316template <typename T, size_t N>
317internal::ParamGenerator<T> ValuesIn(const T (&array)[N]) {
318 return ValuesIn(array, array + N);
319}
320
321template <class Container>
322internal::ParamGenerator<typename Container::value_type> ValuesIn(
323 const Container& container) {
324 return ValuesIn(container.begin(), container.end());
325}
326
327// Values() allows generating tests from explicitly specified list of
328// parameters.
329//
330// Synopsis:
331// Values(T v1, T v2, ..., T vN)
332// - returns a generator producing sequences with elements v1, v2, ..., vN.
333//
334// For example, this instantiates tests from test case BarTest each
335// with values "one", "two", and "three":
336//
337// INSTANTIATE_TEST_CASE_P(NumSequence, BarTest, Values("one", "two", "three"));
338//
339// This instantiates tests from test case BazTest each with values 1, 2, 3.5.
340// The exact type of values will depend on the type of parameter in BazTest.
341//
342// INSTANTIATE_TEST_CASE_P(FloatingNumbers, BazTest, Values(1, 2, 3.5));
343//
344// Currently, Values() supports from 1 to $n parameters.
345//
346$range i 1..n
347$for i [[
348$range j 1..i
349
350template <$for j, [[typename T$j]]>
351internal::ValueArray$i<$for j, [[T$j]]> Values($for j, [[T$j v$j]]) {
352 return internal::ValueArray$i<$for j, [[T$j]]>($for j, [[v$j]]);
353}
354
355]]
356
357// Bool() allows generating tests with parameters in a set of (false, true).
358//
359// Synopsis:
360// Bool()
361// - returns a generator producing sequences with elements {false, true}.
362//
363// It is useful when testing code that depends on Boolean flags. Combinations
364// of multiple flags can be tested when several Bool()'s are combined using
365// Combine() function.
366//
367// In the following example all tests in the test case FlagDependentTest
368// will be instantiated twice with parameters false and true.
369//
370// class FlagDependentTest : public testing::TestWithParam<bool> {
371// virtual void SetUp() {
372// external_flag = GetParam();
373// }
374// }
375// INSTANTIATE_TEST_CASE_P(BoolSequence, FlagDependentTest, Bool());
376//
377inline internal::ParamGenerator<bool> Bool() {
378 return Values(false, true);
379}
380
381# if GTEST_HAS_COMBINE
382// Combine() allows the user to combine two or more sequences to produce
383// values of a Cartesian product of those sequences' elements.
384//
385// Synopsis:
386// Combine(gen1, gen2, ..., genN)
387// - returns a generator producing sequences with elements coming from
388// the Cartesian product of elements from the sequences generated by
389// gen1, gen2, ..., genN. The sequence elements will have a type of
390// tuple<T1, T2, ..., TN> where T1, T2, ..., TN are the types
391// of elements from sequences produces by gen1, gen2, ..., genN.
392//
393// Combine can have up to $maxtuple arguments. This number is currently limited
394// by the maximum number of elements in the tuple implementation used by Google
395// Test.
396//
397// Example:
398//
399// This will instantiate tests in test case AnimalTest each one with
400// the parameter values tuple("cat", BLACK), tuple("cat", WHITE),
401// tuple("dog", BLACK), and tuple("dog", WHITE):
402//
403// enum Color { BLACK, GRAY, WHITE };
404// class AnimalTest
405// : public testing::TestWithParam<tuple<const char*, Color> > {...};
406//
407// TEST_P(AnimalTest, AnimalLooksNice) {...}
408//
409// INSTANTIATE_TEST_CASE_P(AnimalVariations, AnimalTest,
410// Combine(Values("cat", "dog"),
411// Values(BLACK, WHITE)));
412//
413// This will instantiate tests in FlagDependentTest with all variations of two
414// Boolean flags:
415//
416// class FlagDependentTest
417// : public testing::TestWithParam<tuple<bool, bool> > {
418// virtual void SetUp() {
419// // Assigns external_flag_1 and external_flag_2 values from the tuple.
420// tie(external_flag_1, external_flag_2) = GetParam();
421// }
422// };
423//
424// TEST_P(FlagDependentTest, TestFeature1) {
425// // Test your code using external_flag_1 and external_flag_2 here.
426// }
427// INSTANTIATE_TEST_CASE_P(TwoBoolSequence, FlagDependentTest,
428// Combine(Bool(), Bool()));
429//
430$range i 2..maxtuple
431$for i [[
432$range j 1..i
433
434template <$for j, [[typename Generator$j]]>
435internal::CartesianProductHolder$i<$for j, [[Generator$j]]> Combine(
436 $for j, [[const Generator$j& g$j]]) {
437 return internal::CartesianProductHolder$i<$for j, [[Generator$j]]>(
438 $for j, [[g$j]]);
439}
440
441]]
442# endif // GTEST_HAS_COMBINE
443
444
445
446# define TEST_P(test_case_name, test_name) \
447 class GTEST_TEST_CLASS_NAME_(test_case_name, test_name) \
448 : public test_case_name { \
449 public: \
450 GTEST_TEST_CLASS_NAME_(test_case_name, test_name)() {} \
451 virtual void TestBody(); \
452 private: \
453 static int AddToRegistry() { \
454 ::testing::UnitTest::GetInstance()->parameterized_test_registry(). \
455 GetTestCasePatternHolder<test_case_name>(\
456 #test_case_name, __FILE__, __LINE__)->AddTestPattern(\
457 #test_case_name, \
458 #test_name, \
459 new ::testing::internal::TestMetaFactory< \
460 GTEST_TEST_CLASS_NAME_(test_case_name, test_name)>()); \
461 return 0; \
462 } \
463 static int gtest_registering_dummy_; \
464 GTEST_DISALLOW_COPY_AND_ASSIGN_(\
465 GTEST_TEST_CLASS_NAME_(test_case_name, test_name)); \
466 }; \
467 int GTEST_TEST_CLASS_NAME_(test_case_name, \
468 test_name)::gtest_registering_dummy_ = \
469 GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::AddToRegistry(); \
470 void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::TestBody()
471
472# define INSTANTIATE_TEST_CASE_P(prefix, test_case_name, generator) \
473 ::testing::internal::ParamGenerator<test_case_name::ParamType> \
474 gtest_##prefix##test_case_name##_EvalGenerator_() { return generator; } \
475 int gtest_##prefix##test_case_name##_dummy_ = \
476 ::testing::UnitTest::GetInstance()->parameterized_test_registry(). \
477 GetTestCasePatternHolder<test_case_name>(\
478 #test_case_name, __FILE__, __LINE__)->AddTestCaseInstantiation(\
479 #prefix, \
480 &gtest_##prefix##test_case_name##_EvalGenerator_, \
481 __FILE__, __LINE__)
482
483} // namespace testing
484
485#endif // GTEST_HAS_PARAM_TEST
486
487#endif // GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_
4880
=== removed file '3rd_party/gmock/gtest/include/gtest/gtest-printers.h'
--- 3rd_party/gmock/gtest/include/gtest/gtest-printers.h 2014-04-07 19:53:07 +0000
+++ 3rd_party/gmock/gtest/include/gtest/gtest-printers.h 1970-01-01 00:00:00 +0000
@@ -1,855 +0,0 @@
1// Copyright 2007, Google Inc.
2// All rights reserved.
3//
4// Redistribution and use in source and binary forms, with or without
5// modification, are permitted provided that the following conditions are
6// met:
7//
8// * Redistributions of source code must retain the above copyright
9// notice, this list of conditions and the following disclaimer.
10// * Redistributions in binary form must reproduce the above
11// copyright notice, this list of conditions and the following disclaimer
12// in the documentation and/or other materials provided with the
13// distribution.
14// * Neither the name of Google Inc. nor the names of its
15// contributors may be used to endorse or promote products derived from
16// this software without specific prior written permission.
17//
18// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29//
30// Author: wan@google.com (Zhanyong Wan)
31
32// Google Test - The Google C++ Testing Framework
33//
34// This file implements a universal value printer that can print a
35// value of any type T:
36//
37// void ::testing::internal::UniversalPrinter<T>::Print(value, ostream_ptr);
38//
39// A user can teach this function how to print a class type T by
40// defining either operator<<() or PrintTo() in the namespace that
41// defines T. More specifically, the FIRST defined function in the
42// following list will be used (assuming T is defined in namespace
43// foo):
44//
45// 1. foo::PrintTo(const T&, ostream*)
46// 2. operator<<(ostream&, const T&) defined in either foo or the
47// global namespace.
48//
49// If none of the above is defined, it will print the debug string of
50// the value if it is a protocol buffer, or print the raw bytes in the
51// value otherwise.
52//
53// To aid debugging: when T is a reference type, the address of the
54// value is also printed; when T is a (const) char pointer, both the
55// pointer value and the NUL-terminated string it points to are
56// printed.
57//
58// We also provide some convenient wrappers:
59//
60// // Prints a value to a string. For a (const or not) char
61// // pointer, the NUL-terminated string (but not the pointer) is
62// // printed.
63// std::string ::testing::PrintToString(const T& value);
64//
65// // Prints a value tersely: for a reference type, the referenced
66// // value (but not the address) is printed; for a (const or not) char
67// // pointer, the NUL-terminated string (but not the pointer) is
68// // printed.
69// void ::testing::internal::UniversalTersePrint(const T& value, ostream*);
70//
71// // Prints value using the type inferred by the compiler. The difference
72// // from UniversalTersePrint() is that this function prints both the
73// // pointer and the NUL-terminated string for a (const or not) char pointer.
74// void ::testing::internal::UniversalPrint(const T& value, ostream*);
75//
76// // Prints the fields of a tuple tersely to a string vector, one
77// // element for each field. Tuple support must be enabled in
78// // gtest-port.h.
79// std::vector<string> UniversalTersePrintTupleFieldsToStrings(
80// const Tuple& value);
81//
82// Known limitation:
83//
84// The print primitives print the elements of an STL-style container
85// using the compiler-inferred type of *iter where iter is a
86// const_iterator of the container. When const_iterator is an input
87// iterator but not a forward iterator, this inferred type may not
88// match value_type, and the print output may be incorrect. In
89// practice, this is rarely a problem as for most containers
90// const_iterator is a forward iterator. We'll fix this if there's an
91// actual need for it. Note that this fix cannot rely on value_type
92// being defined as many user-defined container types don't have
93// value_type.
94
95#ifndef GTEST_INCLUDE_GTEST_GTEST_PRINTERS_H_
96#define GTEST_INCLUDE_GTEST_GTEST_PRINTERS_H_
97
98#include <ostream> // NOLINT
99#include <sstream>
100#include <string>
101#include <utility>
102#include <vector>
103#include "gtest/internal/gtest-port.h"
104#include "gtest/internal/gtest-internal.h"
105
106namespace testing {
107
108// Definitions in the 'internal' and 'internal2' name spaces are
109// subject to change without notice. DO NOT USE THEM IN USER CODE!
110namespace internal2 {
111
112// Prints the given number of bytes in the given object to the given
113// ostream.
114GTEST_API_ void PrintBytesInObjectTo(const unsigned char* obj_bytes,
115 size_t count,
116 ::std::ostream* os);
117
118// For selecting which printer to use when a given type has neither <<
119// nor PrintTo().
120enum TypeKind {
121 kProtobuf, // a protobuf type
122 kConvertibleToInteger, // a type implicitly convertible to BiggestInt
123 // (e.g. a named or unnamed enum type)
124 kOtherType // anything else
125};
126
127// TypeWithoutFormatter<T, kTypeKind>::PrintValue(value, os) is called
128// by the universal printer to print a value of type T when neither
129// operator<< nor PrintTo() is defined for T, where kTypeKind is the
130// "kind" of T as defined by enum TypeKind.
131template <typename T, TypeKind kTypeKind>
132class TypeWithoutFormatter {
133 public:
134 // This default version is called when kTypeKind is kOtherType.
135 static void PrintValue(const T& value, ::std::ostream* os) {
136 PrintBytesInObjectTo(reinterpret_cast<const unsigned char*>(&value),
137 sizeof(value), os);
138 }
139};
140
141// We print a protobuf using its ShortDebugString() when the string
142// doesn't exceed this many characters; otherwise we print it using
143// DebugString() for better readability.
144const size_t kProtobufOneLinerMaxLength = 50;
145
146template <typename T>
147class TypeWithoutFormatter<T, kProtobuf> {
148 public:
149 static void PrintValue(const T& value, ::std::ostream* os) {
150 const ::testing::internal::string short_str = value.ShortDebugString();
151 const ::testing::internal::string pretty_str =
152 short_str.length() <= kProtobufOneLinerMaxLength ?
153 short_str : ("\n" + value.DebugString());
154 *os << ("<" + pretty_str + ">");
155 }
156};
157
158template <typename T>
159class TypeWithoutFormatter<T, kConvertibleToInteger> {
160 public:
161 // Since T has no << operator or PrintTo() but can be implicitly
162 // converted to BiggestInt, we print it as a BiggestInt.
163 //
164 // Most likely T is an enum type (either named or unnamed), in which
165 // case printing it as an integer is the desired behavior. In case
166 // T is not an enum, printing it as an integer is the best we can do
167 // given that it has no user-defined printer.
168 static void PrintValue(const T& value, ::std::ostream* os) {
169 const internal::BiggestInt kBigInt = value;
170 *os << kBigInt;
171 }
172};
173
174// Prints the given value to the given ostream. If the value is a
175// protocol message, its debug string is printed; if it's an enum or
176// of a type implicitly convertible to BiggestInt, it's printed as an
177// integer; otherwise the bytes in the value are printed. This is
178// what UniversalPrinter<T>::Print() does when it knows nothing about
179// type T and T has neither << operator nor PrintTo().
180//
181// A user can override this behavior for a class type Foo by defining
182// a << operator in the namespace where Foo is defined.
183//
184// We put this operator in namespace 'internal2' instead of 'internal'
185// to simplify the implementation, as much code in 'internal' needs to
186// use << in STL, which would conflict with our own << were it defined
187// in 'internal'.
188//
189// Note that this operator<< takes a generic std::basic_ostream<Char,
190// CharTraits> type instead of the more restricted std::ostream. If
191// we define it to take an std::ostream instead, we'll get an
192// "ambiguous overloads" compiler error when trying to print a type
193// Foo that supports streaming to std::basic_ostream<Char,
194// CharTraits>, as the compiler cannot tell whether
195// operator<<(std::ostream&, const T&) or
196// operator<<(std::basic_stream<Char, CharTraits>, const Foo&) is more
197// specific.
198template <typename Char, typename CharTraits, typename T>
199::std::basic_ostream<Char, CharTraits>& operator<<(
200 ::std::basic_ostream<Char, CharTraits>& os, const T& x) {
201 TypeWithoutFormatter<T,
202 (internal::IsAProtocolMessage<T>::value ? kProtobuf :
203 internal::ImplicitlyConvertible<const T&, internal::BiggestInt>::value ?
204 kConvertibleToInteger : kOtherType)>::PrintValue(x, &os);
205 return os;
206}
207
208} // namespace internal2
209} // namespace testing
210
211// This namespace MUST NOT BE NESTED IN ::testing, or the name look-up
212// magic needed for implementing UniversalPrinter won't work.
213namespace testing_internal {
214
215// Used to print a value that is not an STL-style container when the
216// user doesn't define PrintTo() for it.
217template <typename T>
218void DefaultPrintNonContainerTo(const T& value, ::std::ostream* os) {
219 // With the following statement, during unqualified name lookup,
220 // testing::internal2::operator<< appears as if it was declared in
221 // the nearest enclosing namespace that contains both
222 // ::testing_internal and ::testing::internal2, i.e. the global
223 // namespace. For more details, refer to the C++ Standard section
224 // 7.3.4-1 [namespace.udir]. This allows us to fall back onto
225 // testing::internal2::operator<< in case T doesn't come with a <<
226 // operator.
227 //
228 // We cannot write 'using ::testing::internal2::operator<<;', which
229 // gcc 3.3 fails to compile due to a compiler bug.
230 using namespace ::testing::internal2; // NOLINT
231
232 // Assuming T is defined in namespace foo, in the next statement,
233 // the compiler will consider all of:
234 //
235 // 1. foo::operator<< (thanks to Koenig look-up),
236 // 2. ::operator<< (as the current namespace is enclosed in ::),
237 // 3. testing::internal2::operator<< (thanks to the using statement above).
238 //
239 // The operator<< whose type matches T best will be picked.
240 //
241 // We deliberately allow #2 to be a candidate, as sometimes it's
242 // impossible to define #1 (e.g. when foo is ::std, defining
243 // anything in it is undefined behavior unless you are a compiler
244 // vendor.).
245 *os << value;
246}
247
248} // namespace testing_internal
249
250namespace testing {
251namespace internal {
252
253// UniversalPrinter<T>::Print(value, ostream_ptr) prints the given
254// value to the given ostream. The caller must ensure that
255// 'ostream_ptr' is not NULL, or the behavior is undefined.
256//
257// We define UniversalPrinter as a class template (as opposed to a
258// function template), as we need to partially specialize it for
259// reference types, which cannot be done with function templates.
260template <typename T>
261class UniversalPrinter;
262
263template <typename T>
264void UniversalPrint(const T& value, ::std::ostream* os);
265
266// Used to print an STL-style container when the user doesn't define
267// a PrintTo() for it.
268template <typename C>
269void DefaultPrintTo(IsContainer /* dummy */,
270 false_type /* is not a pointer */,
271 const C& container, ::std::ostream* os) {
272 const size_t kMaxCount = 32; // The maximum number of elements to print.
273 *os << '{';
274 size_t count = 0;
275 for (typename C::const_iterator it = container.begin();
276 it != container.end(); ++it, ++count) {
277 if (count > 0) {
278 *os << ',';
279 if (count == kMaxCount) { // Enough has been printed.
280 *os << " ...";
281 break;
282 }
283 }
284 *os << ' ';
285 // We cannot call PrintTo(*it, os) here as PrintTo() doesn't
286 // handle *it being a native array.
287 internal::UniversalPrint(*it, os);
288 }
289
290 if (count > 0) {
291 *os << ' ';
292 }
293 *os << '}';
294}
295
296// Used to print a pointer that is neither a char pointer nor a member
297// pointer, when the user doesn't define PrintTo() for it. (A member
298// variable pointer or member function pointer doesn't really point to
299// a location in the address space. Their representation is
300// implementation-defined. Therefore they will be printed as raw
301// bytes.)
302template <typename T>
303void DefaultPrintTo(IsNotContainer /* dummy */,
304 true_type /* is a pointer */,
305 T* p, ::std::ostream* os) {
306 if (p == NULL) {
307 *os << "NULL";
308 } else {
309 // C++ doesn't allow casting from a function pointer to any object
310 // pointer.
311 //
312 // IsTrue() silences warnings: "Condition is always true",
313 // "unreachable code".
314 if (IsTrue(ImplicitlyConvertible<T*, const void*>::value)) {
315 // T is not a function type. We just call << to print p,
316 // relying on ADL to pick up user-defined << for their pointer
317 // types, if any.
318 *os << p;
319 } else {
320 // T is a function type, so '*os << p' doesn't do what we want
321 // (it just prints p as bool). We want to print p as a const
322 // void*. However, we cannot cast it to const void* directly,
323 // even using reinterpret_cast, as earlier versions of gcc
324 // (e.g. 3.4.5) cannot compile the cast when p is a function
325 // pointer. Casting to UInt64 first solves the problem.
326 *os << reinterpret_cast<const void*>(
327 reinterpret_cast<internal::UInt64>(p));
328 }
329 }
330}
331
332// Used to print a non-container, non-pointer value when the user
333// doesn't define PrintTo() for it.
334template <typename T>
335void DefaultPrintTo(IsNotContainer /* dummy */,
336 false_type /* is not a pointer */,
337 const T& value, ::std::ostream* os) {
338 ::testing_internal::DefaultPrintNonContainerTo(value, os);
339}
340
341// Prints the given value using the << operator if it has one;
342// otherwise prints the bytes in it. This is what
343// UniversalPrinter<T>::Print() does when PrintTo() is not specialized
344// or overloaded for type T.
345//
346// A user can override this behavior for a class type Foo by defining
347// an overload of PrintTo() in the namespace where Foo is defined. We
348// give the user this option as sometimes defining a << operator for
349// Foo is not desirable (e.g. the coding style may prevent doing it,
350// or there is already a << operator but it doesn't do what the user
351// wants).
352template <typename T>
353void PrintTo(const T& value, ::std::ostream* os) {
354 // DefaultPrintTo() is overloaded. The type of its first two
355 // arguments determine which version will be picked. If T is an
356 // STL-style container, the version for container will be called; if
357 // T is a pointer, the pointer version will be called; otherwise the
358 // generic version will be called.
359 //
360 // Note that we check for container types here, prior to we check
361 // for protocol message types in our operator<<. The rationale is:
362 //
363 // For protocol messages, we want to give people a chance to
364 // override Google Mock's format by defining a PrintTo() or
365 // operator<<. For STL containers, other formats can be
366 // incompatible with Google Mock's format for the container
367 // elements; therefore we check for container types here to ensure
368 // that our format is used.
369 //
370 // The second argument of DefaultPrintTo() is needed to bypass a bug
371 // in Symbian's C++ compiler that prevents it from picking the right
372 // overload between:
373 //
374 // PrintTo(const T& x, ...);
375 // PrintTo(T* x, ...);
376 DefaultPrintTo(IsContainerTest<T>(0), is_pointer<T>(), value, os);
377}
378
379// The following list of PrintTo() overloads tells
380// UniversalPrinter<T>::Print() how to print standard types (built-in
381// types, strings, plain arrays, and pointers).
382
383// Overloads for various char types.
384GTEST_API_ void PrintTo(unsigned char c, ::std::ostream* os);
385GTEST_API_ void PrintTo(signed char c, ::std::ostream* os);
386inline void PrintTo(char c, ::std::ostream* os) {
387 // When printing a plain char, we always treat it as unsigned. This
388 // way, the output won't be affected by whether the compiler thinks
389 // char is signed or not.
390 PrintTo(static_cast<unsigned char>(c), os);
391}
392
393// Overloads for other simple built-in types.
394inline void PrintTo(bool x, ::std::ostream* os) {
395 *os << (x ? "true" : "false");
396}
397
398// Overload for wchar_t type.
399// Prints a wchar_t as a symbol if it is printable or as its internal
400// code otherwise and also as its decimal code (except for L'\0').
401// The L'\0' char is printed as "L'\\0'". The decimal code is printed
402// as signed integer when wchar_t is implemented by the compiler
403// as a signed type and is printed as an unsigned integer when wchar_t
404// is implemented as an unsigned type.
405GTEST_API_ void PrintTo(wchar_t wc, ::std::ostream* os);
406
407// Overloads for C strings.
408GTEST_API_ void PrintTo(const char* s, ::std::ostream* os);
409inline void PrintTo(char* s, ::std::ostream* os) {
410 PrintTo(ImplicitCast_<const char*>(s), os);
411}
412
413// signed/unsigned char is often used for representing binary data, so
414// we print pointers to it as void* to be safe.
415inline void PrintTo(const signed char* s, ::std::ostream* os) {
416 PrintTo(ImplicitCast_<const void*>(s), os);
417}
418inline void PrintTo(signed char* s, ::std::ostream* os) {
419 PrintTo(ImplicitCast_<const void*>(s), os);
420}
421inline void PrintTo(const unsigned char* s, ::std::ostream* os) {
422 PrintTo(ImplicitCast_<const void*>(s), os);
423}
424inline void PrintTo(unsigned char* s, ::std::ostream* os) {
425 PrintTo(ImplicitCast_<const void*>(s), os);
426}
427
428// MSVC can be configured to define wchar_t as a typedef of unsigned
429// short. It defines _NATIVE_WCHAR_T_DEFINED when wchar_t is a native
430// type. When wchar_t is a typedef, defining an overload for const
431// wchar_t* would cause unsigned short* be printed as a wide string,
432// possibly causing invalid memory accesses.
433#if !defined(_MSC_VER) || defined(_NATIVE_WCHAR_T_DEFINED)
434// Overloads for wide C strings
435GTEST_API_ void PrintTo(const wchar_t* s, ::std::ostream* os);
436inline void PrintTo(wchar_t* s, ::std::ostream* os) {
437 PrintTo(ImplicitCast_<const wchar_t*>(s), os);
438}
439#endif
440
441// Overload for C arrays. Multi-dimensional arrays are printed
442// properly.
443
444// Prints the given number of elements in an array, without printing
445// the curly braces.
446template <typename T>
447void PrintRawArrayTo(const T a[], size_t count, ::std::ostream* os) {
448 UniversalPrint(a[0], os);
449 for (size_t i = 1; i != count; i++) {
450 *os << ", ";
451 UniversalPrint(a[i], os);
452 }
453}
454
455// Overloads for ::string and ::std::string.
456#if GTEST_HAS_GLOBAL_STRING
457GTEST_API_ void PrintStringTo(const ::string&s, ::std::ostream* os);
458inline void PrintTo(const ::string& s, ::std::ostream* os) {
459 PrintStringTo(s, os);
460}
461#endif // GTEST_HAS_GLOBAL_STRING
462
463GTEST_API_ void PrintStringTo(const ::std::string&s, ::std::ostream* os);
464inline void PrintTo(const ::std::string& s, ::std::ostream* os) {
465 PrintStringTo(s, os);
466}
467
468// Overloads for ::wstring and ::std::wstring.
469#if GTEST_HAS_GLOBAL_WSTRING
470GTEST_API_ void PrintWideStringTo(const ::wstring&s, ::std::ostream* os);
471inline void PrintTo(const ::wstring& s, ::std::ostream* os) {
472 PrintWideStringTo(s, os);
473}
474#endif // GTEST_HAS_GLOBAL_WSTRING
475
476#if GTEST_HAS_STD_WSTRING
477GTEST_API_ void PrintWideStringTo(const ::std::wstring&s, ::std::ostream* os);
478inline void PrintTo(const ::std::wstring& s, ::std::ostream* os) {
479 PrintWideStringTo(s, os);
480}
481#endif // GTEST_HAS_STD_WSTRING
482
483#if GTEST_HAS_TR1_TUPLE
484// Overload for ::std::tr1::tuple. Needed for printing function arguments,
485// which are packed as tuples.
486
487// Helper function for printing a tuple. T must be instantiated with
488// a tuple type.
489template <typename T>
490void PrintTupleTo(const T& t, ::std::ostream* os);
491
492// Overloaded PrintTo() for tuples of various arities. We support
493// tuples of up-to 10 fields. The following implementation works
494// regardless of whether tr1::tuple is implemented using the
495// non-standard variadic template feature or not.
496
497inline void PrintTo(const ::std::tr1::tuple<>& t, ::std::ostream* os) {
498 PrintTupleTo(t, os);
499}
500
501template <typename T1>
502void PrintTo(const ::std::tr1::tuple<T1>& t, ::std::ostream* os) {
503 PrintTupleTo(t, os);
504}
505
506template <typename T1, typename T2>
507void PrintTo(const ::std::tr1::tuple<T1, T2>& t, ::std::ostream* os) {
508 PrintTupleTo(t, os);
509}
510
511template <typename T1, typename T2, typename T3>
512void PrintTo(const ::std::tr1::tuple<T1, T2, T3>& t, ::std::ostream* os) {
513 PrintTupleTo(t, os);
514}
515
516template <typename T1, typename T2, typename T3, typename T4>
517void PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4>& t, ::std::ostream* os) {
518 PrintTupleTo(t, os);
519}
520
521template <typename T1, typename T2, typename T3, typename T4, typename T5>
522void PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4, T5>& t,
523 ::std::ostream* os) {
524 PrintTupleTo(t, os);
525}
526
527template <typename T1, typename T2, typename T3, typename T4, typename T5,
528 typename T6>
529void PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4, T5, T6>& t,
530 ::std::ostream* os) {
531 PrintTupleTo(t, os);
532}
533
534template <typename T1, typename T2, typename T3, typename T4, typename T5,
535 typename T6, typename T7>
536void PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7>& t,
537 ::std::ostream* os) {
538 PrintTupleTo(t, os);
539}
540
541template <typename T1, typename T2, typename T3, typename T4, typename T5,
542 typename T6, typename T7, typename T8>
543void PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8>& t,
544 ::std::ostream* os) {
545 PrintTupleTo(t, os);
546}
547
548template <typename T1, typename T2, typename T3, typename T4, typename T5,
549 typename T6, typename T7, typename T8, typename T9>
550void PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9>& t,
551 ::std::ostream* os) {
552 PrintTupleTo(t, os);
553}
554
555template <typename T1, typename T2, typename T3, typename T4, typename T5,
556 typename T6, typename T7, typename T8, typename T9, typename T10>
557void PrintTo(
558 const ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>& t,
559 ::std::ostream* os) {
560 PrintTupleTo(t, os);
561}
562#endif // GTEST_HAS_TR1_TUPLE
563
564// Overload for std::pair.
565template <typename T1, typename T2>
566void PrintTo(const ::std::pair<T1, T2>& value, ::std::ostream* os) {
567 *os << '(';
568 // We cannot use UniversalPrint(value.first, os) here, as T1 may be
569 // a reference type. The same for printing value.second.
570 UniversalPrinter<T1>::Print(value.first, os);
571 *os << ", ";
572 UniversalPrinter<T2>::Print(value.second, os);
573 *os << ')';
574}
575
576// Implements printing a non-reference type T by letting the compiler
577// pick the right overload of PrintTo() for T.
578template <typename T>
579class UniversalPrinter {
580 public:
581 // MSVC warns about adding const to a function type, so we want to
582 // disable the warning.
583#ifdef _MSC_VER
584# pragma warning(push) // Saves the current warning state.
585# pragma warning(disable:4180) // Temporarily disables warning 4180.
586#endif // _MSC_VER
587
588 // Note: we deliberately don't call this PrintTo(), as that name
589 // conflicts with ::testing::internal::PrintTo in the body of the
590 // function.
591 static void Print(const T& value, ::std::ostream* os) {
592 // By default, ::testing::internal::PrintTo() is used for printing
593 // the value.
594 //
595 // Thanks to Koenig look-up, if T is a class and has its own
596 // PrintTo() function defined in its namespace, that function will
597 // be visible here. Since it is more specific than the generic ones
598 // in ::testing::internal, it will be picked by the compiler in the
599 // following statement - exactly what we want.
600 PrintTo(value, os);
601 }
602
603#ifdef _MSC_VER
604# pragma warning(pop) // Restores the warning state.
605#endif // _MSC_VER
606};
607
608// UniversalPrintArray(begin, len, os) prints an array of 'len'
609// elements, starting at address 'begin'.
610template <typename T>
611void UniversalPrintArray(const T* begin, size_t len, ::std::ostream* os) {
612 if (len == 0) {
613 *os << "{}";
614 } else {
615 *os << "{ ";
616 const size_t kThreshold = 18;
617 const size_t kChunkSize = 8;
618 // If the array has more than kThreshold elements, we'll have to
619 // omit some details by printing only the first and the last
620 // kChunkSize elements.
621 // TODO(wan@google.com): let the user control the threshold using a flag.
622 if (len <= kThreshold) {
623 PrintRawArrayTo(begin, len, os);
624 } else {
625 PrintRawArrayTo(begin, kChunkSize, os);
626 *os << ", ..., ";
627 PrintRawArrayTo(begin + len - kChunkSize, kChunkSize, os);
628 }
629 *os << " }";
630 }
631}
632// This overload prints a (const) char array compactly.
633GTEST_API_ void UniversalPrintArray(
634 const char* begin, size_t len, ::std::ostream* os);
635
636// This overload prints a (const) wchar_t array compactly.
637GTEST_API_ void UniversalPrintArray(
638 const wchar_t* begin, size_t len, ::std::ostream* os);
639
640// Implements printing an array type T[N].
641template <typename T, size_t N>
642class UniversalPrinter<T[N]> {
643 public:
644 // Prints the given array, omitting some elements when there are too
645 // many.
646 static void Print(const T (&a)[N], ::std::ostream* os) {
647 UniversalPrintArray(a, N, os);
648 }
649};
650
651// Implements printing a reference type T&.
652template <typename T>
653class UniversalPrinter<T&> {
654 public:
655 // MSVC warns about adding const to a function type, so we want to
656 // disable the warning.
657#ifdef _MSC_VER
658# pragma warning(push) // Saves the current warning state.
659# pragma warning(disable:4180) // Temporarily disables warning 4180.
660#endif // _MSC_VER
661
662 static void Print(const T& value, ::std::ostream* os) {
663 // Prints the address of the value. We use reinterpret_cast here
664 // as static_cast doesn't compile when T is a function type.
665 *os << "@" << reinterpret_cast<const void*>(&value) << " ";
666
667 // Then prints the value itself.
668 UniversalPrint(value, os);
669 }
670
671#ifdef _MSC_VER
672# pragma warning(pop) // Restores the warning state.
673#endif // _MSC_VER
674};
675
676// Prints a value tersely: for a reference type, the referenced value
677// (but not the address) is printed; for a (const) char pointer, the
678// NUL-terminated string (but not the pointer) is printed.
679
680template <typename T>
681class UniversalTersePrinter {
682 public:
683 static void Print(const T& value, ::std::ostream* os) {
684 UniversalPrint(value, os);
685 }
686};
687template <typename T>
688class UniversalTersePrinter<T&> {
689 public:
690 static void Print(const T& value, ::std::ostream* os) {
691 UniversalPrint(value, os);
692 }
693};
694template <typename T, size_t N>
695class UniversalTersePrinter<T[N]> {
696 public:
697 static void Print(const T (&value)[N], ::std::ostream* os) {
698 UniversalPrinter<T[N]>::Print(value, os);
699 }
700};
701template <>
702class UniversalTersePrinter<const char*> {
703 public:
704 static void Print(const char* str, ::std::ostream* os) {
705 if (str == NULL) {
706 *os << "NULL";
707 } else {
708 UniversalPrint(string(str), os);
709 }
710 }
711};
712template <>
713class UniversalTersePrinter<char*> {
714 public:
715 static void Print(char* str, ::std::ostream* os) {
716 UniversalTersePrinter<const char*>::Print(str, os);
717 }
718};
719
720#if GTEST_HAS_STD_WSTRING
721template <>
722class UniversalTersePrinter<const wchar_t*> {
723 public:
724 static void Print(const wchar_t* str, ::std::ostream* os) {
725 if (str == NULL) {
726 *os << "NULL";
727 } else {
728 UniversalPrint(::std::wstring(str), os);
729 }
730 }
731};
732#endif
733
734template <>
735class UniversalTersePrinter<wchar_t*> {
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches