Mir

Merge lp:~didrocks/mir/use-system-googlemock into lp:~mir-team/mir/trunk

Proposed by Didier Roche on 2013-07-04
Status: Rejected
Rejected by: Didier Roche on 2013-07-12
Proposed branch: lp:~didrocks/mir/use-system-googlemock
Merge into: lp:~mir-team/mir/trunk
Diff against target: 50742 lines (+17/-50300)
76 files modified
3rd_party/gmock/CHANGES (+0/-116)
3rd_party/gmock/CMakeLists.txt (+0/-171)
3rd_party/gmock/CONTRIBUTORS (+0/-40)
3rd_party/gmock/COPYING (+0/-28)
3rd_party/gmock/README (+0/-369)
3rd_party/gmock/gtest/CHANGES (+0/-151)
3rd_party/gmock/gtest/CMakeLists.txt (+0/-250)
3rd_party/gmock/gtest/CONTRIBUTORS (+0/-37)
3rd_party/gmock/gtest/COPYING (+0/-28)
3rd_party/gmock/gtest/README (+0/-435)
3rd_party/gmock/gtest/cmake/internal_utils.cmake (+0/-227)
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/-2260)
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/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/-1212)
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/-4922)
3rd_party/gmock/gtest/src/gtest_main.cc (+0/-38)
3rd_party/gmock/include/gmock/gmock-actions.h (+0/-1078)
3rd_party/gmock/include/gmock/gmock-cardinalities.h (+0/-147)
3rd_party/gmock/include/gmock/gmock-generated-actions.h (+0/-2415)
3rd_party/gmock/include/gmock/gmock-generated-actions.h.pump (+0/-821)
3rd_party/gmock/include/gmock/gmock-generated-function-mockers.h (+0/-991)
3rd_party/gmock/include/gmock/gmock-generated-function-mockers.h.pump (+0/-265)
3rd_party/gmock/include/gmock/gmock-generated-matchers.h (+0/-2254)
3rd_party/gmock/include/gmock/gmock-generated-matchers.h.pump (+0/-741)
3rd_party/gmock/include/gmock/gmock-generated-nice-strict.h (+0/-397)
3rd_party/gmock/include/gmock/gmock-generated-nice-strict.h.pump (+0/-161)
3rd_party/gmock/include/gmock/gmock-matchers.h (+0/-3365)
3rd_party/gmock/include/gmock/gmock-more-actions.h (+0/-233)
3rd_party/gmock/include/gmock/gmock-more-matchers.h (+0/-58)
3rd_party/gmock/include/gmock/gmock-spec-builders.h (+0/-1791)
3rd_party/gmock/include/gmock/gmock.h (+0/-94)
3rd_party/gmock/include/gmock/internal/gmock-generated-internal-utils.h (+0/-279)
3rd_party/gmock/include/gmock/internal/gmock-generated-internal-utils.h.pump (+0/-136)
3rd_party/gmock/include/gmock/internal/gmock-internal-utils.h (+0/-498)
3rd_party/gmock/include/gmock/internal/gmock-port.h (+0/-78)
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 (+12/-26)
cross-compile-chroot.sh (+3/-0)
debian/control (+1/-0)
tests/unit-tests/graphics/test_graphics_platform.cpp (+0/-9)
tools/setup-partial-armhf-chroot.sh (+1/-0)
To merge this branch: bzr merge lp:~didrocks/mir/use-system-googlemock
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Needs Fixing on 2013-07-10
Mir development team 2013-07-04 Pending
Review via email: mp+173008@code.launchpad.net

Commit message

Remove local google-mock and use the latest available snapshot from the
system. Note that gmock and gtests path can be overridden

Description of the change

Remove local google-mock and use the latest available snapshot from the
system. Note that gmock and gtests path can be overridden.

/!\ Note that this can be merged once 1.6.0+svn437-0ubuntu1 is in the distro

To post a comment you must log in.
Kevin DuBois (kdub) wrote :

triggered a rebuild, looks like a jenkins failure.

Kevin DuBois (kdub) wrote :

there are some fixes we've put into google mock (https://groups.google.com/forum/?fromgroups#!topic/googlemock/ZO4Q1vR7XfM plus some unique_ptr fixes from alan) that I'm not sure are in upstream. If it works though i'd be ok with this, makes our project cleaner to have less depenedencies

Didier Roche (didrocks) wrote :

@Ken: the gmock version (1.6.0+svn437-0ubuntu1) available in ppa:didrocks/ppa is the latest snapshot of google-mock and Mir tests pass with those. I would prefer keeping that right now.

What remains to be patched is Unity and Nux that Thomas told me last week he was going to get at.

811. By Didier Roche on 2013-07-10

add google-mock to setup-partial-armhf-chroot.sh for script not taking into account package build-deps

812. By Didier Roche on 2013-07-10

remerge trunk

813. By Didier Roche on 2013-07-10

include the gmock path which is just extracted in a subdir while doing cross compilation

Robert Ancell (robert-ancell) wrote :

Clang is unhappy :(

Didier Roche (didrocks) wrote :

Yeah, I have no idea how to fix this. Kevin told me he would look at it.

Kevin DuBois (kdub) wrote :

I took a different approach in lp:~mir-team/mir/rm-internal-gmock which supports both cross compile and native compile. I used the ExternalProject_Add function in cmake to build the google mock sources from the distro package.

Didier Roche (didrocks) wrote :

ok, rejecting my branch then, reviewed yours and it works fine! :)

Unmerged revisions

813. By Didier Roche on 2013-07-10

include the gmock path which is just extracted in a subdir while doing cross compilation

812. By Didier Roche on 2013-07-10

remerge trunk

811. By Didier Roche on 2013-07-10

add google-mock to setup-partial-armhf-chroot.sh for script not taking into account package build-deps

810. By Didier Roche on 2013-07-04

remove internal gmock

809. By Didier Roche on 2013-07-04

depend on latest google mock

808. By Didier Roche on 2013-07-04

remove useless typedeff and no more need to hack around -Werror with latest google-mock

807. By Didier Roche on 2013-07-04

first pass at using the system googlemock

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== removed directory '3rd_party/gmock'
2=== removed file '3rd_party/gmock/CHANGES'
3--- 3rd_party/gmock/CHANGES 2013-06-18 14:04:37 +0000
4+++ 3rd_party/gmock/CHANGES 1970-01-01 00:00:00 +0000
5@@ -1,116 +0,0 @@
6-Changes for 1.7.0:
7-
8-* All new improvements in Google Test 1.7.0.
9-* New feature: matchers WhenSorted(), WhenSortedBy(), IsEmpty(), and
10- SizeIs().
11-* Improvement: Google Mock can now be built as a DLL.
12-* Improvement: when exceptions are enabled, a mock method with no
13- default action now throws instead crashing the test.
14-* Improvement: function return types used in MOCK_METHOD*() macros can
15- now contain unprotected commas.
16-* Improvement (potentially breaking): EXPECT_THAT() and ASSERT_THAT()
17- are now more strict in ensuring that the value type and the matcher
18- type are compatible, catching potential bugs in tests.
19-* Improvement: Pointee() now works on an optional<T>.
20-* Improvement: the ElementsAreArray() matcher can now take a vector or
21- iterator range as input, and makes a copy of its input elements
22- before the conversion to a Matcher.
23-* Bug fix: mock object destruction triggerred by another mock object's
24- destruction no longer hangs.
25-* Improvement: Google Mock Doctor works better with newer Clang and
26- GCC now.
27-* Compatibility fixes.
28-* Bug/warning fixes.
29-
30-Changes for 1.6.0:
31-
32-* Compilation is much faster and uses much less memory, especially
33- when the constructor and destructor of a mock class are moved out of
34- the class body.
35-* New matchers: Pointwise(), Each().
36-* New actions: ReturnPointee() and ReturnRefOfCopy().
37-* CMake support.
38-* Project files for Visual Studio 2010.
39-* AllOf() and AnyOf() can handle up-to 10 arguments now.
40-* Google Mock doctor understands Clang error messages now.
41-* SetArgPointee<> now accepts string literals.
42-* gmock_gen.py handles storage specifier macros and template return
43- types now.
44-* Compatibility fixes.
45-* Bug fixes and implementation clean-ups.
46-* Potentially incompatible changes: disables the harmful 'make install'
47- command in autotools.
48-
49-Potentially breaking changes:
50-
51-* The description string for MATCHER*() changes from Python-style
52- interpolation to an ordinary C++ string expression.
53-* SetArgumentPointee is deprecated in favor of SetArgPointee.
54-* Some non-essential project files for Visual Studio 2005 are removed.
55-
56-Changes for 1.5.0:
57-
58- * New feature: Google Mock can be safely used in multi-threaded tests
59- on platforms having pthreads.
60- * New feature: function for printing a value of arbitrary type.
61- * New feature: function ExplainMatchResult() for easy definition of
62- composite matchers.
63- * The new matcher API lets user-defined matchers generate custom
64- explanations more directly and efficiently.
65- * Better failure messages all around.
66- * NotNull() and IsNull() now work with smart pointers.
67- * Field() and Property() now work when the matcher argument is a pointer
68- passed by reference.
69- * Regular expression matchers on all platforms.
70- * Added GCC 4.0 support for Google Mock Doctor.
71- * Added gmock_all_test.cc for compiling most Google Mock tests
72- in a single file.
73- * Significantly cleaned up compiler warnings.
74- * Bug fixes, better test coverage, and implementation clean-ups.
75-
76- Potentially breaking changes:
77-
78- * Custom matchers defined using MatcherInterface or MakePolymorphicMatcher()
79- need to be updated after upgrading to Google Mock 1.5.0; matchers defined
80- using MATCHER or MATCHER_P* aren't affected.
81- * Dropped support for 'make install'.
82-
83-Changes for 1.4.0 (we skipped 1.2.* and 1.3.* to match the version of
84-Google Test):
85-
86- * Works in more environments: Symbian and minGW, Visual C++ 7.1.
87- * Lighter weight: comes with our own implementation of TR1 tuple (no
88- more dependency on Boost!).
89- * New feature: --gmock_catch_leaked_mocks for detecting leaked mocks.
90- * New feature: ACTION_TEMPLATE for defining templatized actions.
91- * New feature: the .After() clause for specifying expectation order.
92- * New feature: the .With() clause for for specifying inter-argument
93- constraints.
94- * New feature: actions ReturnArg<k>(), ReturnNew<T>(...), and
95- DeleteArg<k>().
96- * New feature: matchers Key(), Pair(), Args<...>(), AllArgs(), IsNull(),
97- and Contains().
98- * New feature: utility class MockFunction<F>, useful for checkpoints, etc.
99- * New feature: functions Value(x, m) and SafeMatcherCast<T>(m).
100- * New feature: copying a mock object is rejected at compile time.
101- * New feature: a script for fusing all Google Mock and Google Test
102- source files for easy deployment.
103- * Improved the Google Mock doctor to diagnose more diseases.
104- * Improved the Google Mock generator script.
105- * Compatibility fixes for Mac OS X and gcc.
106- * Bug fixes and implementation clean-ups.
107-
108-Changes for 1.1.0:
109-
110- * New feature: ability to use Google Mock with any testing framework.
111- * New feature: macros for easily defining new matchers
112- * New feature: macros for easily defining new actions.
113- * New feature: more container matchers.
114- * New feature: actions for accessing function arguments and throwing
115- exceptions.
116- * Improved the Google Mock doctor script for diagnosing compiler errors.
117- * Bug fixes and implementation clean-ups.
118-
119-Changes for 1.0.0:
120-
121- * Initial Open Source release of Google Mock
122
123=== removed file '3rd_party/gmock/CMakeLists.txt'
124--- 3rd_party/gmock/CMakeLists.txt 2013-06-18 14:04:37 +0000
125+++ 3rd_party/gmock/CMakeLists.txt 1970-01-01 00:00:00 +0000
126@@ -1,171 +0,0 @@
127-########################################################################
128-# CMake build script for Google Mock.
129-#
130-# To run the tests for Google Mock itself on Linux, use 'make test' or
131-# ctest. You can select which tests to run using 'ctest -R regex'.
132-# For more options, run 'ctest --help'.
133-
134-# BUILD_SHARED_LIBS is a standard CMake variable, but we declare it here to
135-# make it prominent in the GUI.
136-option(BUILD_SHARED_LIBS "Build shared libraries (DLLs)." OFF)
137-
138-option(gmock_build_tests "Build all of Google Mock's own tests." OFF)
139-
140-# A directory to find Google Test sources.
141-if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/gtest/CMakeLists.txt")
142- set(gtest_dir gtest)
143-else()
144- set(gtest_dir ../gtest)
145-endif()
146-
147-# Defines pre_project_set_up_hermetic_build() and set_up_hermetic_build().
148-include("${gtest_dir}/cmake/hermetic_build.cmake" OPTIONAL)
149-
150-if (COMMAND pre_project_set_up_hermetic_build)
151- # Google Test also calls hermetic setup functions from add_subdirectory,
152- # although its changes will not affect things at the current scope.
153- pre_project_set_up_hermetic_build()
154-endif()
155-
156-########################################################################
157-#
158-# Project-wide settings
159-
160-# Name of the project.
161-#
162-# CMake files in this project can refer to the root source directory
163-# as ${gmock_SOURCE_DIR} and to the root binary directory as
164-# ${gmock_BINARY_DIR}.
165-# Language "C" is required for find_package(Threads).
166-project(gmock CXX C)
167-cmake_minimum_required(VERSION 2.6.2)
168-
169-if (COMMAND set_up_hermetic_build)
170- set_up_hermetic_build()
171-endif()
172-
173-# Instructs CMake to process Google Test's CMakeLists.txt and add its
174-# targets to the current scope. We are placing Google Test's binary
175-# directory in a subdirectory of our own as VC compilation may break
176-# if they are the same (the default).
177-add_subdirectory("${gtest_dir}" "${gmock_BINARY_DIR}/gtest")
178-
179-# Although Google Test's CMakeLists.txt calls this function, the
180-# changes there don't affect the current scope. Therefore we have to
181-# call it again here.
182-config_compiler_and_linker() # from ${gtest_dir}/cmake/internal_utils.cmake
183-
184-# Adds Google Mock's and Google Test's header directories to the search path.
185-include_directories("${gmock_SOURCE_DIR}/include"
186- "${gmock_SOURCE_DIR}"
187- "${gtest_SOURCE_DIR}/include"
188- # This directory is needed to build directly from Google
189- # Test sources.
190- "${gtest_SOURCE_DIR}")
191-
192-########################################################################
193-#
194-# Defines the gmock & gmock_main libraries. User tests should link
195-# with one of them.
196-
197-# Google Mock libraries. We build them using more strict warnings than what
198-# are used for other targets, to ensure that Google Mock can be compiled by
199-# a user aggressive about warnings.
200-cxx_library(gmock
201- "${cxx_strict}"
202- "${gtest_dir}/src/gtest-all.cc"
203- src/gmock-all.cc)
204-
205-cxx_library(gmock_main
206- "${cxx_strict}"
207- "${gtest_dir}/src/gtest-all.cc"
208- src/gmock-all.cc
209- src/gmock_main.cc)
210-
211-########################################################################
212-#
213-# Google Mock's own tests.
214-#
215-# You can skip this section if you aren't interested in testing
216-# Google Mock itself.
217-#
218-# The tests are not built by default. To build them, set the
219-# gmock_build_tests option to ON. You can do it by running ccmake
220-# or specifying the -Dgmock_build_tests=ON flag when running cmake.
221-
222-if (gmock_build_tests)
223- # This must be set in the root directory for the tests to be run by
224- # 'make test' or ctest.
225- enable_testing()
226-
227- ############################################################
228- # C++ tests built with standard compiler flags.
229-
230- cxx_test(gmock-actions_test gmock_main)
231- cxx_test(gmock-cardinalities_test gmock_main)
232- cxx_test(gmock_ex_test gmock_main)
233- cxx_test(gmock-generated-actions_test gmock_main)
234- cxx_test(gmock-generated-function-mockers_test gmock_main)
235- cxx_test(gmock-generated-internal-utils_test gmock_main)
236- cxx_test(gmock-generated-matchers_test gmock_main)
237- cxx_test(gmock-internal-utils_test gmock_main)
238- cxx_test(gmock-matchers_test gmock_main)
239- cxx_test(gmock-more-actions_test gmock_main)
240- cxx_test(gmock-nice-strict_test gmock_main)
241- cxx_test(gmock-port_test gmock_main)
242- cxx_test(gmock-spec-builders_test gmock_main)
243- cxx_test(gmock_link_test gmock_main test/gmock_link2_test.cc)
244- cxx_test(gmock_test gmock_main)
245-
246- if (CMAKE_USE_PTHREADS_INIT)
247- cxx_test(gmock_stress_test gmock)
248- endif()
249-
250- # gmock_all_test is commented to save time building and running tests.
251- # Uncomment if necessary.
252- # cxx_test(gmock_all_test gmock_main)
253-
254- ############################################################
255- # C++ tests built with non-standard compiler flags.
256-
257- cxx_library(gmock_main_no_exception "${cxx_no_exception}"
258- "${gtest_dir}/src/gtest-all.cc" src/gmock-all.cc src/gmock_main.cc)
259-
260- cxx_library(gmock_main_no_rtti "${cxx_no_rtti}"
261- "${gtest_dir}/src/gtest-all.cc" src/gmock-all.cc src/gmock_main.cc)
262-
263- cxx_library(gmock_main_use_own_tuple "${cxx_use_own_tuple}"
264- "${gtest_dir}/src/gtest-all.cc" src/gmock-all.cc src/gmock_main.cc)
265-
266- cxx_test_with_flags(gmock-more-actions_no_exception_test "${cxx_no_exception}"
267- gmock_main_no_exception test/gmock-more-actions_test.cc)
268-
269- cxx_test_with_flags(gmock_no_rtti_test "${cxx_no_rtti}"
270- gmock_main_no_rtti test/gmock-spec-builders_test.cc)
271-
272- cxx_test_with_flags(gmock_use_own_tuple_test "${cxx_use_own_tuple}"
273- gmock_main_use_own_tuple test/gmock-spec-builders_test.cc)
274-
275- cxx_shared_library(shared_gmock_main "${cxx_default}"
276- "${gtest_dir}/src/gtest-all.cc" src/gmock-all.cc src/gmock_main.cc)
277-
278- # Tests that a binary can be built with Google Mock as a shared library. On
279- # some system configurations, it may not possible to run the binary without
280- # knowing more details about the system configurations. We do not try to run
281- # this binary. To get a more robust shared library coverage, configure with
282- # -DBUILD_SHARED_LIBS=ON.
283- cxx_executable_with_flags(shared_gmock_test_ "${cxx_default}"
284- shared_gmock_main test/gmock-spec-builders_test.cc)
285- set_target_properties(shared_gmock_test_
286- PROPERTIES
287- COMPILE_DEFINITIONS "GTEST_LINKED_AS_SHARED_LIBRARY=1")
288-
289- ############################################################
290- # Python tests.
291-
292- cxx_executable(gmock_leak_test_ test gmock_main)
293- py_test(gmock_leak_test)
294-
295- cxx_executable(gmock_output_test_ test gmock)
296- py_test(gmock_output_test)
297-endif()
298
299=== removed file '3rd_party/gmock/CONTRIBUTORS'
300--- 3rd_party/gmock/CONTRIBUTORS 2013-06-18 14:04:37 +0000
301+++ 3rd_party/gmock/CONTRIBUTORS 1970-01-01 00:00:00 +0000
302@@ -1,40 +0,0 @@
303-# This file contains a list of people who've made non-trivial
304-# contribution to the Google C++ Mocking Framework project. People
305-# who commit code to the project are encouraged to add their names
306-# here. Please keep the list sorted by first names.
307-
308-Benoit Sigoure <tsuna@google.com>
309-Bogdan Piloca <boo@google.com>
310-Chandler Carruth <chandlerc@google.com>
311-Dave MacLachlan <dmaclach@gmail.com>
312-David Anderson <danderson@google.com>
313-Dean Sturtevant
314-Gene Volovich <gv@cite.com>
315-Hal Burch <gmock@hburch.com>
316-Jeffrey Yasskin <jyasskin@google.com>
317-Jim Keller <jimkeller@google.com>
318-Joe Walnes <joe@truemesh.com>
319-Jon Wray <jwray@google.com>
320-Keir Mierle <mierle@gmail.com>
321-Keith Ray <keith.ray@gmail.com>
322-Kostya Serebryany <kcc@google.com>
323-Lev Makhlis
324-Manuel Klimek <klimek@google.com>
325-Mario Tanev <radix@google.com>
326-Mark Paskin
327-Markus Heule <markus.heule@gmail.com>
328-Matthew Simmons <simmonmt@acm.org>
329-Mike Bland <mbland@google.com>
330-Neal Norwitz <nnorwitz@gmail.com>
331-Nermin Ozkiranartli <nermin@google.com>
332-Owen Carlsen <ocarlsen@google.com>
333-Paneendra Ba <paneendra@google.com>
334-Paul Menage <menage@google.com>
335-Piotr Kaminski <piotrk@google.com>
336-Russ Rufer <russ@pentad.com>
337-Sverre Sundsdal <sundsdal@gmail.com>
338-Takeshi Yoshino <tyoshino@google.com>
339-Vadim Berman <vadimb@google.com>
340-Vlad Losev <vladl@google.com>
341-Wolfgang Klier <wklier@google.com>
342-Zhanyong Wan <wan@google.com>
343
344=== removed file '3rd_party/gmock/COPYING'
345--- 3rd_party/gmock/COPYING 2013-06-18 14:04:37 +0000
346+++ 3rd_party/gmock/COPYING 1970-01-01 00:00:00 +0000
347@@ -1,28 +0,0 @@
348-Copyright 2008, Google Inc.
349-All rights reserved.
350-
351-Redistribution and use in source and binary forms, with or without
352-modification, are permitted provided that the following conditions are
353-met:
354-
355- * Redistributions of source code must retain the above copyright
356-notice, this list of conditions and the following disclaimer.
357- * Redistributions in binary form must reproduce the above
358-copyright notice, this list of conditions and the following disclaimer
359-in the documentation and/or other materials provided with the
360-distribution.
361- * Neither the name of Google Inc. nor the names of its
362-contributors may be used to endorse or promote products derived from
363-this software without specific prior written permission.
364-
365-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
366-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
367-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
368-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
369-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
370-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
371-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
372-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
373-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
374-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
375-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
376
377=== removed file '3rd_party/gmock/README'
378--- 3rd_party/gmock/README 2013-06-18 14:04:37 +0000
379+++ 3rd_party/gmock/README 1970-01-01 00:00:00 +0000
380@@ -1,369 +0,0 @@
381-Google C++ Mocking Framework
382-============================
383-
384-http://code.google.com/p/googlemock/
385-
386-Overview
387---------
388-
389-Google's framework for writing and using C++ mock classes on a variety
390-of platforms (Linux, Mac OS X, Windows, Windows CE, Symbian, etc).
391-Inspired by jMock, EasyMock, and Hamcrest, and designed with C++'s
392-specifics in mind, it can help you derive better designs of your
393-system and write better tests.
394-
395-Google Mock:
396-
397-- provides a declarative syntax for defining mocks,
398-- can easily define partial (hybrid) mocks, which are a cross of real
399- and mock objects,
400-- handles functions of arbitrary types and overloaded functions,
401-- comes with a rich set of matchers for validating function arguments,
402-- uses an intuitive syntax for controlling the behavior of a mock,
403-- does automatic verification of expectations (no record-and-replay
404- needed),
405-- allows arbitrary (partial) ordering constraints on
406- function calls to be expressed,
407-- lets a user extend it by defining new matchers and actions.
408-- does not use exceptions, and
409-- is easy to learn and use.
410-
411-Please see the project page above for more information as well as the
412-mailing list for questions, discussions, and development. There is
413-also an IRC channel on OFTC (irc.oftc.net) #gtest available. Please
414-join us!
415-
416-Please note that code under scripts/generator/ is from the cppclean
417-project (http://code.google.com/p/cppclean/) and under the Apache
418-License, which is different from Google Mock's license.
419-
420-Requirements for End Users
421---------------------------
422-
423-Google Mock is implemented on top of the Google Test C++ testing
424-framework (http://code.google.com/p/googletest/), and includes the
425-latter as part of the SVN repositary and distribution package. You
426-must use the bundled version of Google Test when using Google Mock, or
427-you may get compiler/linker errors.
428-
429-You can also easily configure Google Mock to work with another testing
430-framework of your choice; although it will still need Google Test as
431-an internal dependency. Please read
432-http://code.google.com/p/googlemock/wiki/ForDummies#Using_Google_Mock_with_Any_Testing_Framework
433-for how to do it.
434-
435-Google Mock depends on advanced C++ features and thus requires a more
436-modern compiler. The following are needed to use Google Mock:
437-
438-### Linux Requirements ###
439-
440-These are the base requirements to build and use Google Mock from a source
441-package (as described below):
442-
443- * GNU-compatible Make or "gmake"
444- * POSIX-standard shell
445- * POSIX(-2) Regular Expressions (regex.h)
446- * C++98-standard-compliant compiler (e.g. GCC 3.4 or newer)
447-
448-### Windows Requirements ###
449-
450- * Microsoft Visual C++ 8.0 SP1 or newer
451-
452-### Mac OS X Requirements ###
453-
454- * Mac OS X 10.4 Tiger or newer
455- * Developer Tools Installed
456-
457-Requirements for Contributors
458------------------------------
459-
460-We welcome patches. If you plan to contribute a patch, you need to
461-build Google Mock and its own tests from an SVN checkout (described
462-below), which has further requirements:
463-
464- * Automake version 1.9 or newer
465- * Autoconf version 2.59 or newer
466- * Libtool / Libtoolize
467- * Python version 2.3 or newer (for running some of the tests and
468- re-generating certain source files from templates)
469-
470-Getting the Source
471-------------------
472-
473-There are two primary ways of getting Google Mock's source code: you
474-can download a stable source release in your preferred archive format,
475-or directly check out the source from our Subversion (SVN) repositary.
476-The SVN checkout requires a few extra steps and some extra software
477-packages on your system, but lets you track development and make
478-patches much more easily, so we highly encourage it.
479-
480-### Source Package ###
481-
482-Google Mock is released in versioned source packages which can be
483-downloaded from the download page [1]. Several different archive
484-formats are provided, but the only difference is the tools needed to
485-extract their contents, and the size of the resulting file. Download
486-whichever you are most comfortable with.
487-
488- [1] http://code.google.com/p/googlemock/downloads/list
489-
490-Once downloaded expand the archive using whichever tools you prefer
491-for that type. This will always result in a new directory with the
492-name "gmock-X.Y.Z" which contains all of the source code. Here are
493-some examples on Linux:
494-
495- tar -xvzf gmock-X.Y.Z.tar.gz
496- tar -xvjf gmock-X.Y.Z.tar.bz2
497- unzip gmock-X.Y.Z.zip
498-
499-### SVN Checkout ###
500-
501-To check out the main branch (also known as the "trunk") of Google
502-Mock, run the following Subversion command:
503-
504- svn checkout http://googlemock.googlecode.com/svn/trunk/ gmock-svn
505-
506-If you are using a *nix system and plan to use the GNU Autotools build
507-system to build Google Mock (described below), you'll need to
508-configure it now. Otherwise you are done with getting the source
509-files.
510-
511-To prepare the Autotools build system, enter the target directory of
512-the checkout command you used ('gmock-svn') and proceed with the
513-following command:
514-
515- autoreconf -fvi
516-
517-Once you have completed this step, you are ready to build the library.
518-Note that you should only need to complete this step once. The
519-subsequent 'make' invocations will automatically re-generate the bits
520-of the build system that need to be changed.
521-
522-If your system uses older versions of the autotools, the above command
523-will fail. You may need to explicitly specify a version to use. For
524-instance, if you have both GNU Automake 1.4 and 1.9 installed and
525-'automake' would invoke the 1.4, use instead:
526-
527- AUTOMAKE=automake-1.9 ACLOCAL=aclocal-1.9 autoreconf -fvi
528-
529-Make sure you're using the same version of automake and aclocal.
530-
531-Setting up the Build
532---------------------
533-
534-To build Google Mock and your tests that use it, you need to tell your
535-build system where to find its headers and source files. The exact
536-way to do it depends on which build system you use, and is usually
537-straightforward.
538-
539-### Generic Build Instructions ###
540-
541-This section shows how you can integrate Google Mock into your
542-existing build system.
543-
544-Suppose you put Google Mock in directory ${GMOCK_DIR} and Google Test
545-in ${GTEST_DIR} (the latter is ${GMOCK_DIR}/gtest by default). To
546-build Google Mock, create a library build target (or a project as
547-called by Visual Studio and Xcode) to compile
548-
549- ${GTEST_DIR}/src/gtest-all.cc and ${GMOCK_DIR}/src/gmock-all.cc
550-
551-with
552-
553- ${GTEST_DIR}/include and ${GMOCK_DIR}/include
554-
555-in the system header search path, and
556-
557- ${GTEST_DIR} and ${GMOCK_DIR}
558-
559-in the normal header search path. Assuming a Linux-like system and gcc,
560-something like the following will do:
561-
562- g++ -isystem ${GTEST_DIR}/include -I${GTEST_DIR} \
563- -isystem ${GMOCK_DIR}/include -I${GMOCK_DIR} \
564- -pthread -c ${GTEST_DIR}/src/gtest-all.cc
565- g++ -isystem ${GTEST_DIR}/include -I${GTEST_DIR} \
566- -isystem ${GMOCK_DIR}/include -I${GMOCK_DIR} \
567- -pthread -c ${GMOCK_DIR}/src/gmock-all.cc
568- ar -rv libgmock.a gtest-all.o gmock-all.o
569-
570-(We need -pthread as Google Test and Google Mock use threads.)
571-
572-Next, you should compile your test source file with
573-${GTEST_DIR}/include and ${GMOCK_DIR}/include in the header search
574-path, and link it with gmock and any other necessary libraries:
575-
576- g++ -isystem ${GTEST_DIR}/include -isystem ${GMOCK_DIR}/include \
577- -pthread path/to/your_test.cc libgmock.a -o your_test
578-
579-As an example, the make/ directory contains a Makefile that you can
580-use to build Google Mock on systems where GNU make is available
581-(e.g. Linux, Mac OS X, and Cygwin). It doesn't try to build Google
582-Mock's own tests. Instead, it just builds the Google Mock library and
583-a sample test. You can use it as a starting point for your own build
584-script.
585-
586-If the default settings are correct for your environment, the
587-following commands should succeed:
588-
589- cd ${GMOCK_DIR}/make
590- make
591- ./gmock_test
592-
593-If you see errors, try to tweak the contents of make/Makefile to make
594-them go away. There are instructions in make/Makefile on how to do
595-it.
596-
597-### Windows ###
598-
599-The msvc/2005 directory contains VC++ 2005 projects and the msvc/2010
600-directory contains VC++ 2010 projects for building Google Mock and
601-selected tests.
602-
603-Change to the appropriate directory and run "msbuild gmock.sln" to
604-build the library and tests (or open the gmock.sln in the MSVC IDE).
605-If you want to create your own project to use with Google Mock, you'll
606-have to configure it to use the gmock_config propety sheet. For that:
607-
608- * Open the Property Manager window (View | Other Windows | Property Manager)
609- * Right-click on your project and select "Add Existing Property Sheet..."
610- * Navigate to gmock_config.vsprops or gmock_config.props and select it.
611- * In Project Properties | Configuration Properties | General | Additional
612- Include Directories, type <path to Google Mock>/include.
613-
614-Tweaking Google Mock
615---------------------
616-
617-Google Mock can be used in diverse environments. The default
618-configuration may not work (or may not work well) out of the box in
619-some environments. However, you can easily tweak Google Mock by
620-defining control macros on the compiler command line. Generally,
621-these macros are named like GTEST_XYZ and you define them to either 1
622-or 0 to enable or disable a certain feature.
623-
624-We list the most frequently used macros below. For a complete list,
625-see file ${GTEST_DIR}/include/gtest/internal/gtest-port.h.
626-
627-### Choosing a TR1 Tuple Library ###
628-
629-Google Mock uses the C++ Technical Report 1 (TR1) tuple library
630-heavily. Unfortunately TR1 tuple is not yet widely available with all
631-compilers. The good news is that Google Test 1.4.0+ implements a
632-subset of TR1 tuple that's enough for Google Mock's need. Google Mock
633-will automatically use that implementation when the compiler doesn't
634-provide TR1 tuple.
635-
636-Usually you don't need to care about which tuple library Google Test
637-and Google Mock use. However, if your project already uses TR1 tuple,
638-you need to tell Google Test and Google Mock to use the same TR1 tuple
639-library the rest of your project uses, or the two tuple
640-implementations will clash. To do that, add
641-
642- -DGTEST_USE_OWN_TR1_TUPLE=0
643-
644-to the compiler flags while compiling Google Test, Google Mock, and
645-your tests. If you want to force Google Test and Google Mock to use
646-their own tuple library, just add
647-
648- -DGTEST_USE_OWN_TR1_TUPLE=1
649-
650-to the compiler flags instead.
651-
652-If you want to use Boost's TR1 tuple library with Google Mock, please
653-refer to the Boost website (http://www.boost.org/) for how to obtain
654-it and set it up.
655-
656-### As a Shared Library (DLL) ###
657-
658-Google Mock is compact, so most users can build and link it as a static
659-library for the simplicity. Google Mock can be used as a DLL, but the
660-same DLL must contain Google Test as well. See Google Test's README
661-file for instructions on how to set up necessary compiler settings.
662-
663-### Tweaking Google Mock ###
664-
665-Most of Google Test's control macros apply to Google Mock as well.
666-Please see file ${GTEST_DIR}/README for how to tweak them.
667-
668-Upgrading from an Earlier Version
669----------------------------------
670-
671-We strive to keep Google Mock releases backward compatible.
672-Sometimes, though, we have to make some breaking changes for the
673-users' long-term benefits. This section describes what you'll need to
674-do if you are upgrading from an earlier version of Google Mock.
675-
676-### Upgrading from 1.1.0 or Earlier ###
677-
678-You may need to explicitly enable or disable Google Test's own TR1
679-tuple library. See the instructions in section "Choosing a TR1 Tuple
680-Library".
681-
682-### Upgrading from 1.4.0 or Earlier ###
683-
684-On platforms where the pthread library is available, Google Test and
685-Google Mock use it in order to be thread-safe. For this to work, you
686-may need to tweak your compiler and/or linker flags. Please see the
687-"Multi-threaded Tests" section in file ${GTEST_DIR}/README for what
688-you may need to do.
689-
690-If you have custom matchers defined using MatcherInterface or
691-MakePolymorphicMatcher(), you'll need to update their definitions to
692-use the new matcher API [2]. Matchers defined using MATCHER() or
693-MATCHER_P*() aren't affected.
694-
695- [2] http://code.google.com/p/googlemock/wiki/CookBook#Writing_New_Monomorphic_Matchers,
696- http://code.google.com/p/googlemock/wiki/CookBook#Writing_New_Polymorphic_Matchers
697-
698-Developing Google Mock
699-----------------------
700-
701-This section discusses how to make your own changes to Google Mock.
702-
703-### Testing Google Mock Itself ###
704-
705-To make sure your changes work as intended and don't break existing
706-functionality, you'll want to compile and run Google Test's own tests.
707-For that you'll need Autotools. First, make sure you have followed
708-the instructions in section "SVN Checkout" to configure Google Mock.
709-Then, create a build output directory and enter it. Next,
710-
711- ${GMOCK_DIR}/configure # Standard GNU configure script, --help for more info
712-
713-Once you have successfully configured Google Mock, the build steps are
714-standard for GNU-style OSS packages.
715-
716- make # Standard makefile following GNU conventions
717- make check # Builds and runs all tests - all should pass.
718-
719-Note that when building your project against Google Mock, you are building
720-against Google Test as well. There is no need to configure Google Test
721-separately.
722-
723-### Regenerating Source Files ###
724-
725-Some of Google Mock's source files are generated from templates (not
726-in the C++ sense) using a script. A template file is named FOO.pump,
727-where FOO is the name of the file it will generate. For example, the
728-file include/gmock/gmock-generated-actions.h.pump is used to generate
729-gmock-generated-actions.h in the same directory.
730-
731-Normally you don't need to worry about regenerating the source files,
732-unless you need to modify them. In that case, you should modify the
733-corresponding .pump files instead and run the 'pump' script (for Pump
734-is Useful for Meta Programming) to regenerate them. You can find
735-pump.py in the ${GTEST_DIR}/scripts/ directory. Read the Pump manual
736-[3] for how to use it.
737-
738- [3] http://code.google.com/p/googletest/wiki/PumpManual.
739-
740-### Contributing a Patch ###
741-
742-We welcome patches. Please read the Google Mock developer's guide [4]
743-for how you can contribute. In particular, make sure you have signed
744-the Contributor License Agreement, or we won't be able to accept the
745-patch.
746-
747- [4] http://code.google.com/p/googlemock/wiki/DevGuide
748-
749-Happy testing!
750
751=== removed directory '3rd_party/gmock/gtest'
752=== removed file '3rd_party/gmock/gtest/CHANGES'
753--- 3rd_party/gmock/gtest/CHANGES 2013-06-18 14:04:37 +0000
754+++ 3rd_party/gmock/gtest/CHANGES 1970-01-01 00:00:00 +0000
755@@ -1,151 +0,0 @@
756-Changes for 1.7.0:
757-
758-* New feature: death tests are supported on OpenBSD and in iOS
759- simulator now.
760-* New feature: Test::RecordProperty() can now be used outside of the
761- lifespan of a test method, in which case it will be attributed to
762- the current test case or the test program in the XML report.
763-* New feature (potentially breaking): --gtest_list_tests now prints
764- the type parameters and value parameters for each test.
765-* Improvement: char pointers and char arrays are now escaped properly
766- in failure messages.
767-* Improvement: failure summary in XML reports now includes file and
768- line information.
769-* Improvement: the <testsuites> XML element now has a timestamp attribute.
770-* Fixed the bug where long --gtest_filter flag values are truncated in
771- death tests.
772-* Potentially breaking change: RUN_ALL_TESTS() is now implemented as a
773- function instead of a macro in order to work better with Clang.
774-* Compatibility fixes with C++ 11 and various platforms.
775-* Bug/warning fixes.
776-
777-Changes for 1.6.0:
778-
779-* New feature: ADD_FAILURE_AT() for reporting a test failure at the
780- given source location -- useful for writing testing utilities.
781-* New feature: the universal value printer is moved from Google Mock
782- to Google Test.
783-* New feature: type parameters and value parameters are reported in
784- the XML report now.
785-* A gtest_disable_pthreads CMake option.
786-* Colored output works in GNU Screen sessions now.
787-* Parameters of value-parameterized tests are now printed in the
788- textual output.
789-* Failures from ad hoc test assertions run before RUN_ALL_TESTS() are
790- now correctly reported.
791-* Arguments of ASSERT_XY and EXPECT_XY no longer need to support << to
792- ostream.
793-* More complete handling of exceptions.
794-* GTEST_ASSERT_XY can be used instead of ASSERT_XY in case the latter
795- name is already used by another library.
796-* --gtest_catch_exceptions is now true by default, allowing a test
797- program to continue after an exception is thrown.
798-* Value-parameterized test fixtures can now derive from Test and
799- WithParamInterface<T> separately, easing conversion of legacy tests.
800-* Death test messages are clearly marked to make them more
801- distinguishable from other messages.
802-* Compatibility fixes for Android, Google Native Client, MinGW, HP UX,
803- PowerPC, Lucid autotools, libCStd, Sun C++, Borland C++ Builder (Code Gear),
804- IBM XL C++ (Visual Age C++), and C++0x.
805-* Bug fixes and implementation clean-ups.
806-* Potentially incompatible changes: disables the harmful 'make install'
807- command in autotools.
808-
809-Changes for 1.5.0:
810-
811- * New feature: assertions can be safely called in multiple threads
812- where the pthreads library is available.
813- * New feature: predicates used inside EXPECT_TRUE() and friends
814- can now generate custom failure messages.
815- * New feature: Google Test can now be compiled as a DLL.
816- * New feature: fused source files are included.
817- * New feature: prints help when encountering unrecognized Google Test flags.
818- * Experimental feature: CMake build script (requires CMake 2.6.4+).
819- * Experimental feature: the Pump script for meta programming.
820- * double values streamed to an assertion are printed with enough precision
821- to differentiate any two different values.
822- * Google Test now works on Solaris and AIX.
823- * Build and test script improvements.
824- * Bug fixes and implementation clean-ups.
825-
826- Potentially breaking changes:
827-
828- * Stopped supporting VC++ 7.1 with exceptions disabled.
829- * Dropped support for 'make install'.
830-
831-Changes for 1.4.0:
832-
833- * New feature: the event listener API
834- * New feature: test shuffling
835- * New feature: the XML report format is closer to junitreport and can
836- be parsed by Hudson now.
837- * New feature: when a test runs under Visual Studio, its failures are
838- integrated in the IDE.
839- * New feature: /MD(d) versions of VC++ projects.
840- * New feature: elapsed time for the tests is printed by default.
841- * New feature: comes with a TR1 tuple implementation such that Boost
842- is no longer needed for Combine().
843- * New feature: EXPECT_DEATH_IF_SUPPORTED macro and friends.
844- * New feature: the Xcode project can now produce static gtest
845- libraries in addition to a framework.
846- * Compatibility fixes for Solaris, Cygwin, minGW, Windows Mobile,
847- Symbian, gcc, and C++Builder.
848- * Bug fixes and implementation clean-ups.
849-
850-Changes for 1.3.0:
851-
852- * New feature: death tests on Windows, Cygwin, and Mac.
853- * New feature: ability to use Google Test assertions in other testing
854- frameworks.
855- * New feature: ability to run disabled test via
856- --gtest_also_run_disabled_tests.
857- * New feature: the --help flag for printing the usage.
858- * New feature: access to Google Test flag values in user code.
859- * New feature: a script that packs Google Test into one .h and one
860- .cc file for easy deployment.
861- * New feature: support for distributing test functions to multiple
862- machines (requires support from the test runner).
863- * Bug fixes and implementation clean-ups.
864-
865-Changes for 1.2.1:
866-
867- * Compatibility fixes for Linux IA-64 and IBM z/OS.
868- * Added support for using Boost and other TR1 implementations.
869- * Changes to the build scripts to support upcoming release of Google C++
870- Mocking Framework.
871- * Added Makefile to the distribution package.
872- * Improved build instructions in README.
873-
874-Changes for 1.2.0:
875-
876- * New feature: value-parameterized tests.
877- * New feature: the ASSERT/EXPECT_(NON)FATAL_FAILURE(_ON_ALL_THREADS)
878- macros.
879- * Changed the XML report format to match JUnit/Ant's.
880- * Added tests to the Xcode project.
881- * Added scons/SConscript for building with SCons.
882- * Added src/gtest-all.cc for building Google Test from a single file.
883- * Fixed compatibility with Solaris and z/OS.
884- * Enabled running Python tests on systems with python 2.3 installed,
885- e.g. Mac OS X 10.4.
886- * Bug fixes.
887-
888-Changes for 1.1.0:
889-
890- * New feature: type-parameterized tests.
891- * New feature: exception assertions.
892- * New feature: printing elapsed time of tests.
893- * Improved the robustness of death tests.
894- * Added an Xcode project and samples.
895- * Adjusted the output format on Windows to be understandable by Visual Studio.
896- * Minor bug fixes.
897-
898-Changes for 1.0.1:
899-
900- * Added project files for Visual Studio 7.1.
901- * Fixed issues with compiling on Mac OS X.
902- * Fixed issues with compiling on Cygwin.
903-
904-Changes for 1.0.0:
905-
906- * Initial Open Source release of Google Test
907
908=== removed file '3rd_party/gmock/gtest/CMakeLists.txt'
909--- 3rd_party/gmock/gtest/CMakeLists.txt 2013-06-18 14:04:37 +0000
910+++ 3rd_party/gmock/gtest/CMakeLists.txt 1970-01-01 00:00:00 +0000
911@@ -1,250 +0,0 @@
912-########################################################################
913-# CMake build script for Google Test.
914-#
915-# To run the tests for Google Test itself on Linux, use 'make test' or
916-# ctest. You can select which tests to run using 'ctest -R regex'.
917-# For more options, run 'ctest --help'.
918-
919-# BUILD_SHARED_LIBS is a standard CMake variable, but we declare it here to
920-# make it prominent in the GUI.
921-option(BUILD_SHARED_LIBS "Build shared libraries (DLLs)." OFF)
922-
923-# When other libraries are using a shared version of runtime libraries,
924-# Google Test also has to use one.
925-option(
926- gtest_force_shared_crt
927- "Use shared (DLL) run-time lib even when Google Test is built as static lib."
928- OFF)
929-
930-option(gtest_build_tests "Build all of gtest's own tests." OFF)
931-
932-option(gtest_build_samples "Build gtest's sample programs." OFF)
933-
934-option(gtest_disable_pthreads "Disable uses of pthreads in gtest." OFF)
935-
936-# Defines pre_project_set_up_hermetic_build() and set_up_hermetic_build().
937-include(cmake/hermetic_build.cmake OPTIONAL)
938-
939-if (COMMAND pre_project_set_up_hermetic_build)
940- pre_project_set_up_hermetic_build()
941-endif()
942-
943-########################################################################
944-#
945-# Project-wide settings
946-
947-# Name of the project.
948-#
949-# CMake files in this project can refer to the root source directory
950-# as ${gtest_SOURCE_DIR} and to the root binary directory as
951-# ${gtest_BINARY_DIR}.
952-# Language "C" is required for find_package(Threads).
953-project(gtest CXX C)
954-cmake_minimum_required(VERSION 2.6.2)
955-
956-if (COMMAND set_up_hermetic_build)
957- set_up_hermetic_build()
958-endif()
959-
960-# Define helper functions and macros used by Google Test.
961-include(cmake/internal_utils.cmake)
962-
963-config_compiler_and_linker() # Defined in internal_utils.cmake.
964-
965-# Where Google Test's .h files can be found.
966-include_directories(
967- ${gtest_SOURCE_DIR}/include
968- ${gtest_SOURCE_DIR})
969-
970-# Where Google Test's libraries can be found.
971-link_directories(${gtest_BINARY_DIR}/src)
972-
973-########################################################################
974-#
975-# Defines the gtest & gtest_main libraries. User tests should link
976-# with one of them.
977-
978-# Google Test libraries. We build them using more strict warnings than what
979-# are used for other targets, to ensure that gtest can be compiled by a user
980-# aggressive about warnings.
981-cxx_library(gtest "${cxx_strict}" src/gtest-all.cc)
982-cxx_library(gtest_main "${cxx_strict}" src/gtest_main.cc)
983-target_link_libraries(gtest_main gtest)
984-
985-########################################################################
986-#
987-# Samples on how to link user tests with gtest or gtest_main.
988-#
989-# They are not built by default. To build them, set the
990-# gtest_build_samples option to ON. You can do it by running ccmake
991-# or specifying the -Dbuild_gtest_samples=ON flag when running cmake.
992-
993-if (gtest_build_samples)
994- cxx_executable(sample1_unittest samples gtest_main samples/sample1.cc)
995- cxx_executable(sample2_unittest samples gtest_main samples/sample2.cc)
996- cxx_executable(sample3_unittest samples gtest_main)
997- cxx_executable(sample4_unittest samples gtest_main samples/sample4.cc)
998- cxx_executable(sample5_unittest samples gtest_main samples/sample1.cc)
999- cxx_executable(sample6_unittest samples gtest_main)
1000- cxx_executable(sample7_unittest samples gtest_main)
1001- cxx_executable(sample8_unittest samples gtest_main)
1002- cxx_executable(sample9_unittest samples gtest)
1003- cxx_executable(sample10_unittest samples gtest)
1004-endif()
1005-
1006-########################################################################
1007-#
1008-# Google Test's own tests.
1009-#
1010-# You can skip this section if you aren't interested in testing
1011-# Google Test itself.
1012-#
1013-# The tests are not built by default. To build them, set the
1014-# gtest_build_tests option to ON. You can do it by running ccmake
1015-# or specifying the -Dgtest_build_tests=ON flag when running cmake.
1016-
1017-if (gtest_build_tests)
1018- # This must be set in the root directory for the tests to be run by
1019- # 'make test' or ctest.
1020- enable_testing()
1021-
1022- ############################################################
1023- # C++ tests built with standard compiler flags.
1024-
1025- cxx_test(gtest-death-test_test gtest_main)
1026- cxx_test(gtest_environment_test gtest)
1027- cxx_test(gtest-filepath_test gtest_main)
1028- cxx_test(gtest-linked_ptr_test gtest_main)
1029- cxx_test(gtest-listener_test gtest_main)
1030- cxx_test(gtest_main_unittest gtest_main)
1031- cxx_test(gtest-message_test gtest_main)
1032- cxx_test(gtest_no_test_unittest gtest)
1033- cxx_test(gtest-options_test gtest_main)
1034- cxx_test(gtest-param-test_test gtest
1035- test/gtest-param-test2_test.cc)
1036- cxx_test(gtest-port_test gtest_main)
1037- cxx_test(gtest_pred_impl_unittest gtest_main)
1038- cxx_test(gtest-printers_test gtest_main)
1039- cxx_test(gtest_prod_test gtest_main
1040- test/production.cc)
1041- cxx_test(gtest_repeat_test gtest)
1042- cxx_test(gtest_sole_header_test gtest_main)
1043- cxx_test(gtest_stress_test gtest)
1044- cxx_test(gtest-test-part_test gtest_main)
1045- cxx_test(gtest_throw_on_failure_ex_test gtest)
1046- cxx_test(gtest-typed-test_test gtest_main
1047- test/gtest-typed-test2_test.cc)
1048- cxx_test(gtest_unittest gtest_main)
1049- cxx_test(gtest-unittest-api_test gtest)
1050-
1051- ############################################################
1052- # C++ tests built with non-standard compiler flags.
1053-
1054- # MSVC 7.1 does not support STL with exceptions disabled.
1055- if (NOT MSVC OR MSVC_VERSION GREATER 1310)
1056- cxx_library(gtest_no_exception "${cxx_no_exception}"
1057- src/gtest-all.cc)
1058- cxx_library(gtest_main_no_exception "${cxx_no_exception}"
1059- src/gtest-all.cc src/gtest_main.cc)
1060- endif()
1061- cxx_library(gtest_main_no_rtti "${cxx_no_rtti}"
1062- src/gtest-all.cc src/gtest_main.cc)
1063-
1064- cxx_test_with_flags(gtest-death-test_ex_nocatch_test
1065- "${cxx_exception} -DGTEST_ENABLE_CATCH_EXCEPTIONS_=0"
1066- gtest test/gtest-death-test_ex_test.cc)
1067- cxx_test_with_flags(gtest-death-test_ex_catch_test
1068- "${cxx_exception} -DGTEST_ENABLE_CATCH_EXCEPTIONS_=1"
1069- gtest test/gtest-death-test_ex_test.cc)
1070-
1071- cxx_test_with_flags(gtest_no_rtti_unittest "${cxx_no_rtti}"
1072- gtest_main_no_rtti test/gtest_unittest.cc)
1073-
1074- cxx_shared_library(gtest_dll "${cxx_default}"
1075- src/gtest-all.cc src/gtest_main.cc)
1076-
1077- cxx_executable_with_flags(gtest_dll_test_ "${cxx_default}"
1078- gtest_dll test/gtest_all_test.cc)
1079- set_target_properties(gtest_dll_test_
1080- PROPERTIES
1081- COMPILE_DEFINITIONS "GTEST_LINKED_AS_SHARED_LIBRARY=1")
1082-
1083- if (NOT MSVC OR NOT MSVC_VERSION EQUAL 1600)
1084- # The C++ Standard specifies tuple_element<int, class>.
1085- # Yet MSVC 10's <utility> declares tuple_element<size_t, class>.
1086- # That declaration conflicts with our own standard-conforming
1087- # tuple implementation. Therefore using our own tuple with
1088- # MSVC 10 doesn't compile.
1089- cxx_library(gtest_main_use_own_tuple "${cxx_use_own_tuple}"
1090- src/gtest-all.cc src/gtest_main.cc)
1091-
1092- cxx_test_with_flags(gtest-tuple_test "${cxx_use_own_tuple}"
1093- gtest_main_use_own_tuple test/gtest-tuple_test.cc)
1094-
1095- cxx_test_with_flags(gtest_use_own_tuple_test "${cxx_use_own_tuple}"
1096- gtest_main_use_own_tuple
1097- test/gtest-param-test_test.cc test/gtest-param-test2_test.cc)
1098- endif()
1099-
1100- ############################################################
1101- # Python tests.
1102-
1103- cxx_executable(gtest_break_on_failure_unittest_ test gtest)
1104- py_test(gtest_break_on_failure_unittest)
1105-
1106- # MSVC 7.1 does not support STL with exceptions disabled.
1107- if (NOT MSVC OR MSVC_VERSION GREATER 1310)
1108- cxx_executable_with_flags(
1109- gtest_catch_exceptions_no_ex_test_
1110- "${cxx_no_exception}"
1111- gtest_main_no_exception
1112- test/gtest_catch_exceptions_test_.cc)
1113- endif()
1114-
1115- cxx_executable_with_flags(
1116- gtest_catch_exceptions_ex_test_
1117- "${cxx_exception}"
1118- gtest_main
1119- test/gtest_catch_exceptions_test_.cc)
1120- py_test(gtest_catch_exceptions_test)
1121-
1122- cxx_executable(gtest_color_test_ test gtest)
1123- py_test(gtest_color_test)
1124-
1125- cxx_executable(gtest_env_var_test_ test gtest)
1126- py_test(gtest_env_var_test)
1127-
1128- cxx_executable(gtest_filter_unittest_ test gtest)
1129- py_test(gtest_filter_unittest)
1130-
1131- cxx_executable(gtest_help_test_ test gtest_main)
1132- py_test(gtest_help_test)
1133-
1134- cxx_executable(gtest_list_tests_unittest_ test gtest)
1135- py_test(gtest_list_tests_unittest)
1136-
1137- cxx_executable(gtest_output_test_ test gtest)
1138- py_test(gtest_output_test)
1139-
1140- cxx_executable(gtest_shuffle_test_ test gtest)
1141- py_test(gtest_shuffle_test)
1142-
1143- # MSVC 7.1 does not support STL with exceptions disabled.
1144- if (NOT MSVC OR MSVC_VERSION GREATER 1310)
1145- cxx_executable(gtest_throw_on_failure_test_ test gtest_no_exception)
1146- set_target_properties(gtest_throw_on_failure_test_
1147- PROPERTIES
1148- COMPILE_FLAGS "${cxx_no_exception}")
1149- py_test(gtest_throw_on_failure_test)
1150- endif()
1151-
1152- cxx_executable(gtest_uninitialized_test_ test gtest)
1153- py_test(gtest_uninitialized_test)
1154-
1155- cxx_executable(gtest_xml_outfile1_test_ test gtest_main)
1156- cxx_executable(gtest_xml_outfile2_test_ test gtest_main)
1157- py_test(gtest_xml_outfiles_test)
1158-
1159- cxx_executable(gtest_xml_output_unittest_ test gtest)
1160- py_test(gtest_xml_output_unittest)
1161-endif()
1162
1163=== removed file '3rd_party/gmock/gtest/CONTRIBUTORS'
1164--- 3rd_party/gmock/gtest/CONTRIBUTORS 2013-06-18 14:04:37 +0000
1165+++ 3rd_party/gmock/gtest/CONTRIBUTORS 1970-01-01 00:00:00 +0000
1166@@ -1,37 +0,0 @@
1167-# This file contains a list of people who've made non-trivial
1168-# contribution to the Google C++ Testing Framework project. People
1169-# who commit code to the project are encouraged to add their names
1170-# here. Please keep the list sorted by first names.
1171-
1172-Ajay Joshi <jaj@google.com>
1173-Balázs Dán <balazs.dan@gmail.com>
1174-Bharat Mediratta <bharat@menalto.com>
1175-Chandler Carruth <chandlerc@google.com>
1176-Chris Prince <cprince@google.com>
1177-Chris Taylor <taylorc@google.com>
1178-Dan Egnor <egnor@google.com>
1179-Eric Roman <eroman@chromium.org>
1180-Hady Zalek <hady.zalek@gmail.com>
1181-Jeffrey Yasskin <jyasskin@google.com>
1182-Jói Sigurðsson <joi@google.com>
1183-Keir Mierle <mierle@gmail.com>
1184-Keith Ray <keith.ray@gmail.com>
1185-Kenton Varda <kenton@google.com>
1186-Manuel Klimek <klimek@google.com>
1187-Markus Heule <markus.heule@gmail.com>
1188-Mika Raento <mikie@iki.fi>
1189-Miklós Fazekas <mfazekas@szemafor.com>
1190-Pasi Valminen <pasi.valminen@gmail.com>
1191-Patrick Hanna <phanna@google.com>
1192-Patrick Riley <pfr@google.com>
1193-Peter Kaminski <piotrk@google.com>
1194-Preston Jackson <preston.a.jackson@gmail.com>
1195-Rainer Klaffenboeck <rainer.klaffenboeck@dynatrace.com>
1196-Russ Cox <rsc@google.com>
1197-Russ Rufer <russ@pentad.com>
1198-Sean Mcafee <eefacm@gmail.com>
1199-Sigurður Ásgeirsson <siggi@google.com>
1200-Tracy Bialik <tracy@pentad.com>
1201-Vadim Berman <vadimb@google.com>
1202-Vlad Losev <vladl@google.com>
1203-Zhanyong Wan <wan@google.com>
1204
1205=== removed file '3rd_party/gmock/gtest/COPYING'
1206--- 3rd_party/gmock/gtest/COPYING 2013-06-18 14:04:37 +0000
1207+++ 3rd_party/gmock/gtest/COPYING 1970-01-01 00:00:00 +0000
1208@@ -1,28 +0,0 @@
1209-Copyright 2008, Google Inc.
1210-All rights reserved.
1211-
1212-Redistribution and use in source and binary forms, with or without
1213-modification, are permitted provided that the following conditions are
1214-met:
1215-
1216- * Redistributions of source code must retain the above copyright
1217-notice, this list of conditions and the following disclaimer.
1218- * Redistributions in binary form must reproduce the above
1219-copyright notice, this list of conditions and the following disclaimer
1220-in the documentation and/or other materials provided with the
1221-distribution.
1222- * Neither the name of Google Inc. nor the names of its
1223-contributors may be used to endorse or promote products derived from
1224-this software without specific prior written permission.
1225-
1226-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1227-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1228-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
1229-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
1230-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
1231-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
1232-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
1233-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
1234-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1235-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1236-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1237
1238=== removed file '3rd_party/gmock/gtest/README'
1239--- 3rd_party/gmock/gtest/README 2013-06-18 14:04:37 +0000
1240+++ 3rd_party/gmock/gtest/README 1970-01-01 00:00:00 +0000
1241@@ -1,435 +0,0 @@
1242-Google C++ Testing Framework
1243-============================
1244-
1245-http://code.google.com/p/googletest/
1246-
1247-Overview
1248---------
1249-
1250-Google's framework for writing C++ tests on a variety of platforms
1251-(Linux, Mac OS X, Windows, Windows CE, Symbian, etc). Based on the
1252-xUnit architecture. Supports automatic test discovery, a rich set of
1253-assertions, user-defined assertions, death tests, fatal and non-fatal
1254-failures, various options for running the tests, and XML test report
1255-generation.
1256-
1257-Please see the project page above for more information as well as the
1258-mailing list for questions, discussions, and development. There is
1259-also an IRC channel on OFTC (irc.oftc.net) #gtest available. Please
1260-join us!
1261-
1262-Requirements for End Users
1263---------------------------
1264-
1265-Google Test is designed to have fairly minimal requirements to build
1266-and use with your projects, but there are some. Currently, we support
1267-Linux, Windows, Mac OS X, and Cygwin. We will also make our best
1268-effort to support other platforms (e.g. Solaris, AIX, and z/OS).
1269-However, since core members of the Google Test project have no access
1270-to these platforms, Google Test may have outstanding issues there. If
1271-you notice any problems on your platform, please notify
1272-googletestframework@googlegroups.com. Patches for fixing them are
1273-even more welcome!
1274-
1275-### Linux Requirements ###
1276-
1277-These are the base requirements to build and use Google Test from a source
1278-package (as described below):
1279- * GNU-compatible Make or gmake
1280- * POSIX-standard shell
1281- * POSIX(-2) Regular Expressions (regex.h)
1282- * A C++98-standard-compliant compiler
1283-
1284-### Windows Requirements ###
1285-
1286- * Microsoft Visual C++ 7.1 or newer
1287-
1288-### Cygwin Requirements ###
1289-
1290- * Cygwin 1.5.25-14 or newer
1291-
1292-### Mac OS X Requirements ###
1293-
1294- * Mac OS X 10.4 Tiger or newer
1295- * Developer Tools Installed
1296-
1297-Also, you'll need CMake 2.6.4 or higher if you want to build the
1298-samples using the provided CMake script, regardless of the platform.
1299-
1300-Requirements for Contributors
1301------------------------------
1302-
1303-We welcome patches. If you plan to contribute a patch, you need to
1304-build Google Test and its own tests from an SVN checkout (described
1305-below), which has further requirements:
1306-
1307- * Python version 2.3 or newer (for running some of the tests and
1308- re-generating certain source files from templates)
1309- * CMake 2.6.4 or newer
1310-
1311-Getting the Source
1312-------------------
1313-
1314-There are two primary ways of getting Google Test's source code: you
1315-can download a stable source release in your preferred archive format,
1316-or directly check out the source from our Subversion (SVN) repositary.
1317-The SVN checkout requires a few extra steps and some extra software
1318-packages on your system, but lets you track the latest development and
1319-make patches much more easily, so we highly encourage it.
1320-
1321-### Source Package ###
1322-
1323-Google Test is released in versioned source packages which can be
1324-downloaded from the download page [1]. Several different archive
1325-formats are provided, but the only difference is the tools used to
1326-manipulate them, and the size of the resulting file. Download
1327-whichever you are most comfortable with.
1328-
1329- [1] http://code.google.com/p/googletest/downloads/list
1330-
1331-Once the package is downloaded, expand it using whichever tools you
1332-prefer for that type. This will result in a new directory with the
1333-name "gtest-X.Y.Z" which contains all of the source code. Here are
1334-some examples on Linux:
1335-
1336- tar -xvzf gtest-X.Y.Z.tar.gz
1337- tar -xvjf gtest-X.Y.Z.tar.bz2
1338- unzip gtest-X.Y.Z.zip
1339-
1340-### SVN Checkout ###
1341-
1342-To check out the main branch (also known as the "trunk") of Google
1343-Test, run the following Subversion command:
1344-
1345- svn checkout http://googletest.googlecode.com/svn/trunk/ gtest-svn
1346-
1347-Setting up the Build
1348---------------------
1349-
1350-To build Google Test and your tests that use it, you need to tell your
1351-build system where to find its headers and source files. The exact
1352-way to do it depends on which build system you use, and is usually
1353-straightforward.
1354-
1355-### Generic Build Instructions ###
1356-
1357-Suppose you put Google Test in directory ${GTEST_DIR}. To build it,
1358-create a library build target (or a project as called by Visual Studio
1359-and Xcode) to compile
1360-
1361- ${GTEST_DIR}/src/gtest-all.cc
1362-
1363-with ${GTEST_DIR}/include in the system header search path and ${GTEST_DIR}
1364-in the normal header search path. Assuming a Linux-like system and gcc,
1365-something like the following will do:
1366-
1367- g++ -isystem ${GTEST_DIR}/include -I${GTEST_DIR} \
1368- -pthread -c ${GTEST_DIR}/src/gtest-all.cc
1369- ar -rv libgtest.a gtest-all.o
1370-
1371-(We need -pthread as Google Test uses threads.)
1372-
1373-Next, you should compile your test source file with
1374-${GTEST_DIR}/include in the system header search path, and link it
1375-with gtest and any other necessary libraries:
1376-
1377- g++ -isystem ${GTEST_DIR}/include -pthread path/to/your_test.cc libgtest.a \
1378- -o your_test
1379-
1380-As an example, the make/ directory contains a Makefile that you can
1381-use to build Google Test on systems where GNU make is available
1382-(e.g. Linux, Mac OS X, and Cygwin). It doesn't try to build Google
1383-Test's own tests. Instead, it just builds the Google Test library and
1384-a sample test. You can use it as a starting point for your own build
1385-script.
1386-
1387-If the default settings are correct for your environment, the
1388-following commands should succeed:
1389-
1390- cd ${GTEST_DIR}/make
1391- make
1392- ./sample1_unittest
1393-
1394-If you see errors, try to tweak the contents of make/Makefile to make
1395-them go away. There are instructions in make/Makefile on how to do
1396-it.
1397-
1398-### Using CMake ###
1399-
1400-Google Test comes with a CMake build script (CMakeLists.txt) that can
1401-be used on a wide range of platforms ("C" stands for cross-platofrm.).
1402-If you don't have CMake installed already, you can download it for
1403-free from http://www.cmake.org/.
1404-
1405-CMake works by generating native makefiles or build projects that can
1406-be used in the compiler environment of your choice. The typical
1407-workflow starts with:
1408-
1409- mkdir mybuild # Create a directory to hold the build output.
1410- cd mybuild
1411- cmake ${GTEST_DIR} # Generate native build scripts.
1412-
1413-If you want to build Google Test's samples, you should replace the
1414-last command with
1415-
1416- cmake -Dgtest_build_samples=ON ${GTEST_DIR}
1417-
1418-If you are on a *nix system, you should now see a Makefile in the
1419-current directory. Just type 'make' to build gtest.
1420-
1421-If you use Windows and have Vistual Studio installed, a gtest.sln file
1422-and several .vcproj files will be created. You can then build them
1423-using Visual Studio.
1424-
1425-On Mac OS X with Xcode installed, a .xcodeproj file will be generated.
1426-
1427-### Legacy Build Scripts ###
1428-
1429-Before settling on CMake, we have been providing hand-maintained build
1430-projects/scripts for Visual Studio, Xcode, and Autotools. While we
1431-continue to provide them for convenience, they are not actively
1432-maintained any more. We highly recommend that you follow the
1433-instructions in the previous two sections to integrate Google Test
1434-with your existing build system.
1435-
1436-If you still need to use the legacy build scripts, here's how:
1437-
1438-The msvc\ folder contains two solutions with Visual C++ projects.
1439-Open the gtest.sln or gtest-md.sln file using Visual Studio, and you
1440-are ready to build Google Test the same way you build any Visual
1441-Studio project. Files that have names ending with -md use DLL
1442-versions of Microsoft runtime libraries (the /MD or the /MDd compiler
1443-option). Files without that suffix use static versions of the runtime
1444-libraries (the /MT or the /MTd option). Please note that one must use
1445-the same option to compile both gtest and the test code. If you use
1446-Visual Studio 2005 or above, we recommend the -md version as /MD is
1447-the default for new projects in these versions of Visual Studio.
1448-
1449-On Mac OS X, open the gtest.xcodeproj in the xcode/ folder using
1450-Xcode. Build the "gtest" target. The universal binary framework will
1451-end up in your selected build directory (selected in the Xcode
1452-"Preferences..." -> "Building" pane and defaults to xcode/build).
1453-Alternatively, at the command line, enter:
1454-
1455- xcodebuild
1456-
1457-This will build the "Release" configuration of gtest.framework in your
1458-default build location. See the "xcodebuild" man page for more
1459-information about building different configurations and building in
1460-different locations.
1461-
1462-If you wish to use the Google Test Xcode project with Xcode 4.x and
1463-above, you need to either:
1464- * update the SDK configuration options in xcode/Config/General.xconfig.
1465- Comment options SDKROOT, MACOS_DEPLOYMENT_TARGET, and GCC_VERSION. If
1466- you choose this route you lose the ability to target earlier versions
1467- of MacOS X.
1468- * Install an SDK for an earlier version. This doesn't appear to be
1469- supported by Apple, but has been reported to work
1470- (http://stackoverflow.com/questions/5378518).
1471-
1472-Tweaking Google Test
1473---------------------
1474-
1475-Google Test can be used in diverse environments. The default
1476-configuration may not work (or may not work well) out of the box in
1477-some environments. However, you can easily tweak Google Test by
1478-defining control macros on the compiler command line. Generally,
1479-these macros are named like GTEST_XYZ and you define them to either 1
1480-or 0 to enable or disable a certain feature.
1481-
1482-We list the most frequently used macros below. For a complete list,
1483-see file include/gtest/internal/gtest-port.h.
1484-
1485-### Choosing a TR1 Tuple Library ###
1486-
1487-Some Google Test features require the C++ Technical Report 1 (TR1)
1488-tuple library, which is not yet available with all compilers. The
1489-good news is that Google Test implements a subset of TR1 tuple that's
1490-enough for its own need, and will automatically use this when the
1491-compiler doesn't provide TR1 tuple.
1492-
1493-Usually you don't need to care about which tuple library Google Test
1494-uses. However, if your project already uses TR1 tuple, you need to
1495-tell Google Test to use the same TR1 tuple library the rest of your
1496-project uses, or the two tuple implementations will clash. To do
1497-that, add
1498-
1499- -DGTEST_USE_OWN_TR1_TUPLE=0
1500-
1501-to the compiler flags while compiling Google Test and your tests. If
1502-you want to force Google Test to use its own tuple library, just add
1503-
1504- -DGTEST_USE_OWN_TR1_TUPLE=1
1505-
1506-to the compiler flags instead.
1507-
1508-If you don't want Google Test to use tuple at all, add
1509-
1510- -DGTEST_HAS_TR1_TUPLE=0
1511-
1512-and all features using tuple will be disabled.
1513-
1514-### Multi-threaded Tests ###
1515-
1516-Google Test is thread-safe where the pthread library is available.
1517-After #include "gtest/gtest.h", you can check the GTEST_IS_THREADSAFE
1518-macro to see whether this is the case (yes if the macro is #defined to
1519-1, no if it's undefined.).
1520-
1521-If Google Test doesn't correctly detect whether pthread is available
1522-in your environment, you can force it with
1523-
1524- -DGTEST_HAS_PTHREAD=1
1525-
1526-or
1527-
1528- -DGTEST_HAS_PTHREAD=0
1529-
1530-When Google Test uses pthread, you may need to add flags to your
1531-compiler and/or linker to select the pthread library, or you'll get
1532-link errors. If you use the CMake script or the deprecated Autotools
1533-script, this is taken care of for you. If you use your own build
1534-script, you'll need to read your compiler and linker's manual to
1535-figure out what flags to add.
1536-
1537-### As a Shared Library (DLL) ###
1538-
1539-Google Test is compact, so most users can build and link it as a
1540-static library for the simplicity. You can choose to use Google Test
1541-as a shared library (known as a DLL on Windows) if you prefer.
1542-
1543-To compile *gtest* as a shared library, add
1544-
1545- -DGTEST_CREATE_SHARED_LIBRARY=1
1546-
1547-to the compiler flags. You'll also need to tell the linker to produce
1548-a shared library instead - consult your linker's manual for how to do
1549-it.
1550-
1551-To compile your *tests* that use the gtest shared library, add
1552-
1553- -DGTEST_LINKED_AS_SHARED_LIBRARY=1
1554-
1555-to the compiler flags.
1556-
1557-Note: while the above steps aren't technically necessary today when
1558-using some compilers (e.g. GCC), they may become necessary in the
1559-future, if we decide to improve the speed of loading the library (see
1560-http://gcc.gnu.org/wiki/Visibility for details). Therefore you are
1561-recommended to always add the above flags when using Google Test as a
1562-shared library. Otherwise a future release of Google Test may break
1563-your build script.
1564-
1565-### Avoiding Macro Name Clashes ###
1566-
1567-In C++, macros don't obey namespaces. Therefore two libraries that
1568-both define a macro of the same name will clash if you #include both
1569-definitions. In case a Google Test macro clashes with another
1570-library, you can force Google Test to rename its macro to avoid the
1571-conflict.
1572-
1573-Specifically, if both Google Test and some other code define macro
1574-FOO, you can add
1575-
1576- -DGTEST_DONT_DEFINE_FOO=1
1577-
1578-to the compiler flags to tell Google Test to change the macro's name
1579-from FOO to GTEST_FOO. Currently FOO can be FAIL, SUCCEED, or TEST.
1580-For example, with -DGTEST_DONT_DEFINE_TEST=1, you'll need to write
1581-
1582- GTEST_TEST(SomeTest, DoesThis) { ... }
1583-
1584-instead of
1585-
1586- TEST(SomeTest, DoesThis) { ... }
1587-
1588-in order to define a test.
1589-
1590-Upgrating from an Earlier Version
1591----------------------------------
1592-
1593-We strive to keep Google Test releases backward compatible.
1594-Sometimes, though, we have to make some breaking changes for the
1595-users' long-term benefits. This section describes what you'll need to
1596-do if you are upgrading from an earlier version of Google Test.
1597-
1598-### Upgrading from 1.3.0 or Earlier ###
1599-
1600-You may need to explicitly enable or disable Google Test's own TR1
1601-tuple library. See the instructions in section "Choosing a TR1 Tuple
1602-Library".
1603-
1604-### Upgrading from 1.4.0 or Earlier ###
1605-
1606-The Autotools build script (configure + make) is no longer officially
1607-supportted. You are encouraged to migrate to your own build system or
1608-use CMake. If you still need to use Autotools, you can find
1609-instructions in the README file from Google Test 1.4.0.
1610-
1611-On platforms where the pthread library is available, Google Test uses
1612-it in order to be thread-safe. See the "Multi-threaded Tests" section
1613-for what this means to your build script.
1614-
1615-If you use Microsoft Visual C++ 7.1 with exceptions disabled, Google
1616-Test will no longer compile. This should affect very few people, as a
1617-large portion of STL (including <string>) doesn't compile in this mode
1618-anyway. We decided to stop supporting it in order to greatly simplify
1619-Google Test's implementation.
1620-
1621-Developing Google Test
1622-----------------------
1623-
1624-This section discusses how to make your own changes to Google Test.
1625-
1626-### Testing Google Test Itself ###
1627-
1628-To make sure your changes work as intended and don't break existing
1629-functionality, you'll want to compile and run Google Test's own tests.
1630-For that you can use CMake:
1631-
1632- mkdir mybuild
1633- cd mybuild
1634- cmake -Dgtest_build_tests=ON ${GTEST_DIR}
1635-
1636-Make sure you have Python installed, as some of Google Test's tests
1637-are written in Python. If the cmake command complains about not being
1638-able to find Python ("Could NOT find PythonInterp (missing:
1639-PYTHON_EXECUTABLE)"), try telling it explicitly where your Python
1640-executable can be found:
1641-
1642- cmake -DPYTHON_EXECUTABLE=path/to/python -Dgtest_build_tests=ON ${GTEST_DIR}
1643-
1644-Next, you can build Google Test and all of its own tests. On *nix,
1645-this is usually done by 'make'. To run the tests, do
1646-
1647- make test
1648-
1649-All tests should pass.
1650-
1651-### Regenerating Source Files ###
1652-
1653-Some of Google Test's source files are generated from templates (not
1654-in the C++ sense) using a script. A template file is named FOO.pump,
1655-where FOO is the name of the file it will generate. For example, the
1656-file include/gtest/internal/gtest-type-util.h.pump is used to generate
1657-gtest-type-util.h in the same directory.
1658-
1659-Normally you don't need to worry about regenerating the source files,
1660-unless you need to modify them. In that case, you should modify the
1661-corresponding .pump files instead and run the pump.py Python script to
1662-regenerate them. You can find pump.py in the scripts/ directory.
1663-Read the Pump manual [2] for how to use it.
1664-
1665- [2] http://code.google.com/p/googletest/wiki/PumpManual
1666-
1667-### Contributing a Patch ###
1668-
1669-We welcome patches. Please read the Google Test developer's guide [3]
1670-for how you can contribute. In particular, make sure you have signed
1671-the Contributor License Agreement, or we won't be able to accept the
1672-patch.
1673-
1674- [3] http://code.google.com/p/googletest/wiki/GoogleTestDevGuide
1675-
1676-Happy testing!
1677
1678=== removed directory '3rd_party/gmock/gtest/cmake'
1679=== removed file '3rd_party/gmock/gtest/cmake/internal_utils.cmake'
1680--- 3rd_party/gmock/gtest/cmake/internal_utils.cmake 2013-06-18 14:04:37 +0000
1681+++ 3rd_party/gmock/gtest/cmake/internal_utils.cmake 1970-01-01 00:00:00 +0000
1682@@ -1,227 +0,0 @@
1683-# Defines functions and macros useful for building Google Test and
1684-# Google Mock.
1685-#
1686-# Note:
1687-#
1688-# - This file will be run twice when building Google Mock (once via
1689-# Google Test's CMakeLists.txt, and once via Google Mock's).
1690-# Therefore it shouldn't have any side effects other than defining
1691-# the functions and macros.
1692-#
1693-# - The functions/macros defined in this file may depend on Google
1694-# Test and Google Mock's option() definitions, and thus must be
1695-# called *after* the options have been defined.
1696-
1697-# Tweaks CMake's default compiler/linker settings to suit Google Test's needs.
1698-#
1699-# This must be a macro(), as inside a function string() can only
1700-# update variables in the function scope.
1701-macro(fix_default_compiler_settings_)
1702- if (MSVC)
1703- # For MSVC, CMake sets certain flags to defaults we want to override.
1704- # This replacement code is taken from sample in the CMake Wiki at
1705- # http://www.cmake.org/Wiki/CMake_FAQ#Dynamic_Replace.
1706- foreach (flag_var
1707- CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
1708- CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO)
1709- if (NOT BUILD_SHARED_LIBS AND NOT gtest_force_shared_crt)
1710- # When Google Test is built as a shared library, it should also use
1711- # shared runtime libraries. Otherwise, it may end up with multiple
1712- # copies of runtime library data in different modules, resulting in
1713- # hard-to-find crashes. When it is built as a static library, it is
1714- # preferable to use CRT as static libraries, as we don't have to rely
1715- # on CRT DLLs being available. CMake always defaults to using shared
1716- # CRT libraries, so we override that default here.
1717- string(REPLACE "/MD" "-MT" ${flag_var} "${${flag_var}}")
1718- endif()
1719-
1720- # We prefer more strict warning checking for building Google Test.
1721- # Replaces /W3 with /W4 in defaults.
1722- string(REPLACE "/W3" "-W4" ${flag_var} "${${flag_var}}")
1723- endforeach()
1724- endif()
1725-endmacro()
1726-
1727-# Defines the compiler/linker flags used to build Google Test and
1728-# Google Mock. You can tweak these definitions to suit your need. A
1729-# variable's value is empty before it's explicitly assigned to.
1730-macro(config_compiler_and_linker)
1731- if (NOT gtest_disable_pthreads)
1732- # Defines CMAKE_USE_PTHREADS_INIT and CMAKE_THREAD_LIBS_INIT.
1733- find_package(Threads)
1734- endif()
1735-
1736- fix_default_compiler_settings_()
1737- if (MSVC)
1738- # Newlines inside flags variables break CMake's NMake generator.
1739- # TODO(vladl@google.com): Add -RTCs and -RTCu to debug builds.
1740- set(cxx_base_flags "-GS -W4 -WX -wd4127 -wd4251 -wd4275 -nologo -J -Zi")
1741- if (MSVC_VERSION LESS 1400)
1742- # Suppress spurious warnings MSVC 7.1 sometimes issues.
1743- # Forcing value to bool.
1744- set(cxx_base_flags "${cxx_base_flags} -wd4800")
1745- # Copy constructor and assignment operator could not be generated.
1746- set(cxx_base_flags "${cxx_base_flags} -wd4511 -wd4512")
1747- # Compatibility warnings not applicable to Google Test.
1748- # Resolved overload was found by argument-dependent lookup.
1749- set(cxx_base_flags "${cxx_base_flags} -wd4675")
1750- endif()
1751- set(cxx_base_flags "${cxx_base_flags} -D_UNICODE -DUNICODE -DWIN32 -D_WIN32")
1752- set(cxx_base_flags "${cxx_base_flags} -DSTRICT -DWIN32_LEAN_AND_MEAN")
1753- set(cxx_exception_flags "-EHsc -D_HAS_EXCEPTIONS=1")
1754- set(cxx_no_exception_flags "-D_HAS_EXCEPTIONS=0")
1755- set(cxx_no_rtti_flags "-GR-")
1756- elseif (CMAKE_COMPILER_IS_GNUCXX)
1757- set(cxx_base_flags "-Wall -Wshadow")
1758- set(cxx_exception_flags "-fexceptions")
1759- set(cxx_no_exception_flags "-fno-exceptions")
1760- # Until version 4.3.2, GCC doesn't define a macro to indicate
1761- # whether RTTI is enabled. Therefore we define GTEST_HAS_RTTI
1762- # explicitly.
1763- set(cxx_no_rtti_flags "-fno-rtti -DGTEST_HAS_RTTI=0")
1764- set(cxx_strict_flags
1765- "-Wextra -Wno-unused-parameter -Wno-missing-field-initializers")
1766- elseif (CMAKE_CXX_COMPILER_ID STREQUAL "SunPro")
1767- set(cxx_exception_flags "-features=except")
1768- # Sun Pro doesn't provide macros to indicate whether exceptions and
1769- # RTTI are enabled, so we define GTEST_HAS_* explicitly.
1770- set(cxx_no_exception_flags "-features=no%except -DGTEST_HAS_EXCEPTIONS=0")
1771- set(cxx_no_rtti_flags "-features=no%rtti -DGTEST_HAS_RTTI=0")
1772- elseif (CMAKE_CXX_COMPILER_ID STREQUAL "VisualAge" OR
1773- CMAKE_CXX_COMPILER_ID STREQUAL "XL")
1774- # CMake 2.8 changes Visual Age's compiler ID to "XL".
1775- set(cxx_exception_flags "-qeh")
1776- set(cxx_no_exception_flags "-qnoeh")
1777- # Until version 9.0, Visual Age doesn't define a macro to indicate
1778- # whether RTTI is enabled. Therefore we define GTEST_HAS_RTTI
1779- # explicitly.
1780- set(cxx_no_rtti_flags "-qnortti -DGTEST_HAS_RTTI=0")
1781- elseif (CMAKE_CXX_COMPILER_ID STREQUAL "HP")
1782- set(cxx_base_flags "-AA -mt")
1783- set(cxx_exception_flags "-DGTEST_HAS_EXCEPTIONS=1")
1784- set(cxx_no_exception_flags "+noeh -DGTEST_HAS_EXCEPTIONS=0")
1785- # RTTI can not be disabled in HP aCC compiler.
1786- set(cxx_no_rtti_flags "")
1787- endif()
1788-
1789- if (CMAKE_USE_PTHREADS_INIT) # The pthreads library is available and allowed.
1790- set(cxx_base_flags "${cxx_base_flags} -DGTEST_HAS_PTHREAD=1")
1791- else()
1792- set(cxx_base_flags "${cxx_base_flags} -DGTEST_HAS_PTHREAD=0")
1793- endif()
1794-
1795- # For building gtest's own tests and samples.
1796- set(cxx_exception "${CMAKE_CXX_FLAGS} ${cxx_base_flags} ${cxx_exception_flags}")
1797- set(cxx_no_exception
1798- "${CMAKE_CXX_FLAGS} ${cxx_base_flags} ${cxx_no_exception_flags}")
1799- set(cxx_default "${cxx_exception}")
1800- set(cxx_no_rtti "${cxx_default} ${cxx_no_rtti_flags}")
1801- set(cxx_use_own_tuple "${cxx_default} -DGTEST_USE_OWN_TR1_TUPLE=1")
1802-
1803- # For building the gtest libraries.
1804- set(cxx_strict "${cxx_default} ${cxx_strict_flags}")
1805-endmacro()
1806-
1807-# Defines the gtest & gtest_main libraries. User tests should link
1808-# with one of them.
1809-function(cxx_library_with_type name type cxx_flags)
1810- # type can be either STATIC or SHARED to denote a static or shared library.
1811- # ARGN refers to additional arguments after 'cxx_flags'.
1812- add_library(${name} ${type} ${ARGN})
1813- set_target_properties(${name}
1814- PROPERTIES
1815- COMPILE_FLAGS "${cxx_flags}")
1816- if (BUILD_SHARED_LIBS OR type STREQUAL "SHARED")
1817- set_target_properties(${name}
1818- PROPERTIES
1819- COMPILE_DEFINITIONS "GTEST_CREATE_SHARED_LIBRARY=1")
1820- endif()
1821- if (CMAKE_USE_PTHREADS_INIT)
1822- target_link_libraries(${name} ${CMAKE_THREAD_LIBS_INIT})
1823- endif()
1824-endfunction()
1825-
1826-########################################################################
1827-#
1828-# Helper functions for creating build targets.
1829-
1830-function(cxx_shared_library name cxx_flags)
1831- cxx_library_with_type(${name} SHARED "${cxx_flags}" ${ARGN})
1832-endfunction()
1833-
1834-function(cxx_library name cxx_flags)
1835- cxx_library_with_type(${name} "" "${cxx_flags}" ${ARGN})
1836-endfunction()
1837-
1838-# cxx_executable_with_flags(name cxx_flags libs srcs...)
1839-#
1840-# creates a named C++ executable that depends on the given libraries and
1841-# is built from the given source files with the given compiler flags.
1842-function(cxx_executable_with_flags name cxx_flags libs)
1843- add_executable(${name} ${ARGN})
1844- if (cxx_flags)
1845- set_target_properties(${name}
1846- PROPERTIES
1847- COMPILE_FLAGS "${cxx_flags}")
1848- endif()
1849- if (BUILD_SHARED_LIBS)
1850- set_target_properties(${name}
1851- PROPERTIES
1852- COMPILE_DEFINITIONS "GTEST_LINKED_AS_SHARED_LIBRARY=1")
1853- endif()
1854- # To support mixing linking in static and dynamic libraries, link each
1855- # library in with an extra call to target_link_libraries.
1856- foreach (lib "${libs}")
1857- target_link_libraries(${name} ${lib})
1858- endforeach()
1859-endfunction()
1860-
1861-# cxx_executable(name dir lib srcs...)
1862-#
1863-# creates a named target that depends on the given libs and is built
1864-# from the given source files. dir/name.cc is implicitly included in
1865-# the source file list.
1866-function(cxx_executable name dir libs)
1867- cxx_executable_with_flags(
1868- ${name} "${cxx_default}" "${libs}" "${dir}/${name}.cc" ${ARGN})
1869-endfunction()
1870-
1871-# Sets PYTHONINTERP_FOUND and PYTHON_EXECUTABLE.
1872-find_package(PythonInterp)
1873-
1874-# cxx_test_with_flags(name cxx_flags libs srcs...)
1875-#
1876-# creates a named C++ test that depends on the given libs and is built
1877-# from the given source files with the given compiler flags.
1878-function(cxx_test_with_flags name cxx_flags libs)
1879- cxx_executable_with_flags(${name} "${cxx_flags}" "${libs}" ${ARGN})
1880- add_test(${name} ${name})
1881-endfunction()
1882-
1883-# cxx_test(name libs srcs...)
1884-#
1885-# creates a named test target that depends on the given libs and is
1886-# built from the given source files. Unlike cxx_test_with_flags,
1887-# test/name.cc is already implicitly included in the source file list.
1888-function(cxx_test name libs)
1889- cxx_test_with_flags("${name}" "${cxx_default}" "${libs}"
1890- "test/${name}.cc" ${ARGN})
1891-endfunction()
1892-
1893-# py_test(name)
1894-#
1895-# creates a Python test with the given name whose main module is in
1896-# test/name.py. It does nothing if Python is not installed.
1897-function(py_test name)
1898- # We are not supporting Python tests on Linux yet as they consider
1899- # all Linux environments to be google3 and try to use google3 features.
1900- if (PYTHONINTERP_FOUND)
1901- # ${CMAKE_BINARY_DIR} is known at configuration time, so we can
1902- # directly bind it from cmake. ${CTEST_CONFIGURATION_TYPE} is known
1903- # only at ctest runtime (by calling ctest -c <Configuration>), so
1904- # we have to escape $ to delay variable substitution here.
1905- add_test(${name}
1906- ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test/${name}.py
1907- --build_dir=${CMAKE_CURRENT_BINARY_DIR}/\${CTEST_CONFIGURATION_TYPE})
1908- endif()
1909-endfunction()
1910
1911=== removed directory '3rd_party/gmock/gtest/include'
1912=== removed directory '3rd_party/gmock/gtest/include/gtest'
1913=== removed file '3rd_party/gmock/gtest/include/gtest/gtest-death-test.h'
1914--- 3rd_party/gmock/gtest/include/gtest/gtest-death-test.h 2013-06-18 14:04:37 +0000
1915+++ 3rd_party/gmock/gtest/include/gtest/gtest-death-test.h 1970-01-01 00:00:00 +0000
1916@@ -1,294 +0,0 @@
1917-// Copyright 2005, Google Inc.
1918-// All rights reserved.
1919-//
1920-// Redistribution and use in source and binary forms, with or without
1921-// modification, are permitted provided that the following conditions are
1922-// met:
1923-//
1924-// * Redistributions of source code must retain the above copyright
1925-// notice, this list of conditions and the following disclaimer.
1926-// * Redistributions in binary form must reproduce the above
1927-// copyright notice, this list of conditions and the following disclaimer
1928-// in the documentation and/or other materials provided with the
1929-// distribution.
1930-// * Neither the name of Google Inc. nor the names of its
1931-// contributors may be used to endorse or promote products derived from
1932-// this software without specific prior written permission.
1933-//
1934-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1935-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1936-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
1937-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
1938-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
1939-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
1940-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
1941-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
1942-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1943-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1944-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1945-//
1946-// Author: wan@google.com (Zhanyong Wan)
1947-//
1948-// The Google C++ Testing Framework (Google Test)
1949-//
1950-// This header file defines the public API for death tests. It is
1951-// #included by gtest.h so a user doesn't need to include this
1952-// directly.
1953-
1954-#ifndef GTEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H_
1955-#define GTEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H_
1956-
1957-#include "gtest/internal/gtest-death-test-internal.h"
1958-
1959-namespace testing {
1960-
1961-// This flag controls the style of death tests. Valid values are "threadsafe",
1962-// meaning that the death test child process will re-execute the test binary
1963-// from the start, running only a single death test, or "fast",
1964-// meaning that the child process will execute the test logic immediately
1965-// after forking.
1966-GTEST_DECLARE_string_(death_test_style);
1967-
1968-#if GTEST_HAS_DEATH_TEST
1969-
1970-namespace internal {
1971-
1972-// Returns a Boolean value indicating whether the caller is currently
1973-// executing in the context of the death test child process. Tools such as
1974-// Valgrind heap checkers may need this to modify their behavior in death
1975-// tests. IMPORTANT: This is an internal utility. Using it may break the
1976-// implementation of death tests. User code MUST NOT use it.
1977-GTEST_API_ bool InDeathTestChild();
1978-
1979-} // namespace internal
1980-
1981-// The following macros are useful for writing death tests.
1982-
1983-// Here's what happens when an ASSERT_DEATH* or EXPECT_DEATH* is
1984-// executed:
1985-//
1986-// 1. It generates a warning if there is more than one active
1987-// thread. This is because it's safe to fork() or clone() only
1988-// when there is a single thread.
1989-//
1990-// 2. The parent process clone()s a sub-process and runs the death
1991-// test in it; the sub-process exits with code 0 at the end of the
1992-// death test, if it hasn't exited already.
1993-//
1994-// 3. The parent process waits for the sub-process to terminate.
1995-//
1996-// 4. The parent process checks the exit code and error message of
1997-// the sub-process.
1998-//
1999-// Examples:
2000-//
2001-// ASSERT_DEATH(server.SendMessage(56, "Hello"), "Invalid port number");
2002-// for (int i = 0; i < 5; i++) {
2003-// EXPECT_DEATH(server.ProcessRequest(i),
2004-// "Invalid request .* in ProcessRequest()")
2005-// << "Failed to die on request " << i;
2006-// }
2007-//
2008-// ASSERT_EXIT(server.ExitNow(), ::testing::ExitedWithCode(0), "Exiting");
2009-//
2010-// bool KilledBySIGHUP(int exit_code) {
2011-// return WIFSIGNALED(exit_code) && WTERMSIG(exit_code) == SIGHUP;
2012-// }
2013-//
2014-// ASSERT_EXIT(client.HangUpServer(), KilledBySIGHUP, "Hanging up!");
2015-//
2016-// On the regular expressions used in death tests:
2017-//
2018-// On POSIX-compliant systems (*nix), we use the <regex.h> library,
2019-// which uses the POSIX extended regex syntax.
2020-//
2021-// On other platforms (e.g. Windows), we only support a simple regex
2022-// syntax implemented as part of Google Test. This limited
2023-// implementation should be enough most of the time when writing
2024-// death tests; though it lacks many features you can find in PCRE
2025-// or POSIX extended regex syntax. For example, we don't support
2026-// union ("x|y"), grouping ("(xy)"), brackets ("[xy]"), and
2027-// repetition count ("x{5,7}"), among others.
2028-//
2029-// Below is the syntax that we do support. We chose it to be a
2030-// subset of both PCRE and POSIX extended regex, so it's easy to
2031-// learn wherever you come from. In the following: 'A' denotes a
2032-// literal character, period (.), or a single \\ escape sequence;
2033-// 'x' and 'y' denote regular expressions; 'm' and 'n' are for
2034-// natural numbers.
2035-//
2036-// c matches any literal character c
2037-// \\d matches any decimal digit
2038-// \\D matches any character that's not a decimal digit
2039-// \\f matches \f
2040-// \\n matches \n
2041-// \\r matches \r
2042-// \\s matches any ASCII whitespace, including \n
2043-// \\S matches any character that's not a whitespace
2044-// \\t matches \t
2045-// \\v matches \v
2046-// \\w matches any letter, _, or decimal digit
2047-// \\W matches any character that \\w doesn't match
2048-// \\c matches any literal character c, which must be a punctuation
2049-// . matches any single character except \n
2050-// A? matches 0 or 1 occurrences of A
2051-// A* matches 0 or many occurrences of A
2052-// A+ matches 1 or many occurrences of A
2053-// ^ matches the beginning of a string (not that of each line)
2054-// $ matches the end of a string (not that of each line)
2055-// xy matches x followed by y
2056-//
2057-// If you accidentally use PCRE or POSIX extended regex features
2058-// not implemented by us, you will get a run-time failure. In that
2059-// case, please try to rewrite your regular expression within the
2060-// above syntax.
2061-//
2062-// This implementation is *not* meant to be as highly tuned or robust
2063-// as a compiled regex library, but should perform well enough for a
2064-// death test, which already incurs significant overhead by launching
2065-// a child process.
2066-//
2067-// Known caveats:
2068-//
2069-// A "threadsafe" style death test obtains the path to the test
2070-// program from argv[0] and re-executes it in the sub-process. For
2071-// simplicity, the current implementation doesn't search the PATH
2072-// when launching the sub-process. This means that the user must
2073-// invoke the test program via a path that contains at least one
2074-// path separator (e.g. path/to/foo_test and
2075-// /absolute/path/to/bar_test are fine, but foo_test is not). This
2076-// is rarely a problem as people usually don't put the test binary
2077-// directory in PATH.
2078-//
2079-// TODO(wan@google.com): make thread-safe death tests search the PATH.
2080-
2081-// Asserts that a given statement causes the program to exit, with an
2082-// integer exit status that satisfies predicate, and emitting error output
2083-// that matches regex.
2084-# define ASSERT_EXIT(statement, predicate, regex) \
2085- GTEST_DEATH_TEST_(statement, predicate, regex, GTEST_FATAL_FAILURE_)
2086-
2087-// Like ASSERT_EXIT, but continues on to successive tests in the
2088-// test case, if any:
2089-# define EXPECT_EXIT(statement, predicate, regex) \
2090- GTEST_DEATH_TEST_(statement, predicate, regex, GTEST_NONFATAL_FAILURE_)
2091-
2092-// Asserts that a given statement causes the program to exit, either by
2093-// explicitly exiting with a nonzero exit code or being killed by a
2094-// signal, and emitting error output that matches regex.
2095-# define ASSERT_DEATH(statement, regex) \
2096- ASSERT_EXIT(statement, ::testing::internal::ExitedUnsuccessfully, regex)
2097-
2098-// Like ASSERT_DEATH, but continues on to successive tests in the
2099-// test case, if any:
2100-# define EXPECT_DEATH(statement, regex) \
2101- EXPECT_EXIT(statement, ::testing::internal::ExitedUnsuccessfully, regex)
2102-
2103-// Two predicate classes that can be used in {ASSERT,EXPECT}_EXIT*:
2104-
2105-// Tests that an exit code describes a normal exit with a given exit code.
2106-class GTEST_API_ ExitedWithCode {
2107- public:
2108- explicit ExitedWithCode(int exit_code);
2109- bool operator()(int exit_status) const;
2110- private:
2111- // No implementation - assignment is unsupported.
2112- void operator=(const ExitedWithCode& other);
2113-
2114- const int exit_code_;
2115-};
2116-
2117-# if !GTEST_OS_WINDOWS
2118-// Tests that an exit code describes an exit due to termination by a
2119-// given signal.
2120-class GTEST_API_ KilledBySignal {
2121- public:
2122- explicit KilledBySignal(int signum);
2123- bool operator()(int exit_status) const;
2124- private:
2125- const int signum_;
2126-};
2127-# endif // !GTEST_OS_WINDOWS
2128-
2129-// EXPECT_DEBUG_DEATH asserts that the given statements die in debug mode.
2130-// The death testing framework causes this to have interesting semantics,
2131-// since the sideeffects of the call are only visible in opt mode, and not
2132-// in debug mode.
2133-//
2134-// In practice, this can be used to test functions that utilize the
2135-// LOG(DFATAL) macro using the following style:
2136-//
2137-// int DieInDebugOr12(int* sideeffect) {
2138-// if (sideeffect) {
2139-// *sideeffect = 12;
2140-// }
2141-// LOG(DFATAL) << "death";
2142-// return 12;
2143-// }
2144-//
2145-// TEST(TestCase, TestDieOr12WorksInDgbAndOpt) {
2146-// int sideeffect = 0;
2147-// // Only asserts in dbg.
2148-// EXPECT_DEBUG_DEATH(DieInDebugOr12(&sideeffect), "death");
2149-//
2150-// #ifdef NDEBUG
2151-// // opt-mode has sideeffect visible.
2152-// EXPECT_EQ(12, sideeffect);
2153-// #else
2154-// // dbg-mode no visible sideeffect.
2155-// EXPECT_EQ(0, sideeffect);
2156-// #endif
2157-// }
2158-//
2159-// This will assert that DieInDebugReturn12InOpt() crashes in debug
2160-// mode, usually due to a DCHECK or LOG(DFATAL), but returns the
2161-// appropriate fallback value (12 in this case) in opt mode. If you
2162-// need to test that a function has appropriate side-effects in opt
2163-// mode, include assertions against the side-effects. A general
2164-// pattern for this is:
2165-//
2166-// EXPECT_DEBUG_DEATH({
2167-// // Side-effects here will have an effect after this statement in
2168-// // opt mode, but none in debug mode.
2169-// EXPECT_EQ(12, DieInDebugOr12(&sideeffect));
2170-// }, "death");
2171-//
2172-# ifdef NDEBUG
2173-
2174-# define EXPECT_DEBUG_DEATH(statement, regex) \
2175- GTEST_EXECUTE_STATEMENT_(statement, regex)
2176-
2177-# define ASSERT_DEBUG_DEATH(statement, regex) \
2178- GTEST_EXECUTE_STATEMENT_(statement, regex)
2179-
2180-# else
2181-
2182-# define EXPECT_DEBUG_DEATH(statement, regex) \
2183- EXPECT_DEATH(statement, regex)
2184-
2185-# define ASSERT_DEBUG_DEATH(statement, regex) \
2186- ASSERT_DEATH(statement, regex)
2187-
2188-# endif // NDEBUG for EXPECT_DEBUG_DEATH
2189-#endif // GTEST_HAS_DEATH_TEST
2190-
2191-// EXPECT_DEATH_IF_SUPPORTED(statement, regex) and
2192-// ASSERT_DEATH_IF_SUPPORTED(statement, regex) expand to real death tests if
2193-// death tests are supported; otherwise they just issue a warning. This is
2194-// useful when you are combining death test assertions with normal test
2195-// assertions in one test.
2196-#if GTEST_HAS_DEATH_TEST
2197-# define EXPECT_DEATH_IF_SUPPORTED(statement, regex) \
2198- EXPECT_DEATH(statement, regex)
2199-# define ASSERT_DEATH_IF_SUPPORTED(statement, regex) \
2200- ASSERT_DEATH(statement, regex)
2201-#else
2202-# define EXPECT_DEATH_IF_SUPPORTED(statement, regex) \
2203- GTEST_UNSUPPORTED_DEATH_TEST_(statement, regex, )
2204-# define ASSERT_DEATH_IF_SUPPORTED(statement, regex) \
2205- GTEST_UNSUPPORTED_DEATH_TEST_(statement, regex, return)
2206-#endif
2207-
2208-} // namespace testing
2209-
2210-#endif // GTEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H_
2211
2212=== removed file '3rd_party/gmock/gtest/include/gtest/gtest-message.h'
2213--- 3rd_party/gmock/gtest/include/gtest/gtest-message.h 2013-06-18 14:04:37 +0000
2214+++ 3rd_party/gmock/gtest/include/gtest/gtest-message.h 1970-01-01 00:00:00 +0000
2215@@ -1,250 +0,0 @@
2216-// Copyright 2005, Google Inc.
2217-// All rights reserved.
2218-//
2219-// Redistribution and use in source and binary forms, with or without
2220-// modification, are permitted provided that the following conditions are
2221-// met:
2222-//
2223-// * Redistributions of source code must retain the above copyright
2224-// notice, this list of conditions and the following disclaimer.
2225-// * Redistributions in binary form must reproduce the above
2226-// copyright notice, this list of conditions and the following disclaimer
2227-// in the documentation and/or other materials provided with the
2228-// distribution.
2229-// * Neither the name of Google Inc. nor the names of its
2230-// contributors may be used to endorse or promote products derived from
2231-// this software without specific prior written permission.
2232-//
2233-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
2234-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
2235-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
2236-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
2237-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2238-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
2239-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2240-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2241-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2242-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2243-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2244-//
2245-// Author: wan@google.com (Zhanyong Wan)
2246-//
2247-// The Google C++ Testing Framework (Google Test)
2248-//
2249-// This header file defines the Message class.
2250-//
2251-// IMPORTANT NOTE: Due to limitation of the C++ language, we have to
2252-// leave some internal implementation details in this header file.
2253-// They are clearly marked by comments like this:
2254-//
2255-// // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
2256-//
2257-// Such code is NOT meant to be used by a user directly, and is subject
2258-// to CHANGE WITHOUT NOTICE. Therefore DO NOT DEPEND ON IT in a user
2259-// program!
2260-
2261-#ifndef GTEST_INCLUDE_GTEST_GTEST_MESSAGE_H_
2262-#define GTEST_INCLUDE_GTEST_GTEST_MESSAGE_H_
2263-
2264-#include <limits>
2265-
2266-#include "gtest/internal/gtest-port.h"
2267-
2268-// Ensures that there is at least one operator<< in the global namespace.
2269-// See Message& operator<<(...) below for why.
2270-void operator<<(const testing::internal::Secret&, int);
2271-
2272-namespace testing {
2273-
2274-// The Message class works like an ostream repeater.
2275-//
2276-// Typical usage:
2277-//
2278-// 1. You stream a bunch of values to a Message object.
2279-// It will remember the text in a stringstream.
2280-// 2. Then you stream the Message object to an ostream.
2281-// This causes the text in the Message to be streamed
2282-// to the ostream.
2283-//
2284-// For example;
2285-//
2286-// testing::Message foo;
2287-// foo << 1 << " != " << 2;
2288-// std::cout << foo;
2289-//
2290-// will print "1 != 2".
2291-//
2292-// Message is not intended to be inherited from. In particular, its
2293-// destructor is not virtual.
2294-//
2295-// Note that stringstream behaves differently in gcc and in MSVC. You
2296-// can stream a NULL char pointer to it in the former, but not in the
2297-// latter (it causes an access violation if you do). The Message
2298-// class hides this difference by treating a NULL char pointer as
2299-// "(null)".
2300-class GTEST_API_ Message {
2301- private:
2302- // The type of basic IO manipulators (endl, ends, and flush) for
2303- // narrow streams.
2304- typedef std::ostream& (*BasicNarrowIoManip)(std::ostream&);
2305-
2306- public:
2307- // Constructs an empty Message.
2308- Message();
2309-
2310- // Copy constructor.
2311- Message(const Message& msg) : ss_(new ::std::stringstream) { // NOLINT
2312- *ss_ << msg.GetString();
2313- }
2314-
2315- // Constructs a Message from a C-string.
2316- explicit Message(const char* str) : ss_(new ::std::stringstream) {
2317- *ss_ << str;
2318- }
2319-
2320-#if GTEST_OS_SYMBIAN
2321- // Streams a value (either a pointer or not) to this object.
2322- template <typename T>
2323- inline Message& operator <<(const T& value) {
2324- StreamHelper(typename internal::is_pointer<T>::type(), value);
2325- return *this;
2326- }
2327-#else
2328- // Streams a non-pointer value to this object.
2329- template <typename T>
2330- inline Message& operator <<(const T& val) {
2331- // Some libraries overload << for STL containers. These
2332- // overloads are defined in the global namespace instead of ::std.
2333- //
2334- // C++'s symbol lookup rule (i.e. Koenig lookup) says that these
2335- // overloads are visible in either the std namespace or the global
2336- // namespace, but not other namespaces, including the testing
2337- // namespace which Google Test's Message class is in.
2338- //
2339- // To allow STL containers (and other types that has a << operator
2340- // defined in the global namespace) to be used in Google Test
2341- // assertions, testing::Message must access the custom << operator
2342- // from the global namespace. With this using declaration,
2343- // overloads of << defined in the global namespace and those
2344- // visible via Koenig lookup are both exposed in this function.
2345- using ::operator <<;
2346- *ss_ << val;
2347- return *this;
2348- }
2349-
2350- // Streams a pointer value to this object.
2351- //
2352- // This function is an overload of the previous one. When you
2353- // stream a pointer to a Message, this definition will be used as it
2354- // is more specialized. (The C++ Standard, section
2355- // [temp.func.order].) If you stream a non-pointer, then the
2356- // previous definition will be used.
2357- //
2358- // The reason for this overload is that streaming a NULL pointer to
2359- // ostream is undefined behavior. Depending on the compiler, you
2360- // may get "0", "(nil)", "(null)", or an access violation. To
2361- // ensure consistent result across compilers, we always treat NULL
2362- // as "(null)".
2363- template <typename T>
2364- inline Message& operator <<(T* const& pointer) { // NOLINT
2365- if (pointer == NULL) {
2366- *ss_ << "(null)";
2367- } else {
2368- *ss_ << pointer;
2369- }
2370- return *this;
2371- }
2372-#endif // GTEST_OS_SYMBIAN
2373-
2374- // Since the basic IO manipulators are overloaded for both narrow
2375- // and wide streams, we have to provide this specialized definition
2376- // of operator <<, even though its body is the same as the
2377- // templatized version above. Without this definition, streaming
2378- // endl or other basic IO manipulators to Message will confuse the
2379- // compiler.
2380- Message& operator <<(BasicNarrowIoManip val) {
2381- *ss_ << val;
2382- return *this;
2383- }
2384-
2385- // Instead of 1/0, we want to see true/false for bool values.
2386- Message& operator <<(bool b) {
2387- return *this << (b ? "true" : "false");
2388- }
2389-
2390- // These two overloads allow streaming a wide C string to a Message
2391- // using the UTF-8 encoding.
2392- Message& operator <<(const wchar_t* wide_c_str);
2393- Message& operator <<(wchar_t* wide_c_str);
2394-
2395-#if GTEST_HAS_STD_WSTRING
2396- // Converts the given wide string to a narrow string using the UTF-8
2397- // encoding, and streams the result to this Message object.
2398- Message& operator <<(const ::std::wstring& wstr);
2399-#endif // GTEST_HAS_STD_WSTRING
2400-
2401-#if GTEST_HAS_GLOBAL_WSTRING
2402- // Converts the given wide string to a narrow string using the UTF-8
2403- // encoding, and streams the result to this Message object.
2404- Message& operator <<(const ::wstring& wstr);
2405-#endif // GTEST_HAS_GLOBAL_WSTRING
2406-
2407- // Gets the text streamed to this object so far as an std::string.
2408- // Each '\0' character in the buffer is replaced with "\\0".
2409- //
2410- // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
2411- std::string GetString() const;
2412-
2413- private:
2414-
2415-#if GTEST_OS_SYMBIAN
2416- // These are needed as the Nokia Symbian Compiler cannot decide between
2417- // const T& and const T* in a function template. The Nokia compiler _can_
2418- // decide between class template specializations for T and T*, so a
2419- // tr1::type_traits-like is_pointer works, and we can overload on that.
2420- template <typename T>
2421- inline void StreamHelper(internal::true_type /*is_pointer*/, T* pointer) {
2422- if (pointer == NULL) {
2423- *ss_ << "(null)";
2424- } else {
2425- *ss_ << pointer;
2426- }
2427- }
2428- template <typename T>
2429- inline void StreamHelper(internal::false_type /*is_pointer*/,
2430- const T& value) {
2431- // See the comments in Message& operator <<(const T&) above for why
2432- // we need this using statement.
2433- using ::operator <<;
2434- *ss_ << value;
2435- }
2436-#endif // GTEST_OS_SYMBIAN
2437-
2438- // We'll hold the text streamed to this object here.
2439- const internal::scoped_ptr< ::std::stringstream> ss_;
2440-
2441- // We declare (but don't implement) this to prevent the compiler
2442- // from implementing the assignment operator.
2443- void operator=(const Message&);
2444-};
2445-
2446-// Streams a Message to an ostream.
2447-inline std::ostream& operator <<(std::ostream& os, const Message& sb) {
2448- return os << sb.GetString();
2449-}
2450-
2451-namespace internal {
2452-
2453-// Converts a streamable value to an std::string. A NULL pointer is
2454-// converted to "(null)". When the input value is a ::string,
2455-// ::std::string, ::wstring, or ::std::wstring object, each NUL
2456-// character in it is replaced with "\\0".
2457-template <typename T>
2458-std::string StreamableToString(const T& streamable) {
2459- return (Message() << streamable).GetString();
2460-}
2461-
2462-} // namespace internal
2463-} // namespace testing
2464-
2465-#endif // GTEST_INCLUDE_GTEST_GTEST_MESSAGE_H_
2466
2467=== removed file '3rd_party/gmock/gtest/include/gtest/gtest-param-test.h'
2468--- 3rd_party/gmock/gtest/include/gtest/gtest-param-test.h 2013-06-18 14:04:37 +0000
2469+++ 3rd_party/gmock/gtest/include/gtest/gtest-param-test.h 1970-01-01 00:00:00 +0000
2470@@ -1,1421 +0,0 @@
2471-// This file was GENERATED by command:
2472-// pump.py gtest-param-test.h.pump
2473-// DO NOT EDIT BY HAND!!!
2474-
2475-// Copyright 2008, Google Inc.
2476-// All rights reserved.
2477-//
2478-// Redistribution and use in source and binary forms, with or without
2479-// modification, are permitted provided that the following conditions are
2480-// met:
2481-//
2482-// * Redistributions of source code must retain the above copyright
2483-// notice, this list of conditions and the following disclaimer.
2484-// * Redistributions in binary form must reproduce the above
2485-// copyright notice, this list of conditions and the following disclaimer
2486-// in the documentation and/or other materials provided with the
2487-// distribution.
2488-// * Neither the name of Google Inc. nor the names of its
2489-// contributors may be used to endorse or promote products derived from
2490-// this software without specific prior written permission.
2491-//
2492-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
2493-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
2494-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
2495-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
2496-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2497-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
2498-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2499-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2500-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2501-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2502-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2503-//
2504-// Authors: vladl@google.com (Vlad Losev)
2505-//
2506-// Macros and functions for implementing parameterized tests
2507-// in Google C++ Testing Framework (Google Test)
2508-//
2509-// This file is generated by a SCRIPT. DO NOT EDIT BY HAND!
2510-//
2511-#ifndef GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_
2512-#define GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_
2513-
2514-
2515-// Value-parameterized tests allow you to test your code with different
2516-// parameters without writing multiple copies of the same test.
2517-//
2518-// Here is how you use value-parameterized tests:
2519-
2520-#if 0
2521-
2522-// To write value-parameterized tests, first you should define a fixture
2523-// class. It is usually derived from testing::TestWithParam<T> (see below for
2524-// another inheritance scheme that's sometimes useful in more complicated
2525-// class hierarchies), where the type of your parameter values.
2526-// TestWithParam<T> is itself derived from testing::Test. T can be any
2527-// copyable type. If it's a raw pointer, you are responsible for managing the
2528-// lifespan of the pointed values.
2529-
2530-class FooTest : public ::testing::TestWithParam<const char*> {
2531- // You can implement all the usual class fixture members here.
2532-};
2533-
2534-// Then, use the TEST_P macro to define as many parameterized tests
2535-// for this fixture as you want. The _P suffix is for "parameterized"
2536-// or "pattern", whichever you prefer to think.
2537-
2538-TEST_P(FooTest, DoesBlah) {
2539- // Inside a test, access the test parameter with the GetParam() method
2540- // of the TestWithParam<T> class:
2541- EXPECT_TRUE(foo.Blah(GetParam()));
2542- ...
2543-}
2544-
2545-TEST_P(FooTest, HasBlahBlah) {
2546- ...
2547-}
2548-
2549-// Finally, you can use INSTANTIATE_TEST_CASE_P to instantiate the test
2550-// case with any set of parameters you want. Google Test defines a number
2551-// of functions for generating test parameters. They return what we call
2552-// (surprise!) parameter generators. Here is a summary of them, which
2553-// are all in the testing namespace:
2554-//
2555-//
2556-// Range(begin, end [, step]) - Yields values {begin, begin+step,
2557-// begin+step+step, ...}. The values do not
2558-// include end. step defaults to 1.
2559-// Values(v1, v2, ..., vN) - Yields values {v1, v2, ..., vN}.
2560-// ValuesIn(container) - Yields values from a C-style array, an STL
2561-// ValuesIn(begin,end) container, or an iterator range [begin, end).
2562-// Bool() - Yields sequence {false, true}.
2563-// Combine(g1, g2, ..., gN) - Yields all combinations (the Cartesian product
2564-// for the math savvy) of the values generated
2565-// by the N generators.
2566-//
2567-// For more details, see comments at the definitions of these functions below
2568-// in this file.
2569-//
2570-// The following statement will instantiate tests from the FooTest test case
2571-// each with parameter values "meeny", "miny", and "moe".
2572-
2573-INSTANTIATE_TEST_CASE_P(InstantiationName,
2574- FooTest,
2575- Values("meeny", "miny", "moe"));
2576-
2577-// To distinguish different instances of the pattern, (yes, you
2578-// can instantiate it more then once) the first argument to the
2579-// INSTANTIATE_TEST_CASE_P macro is a prefix that will be added to the
2580-// actual test case name. Remember to pick unique prefixes for different
2581-// instantiations. The tests from the instantiation above will have
2582-// these names:
2583-//
2584-// * InstantiationName/FooTest.DoesBlah/0 for "meeny"
2585-// * InstantiationName/FooTest.DoesBlah/1 for "miny"
2586-// * InstantiationName/FooTest.DoesBlah/2 for "moe"
2587-// * InstantiationName/FooTest.HasBlahBlah/0 for "meeny"
2588-// * InstantiationName/FooTest.HasBlahBlah/1 for "miny"
2589-// * InstantiationName/FooTest.HasBlahBlah/2 for "moe"
2590-//
2591-// You can use these names in --gtest_filter.
2592-//
2593-// This statement will instantiate all tests from FooTest again, each
2594-// with parameter values "cat" and "dog":
2595-
2596-const char* pets[] = {"cat", "dog"};
2597-INSTANTIATE_TEST_CASE_P(AnotherInstantiationName, FooTest, ValuesIn(pets));
2598-
2599-// The tests from the instantiation above will have these names:
2600-//
2601-// * AnotherInstantiationName/FooTest.DoesBlah/0 for "cat"
2602-// * AnotherInstantiationName/FooTest.DoesBlah/1 for "dog"
2603-// * AnotherInstantiationName/FooTest.HasBlahBlah/0 for "cat"
2604-// * AnotherInstantiationName/FooTest.HasBlahBlah/1 for "dog"
2605-//
2606-// Please note that INSTANTIATE_TEST_CASE_P will instantiate all tests
2607-// in the given test case, whether their definitions come before or
2608-// AFTER the INSTANTIATE_TEST_CASE_P statement.
2609-//
2610-// Please also note that generator expressions (including parameters to the
2611-// generators) are evaluated in InitGoogleTest(), after main() has started.
2612-// This allows the user on one hand, to adjust generator parameters in order
2613-// to dynamically determine a set of tests to run and on the other hand,
2614-// give the user a chance to inspect the generated tests with Google Test
2615-// reflection API before RUN_ALL_TESTS() is executed.
2616-//
2617-// You can see samples/sample7_unittest.cc and samples/sample8_unittest.cc
2618-// for more examples.
2619-//
2620-// In the future, we plan to publish the API for defining new parameter
2621-// generators. But for now this interface remains part of the internal
2622-// implementation and is subject to change.
2623-//
2624-//
2625-// A parameterized test fixture must be derived from testing::Test and from
2626-// testing::WithParamInterface<T>, where T is the type of the parameter
2627-// values. Inheriting from TestWithParam<T> satisfies that requirement because
2628-// TestWithParam<T> inherits from both Test and WithParamInterface. In more
2629-// complicated hierarchies, however, it is occasionally useful to inherit
2630-// separately from Test and WithParamInterface. For example:
2631-
2632-class BaseTest : public ::testing::Test {
2633- // You can inherit all the usual members for a non-parameterized test
2634- // fixture here.
2635-};
2636-
2637-class DerivedTest : public BaseTest, public ::testing::WithParamInterface<int> {
2638- // The usual test fixture members go here too.
2639-};
2640-
2641-TEST_F(BaseTest, HasFoo) {
2642- // This is an ordinary non-parameterized test.
2643-}
2644-
2645-TEST_P(DerivedTest, DoesBlah) {
2646- // GetParam works just the same here as if you inherit from TestWithParam.
2647- EXPECT_TRUE(foo.Blah(GetParam()));
2648-}
2649-
2650-#endif // 0
2651-
2652-#include "gtest/internal/gtest-port.h"
2653-
2654-#if !GTEST_OS_SYMBIAN
2655-# include <utility>
2656-#endif
2657-
2658-// scripts/fuse_gtest.py depends on gtest's own header being #included
2659-// *unconditionally*. Therefore these #includes cannot be moved
2660-// inside #if GTEST_HAS_PARAM_TEST.
2661-#include "gtest/internal/gtest-internal.h"
2662-#include "gtest/internal/gtest-param-util.h"
2663-#include "gtest/internal/gtest-param-util-generated.h"
2664-
2665-#if GTEST_HAS_PARAM_TEST
2666-
2667-namespace testing {
2668-
2669-// Functions producing parameter generators.
2670-//
2671-// Google Test uses these generators to produce parameters for value-
2672-// parameterized tests. When a parameterized test case is instantiated
2673-// with a particular generator, Google Test creates and runs tests
2674-// for each element in the sequence produced by the generator.
2675-//
2676-// In the following sample, tests from test case FooTest are instantiated
2677-// each three times with parameter values 3, 5, and 8:
2678-//
2679-// class FooTest : public TestWithParam<int> { ... };
2680-//
2681-// TEST_P(FooTest, TestThis) {
2682-// }
2683-// TEST_P(FooTest, TestThat) {
2684-// }
2685-// INSTANTIATE_TEST_CASE_P(TestSequence, FooTest, Values(3, 5, 8));
2686-//
2687-
2688-// Range() returns generators providing sequences of values in a range.
2689-//
2690-// Synopsis:
2691-// Range(start, end)
2692-// - returns a generator producing a sequence of values {start, start+1,
2693-// start+2, ..., }.
2694-// Range(start, end, step)
2695-// - returns a generator producing a sequence of values {start, start+step,
2696-// start+step+step, ..., }.
2697-// Notes:
2698-// * The generated sequences never include end. For example, Range(1, 5)
2699-// returns a generator producing a sequence {1, 2, 3, 4}. Range(1, 9, 2)
2700-// returns a generator producing {1, 3, 5, 7}.
2701-// * start and end must have the same type. That type may be any integral or
2702-// floating-point type or a user defined type satisfying these conditions:
2703-// * It must be assignable (have operator=() defined).
2704-// * It must have operator+() (operator+(int-compatible type) for
2705-// two-operand version).
2706-// * It must have operator<() defined.
2707-// Elements in the resulting sequences will also have that type.
2708-// * Condition start < end must be satisfied in order for resulting sequences
2709-// to contain any elements.
2710-//
2711-template <typename T, typename IncrementT>
2712-internal::ParamGenerator<T> Range(T start, T end, IncrementT step) {
2713- return internal::ParamGenerator<T>(
2714- new internal::RangeGenerator<T, IncrementT>(start, end, step));
2715-}
2716-
2717-template <typename T>
2718-internal::ParamGenerator<T> Range(T start, T end) {
2719- return Range(start, end, 1);
2720-}
2721-
2722-// ValuesIn() function allows generation of tests with parameters coming from
2723-// a container.
2724-//
2725-// Synopsis:
2726-// ValuesIn(const T (&array)[N])
2727-// - returns a generator producing sequences with elements from
2728-// a C-style array.
2729-// ValuesIn(const Container& container)
2730-// - returns a generator producing sequences with elements from
2731-// an STL-style container.
2732-// ValuesIn(Iterator begin, Iterator end)
2733-// - returns a generator producing sequences with elements from
2734-// a range [begin, end) defined by a pair of STL-style iterators. These
2735-// iterators can also be plain C pointers.
2736-//
2737-// Please note that ValuesIn copies the values from the containers
2738-// passed in and keeps them to generate tests in RUN_ALL_TESTS().
2739-//
2740-// Examples:
2741-//
2742-// This instantiates tests from test case StringTest
2743-// each with C-string values of "foo", "bar", and "baz":
2744-//
2745-// const char* strings[] = {"foo", "bar", "baz"};
2746-// INSTANTIATE_TEST_CASE_P(StringSequence, SrtingTest, ValuesIn(strings));
2747-//
2748-// This instantiates tests from test case StlStringTest
2749-// each with STL strings with values "a" and "b":
2750-//
2751-// ::std::vector< ::std::string> GetParameterStrings() {
2752-// ::std::vector< ::std::string> v;
2753-// v.push_back("a");
2754-// v.push_back("b");
2755-// return v;
2756-// }
2757-//
2758-// INSTANTIATE_TEST_CASE_P(CharSequence,
2759-// StlStringTest,
2760-// ValuesIn(GetParameterStrings()));
2761-//
2762-//
2763-// This will also instantiate tests from CharTest
2764-// each with parameter values 'a' and 'b':
2765-//
2766-// ::std::list<char> GetParameterChars() {
2767-// ::std::list<char> list;
2768-// list.push_back('a');
2769-// list.push_back('b');
2770-// return list;
2771-// }
2772-// ::std::list<char> l = GetParameterChars();
2773-// INSTANTIATE_TEST_CASE_P(CharSequence2,
2774-// CharTest,
2775-// ValuesIn(l.begin(), l.end()));
2776-//
2777-template <typename ForwardIterator>
2778-internal::ParamGenerator<
2779- typename ::testing::internal::IteratorTraits<ForwardIterator>::value_type>
2780-ValuesIn(ForwardIterator begin, ForwardIterator end) {
2781- typedef typename ::testing::internal::IteratorTraits<ForwardIterator>
2782- ::value_type ParamType;
2783- return internal::ParamGenerator<ParamType>(
2784- new internal::ValuesInIteratorRangeGenerator<ParamType>(begin, end));
2785-}
2786-
2787-template <typename T, size_t N>
2788-internal::ParamGenerator<T> ValuesIn(const T (&array)[N]) {
2789- return ValuesIn(array, array + N);
2790-}
2791-
2792-template <class Container>
2793-internal::ParamGenerator<typename Container::value_type> ValuesIn(
2794- const Container& container) {
2795- return ValuesIn(container.begin(), container.end());
2796-}
2797-
2798-// Values() allows generating tests from explicitly specified list of
2799-// parameters.
2800-//
2801-// Synopsis:
2802-// Values(T v1, T v2, ..., T vN)
2803-// - returns a generator producing sequences with elements v1, v2, ..., vN.
2804-//
2805-// For example, this instantiates tests from test case BarTest each
2806-// with values "one", "two", and "three":
2807-//
2808-// INSTANTIATE_TEST_CASE_P(NumSequence, BarTest, Values("one", "two", "three"));
2809-//
2810-// This instantiates tests from test case BazTest each with values 1, 2, 3.5.
2811-// The exact type of values will depend on the type of parameter in BazTest.
2812-//
2813-// INSTANTIATE_TEST_CASE_P(FloatingNumbers, BazTest, Values(1, 2, 3.5));
2814-//
2815-// Currently, Values() supports from 1 to 50 parameters.
2816-//
2817-template <typename T1>
2818-internal::ValueArray1<T1> Values(T1 v1) {
2819- return internal::ValueArray1<T1>(v1);
2820-}
2821-
2822-template <typename T1, typename T2>
2823-internal::ValueArray2<T1, T2> Values(T1 v1, T2 v2) {
2824- return internal::ValueArray2<T1, T2>(v1, v2);
2825-}
2826-
2827-template <typename T1, typename T2, typename T3>
2828-internal::ValueArray3<T1, T2, T3> Values(T1 v1, T2 v2, T3 v3) {
2829- return internal::ValueArray3<T1, T2, T3>(v1, v2, v3);
2830-}
2831-
2832-template <typename T1, typename T2, typename T3, typename T4>
2833-internal::ValueArray4<T1, T2, T3, T4> Values(T1 v1, T2 v2, T3 v3, T4 v4) {
2834- return internal::ValueArray4<T1, T2, T3, T4>(v1, v2, v3, v4);
2835-}
2836-
2837-template <typename T1, typename T2, typename T3, typename T4, typename T5>
2838-internal::ValueArray5<T1, T2, T3, T4, T5> Values(T1 v1, T2 v2, T3 v3, T4 v4,
2839- T5 v5) {
2840- return internal::ValueArray5<T1, T2, T3, T4, T5>(v1, v2, v3, v4, v5);
2841-}
2842-
2843-template <typename T1, typename T2, typename T3, typename T4, typename T5,
2844- typename T6>
2845-internal::ValueArray6<T1, T2, T3, T4, T5, T6> Values(T1 v1, T2 v2, T3 v3,
2846- T4 v4, T5 v5, T6 v6) {
2847- return internal::ValueArray6<T1, T2, T3, T4, T5, T6>(v1, v2, v3, v4, v5, v6);
2848-}
2849-
2850-template <typename T1, typename T2, typename T3, typename T4, typename T5,
2851- typename T6, typename T7>
2852-internal::ValueArray7<T1, T2, T3, T4, T5, T6, T7> Values(T1 v1, T2 v2, T3 v3,
2853- T4 v4, T5 v5, T6 v6, T7 v7) {
2854- return internal::ValueArray7<T1, T2, T3, T4, T5, T6, T7>(v1, v2, v3, v4, v5,
2855- v6, v7);
2856-}
2857-
2858-template <typename T1, typename T2, typename T3, typename T4, typename T5,
2859- typename T6, typename T7, typename T8>
2860-internal::ValueArray8<T1, T2, T3, T4, T5, T6, T7, T8> Values(T1 v1, T2 v2,
2861- T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8) {
2862- return internal::ValueArray8<T1, T2, T3, T4, T5, T6, T7, T8>(v1, v2, v3, v4,
2863- v5, v6, v7, v8);
2864-}
2865-
2866-template <typename T1, typename T2, typename T3, typename T4, typename T5,
2867- typename T6, typename T7, typename T8, typename T9>
2868-internal::ValueArray9<T1, T2, T3, T4, T5, T6, T7, T8, T9> Values(T1 v1, T2 v2,
2869- T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9) {
2870- return internal::ValueArray9<T1, T2, T3, T4, T5, T6, T7, T8, T9>(v1, v2, v3,
2871- v4, v5, v6, v7, v8, v9);
2872-}
2873-
2874-template <typename T1, typename T2, typename T3, typename T4, typename T5,
2875- typename T6, typename T7, typename T8, typename T9, typename T10>
2876-internal::ValueArray10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> Values(T1 v1,
2877- T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10) {
2878- return internal::ValueArray10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(v1,
2879- v2, v3, v4, v5, v6, v7, v8, v9, v10);
2880-}
2881-
2882-template <typename T1, typename T2, typename T3, typename T4, typename T5,
2883- typename T6, typename T7, typename T8, typename T9, typename T10,
2884- typename T11>
2885-internal::ValueArray11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10,
2886- T11> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
2887- T10 v10, T11 v11) {
2888- return internal::ValueArray11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10,
2889- T11>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11);
2890-}
2891-
2892-template <typename T1, typename T2, typename T3, typename T4, typename T5,
2893- typename T6, typename T7, typename T8, typename T9, typename T10,
2894- typename T11, typename T12>
2895-internal::ValueArray12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
2896- T12> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
2897- T10 v10, T11 v11, T12 v12) {
2898- return internal::ValueArray12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
2899- T12>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12);
2900-}
2901-
2902-template <typename T1, typename T2, typename T3, typename T4, typename T5,
2903- typename T6, typename T7, typename T8, typename T9, typename T10,
2904- typename T11, typename T12, typename T13>
2905-internal::ValueArray13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
2906- T13> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
2907- T10 v10, T11 v11, T12 v12, T13 v13) {
2908- return internal::ValueArray13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
2909- T12, T13>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13);
2910-}
2911-
2912-template <typename T1, typename T2, typename T3, typename T4, typename T5,
2913- typename T6, typename T7, typename T8, typename T9, typename T10,
2914- typename T11, typename T12, typename T13, typename T14>
2915-internal::ValueArray14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
2916- T14> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
2917- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14) {
2918- return internal::ValueArray14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
2919- T12, T13, T14>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13,
2920- v14);
2921-}
2922-
2923-template <typename T1, typename T2, typename T3, typename T4, typename T5,
2924- typename T6, typename T7, typename T8, typename T9, typename T10,
2925- typename T11, typename T12, typename T13, typename T14, typename T15>
2926-internal::ValueArray15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
2927- T14, T15> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8,
2928- T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15) {
2929- return internal::ValueArray15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
2930- T12, T13, T14, T15>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12,
2931- v13, v14, v15);
2932-}
2933-
2934-template <typename T1, typename T2, typename T3, typename T4, typename T5,
2935- typename T6, typename T7, typename T8, typename T9, typename T10,
2936- typename T11, typename T12, typename T13, typename T14, typename T15,
2937- typename T16>
2938-internal::ValueArray16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
2939- T14, T15, T16> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7,
2940- T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
2941- T16 v16) {
2942- return internal::ValueArray16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
2943- T12, T13, T14, T15, T16>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11,
2944- v12, v13, v14, v15, v16);
2945-}
2946-
2947-template <typename T1, typename T2, typename T3, typename T4, typename T5,
2948- typename T6, typename T7, typename T8, typename T9, typename T10,
2949- typename T11, typename T12, typename T13, typename T14, typename T15,
2950- typename T16, typename T17>
2951-internal::ValueArray17<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
2952- T14, T15, T16, T17> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7,
2953- T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
2954- T16 v16, T17 v17) {
2955- return internal::ValueArray17<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
2956- T12, T13, T14, T15, T16, T17>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10,
2957- v11, v12, v13, v14, v15, v16, v17);
2958-}
2959-
2960-template <typename T1, typename T2, typename T3, typename T4, typename T5,
2961- typename T6, typename T7, typename T8, typename T9, typename T10,
2962- typename T11, typename T12, typename T13, typename T14, typename T15,
2963- typename T16, typename T17, typename T18>
2964-internal::ValueArray18<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
2965- T14, T15, T16, T17, T18> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6,
2966- T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
2967- T16 v16, T17 v17, T18 v18) {
2968- return internal::ValueArray18<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
2969- T12, T13, T14, T15, T16, T17, T18>(v1, v2, v3, v4, v5, v6, v7, v8, v9,
2970- v10, v11, v12, v13, v14, v15, v16, v17, v18);
2971-}
2972-
2973-template <typename T1, typename T2, typename T3, typename T4, typename T5,
2974- typename T6, typename T7, typename T8, typename T9, typename T10,
2975- typename T11, typename T12, typename T13, typename T14, typename T15,
2976- typename T16, typename T17, typename T18, typename T19>
2977-internal::ValueArray19<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
2978- T14, T15, T16, T17, T18, T19> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5,
2979- T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14,
2980- T15 v15, T16 v16, T17 v17, T18 v18, T19 v19) {
2981- return internal::ValueArray19<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
2982- T12, T13, T14, T15, T16, T17, T18, T19>(v1, v2, v3, v4, v5, v6, v7, v8,
2983- v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19);
2984-}
2985-
2986-template <typename T1, typename T2, typename T3, typename T4, typename T5,
2987- typename T6, typename T7, typename T8, typename T9, typename T10,
2988- typename T11, typename T12, typename T13, typename T14, typename T15,
2989- typename T16, typename T17, typename T18, typename T19, typename T20>
2990-internal::ValueArray20<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
2991- T14, T15, T16, T17, T18, T19, T20> Values(T1 v1, T2 v2, T3 v3, T4 v4,
2992- T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13,
2993- T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20) {
2994- return internal::ValueArray20<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
2995- T12, T13, T14, T15, T16, T17, T18, T19, T20>(v1, v2, v3, v4, v5, v6, v7,
2996- v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20);
2997-}
2998-
2999-template <typename T1, typename T2, typename T3, typename T4, typename T5,
3000- typename T6, typename T7, typename T8, typename T9, typename T10,
3001- typename T11, typename T12, typename T13, typename T14, typename T15,
3002- typename T16, typename T17, typename T18, typename T19, typename T20,
3003- typename T21>
3004-internal::ValueArray21<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
3005- T14, T15, T16, T17, T18, T19, T20, T21> Values(T1 v1, T2 v2, T3 v3, T4 v4,
3006- T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13,
3007- T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21) {
3008- return internal::ValueArray21<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
3009- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21>(v1, v2, v3, v4, v5, v6,
3010- v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21);
3011-}
3012-
3013-template <typename T1, typename T2, typename T3, typename T4, typename T5,
3014- typename T6, typename T7, typename T8, typename T9, typename T10,
3015- typename T11, typename T12, typename T13, typename T14, typename T15,
3016- typename T16, typename T17, typename T18, typename T19, typename T20,
3017- typename T21, typename T22>
3018-internal::ValueArray22<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
3019- T14, T15, T16, T17, T18, T19, T20, T21, T22> Values(T1 v1, T2 v2, T3 v3,
3020- T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12,
3021- T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20,
3022- T21 v21, T22 v22) {
3023- return internal::ValueArray22<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
3024- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22>(v1, v2, v3, v4,
3025- v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19,
3026- v20, v21, v22);
3027-}
3028-
3029-template <typename T1, typename T2, typename T3, typename T4, typename T5,
3030- typename T6, typename T7, typename T8, typename T9, typename T10,
3031- typename T11, typename T12, typename T13, typename T14, typename T15,
3032- typename T16, typename T17, typename T18, typename T19, typename T20,
3033- typename T21, typename T22, typename T23>
3034-internal::ValueArray23<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
3035- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23> Values(T1 v1, T2 v2,
3036- T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12,
3037- T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20,
3038- T21 v21, T22 v22, T23 v23) {
3039- return internal::ValueArray23<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
3040- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23>(v1, v2, v3,
3041- v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19,
3042- v20, v21, v22, v23);
3043-}
3044-
3045-template <typename T1, typename T2, typename T3, typename T4, typename T5,
3046- typename T6, typename T7, typename T8, typename T9, typename T10,
3047- typename T11, typename T12, typename T13, typename T14, typename T15,
3048- typename T16, typename T17, typename T18, typename T19, typename T20,
3049- typename T21, typename T22, typename T23, typename T24>
3050-internal::ValueArray24<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
3051- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24> Values(T1 v1, T2 v2,
3052- T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12,
3053- T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20,
3054- T21 v21, T22 v22, T23 v23, T24 v24) {
3055- return internal::ValueArray24<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
3056- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24>(v1, v2,
3057- v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18,
3058- v19, v20, v21, v22, v23, v24);
3059-}
3060-
3061-template <typename T1, typename T2, typename T3, typename T4, typename T5,
3062- typename T6, typename T7, typename T8, typename T9, typename T10,
3063- typename T11, typename T12, typename T13, typename T14, typename T15,
3064- typename T16, typename T17, typename T18, typename T19, typename T20,
3065- typename T21, typename T22, typename T23, typename T24, typename T25>
3066-internal::ValueArray25<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
3067- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25> Values(T1 v1,
3068- T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11,
3069- T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19,
3070- T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25) {
3071- return internal::ValueArray25<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
3072- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25>(v1,
3073- v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17,
3074- v18, v19, v20, v21, v22, v23, v24, v25);
3075-}
3076-
3077-template <typename T1, typename T2, typename T3, typename T4, typename T5,
3078- typename T6, typename T7, typename T8, typename T9, typename T10,
3079- typename T11, typename T12, typename T13, typename T14, typename T15,
3080- typename T16, typename T17, typename T18, typename T19, typename T20,
3081- typename T21, typename T22, typename T23, typename T24, typename T25,
3082- typename T26>
3083-internal::ValueArray26<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
3084- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
3085- T26> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
3086- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
3087- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
3088- T26 v26) {
3089- return internal::ValueArray26<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
3090- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
3091- T26>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15,
3092- v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26);
3093-}
3094-
3095-template <typename T1, typename T2, typename T3, typename T4, typename T5,
3096- typename T6, typename T7, typename T8, typename T9, typename T10,
3097- typename T11, typename T12, typename T13, typename T14, typename T15,
3098- typename T16, typename T17, typename T18, typename T19, typename T20,
3099- typename T21, typename T22, typename T23, typename T24, typename T25,
3100- typename T26, typename T27>
3101-internal::ValueArray27<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
3102- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
3103- T27> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
3104- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
3105- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
3106- T26 v26, T27 v27) {
3107- return internal::ValueArray27<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
3108- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
3109- T26, T27>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14,
3110- v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27);
3111-}
3112-
3113-template <typename T1, typename T2, typename T3, typename T4, typename T5,
3114- typename T6, typename T7, typename T8, typename T9, typename T10,
3115- typename T11, typename T12, typename T13, typename T14, typename T15,
3116- typename T16, typename T17, typename T18, typename T19, typename T20,
3117- typename T21, typename T22, typename T23, typename T24, typename T25,
3118- typename T26, typename T27, typename T28>
3119-internal::ValueArray28<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
3120- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
3121- T28> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
3122- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
3123- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
3124- T26 v26, T27 v27, T28 v28) {
3125- return internal::ValueArray28<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
3126- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
3127- T26, T27, T28>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13,
3128- v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27,
3129- v28);
3130-}
3131-
3132-template <typename T1, typename T2, typename T3, typename T4, typename T5,
3133- typename T6, typename T7, typename T8, typename T9, typename T10,
3134- typename T11, typename T12, typename T13, typename T14, typename T15,
3135- typename T16, typename T17, typename T18, typename T19, typename T20,
3136- typename T21, typename T22, typename T23, typename T24, typename T25,
3137- typename T26, typename T27, typename T28, typename T29>
3138-internal::ValueArray29<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
3139- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
3140- T29> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
3141- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
3142- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
3143- T26 v26, T27 v27, T28 v28, T29 v29) {
3144- return internal::ValueArray29<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
3145- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
3146- T26, T27, T28, T29>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12,
3147- v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26,
3148- v27, v28, v29);
3149-}
3150-
3151-template <typename T1, typename T2, typename T3, typename T4, typename T5,
3152- typename T6, typename T7, typename T8, typename T9, typename T10,
3153- typename T11, typename T12, typename T13, typename T14, typename T15,
3154- typename T16, typename T17, typename T18, typename T19, typename T20,
3155- typename T21, typename T22, typename T23, typename T24, typename T25,
3156- typename T26, typename T27, typename T28, typename T29, typename T30>
3157-internal::ValueArray30<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
3158- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
3159- T29, T30> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8,
3160- T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16,
3161- T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24,
3162- T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30) {
3163- return internal::ValueArray30<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
3164- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
3165- T26, T27, T28, T29, T30>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11,
3166- v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25,
3167- v26, v27, v28, v29, v30);
3168-}
3169-
3170-template <typename T1, typename T2, typename T3, typename T4, typename T5,
3171- typename T6, typename T7, typename T8, typename T9, typename T10,
3172- typename T11, typename T12, typename T13, typename T14, typename T15,
3173- typename T16, typename T17, typename T18, typename T19, typename T20,
3174- typename T21, typename T22, typename T23, typename T24, typename T25,
3175- typename T26, typename T27, typename T28, typename T29, typename T30,
3176- typename T31>
3177-internal::ValueArray31<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
3178- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
3179- T29, T30, T31> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7,
3180- T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
3181- T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23,
3182- T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31) {
3183- return internal::ValueArray31<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
3184- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
3185- T26, T27, T28, T29, T30, T31>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10,
3186- v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24,
3187- v25, v26, v27, v28, v29, v30, v31);
3188-}
3189-
3190-template <typename T1, typename T2, typename T3, typename T4, typename T5,
3191- typename T6, typename T7, typename T8, typename T9, typename T10,
3192- typename T11, typename T12, typename T13, typename T14, typename T15,
3193- typename T16, typename T17, typename T18, typename T19, typename T20,
3194- typename T21, typename T22, typename T23, typename T24, typename T25,
3195- typename T26, typename T27, typename T28, typename T29, typename T30,
3196- typename T31, typename T32>
3197-internal::ValueArray32<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
3198- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
3199- T29, T30, T31, T32> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7,
3200- T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
3201- T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23,
3202- T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31,
3203- T32 v32) {
3204- return internal::ValueArray32<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
3205- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
3206- T26, T27, T28, T29, T30, T31, T32>(v1, v2, v3, v4, v5, v6, v7, v8, v9,
3207- v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23,
3208- v24, v25, v26, v27, v28, v29, v30, v31, v32);
3209-}
3210-
3211-template <typename T1, typename T2, typename T3, typename T4, typename T5,
3212- typename T6, typename T7, typename T8, typename T9, typename T10,
3213- typename T11, typename T12, typename T13, typename T14, typename T15,
3214- typename T16, typename T17, typename T18, typename T19, typename T20,
3215- typename T21, typename T22, typename T23, typename T24, typename T25,
3216- typename T26, typename T27, typename T28, typename T29, typename T30,
3217- typename T31, typename T32, typename T33>
3218-internal::ValueArray33<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
3219- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
3220- T29, T30, T31, T32, T33> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6,
3221- T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
3222- T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23,
3223- T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31,
3224- T32 v32, T33 v33) {
3225- return internal::ValueArray33<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
3226- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
3227- T26, T27, T28, T29, T30, T31, T32, T33>(v1, v2, v3, v4, v5, v6, v7, v8,
3228- v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23,
3229- v24, v25, v26, v27, v28, v29, v30, v31, v32, v33);
3230-}
3231-
3232-template <typename T1, typename T2, typename T3, typename T4, typename T5,
3233- typename T6, typename T7, typename T8, typename T9, typename T10,
3234- typename T11, typename T12, typename T13, typename T14, typename T15,
3235- typename T16, typename T17, typename T18, typename T19, typename T20,
3236- typename T21, typename T22, typename T23, typename T24, typename T25,
3237- typename T26, typename T27, typename T28, typename T29, typename T30,
3238- typename T31, typename T32, typename T33, typename T34>
3239-internal::ValueArray34<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
3240- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
3241- T29, T30, T31, T32, T33, T34> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5,
3242- T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14,
3243- T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22,
3244- T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30,
3245- T31 v31, T32 v32, T33 v33, T34 v34) {
3246- return internal::ValueArray34<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
3247- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
3248- T26, T27, T28, T29, T30, T31, T32, T33, T34>(v1, v2, v3, v4, v5, v6, v7,
3249- v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22,
3250- v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34);
3251-}
3252-
3253-template <typename T1, typename T2, typename T3, typename T4, typename T5,
3254- typename T6, typename T7, typename T8, typename T9, typename T10,
3255- typename T11, typename T12, typename T13, typename T14, typename T15,
3256- typename T16, typename T17, typename T18, typename T19, typename T20,
3257- typename T21, typename T22, typename T23, typename T24, typename T25,
3258- typename T26, typename T27, typename T28, typename T29, typename T30,
3259- typename T31, typename T32, typename T33, typename T34, typename T35>
3260-internal::ValueArray35<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
3261- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
3262- T29, T30, T31, T32, T33, T34, T35> Values(T1 v1, T2 v2, T3 v3, T4 v4,
3263- T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13,
3264- T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21,
3265- T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29,
3266- T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35) {
3267- return internal::ValueArray35<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
3268- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
3269- T26, T27, T28, T29, T30, T31, T32, T33, T34, T35>(v1, v2, v3, v4, v5, v6,
3270- v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21,
3271- v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35);
3272-}
3273-
3274-template <typename T1, typename T2, typename T3, typename T4, typename T5,
3275- typename T6, typename T7, typename T8, typename T9, typename T10,
3276- typename T11, typename T12, typename T13, typename T14, typename T15,
3277- typename T16, typename T17, typename T18, typename T19, typename T20,
3278- typename T21, typename T22, typename T23, typename T24, typename T25,
3279- typename T26, typename T27, typename T28, typename T29, typename T30,
3280- typename T31, typename T32, typename T33, typename T34, typename T35,
3281- typename T36>
3282-internal::ValueArray36<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
3283- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
3284- T29, T30, T31, T32, T33, T34, T35, T36> Values(T1 v1, T2 v2, T3 v3, T4 v4,
3285- T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13,
3286- T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21,
3287- T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29,
3288- T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36) {
3289- return internal::ValueArray36<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
3290- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
3291- T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36>(v1, v2, v3, v4,
3292- v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19,
3293- v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33,
3294- v34, v35, v36);
3295-}
3296-
3297-template <typename T1, typename T2, typename T3, typename T4, typename T5,
3298- typename T6, typename T7, typename T8, typename T9, typename T10,
3299- typename T11, typename T12, typename T13, typename T14, typename T15,
3300- typename T16, typename T17, typename T18, typename T19, typename T20,
3301- typename T21, typename T22, typename T23, typename T24, typename T25,
3302- typename T26, typename T27, typename T28, typename T29, typename T30,
3303- typename T31, typename T32, typename T33, typename T34, typename T35,
3304- typename T36, typename T37>
3305-internal::ValueArray37<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
3306- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
3307- T29, T30, T31, T32, T33, T34, T35, T36, T37> Values(T1 v1, T2 v2, T3 v3,
3308- T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12,
3309- T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20,
3310- T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28,
3311- T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36,
3312- T37 v37) {
3313- return internal::ValueArray37<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
3314- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
3315- T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37>(v1, v2, v3,
3316- v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19,
3317- v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33,
3318- v34, v35, v36, v37);
3319-}
3320-
3321-template <typename T1, typename T2, typename T3, typename T4, typename T5,
3322- typename T6, typename T7, typename T8, typename T9, typename T10,
3323- typename T11, typename T12, typename T13, typename T14, typename T15,
3324- typename T16, typename T17, typename T18, typename T19, typename T20,
3325- typename T21, typename T22, typename T23, typename T24, typename T25,
3326- typename T26, typename T27, typename T28, typename T29, typename T30,
3327- typename T31, typename T32, typename T33, typename T34, typename T35,
3328- typename T36, typename T37, typename T38>
3329-internal::ValueArray38<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
3330- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
3331- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38> Values(T1 v1, T2 v2,
3332- T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12,
3333- T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20,
3334- T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28,
3335- T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36,
3336- T37 v37, T38 v38) {
3337- return internal::ValueArray38<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
3338- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
3339- T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38>(v1, v2,
3340- v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18,
3341- v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32,
3342- v33, v34, v35, v36, v37, v38);
3343-}
3344-
3345-template <typename T1, typename T2, typename T3, typename T4, typename T5,
3346- typename T6, typename T7, typename T8, typename T9, typename T10,
3347- typename T11, typename T12, typename T13, typename T14, typename T15,
3348- typename T16, typename T17, typename T18, typename T19, typename T20,
3349- typename T21, typename T22, typename T23, typename T24, typename T25,
3350- typename T26, typename T27, typename T28, typename T29, typename T30,
3351- typename T31, typename T32, typename T33, typename T34, typename T35,
3352- typename T36, typename T37, typename T38, typename T39>
3353-internal::ValueArray39<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
3354- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
3355- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39> Values(T1 v1, T2 v2,
3356- T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12,
3357- T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20,
3358- T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28,
3359- T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36,
3360- T37 v37, T38 v38, T39 v39) {
3361- return internal::ValueArray39<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
3362- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
3363- T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39>(v1,
3364- v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17,
3365- v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31,
3366- v32, v33, v34, v35, v36, v37, v38, v39);
3367-}
3368-
3369-template <typename T1, typename T2, typename T3, typename T4, typename T5,
3370- typename T6, typename T7, typename T8, typename T9, typename T10,
3371- typename T11, typename T12, typename T13, typename T14, typename T15,
3372- typename T16, typename T17, typename T18, typename T19, typename T20,
3373- typename T21, typename T22, typename T23, typename T24, typename T25,
3374- typename T26, typename T27, typename T28, typename T29, typename T30,
3375- typename T31, typename T32, typename T33, typename T34, typename T35,
3376- typename T36, typename T37, typename T38, typename T39, typename T40>
3377-internal::ValueArray40<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
3378- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
3379- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40> Values(T1 v1,
3380- T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11,
3381- T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19,
3382- T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27,
3383- T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35,
3384- T36 v36, T37 v37, T38 v38, T39 v39, T40 v40) {
3385- return internal::ValueArray40<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
3386- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
3387- T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
3388- T40>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15,
3389- v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29,
3390- v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40);
3391-}
3392-
3393-template <typename T1, typename T2, typename T3, typename T4, typename T5,
3394- typename T6, typename T7, typename T8, typename T9, typename T10,
3395- typename T11, typename T12, typename T13, typename T14, typename T15,
3396- typename T16, typename T17, typename T18, typename T19, typename T20,
3397- typename T21, typename T22, typename T23, typename T24, typename T25,
3398- typename T26, typename T27, typename T28, typename T29, typename T30,
3399- typename T31, typename T32, typename T33, typename T34, typename T35,
3400- typename T36, typename T37, typename T38, typename T39, typename T40,
3401- typename T41>
3402-internal::ValueArray41<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
3403- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
3404- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
3405- T41> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
3406- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
3407- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
3408- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
3409- T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41) {
3410- return internal::ValueArray41<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
3411- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
3412- T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
3413- T40, T41>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14,
3414- v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28,
3415- v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41);
3416-}
3417-
3418-template <typename T1, typename T2, typename T3, typename T4, typename T5,
3419- typename T6, typename T7, typename T8, typename T9, typename T10,
3420- typename T11, typename T12, typename T13, typename T14, typename T15,
3421- typename T16, typename T17, typename T18, typename T19, typename T20,
3422- typename T21, typename T22, typename T23, typename T24, typename T25,
3423- typename T26, typename T27, typename T28, typename T29, typename T30,
3424- typename T31, typename T32, typename T33, typename T34, typename T35,
3425- typename T36, typename T37, typename T38, typename T39, typename T40,
3426- typename T41, typename T42>
3427-internal::ValueArray42<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
3428- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
3429- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,
3430- T42> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
3431- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
3432- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
3433- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
3434- T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
3435- T42 v42) {
3436- return internal::ValueArray42<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
3437- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
3438- T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
3439- T40, T41, T42>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13,
3440- v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27,
3441- v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41,
3442- v42);
3443-}
3444-
3445-template <typename T1, typename T2, typename T3, typename T4, typename T5,
3446- typename T6, typename T7, typename T8, typename T9, typename T10,
3447- typename T11, typename T12, typename T13, typename T14, typename T15,
3448- typename T16, typename T17, typename T18, typename T19, typename T20,
3449- typename T21, typename T22, typename T23, typename T24, typename T25,
3450- typename T26, typename T27, typename T28, typename T29, typename T30,
3451- typename T31, typename T32, typename T33, typename T34, typename T35,
3452- typename T36, typename T37, typename T38, typename T39, typename T40,
3453- typename T41, typename T42, typename T43>
3454-internal::ValueArray43<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
3455- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
3456- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,
3457- T43> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
3458- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
3459- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
3460- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
3461- T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
3462- T42 v42, T43 v43) {
3463- return internal::ValueArray43<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
3464- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
3465- T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
3466- T40, T41, T42, T43>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12,
3467- v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26,
3468- v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40,
3469- v41, v42, v43);
3470-}
3471-
3472-template <typename T1, typename T2, typename T3, typename T4, typename T5,
3473- typename T6, typename T7, typename T8, typename T9, typename T10,
3474- typename T11, typename T12, typename T13, typename T14, typename T15,
3475- typename T16, typename T17, typename T18, typename T19, typename T20,
3476- typename T21, typename T22, typename T23, typename T24, typename T25,
3477- typename T26, typename T27, typename T28, typename T29, typename T30,
3478- typename T31, typename T32, typename T33, typename T34, typename T35,
3479- typename T36, typename T37, typename T38, typename T39, typename T40,
3480- typename T41, typename T42, typename T43, typename T44>
3481-internal::ValueArray44<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
3482- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
3483- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
3484- T44> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
3485- T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
3486- T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
3487- T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
3488- T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
3489- T42 v42, T43 v43, T44 v44) {
3490- return internal::ValueArray44<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
3491- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
3492- T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
3493- T40, T41, T42, T43, T44>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11,
3494- v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25,
3495- v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39,
3496- v40, v41, v42, v43, v44);
3497-}
3498-
3499-template <typename T1, typename T2, typename T3, typename T4, typename T5,
3500- typename T6, typename T7, typename T8, typename T9, typename T10,
3501- typename T11, typename T12, typename T13, typename T14, typename T15,
3502- typename T16, typename T17, typename T18, typename T19, typename T20,
3503- typename T21, typename T22, typename T23, typename T24, typename T25,
3504- typename T26, typename T27, typename T28, typename T29, typename T30,
3505- typename T31, typename T32, typename T33, typename T34, typename T35,
3506- typename T36, typename T37, typename T38, typename T39, typename T40,
3507- typename T41, typename T42, typename T43, typename T44, typename T45>
3508-internal::ValueArray45<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
3509- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
3510- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
3511- T44, T45> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8,
3512- T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16,
3513- T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24,
3514- T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32,
3515- T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40,
3516- T41 v41, T42 v42, T43 v43, T44 v44, T45 v45) {
3517- return internal::ValueArray45<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
3518- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
3519- T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
3520- T40, T41, T42, T43, T44, T45>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10,
3521- v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24,
3522- v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38,
3523- v39, v40, v41, v42, v43, v44, v45);
3524-}
3525-
3526-template <typename T1, typename T2, typename T3, typename T4, typename T5,
3527- typename T6, typename T7, typename T8, typename T9, typename T10,
3528- typename T11, typename T12, typename T13, typename T14, typename T15,
3529- typename T16, typename T17, typename T18, typename T19, typename T20,
3530- typename T21, typename T22, typename T23, typename T24, typename T25,
3531- typename T26, typename T27, typename T28, typename T29, typename T30,
3532- typename T31, typename T32, typename T33, typename T34, typename T35,
3533- typename T36, typename T37, typename T38, typename T39, typename T40,
3534- typename T41, typename T42, typename T43, typename T44, typename T45,
3535- typename T46>
3536-internal::ValueArray46<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
3537- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
3538- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
3539- T44, T45, T46> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7,
3540- T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
3541- T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23,
3542- T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31,
3543- T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39,
3544- T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45, T46 v46) {
3545- return internal::ValueArray46<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
3546- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
3547- T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
3548- T40, T41, T42, T43, T44, T45, T46>(v1, v2, v3, v4, v5, v6, v7, v8, v9,
3549- v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23,
3550- v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37,
3551- v38, v39, v40, v41, v42, v43, v44, v45, v46);
3552-}
3553-
3554-template <typename T1, typename T2, typename T3, typename T4, typename T5,
3555- typename T6, typename T7, typename T8, typename T9, typename T10,
3556- typename T11, typename T12, typename T13, typename T14, typename T15,
3557- typename T16, typename T17, typename T18, typename T19, typename T20,
3558- typename T21, typename T22, typename T23, typename T24, typename T25,
3559- typename T26, typename T27, typename T28, typename T29, typename T30,
3560- typename T31, typename T32, typename T33, typename T34, typename T35,
3561- typename T36, typename T37, typename T38, typename T39, typename T40,
3562- typename T41, typename T42, typename T43, typename T44, typename T45,
3563- typename T46, typename T47>
3564-internal::ValueArray47<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
3565- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
3566- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
3567- T44, T45, T46, T47> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7,
3568- T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
3569- T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23,
3570- T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31,
3571- T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39,
3572- T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47) {
3573- return internal::ValueArray47<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
3574- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
3575- T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
3576- T40, T41, T42, T43, T44, T45, T46, T47>(v1, v2, v3, v4, v5, v6, v7, v8,
3577- v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23,
3578- v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37,
3579- v38, v39, v40, v41, v42, v43, v44, v45, v46, v47);
3580-}
3581-
3582-template <typename T1, typename T2, typename T3, typename T4, typename T5,
3583- typename T6, typename T7, typename T8, typename T9, typename T10,
3584- typename T11, typename T12, typename T13, typename T14, typename T15,
3585- typename T16, typename T17, typename T18, typename T19, typename T20,
3586- typename T21, typename T22, typename T23, typename T24, typename T25,
3587- typename T26, typename T27, typename T28, typename T29, typename T30,
3588- typename T31, typename T32, typename T33, typename T34, typename T35,
3589- typename T36, typename T37, typename T38, typename T39, typename T40,
3590- typename T41, typename T42, typename T43, typename T44, typename T45,
3591- typename T46, typename T47, typename T48>
3592-internal::ValueArray48<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
3593- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
3594- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
3595- T44, T45, T46, T47, T48> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6,
3596- T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
3597- T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23,
3598- T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31,
3599- T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39,
3600- T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47,
3601- T48 v48) {
3602- return internal::ValueArray48<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
3603- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
3604- T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
3605- T40, T41, T42, T43, T44, T45, T46, T47, T48>(v1, v2, v3, v4, v5, v6, v7,
3606- v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22,
3607- v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36,
3608- v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48);
3609-}
3610-
3611-template <typename T1, typename T2, typename T3, typename T4, typename T5,
3612- typename T6, typename T7, typename T8, typename T9, typename T10,
3613- typename T11, typename T12, typename T13, typename T14, typename T15,
3614- typename T16, typename T17, typename T18, typename T19, typename T20,
3615- typename T21, typename T22, typename T23, typename T24, typename T25,
3616- typename T26, typename T27, typename T28, typename T29, typename T30,
3617- typename T31, typename T32, typename T33, typename T34, typename T35,
3618- typename T36, typename T37, typename T38, typename T39, typename T40,
3619- typename T41, typename T42, typename T43, typename T44, typename T45,
3620- typename T46, typename T47, typename T48, typename T49>
3621-internal::ValueArray49<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
3622- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
3623- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
3624- T44, T45, T46, T47, T48, T49> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5,
3625- T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14,
3626- T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22,
3627- T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30,
3628- T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38,
3629- T39 v39, T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45, T46 v46,
3630- T47 v47, T48 v48, T49 v49) {
3631- return internal::ValueArray49<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
3632- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
3633- T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
3634- T40, T41, T42, T43, T44, T45, T46, T47, T48, T49>(v1, v2, v3, v4, v5, v6,
3635- v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21,
3636- v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35,
3637- v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49);
3638-}
3639-
3640-template <typename T1, typename T2, typename T3, typename T4, typename T5,
3641- typename T6, typename T7, typename T8, typename T9, typename T10,
3642- typename T11, typename T12, typename T13, typename T14, typename T15,
3643- typename T16, typename T17, typename T18, typename T19, typename T20,
3644- typename T21, typename T22, typename T23, typename T24, typename T25,
3645- typename T26, typename T27, typename T28, typename T29, typename T30,
3646- typename T31, typename T32, typename T33, typename T34, typename T35,
3647- typename T36, typename T37, typename T38, typename T39, typename T40,
3648- typename T41, typename T42, typename T43, typename T44, typename T45,
3649- typename T46, typename T47, typename T48, typename T49, typename T50>
3650-internal::ValueArray50<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
3651- T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
3652- T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
3653- T44, T45, T46, T47, T48, T49, T50> Values(T1 v1, T2 v2, T3 v3, T4 v4,
3654- T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13,
3655- T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21,
3656- T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29,
3657- T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37,
3658- T38 v38, T39 v39, T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45,
3659- T46 v46, T47 v47, T48 v48, T49 v49, T50 v50) {
3660- return internal::ValueArray50<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
3661- T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
3662- T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
3663- T40, T41, T42, T43, T44, T45, T46, T47, T48, T49, T50>(v1, v2, v3, v4,
3664- v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19,
3665- v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33,
3666- v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47,
3667- v48, v49, v50);
3668-}
3669-
3670-// Bool() allows generating tests with parameters in a set of (false, true).
3671-//
3672-// Synopsis:
3673-// Bool()
3674-// - returns a generator producing sequences with elements {false, true}.
3675-//
3676-// It is useful when testing code that depends on Boolean flags. Combinations
3677-// of multiple flags can be tested when several Bool()'s are combined using
3678-// Combine() function.
3679-//
3680-// In the following example all tests in the test case FlagDependentTest
3681-// will be instantiated twice with parameters false and true.
3682-//
3683-// class FlagDependentTest : public testing::TestWithParam<bool> {
3684-// virtual void SetUp() {
3685-// external_flag = GetParam();
3686-// }
3687-// }
3688-// INSTANTIATE_TEST_CASE_P(BoolSequence, FlagDependentTest, Bool());
3689-//
3690-inline internal::ParamGenerator<bool> Bool() {
3691- return Values(false, true);
3692-}
3693-
3694-# if GTEST_HAS_COMBINE
3695-// Combine() allows the user to combine two or more sequences to produce
3696-// values of a Cartesian product of those sequences' elements.
3697-//
3698-// Synopsis:
3699-// Combine(gen1, gen2, ..., genN)
3700-// - returns a generator producing sequences with elements coming from
3701-// the Cartesian product of elements from the sequences generated by
3702-// gen1, gen2, ..., genN. The sequence elements will have a type of
3703-// tuple<T1, T2, ..., TN> where T1, T2, ..., TN are the types
3704-// of elements from sequences produces by gen1, gen2, ..., genN.
3705-//
3706-// Combine can have up to 10 arguments. This number is currently limited
3707-// by the maximum number of elements in the tuple implementation used by Google
3708-// Test.
3709-//
3710-// Example:
3711-//
3712-// This will instantiate tests in test case AnimalTest each one with
3713-// the parameter values tuple("cat", BLACK), tuple("cat", WHITE),
3714-// tuple("dog", BLACK), and tuple("dog", WHITE):
3715-//
3716-// enum Color { BLACK, GRAY, WHITE };
3717-// class AnimalTest
3718-// : public testing::TestWithParam<tuple<const char*, Color> > {...};
3719-//
3720-// TEST_P(AnimalTest, AnimalLooksNice) {...}
3721-//
3722-// INSTANTIATE_TEST_CASE_P(AnimalVariations, AnimalTest,
3723-// Combine(Values("cat", "dog"),
3724-// Values(BLACK, WHITE)));
3725-//
3726-// This will instantiate tests in FlagDependentTest with all variations of two
3727-// Boolean flags:
3728-//
3729-// class FlagDependentTest
3730-// : public testing::TestWithParam<tuple<bool, bool> > {
3731-// virtual void SetUp() {
3732-// // Assigns external_flag_1 and external_flag_2 values from the tuple.
3733-// tie(external_flag_1, external_flag_2) = GetParam();
3734-// }
3735-// };
3736-//
3737-// TEST_P(FlagDependentTest, TestFeature1) {
3738-// // Test your code using external_flag_1 and external_flag_2 here.
3739-// }
3740-// INSTANTIATE_TEST_CASE_P(TwoBoolSequence, FlagDependentTest,
3741-// Combine(Bool(), Bool()));
3742-//
3743-template <typename Generator1, typename Generator2>
3744-internal::CartesianProductHolder2<Generator1, Generator2> Combine(
3745- const Generator1& g1, const Generator2& g2) {
3746- return internal::CartesianProductHolder2<Generator1, Generator2>(
3747- g1, g2);
3748-}
3749-
3750-template <typename Generator1, typename Generator2, typename Generator3>
3751-internal::CartesianProductHolder3<Generator1, Generator2, Generator3> Combine(
3752- const Generator1& g1, const Generator2& g2, const Generator3& g3) {
3753- return internal::CartesianProductHolder3<Generator1, Generator2, Generator3>(
3754- g1, g2, g3);
3755-}
3756-
3757-template <typename Generator1, typename Generator2, typename Generator3,
3758- typename Generator4>
3759-internal::CartesianProductHolder4<Generator1, Generator2, Generator3,
3760- Generator4> Combine(
3761- const Generator1& g1, const Generator2& g2, const Generator3& g3,
3762- const Generator4& g4) {
3763- return internal::CartesianProductHolder4<Generator1, Generator2, Generator3,
3764- Generator4>(
3765- g1, g2, g3, g4);
3766-}
3767-
3768-template <typename Generator1, typename Generator2, typename Generator3,
3769- typename Generator4, typename Generator5>
3770-internal::CartesianProductHolder5<Generator1, Generator2, Generator3,
3771- Generator4, Generator5> Combine(
3772- const Generator1& g1, const Generator2& g2, const Generator3& g3,
3773- const Generator4& g4, const Generator5& g5) {
3774- return internal::CartesianProductHolder5<Generator1, Generator2, Generator3,
3775- Generator4, Generator5>(
3776- g1, g2, g3, g4, g5);
3777-}
3778-
3779-template <typename Generator1, typename Generator2, typename Generator3,
3780- typename Generator4, typename Generator5, typename Generator6>
3781-internal::CartesianProductHolder6<Generator1, Generator2, Generator3,
3782- Generator4, Generator5, Generator6> Combine(
3783- const Generator1& g1, const Generator2& g2, const Generator3& g3,
3784- const Generator4& g4, const Generator5& g5, const Generator6& g6) {
3785- return internal::CartesianProductHolder6<Generator1, Generator2, Generator3,
3786- Generator4, Generator5, Generator6>(
3787- g1, g2, g3, g4, g5, g6);
3788-}
3789-
3790-template <typename Generator1, typename Generator2, typename Generator3,
3791- typename Generator4, typename Generator5, typename Generator6,
3792- typename Generator7>
3793-internal::CartesianProductHolder7<Generator1, Generator2, Generator3,
3794- Generator4, Generator5, Generator6, Generator7> Combine(
3795- const Generator1& g1, const Generator2& g2, const Generator3& g3,
3796- const Generator4& g4, const Generator5& g5, const Generator6& g6,
3797- const Generator7& g7) {
3798- return internal::CartesianProductHolder7<Generator1, Generator2, Generator3,
3799- Generator4, Generator5, Generator6, Generator7>(
3800- g1, g2, g3, g4, g5, g6, g7);
3801-}
3802-
3803-template <typename Generator1, typename Generator2, typename Generator3,
3804- typename Generator4, typename Generator5, typename Generator6,
3805- typename Generator7, typename Generator8>
3806-internal::CartesianProductHolder8<Generator1, Generator2, Generator3,
3807- Generator4, Generator5, Generator6, Generator7, Generator8> Combine(
3808- const Generator1& g1, const Generator2& g2, const Generator3& g3,
3809- const Generator4& g4, const Generator5& g5, const Generator6& g6,
3810- const Generator7& g7, const Generator8& g8) {
3811- return internal::CartesianProductHolder8<Generator1, Generator2, Generator3,
3812- Generator4, Generator5, Generator6, Generator7, Generator8>(
3813- g1, g2, g3, g4, g5, g6, g7, g8);
3814-}
3815-
3816-template <typename Generator1, typename Generator2, typename Generator3,
3817- typename Generator4, typename Generator5, typename Generator6,
3818- typename Generator7, typename Generator8, typename Generator9>
3819-internal::CartesianProductHolder9<Generator1, Generator2, Generator3,
3820- Generator4, Generator5, Generator6, Generator7, Generator8,
3821- Generator9> Combine(
3822- const Generator1& g1, const Generator2& g2, const Generator3& g3,
3823- const Generator4& g4, const Generator5& g5, const Generator6& g6,
3824- const Generator7& g7, const Generator8& g8, const Generator9& g9) {
3825- return internal::CartesianProductHolder9<Generator1, Generator2, Generator3,
3826- Generator4, Generator5, Generator6, Generator7, Generator8, Generator9>(
3827- g1, g2, g3, g4, g5, g6, g7, g8, g9);
3828-}
3829-
3830-template <typename Generator1, typename Generator2, typename Generator3,
3831- typename Generator4, typename Generator5, typename Generator6,
3832- typename Generator7, typename Generator8, typename Generator9,
3833- typename Generator10>
3834-internal::CartesianProductHolder10<Generator1, Generator2, Generator3,
3835- Generator4, Generator5, Generator6, Generator7, Generator8, Generator9,
3836- Generator10> Combine(
3837- const Generator1& g1, const Generator2& g2, const Generator3& g3,
3838- const Generator4& g4, const Generator5& g5, const Generator6& g6,
3839- const Generator7& g7, const Generator8& g8, const Generator9& g9,
3840- const Generator10& g10) {
3841- return internal::CartesianProductHolder10<Generator1, Generator2, Generator3,
3842- Generator4, Generator5, Generator6, Generator7, Generator8, Generator9,
3843- Generator10>(
3844- g1, g2, g3, g4, g5, g6, g7, g8, g9, g10);
3845-}
3846-# endif // GTEST_HAS_COMBINE
3847-
3848-
3849-
3850-# define TEST_P(test_case_name, test_name) \
3851- class GTEST_TEST_CLASS_NAME_(test_case_name, test_name) \
3852- : public test_case_name { \
3853- public: \
3854- GTEST_TEST_CLASS_NAME_(test_case_name, test_name)() {} \
3855- virtual void TestBody(); \
3856- private: \
3857- static int AddToRegistry() { \
3858- ::testing::UnitTest::GetInstance()->parameterized_test_registry(). \
3859- GetTestCasePatternHolder<test_case_name>(\
3860- #test_case_name, __FILE__, __LINE__)->AddTestPattern(\
3861- #test_case_name, \
3862- #test_name, \
3863- new ::testing::internal::TestMetaFactory< \
3864- GTEST_TEST_CLASS_NAME_(test_case_name, test_name)>()); \
3865- return 0; \
3866- } \
3867- static int gtest_registering_dummy_; \
3868- GTEST_DISALLOW_COPY_AND_ASSIGN_(\
3869- GTEST_TEST_CLASS_NAME_(test_case_name, test_name)); \
3870- }; \
3871- int GTEST_TEST_CLASS_NAME_(test_case_name, \
3872- test_name)::gtest_registering_dummy_ = \
3873- GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::AddToRegistry(); \
3874- void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::TestBody()
3875-
3876-# define INSTANTIATE_TEST_CASE_P(prefix, test_case_name, generator) \
3877- ::testing::internal::ParamGenerator<test_case_name::ParamType> \
3878- gtest_##prefix##test_case_name##_EvalGenerator_() { return generator; } \
3879- int gtest_##prefix##test_case_name##_dummy_ = \
3880- ::testing::UnitTest::GetInstance()->parameterized_test_registry(). \
3881- GetTestCasePatternHolder<test_case_name>(\
3882- #test_case_name, __FILE__, __LINE__)->AddTestCaseInstantiation(\
3883- #prefix, \
3884- &gtest_##prefix##test_case_name##_EvalGenerator_, \
3885- __FILE__, __LINE__)
3886-
3887-} // namespace testing
3888-
3889-#endif // GTEST_HAS_PARAM_TEST
3890-
3891-#endif // GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_
3892
3893=== removed file '3rd_party/gmock/gtest/include/gtest/gtest-param-test.h.pump'
3894--- 3rd_party/gmock/gtest/include/gtest/gtest-param-test.h.pump 2013-06-18 14:04:37 +0000
3895+++ 3rd_party/gmock/gtest/include/gtest/gtest-param-test.h.pump 1970-01-01 00:00:00 +0000
3896@@ -1,487 +0,0 @@
3897-$$ -*- mode: c++; -*-
3898-$var n = 50 $$ Maximum length of Values arguments we want to support.
3899-$var maxtuple = 10 $$ Maximum number of Combine arguments we want to support.
3900-// Copyright 2008, Google Inc.
3901-// All rights reserved.
3902-//
3903-// Redistribution and use in source and binary forms, with or without
3904-// modification, are permitted provided that the following conditions are
3905-// met:
3906-//
3907-// * Redistributions of source code must retain the above copyright
3908-// notice, this list of conditions and the following disclaimer.
3909-// * Redistributions in binary form must reproduce the above
3910-// copyright notice, this list of conditions and the following disclaimer
3911-// in the documentation and/or other materials provided with the
3912-// distribution.
3913-// * Neither the name of Google Inc. nor the names of its
3914-// contributors may be used to endorse or promote products derived from
3915-// this software without specific prior written permission.
3916-//
3917-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
3918-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
3919-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
3920-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
3921-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
3922-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
3923-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
3924-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
3925-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3926-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
3927-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3928-//
3929-// Authors: vladl@google.com (Vlad Losev)
3930-//
3931-// Macros and functions for implementing parameterized tests
3932-// in Google C++ Testing Framework (Google Test)
3933-//
3934-// This file is generated by a SCRIPT. DO NOT EDIT BY HAND!
3935-//
3936-#ifndef GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_
3937-#define GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_
3938-
3939-
3940-// Value-parameterized tests allow you to test your code with different
3941-// parameters without writing multiple copies of the same test.
3942-//
3943-// Here is how you use value-parameterized tests:
3944-
3945-#if 0
3946-
3947-// To write value-parameterized tests, first you should define a fixture
3948-// class. It is usually derived from testing::TestWithParam<T> (see below for
3949-// another inheritance scheme that's sometimes useful in more complicated
3950-// class hierarchies), where the type of your parameter values.
3951-// TestWithParam<T> is itself derived from testing::Test. T can be any
3952-// copyable type. If it's a raw pointer, you are responsible for managing the
3953-// lifespan of the pointed values.
3954-
3955-class FooTest : public ::testing::TestWithParam<const char*> {
3956- // You can implement all the usual class fixture members here.
3957-};
3958-
3959-// Then, use the TEST_P macro to define as many parameterized tests
3960-// for this fixture as you want. The _P suffix is for "parameterized"
3961-// or "pattern", whichever you prefer to think.
3962-
3963-TEST_P(FooTest, DoesBlah) {
3964- // Inside a test, access the test parameter with the GetParam() method
3965- // of the TestWithParam<T> class:
3966- EXPECT_TRUE(foo.Blah(GetParam()));
3967- ...
3968-}
3969-
3970-TEST_P(FooTest, HasBlahBlah) {
3971- ...
3972-}
3973-
3974-// Finally, you can use INSTANTIATE_TEST_CASE_P to instantiate the test
3975-// case with any set of parameters you want. Google Test defines a number
3976-// of functions for generating test parameters. They return what we call
3977-// (surprise!) parameter generators. Here is a summary of them, which
3978-// are all in the testing namespace:
3979-//
3980-//
3981-// Range(begin, end [, step]) - Yields values {begin, begin+step,
3982-// begin+step+step, ...}. The values do not
3983-// include end. step defaults to 1.
3984-// Values(v1, v2, ..., vN) - Yields values {v1, v2, ..., vN}.
3985-// ValuesIn(container) - Yields values from a C-style array, an STL
3986-// ValuesIn(begin,end) container, or an iterator range [begin, end).
3987-// Bool() - Yields sequence {false, true}.
3988-// Combine(g1, g2, ..., gN) - Yields all combinations (the Cartesian product
3989-// for the math savvy) of the values generated
3990-// by the N generators.
3991-//
3992-// For more details, see comments at the definitions of these functions below
3993-// in this file.
3994-//
3995-// The following statement will instantiate tests from the FooTest test case
3996-// each with parameter values "meeny", "miny", and "moe".
3997-
3998-INSTANTIATE_TEST_CASE_P(InstantiationName,
3999- FooTest,
4000- Values("meeny", "miny", "moe"));
4001-
4002-// To distinguish different instances of the pattern, (yes, you
4003-// can instantiate it more then once) the first argument to the
4004-// INSTANTIATE_TEST_CASE_P macro is a prefix that will be added to the
4005-// actual test case name. Remember to pick unique prefixes for different
4006-// instantiations. The tests from the instantiation above will have
4007-// these names:
4008-//
4009-// * InstantiationName/FooTest.DoesBlah/0 for "meeny"
4010-// * InstantiationName/FooTest.DoesBlah/1 for "miny"
4011-// * InstantiationName/FooTest.DoesBlah/2 for "moe"
4012-// * InstantiationName/FooTest.HasBlahBlah/0 for "meeny"
4013-// * InstantiationName/FooTest.HasBlahBlah/1 for "miny"
4014-// * InstantiationName/FooTest.HasBlahBlah/2 for "moe"
4015-//
4016-// You can use these names in --gtest_filter.
4017-//
4018-// This statement will instantiate all tests from FooTest again, each
4019-// with parameter values "cat" and "dog":
4020-
4021-const char* pets[] = {"cat", "dog"};
4022-INSTANTIATE_TEST_CASE_P(AnotherInstantiationName, FooTest, ValuesIn(pets));
4023-
4024-// The tests from the instantiation above will have these names:
4025-//
4026-// * AnotherInstantiationName/FooTest.DoesBlah/0 for "cat"
4027-// * AnotherInstantiationName/FooTest.DoesBlah/1 for "dog"
4028-// * AnotherInstantiationName/FooTest.HasBlahBlah/0 for "cat"
4029-// * AnotherInstantiationName/FooTest.HasBlahBlah/1 for "dog"
4030-//
4031-// Please note that INSTANTIATE_TEST_CASE_P will instantiate all tests
4032-// in the given test case, whether their definitions come before or
4033-// AFTER the INSTANTIATE_TEST_CASE_P statement.
4034-//
4035-// Please also note that generator expressions (including parameters to the
4036-// generators) are evaluated in InitGoogleTest(), after main() has started.
4037-// This allows the user on one hand, to adjust generator parameters in order
4038-// to dynamically determine a set of tests to run and on the other hand,
4039-// give the user a chance to inspect the generated tests with Google Test
4040-// reflection API before RUN_ALL_TESTS() is executed.
4041-//
4042-// You can see samples/sample7_unittest.cc and samples/sample8_unittest.cc
4043-// for more examples.
4044-//
4045-// In the future, we plan to publish the API for defining new parameter
4046-// generators. But for now this interface remains part of the internal
4047-// implementation and is subject to change.
4048-//
4049-//
4050-// A parameterized test fixture must be derived from testing::Test and from
4051-// testing::WithParamInterface<T>, where T is the type of the parameter
4052-// values. Inheriting from TestWithParam<T> satisfies that requirement because
4053-// TestWithParam<T> inherits from both Test and WithParamInterface. In more
4054-// complicated hierarchies, however, it is occasionally useful to inherit
4055-// separately from Test and WithParamInterface. For example:
4056-
4057-class BaseTest : public ::testing::Test {
4058- // You can inherit all the usual members for a non-parameterized test
4059- // fixture here.
4060-};
4061-
4062-class DerivedTest : public BaseTest, public ::testing::WithParamInterface<int> {
4063- // The usual test fixture members go here too.
4064-};
4065-
4066-TEST_F(BaseTest, HasFoo) {
4067- // This is an ordinary non-parameterized test.
4068-}
4069-
4070-TEST_P(DerivedTest, DoesBlah) {
4071- // GetParam works just the same here as if you inherit from TestWithParam.
4072- EXPECT_TRUE(foo.Blah(GetParam()));
4073-}
4074-
4075-#endif // 0
4076-
4077-#include "gtest/internal/gtest-port.h"
4078-
4079-#if !GTEST_OS_SYMBIAN
4080-# include <utility>
4081-#endif
4082-
4083-// scripts/fuse_gtest.py depends on gtest's own header being #included
4084-// *unconditionally*. Therefore these #includes cannot be moved
4085-// inside #if GTEST_HAS_PARAM_TEST.
4086-#include "gtest/internal/gtest-internal.h"
4087-#include "gtest/internal/gtest-param-util.h"
4088-#include "gtest/internal/gtest-param-util-generated.h"
4089-
4090-#if GTEST_HAS_PARAM_TEST
4091-
4092-namespace testing {
4093-
4094-// Functions producing parameter generators.
4095-//
4096-// Google Test uses these generators to produce parameters for value-
4097-// parameterized tests. When a parameterized test case is instantiated
4098-// with a particular generator, Google Test creates and runs tests
4099-// for each element in the sequence produced by the generator.
4100-//
4101-// In the following sample, tests from test case FooTest are instantiated
4102-// each three times with parameter values 3, 5, and 8:
4103-//
4104-// class FooTest : public TestWithParam<int> { ... };
4105-//
4106-// TEST_P(FooTest, TestThis) {
4107-// }
4108-// TEST_P(FooTest, TestThat) {
4109-// }
4110-// INSTANTIATE_TEST_CASE_P(TestSequence, FooTest, Values(3, 5, 8));
4111-//
4112-
4113-// Range() returns generators providing sequences of values in a range.
4114-//
4115-// Synopsis:
4116-// Range(start, end)
4117-// - returns a generator producing a sequence of values {start, start+1,
4118-// start+2, ..., }.
4119-// Range(start, end, step)
4120-// - returns a generator producing a sequence of values {start, start+step,
4121-// start+step+step, ..., }.
4122-// Notes:
4123-// * The generated sequences never include end. For example, Range(1, 5)
4124-// returns a generator producing a sequence {1, 2, 3, 4}. Range(1, 9, 2)
4125-// returns a generator producing {1, 3, 5, 7}.
4126-// * start and end must have the same type. That type may be any integral or
4127-// floating-point type or a user defined type satisfying these conditions:
4128-// * It must be assignable (have operator=() defined).
4129-// * It must have operator+() (operator+(int-compatible type) for
4130-// two-operand version).
4131-// * It must have operator<() defined.
4132-// Elements in the resulting sequences will also have that type.
4133-// * Condition start < end must be satisfied in order for resulting sequences
4134-// to contain any elements.
4135-//
4136-template <typename T, typename IncrementT>
4137-internal::ParamGenerator<T> Range(T start, T end, IncrementT step) {
4138- return internal::ParamGenerator<T>(
4139- new internal::RangeGenerator<T, IncrementT>(start, end, step));
4140-}
4141-
4142-template <typename T>
4143-internal::ParamGenerator<T> Range(T start, T end) {
4144- return Range(start, end, 1);
4145-}
4146-
4147-// ValuesIn() function allows generation of tests with parameters coming from
4148-// a container.
4149-//
4150-// Synopsis:
4151-// ValuesIn(const T (&array)[N])
4152-// - returns a generator producing sequences with elements from
4153-// a C-style array.
4154-// ValuesIn(const Container& container)
4155-// - returns a generator producing sequences with elements from
4156-// an STL-style container.
4157-// ValuesIn(Iterator begin, Iterator end)
4158-// - returns a generator producing sequences with elements from
4159-// a range [begin, end) defined by a pair of STL-style iterators. These
4160-// iterators can also be plain C pointers.
4161-//
4162-// Please note that ValuesIn copies the values from the containers
4163-// passed in and keeps them to generate tests in RUN_ALL_TESTS().
4164-//
4165-// Examples:
4166-//
4167-// This instantiates tests from test case StringTest
4168-// each with C-string values of "foo", "bar", and "baz":
4169-//
4170-// const char* strings[] = {"foo", "bar", "baz"};
4171-// INSTANTIATE_TEST_CASE_P(StringSequence, SrtingTest, ValuesIn(strings));
4172-//
4173-// This instantiates tests from test case StlStringTest
4174-// each with STL strings with values "a" and "b":
4175-//
4176-// ::std::vector< ::std::string> GetParameterStrings() {
4177-// ::std::vector< ::std::string> v;
4178-// v.push_back("a");
4179-// v.push_back("b");
4180-// return v;
4181-// }
4182-//
4183-// INSTANTIATE_TEST_CASE_P(CharSequence,
4184-// StlStringTest,
4185-// ValuesIn(GetParameterStrings()));
4186-//
4187-//
4188-// This will also instantiate tests from CharTest
4189-// each with parameter values 'a' and 'b':
4190-//
4191-// ::std::list<char> GetParameterChars() {
4192-// ::std::list<char> list;
4193-// list.push_back('a');
4194-// list.push_back('b');
4195-// return list;
4196-// }
4197-// ::std::list<char> l = GetParameterChars();
4198-// INSTANTIATE_TEST_CASE_P(CharSequence2,
4199-// CharTest,
4200-// ValuesIn(l.begin(), l.end()));
4201-//
4202-template <typename ForwardIterator>
4203-internal::ParamGenerator<
4204- typename ::testing::internal::IteratorTraits<ForwardIterator>::value_type>
4205-ValuesIn(ForwardIterator begin, ForwardIterator end) {
4206- typedef typename ::testing::internal::IteratorTraits<ForwardIterator>
4207- ::value_type ParamType;
4208- return internal::ParamGenerator<ParamType>(
4209- new internal::ValuesInIteratorRangeGenerator<ParamType>(begin, end));
4210-}
4211-
4212-template <typename T, size_t N>
4213-internal::ParamGenerator<T> ValuesIn(const T (&array)[N]) {
4214- return ValuesIn(array, array + N);
4215-}
4216-
4217-template <class Container>
4218-internal::ParamGenerator<typename Container::value_type> ValuesIn(
4219- const Container& container) {
4220- return ValuesIn(container.begin(), container.end());
4221-}
4222-
4223-// Values() allows generating tests from explicitly specified list of
4224-// parameters.
4225-//
4226-// Synopsis:
4227-// Values(T v1, T v2, ..., T vN)
4228-// - returns a generator producing sequences with elements v1, v2, ..., vN.
4229-//
4230-// For example, this instantiates tests from test case BarTest each
4231-// with values "one", "two", and "three":
4232-//
4233-// INSTANTIATE_TEST_CASE_P(NumSequence, BarTest, Values("one", "two", "three"));
4234-//
4235-// This instantiates tests from test case BazTest each with values 1, 2, 3.5.
4236-// The exact type of values will depend on the type of parameter in BazTest.
4237-//
4238-// INSTANTIATE_TEST_CASE_P(FloatingNumbers, BazTest, Values(1, 2, 3.5));
4239-//
4240-// Currently, Values() supports from 1 to $n parameters.
4241-//
4242-$range i 1..n
4243-$for i [[
4244-$range j 1..i
4245-
4246-template <$for j, [[typename T$j]]>
4247-internal::ValueArray$i<$for j, [[T$j]]> Values($for j, [[T$j v$j]]) {
4248- return internal::ValueArray$i<$for j, [[T$j]]>($for j, [[v$j]]);
4249-}
4250-
4251-]]
4252-
4253-// Bool() allows generating tests with parameters in a set of (false, true).
4254-//
4255-// Synopsis:
4256-// Bool()
4257-// - returns a generator producing sequences with elements {false, true}.
4258-//
4259-// It is useful when testing code that depends on Boolean flags. Combinations
4260-// of multiple flags can be tested when several Bool()'s are combined using
4261-// Combine() function.
4262-//
4263-// In the following example all tests in the test case FlagDependentTest
4264-// will be instantiated twice with parameters false and true.
4265-//
4266-// class FlagDependentTest : public testing::TestWithParam<bool> {
4267-// virtual void SetUp() {
4268-// external_flag = GetParam();
4269-// }
4270-// }
4271-// INSTANTIATE_TEST_CASE_P(BoolSequence, FlagDependentTest, Bool());
4272-//
4273-inline internal::ParamGenerator<bool> Bool() {
4274- return Values(false, true);
4275-}
4276-
4277-# if GTEST_HAS_COMBINE
4278-// Combine() allows the user to combine two or more sequences to produce
4279-// values of a Cartesian product of those sequences' elements.
4280-//
4281-// Synopsis:
4282-// Combine(gen1, gen2, ..., genN)
4283-// - returns a generator producing sequences with elements coming from
4284-// the Cartesian product of elements from the sequences generated by
4285-// gen1, gen2, ..., genN. The sequence elements will have a type of
4286-// tuple<T1, T2, ..., TN> where T1, T2, ..., TN are the types
4287-// of elements from sequences produces by gen1, gen2, ..., genN.
4288-//
4289-// Combine can have up to $maxtuple arguments. This number is currently limited
4290-// by the maximum number of elements in the tuple implementation used by Google
4291-// Test.
4292-//
4293-// Example:
4294-//
4295-// This will instantiate tests in test case AnimalTest each one with
4296-// the parameter values tuple("cat", BLACK), tuple("cat", WHITE),
4297-// tuple("dog", BLACK), and tuple("dog", WHITE):
4298-//
4299-// enum Color { BLACK, GRAY, WHITE };
4300-// class AnimalTest
4301-// : public testing::TestWithParam<tuple<const char*, Color> > {...};
4302-//
4303-// TEST_P(AnimalTest, AnimalLooksNice) {...}
4304-//
4305-// INSTANTIATE_TEST_CASE_P(AnimalVariations, AnimalTest,
4306-// Combine(Values("cat", "dog"),
4307-// Values(BLACK, WHITE)));
4308-//
4309-// This will instantiate tests in FlagDependentTest with all variations of two
4310-// Boolean flags:
4311-//
4312-// class FlagDependentTest
4313-// : public testing::TestWithParam<tuple<bool, bool> > {
4314-// virtual void SetUp() {
4315-// // Assigns external_flag_1 and external_flag_2 values from the tuple.
4316-// tie(external_flag_1, external_flag_2) = GetParam();
4317-// }
4318-// };
4319-//
4320-// TEST_P(FlagDependentTest, TestFeature1) {
4321-// // Test your code using external_flag_1 and external_flag_2 here.
4322-// }
4323-// INSTANTIATE_TEST_CASE_P(TwoBoolSequence, FlagDependentTest,
4324-// Combine(Bool(), Bool()));
4325-//
4326-$range i 2..maxtuple
4327-$for i [[
4328-$range j 1..i
4329-
4330-template <$for j, [[typename Generator$j]]>
4331-internal::CartesianProductHolder$i<$for j, [[Generator$j]]> Combine(
4332- $for j, [[const Generator$j& g$j]]) {
4333- return internal::CartesianProductHolder$i<$for j, [[Generator$j]]>(
4334- $for j, [[g$j]]);
4335-}
4336-
4337-]]
4338-# endif // GTEST_HAS_COMBINE
4339-
4340-
4341-
4342-# define TEST_P(test_case_name, test_name) \
4343- class GTEST_TEST_CLASS_NAME_(test_case_name, test_name) \
4344- : public test_case_name { \
4345- public: \
4346- GTEST_TEST_CLASS_NAME_(test_case_name, test_name)() {} \
4347- virtual void TestBody(); \
4348- private: \
4349- static int AddToRegistry() { \
4350- ::testing::UnitTest::GetInstance()->parameterized_test_registry(). \
4351- GetTestCasePatternHolder<test_case_name>(\
4352- #test_case_name, __FILE__, __LINE__)->AddTestPattern(\
4353- #test_case_name, \
4354- #test_name, \
4355- new ::testing::internal::TestMetaFactory< \
4356- GTEST_TEST_CLASS_NAME_(test_case_name, test_name)>()); \
4357- return 0; \
4358- } \
4359- static int gtest_registering_dummy_; \
4360- GTEST_DISALLOW_COPY_AND_ASSIGN_(\
4361- GTEST_TEST_CLASS_NAME_(test_case_name, test_name)); \
4362- }; \
4363- int GTEST_TEST_CLASS_NAME_(test_case_name, \
4364- test_name)::gtest_registering_dummy_ = \
4365- GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::AddToRegistry(); \
4366- void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::TestBody()
4367-
4368-# define INSTANTIATE_TEST_CASE_P(prefix, test_case_name, generator) \
4369- ::testing::internal::ParamGenerator<test_case_name::ParamType> \
4370- gtest_##prefix##test_case_name##_EvalGenerator_() { return generator; } \
4371- int gtest_##prefix##test_case_name##_dummy_ = \
4372- ::testing::UnitTest::GetInstance()->parameterized_test_registry(). \
4373- GetTestCasePatternHolder<test_case_name>(\
4374- #test_case_name, __FILE__, __LINE__)->AddTestCaseInstantiation(\
4375- #prefix, \
4376- &gtest_##prefix##test_case_name##_EvalGenerator_, \
4377- __FILE__, __LINE__)
4378-
4379-} // namespace testing
4380-
4381-#endif // GTEST_HAS_PARAM_TEST
4382-
4383-#endif // GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_
4384
4385=== removed file '3rd_party/gmock/gtest/include/gtest/gtest-printers.h'
4386--- 3rd_party/gmock/gtest/include/gtest/gtest-printers.h 2013-06-18 14:04:37 +0000
4387+++ 3rd_party/gmock/gtest/include/gtest/gtest-printers.h 1970-01-01 00:00:00 +0000
4388@@ -1,855 +0,0 @@
4389-// Copyright 2007, Google Inc.
4390-// All rights reserved.
4391-//
4392-// Redistribution and use in source and binary forms, with or without
4393-// modification, are permitted provided that the following conditions are
4394-// met:
4395-//
4396-// * Redistributions of source code must retain the above copyright
4397-// notice, this list of conditions and the following disclaimer.
4398-// * Redistributions in binary form must reproduce the above
4399-// copyright notice, this list of conditions and the following disclaimer
4400-// in the documentation and/or other materials provided with the
4401-// distribution.
4402-// * Neither the name of Google Inc. nor the names of its
4403-// contributors may be used to endorse or promote products derived from
4404-// this software without specific prior written permission.
4405-//
4406-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
4407-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
4408-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
4409-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
4410-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
4411-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
4412-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
4413-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
4414-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
4415-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
4416-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4417-//
4418-// Author: wan@google.com (Zhanyong Wan)
4419-
4420-// Google Test - The Google C++ Testing Framework
4421-//
4422-// This file implements a universal value printer that can print a
4423-// value of any type T:
4424-//
4425-// void ::testing::internal::UniversalPrinter<T>::Print(value, ostream_ptr);
4426-//
4427-// A user can teach this function how to print a class type T by
4428-// defining either operator<<() or PrintTo() in the namespace that
4429-// defines T. More specifically, the FIRST defined function in the
4430-// following list will be used (assuming T is defined in namespace
4431-// foo):
4432-//
4433-// 1. foo::PrintTo(const T&, ostream*)
4434-// 2. operator<<(ostream&, const T&) defined in either foo or the
4435-// global namespace.
4436-//
4437-// If none of the above is defined, it will print the debug string of
4438-// the value if it is a protocol buffer, or print the raw bytes in the
4439-// value otherwise.
4440-//
4441-// To aid debugging: when T is a reference type, the address of the
4442-// value is also printed; when T is a (const) char pointer, both the
4443-// pointer value and the NUL-terminated string it points to are
4444-// printed.
4445-//
4446-// We also provide some convenient wrappers:
4447-//
4448-// // Prints a value to a string. For a (const or not) char
4449-// // pointer, the NUL-terminated string (but not the pointer) is
4450-// // printed.
4451-// std::string ::testing::PrintToString(const T& value);
4452-//
4453-// // Prints a value tersely: for a reference type, the referenced
4454-// // value (but not the address) is printed; for a (const or not) char
4455-// // pointer, the NUL-terminated string (but not the pointer) is
4456-// // printed.
4457-// void ::testing::internal::UniversalTersePrint(const T& value, ostream*);
4458-//
4459-// // Prints value using the type inferred by the compiler. The difference
4460-// // from UniversalTersePrint() is that this function prints both the
4461-// // pointer and the NUL-terminated string for a (const or not) char pointer.
4462-// void ::testing::internal::UniversalPrint(const T& value, ostream*);
4463-//
4464-// // Prints the fields of a tuple tersely to a string vector, one
4465-// // element for each field. Tuple support must be enabled in
4466-// // gtest-port.h.
4467-// std::vector<string> UniversalTersePrintTupleFieldsToStrings(
4468-// const Tuple& value);
4469-//
4470-// Known limitation:
4471-//
4472-// The print primitives print the elements of an STL-style container
4473-// using the compiler-inferred type of *iter where iter is a
4474-// const_iterator of the container. When const_iterator is an input
4475-// iterator but not a forward iterator, this inferred type may not
4476-// match value_type, and the print output may be incorrect. In
4477-// practice, this is rarely a problem as for most containers
4478-// const_iterator is a forward iterator. We'll fix this if there's an
4479-// actual need for it. Note that this fix cannot rely on value_type
4480-// being defined as many user-defined container types don't have
4481-// value_type.
4482-
4483-#ifndef GTEST_INCLUDE_GTEST_GTEST_PRINTERS_H_
4484-#define GTEST_INCLUDE_GTEST_GTEST_PRINTERS_H_
4485-
4486-#include <ostream> // NOLINT
4487-#include <sstream>
4488-#include <string>
4489-#include <utility>
4490-#include <vector>
4491-#include "gtest/internal/gtest-port.h"
4492-#include "gtest/internal/gtest-internal.h"
4493-
4494-namespace testing {
4495-
4496-// Definitions in the 'internal' and 'internal2' name spaces are
4497-// subject to change without notice. DO NOT USE THEM IN USER CODE!
4498-namespace internal2 {
4499-
4500-// Prints the given number of bytes in the given object to the given
4501-// ostream.
4502-GTEST_API_ void PrintBytesInObjectTo(const unsigned char* obj_bytes,
4503- size_t count,
4504- ::std::ostream* os);
4505-
4506-// For selecting which printer to use when a given type has neither <<
4507-// nor PrintTo().
4508-enum TypeKind {
4509- kProtobuf, // a protobuf type
4510- kConvertibleToInteger, // a type implicitly convertible to BiggestInt
4511- // (e.g. a named or unnamed enum type)
4512- kOtherType // anything else
4513-};
4514-
4515-// TypeWithoutFormatter<T, kTypeKind>::PrintValue(value, os) is called
4516-// by the universal printer to print a value of type T when neither
4517-// operator<< nor PrintTo() is defined for T, where kTypeKind is the
4518-// "kind" of T as defined by enum TypeKind.
4519-template <typename T, TypeKind kTypeKind>
4520-class TypeWithoutFormatter {
4521- public:
4522- // This default version is called when kTypeKind is kOtherType.
4523- static void PrintValue(const T& value, ::std::ostream* os) {
4524- PrintBytesInObjectTo(reinterpret_cast<const unsigned char*>(&value),
4525- sizeof(value), os);
4526- }
4527-};
4528-
4529-// We print a protobuf using its ShortDebugString() when the string
4530-// doesn't exceed this many characters; otherwise we print it using
4531-// DebugString() for better readability.
4532-const size_t kProtobufOneLinerMaxLength = 50;
4533-
4534-template <typename T>
4535-class TypeWithoutFormatter<T, kProtobuf> {
4536- public:
4537- static void PrintValue(const T& value, ::std::ostream* os) {
4538- const ::testing::internal::string short_str = value.ShortDebugString();
4539- const ::testing::internal::string pretty_str =
4540- short_str.length() <= kProtobufOneLinerMaxLength ?
4541- short_str : ("\n" + value.DebugString());
4542- *os << ("<" + pretty_str + ">");
4543- }
4544-};
4545-
4546-template <typename T>
4547-class TypeWithoutFormatter<T, kConvertibleToInteger> {
4548- public:
4549- // Since T has no << operator or PrintTo() but can be implicitly
4550- // converted to BiggestInt, we print it as a BiggestInt.
4551- //
4552- // Most likely T is an enum type (either named or unnamed), in which
4553- // case printing it as an integer is the desired behavior. In case
4554- // T is not an enum, printing it as an integer is the best we can do
4555- // given that it has no user-defined printer.
4556- static void PrintValue(const T& value, ::std::ostream* os) {
4557- const internal::BiggestInt kBigInt = value;
4558- *os << kBigInt;
4559- }
4560-};
4561-
4562-// Prints the given value to the given ostream. If the value is a
4563-// protocol message, its debug string is printed; if it's an enum or
4564-// of a type implicitly convertible to BiggestInt, it's printed as an
4565-// integer; otherwise the bytes in the value are printed. This is
4566-// what UniversalPrinter<T>::Print() does when it knows nothing about
4567-// type T and T has neither << operator nor PrintTo().
4568-//
4569-// A user can override this behavior for a class type Foo by defining
4570-// a << operator in the namespace where Foo is defined.
4571-//
4572-// We put this operator in namespace 'internal2' instead of 'internal'
4573-// to simplify the implementation, as much code in 'internal' needs to
4574-// use << in STL, which would conflict with our own << were it defined
4575-// in 'internal'.
4576-//
4577-// Note that this operator<< takes a generic std::basic_ostream<Char,
4578-// CharTraits> type instead of the more restricted std::ostream. If
4579-// we define it to take an std::ostream instead, we'll get an
4580-// "ambiguous overloads" compiler error when trying to print a type
4581-// Foo that supports streaming to std::basic_ostream<Char,
4582-// CharTraits>, as the compiler cannot tell whether
4583-// operator<<(std::ostream&, const T&) or
4584-// operator<<(std::basic_stream<Char, CharTraits>, const Foo&) is more
4585-// specific.
4586-template <typename Char, typename CharTraits, typename T>
4587-::std::basic_ostream<Char, CharTraits>& operator<<(
4588- ::std::basic_ostream<Char, CharTraits>& os, const T& x) {
4589- TypeWithoutFormatter<T,
4590- (internal::IsAProtocolMessage<T>::value ? kProtobuf :
4591- internal::ImplicitlyConvertible<const T&, internal::BiggestInt>::value ?
4592- kConvertibleToInteger : kOtherType)>::PrintValue(x, &os);
4593- return os;
4594-}
4595-
4596-} // namespace internal2
4597-} // namespace testing
4598-
4599-// This namespace MUST NOT BE NESTED IN ::testing, or the name look-up
4600-// magic needed for implementing UniversalPrinter won't work.
4601-namespace testing_internal {
4602-
4603-// Used to print a value that is not an STL-style container when the
4604-// user doesn't define PrintTo() for it.
4605-template <typename T>
4606-void DefaultPrintNonContainerTo(const T& value, ::std::ostream* os) {
4607- // With the following statement, during unqualified name lookup,
4608- // testing::internal2::operator<< appears as if it was declared in
4609- // the nearest enclosing namespace that contains both
4610- // ::testing_internal and ::testing::internal2, i.e. the global
4611- // namespace. For more details, refer to the C++ Standard section
4612- // 7.3.4-1 [namespace.udir]. This allows us to fall back onto
4613- // testing::internal2::operator<< in case T doesn't come with a <<
4614- // operator.
4615- //
4616- // We cannot write 'using ::testing::internal2::operator<<;', which
4617- // gcc 3.3 fails to compile due to a compiler bug.
4618- using namespace ::testing::internal2; // NOLINT
4619-
4620- // Assuming T is defined in namespace foo, in the next statement,
4621- // the compiler will consider all of:
4622- //
4623- // 1. foo::operator<< (thanks to Koenig look-up),
4624- // 2. ::operator<< (as the current namespace is enclosed in ::),
4625- // 3. testing::internal2::operator<< (thanks to the using statement above).
4626- //
4627- // The operator<< whose type matches T best will be picked.
4628- //
4629- // We deliberately allow #2 to be a candidate, as sometimes it's
4630- // impossible to define #1 (e.g. when foo is ::std, defining
4631- // anything in it is undefined behavior unless you are a compiler
4632- // vendor.).
4633- *os << value;
4634-}
4635-
4636-} // namespace testing_internal
4637-
4638-namespace testing {
4639-namespace internal {
4640-
4641-// UniversalPrinter<T>::Print(value, ostream_ptr) prints the given
4642-// value to the given ostream. The caller must ensure that
4643-// 'ostream_ptr' is not NULL, or the behavior is undefined.
4644-//
4645-// We define UniversalPrinter as a class template (as opposed to a
4646-// function template), as we need to partially specialize it for
4647-// reference types, which cannot be done with function templates.
4648-template <typename T>
4649-class UniversalPrinter;
4650-
4651-template <typename T>
4652-void UniversalPrint(const T& value, ::std::ostream* os);
4653-
4654-// Used to print an STL-style container when the user doesn't define
4655-// a PrintTo() for it.
4656-template <typename C>
4657-void DefaultPrintTo(IsContainer /* dummy */,
4658- false_type /* is not a pointer */,
4659- const C& container, ::std::ostream* os) {
4660- const size_t kMaxCount = 32; // The maximum number of elements to print.
4661- *os << '{';
4662- size_t count = 0;
4663- for (typename C::const_iterator it = container.begin();
4664- it != container.end(); ++it, ++count) {
4665- if (count > 0) {
4666- *os << ',';
4667- if (count == kMaxCount) { // Enough has been printed.
4668- *os << " ...";
4669- break;
4670- }
4671- }
4672- *os << ' ';
4673- // We cannot call PrintTo(*it, os) here as PrintTo() doesn't
4674- // handle *it being a native array.
4675- internal::UniversalPrint(*it, os);
4676- }
4677-
4678- if (count > 0) {
4679- *os << ' ';
4680- }
4681- *os << '}';
4682-}
4683-
4684-// Used to print a pointer that is neither a char pointer nor a member
4685-// pointer, when the user doesn't define PrintTo() for it. (A member
4686-// variable pointer or member function pointer doesn't really point to
4687-// a location in the address space. Their representation is
4688-// implementation-defined. Therefore they will be printed as raw
4689-// bytes.)
4690-template <typename T>
4691-void DefaultPrintTo(IsNotContainer /* dummy */,
4692- true_type /* is a pointer */,
4693- T* p, ::std::ostream* os) {
4694- if (p == NULL) {
4695- *os << "NULL";
4696- } else {
4697- // C++ doesn't allow casting from a function pointer to any object
4698- // pointer.
4699- //
4700- // IsTrue() silences warnings: "Condition is always true",
4701- // "unreachable code".
4702- if (IsTrue(ImplicitlyConvertible<T*, const void*>::value)) {
4703- // T is not a function type. We just call << to print p,
4704- // relying on ADL to pick up user-defined << for their pointer
4705- // types, if any.
4706- *os << p;
4707- } else {
4708- // T is a function type, so '*os << p' doesn't do what we want
4709- // (it just prints p as bool). We want to print p as a const
4710- // void*. However, we cannot cast it to const void* directly,
4711- // even using reinterpret_cast, as earlier versions of gcc
4712- // (e.g. 3.4.5) cannot compile the cast when p is a function
4713- // pointer. Casting to UInt64 first solves the problem.
4714- *os << reinterpret_cast<const void*>(
4715- reinterpret_cast<internal::UInt64>(p));
4716- }
4717- }
4718-}
4719-
4720-// Used to print a non-container, non-pointer value when the user
4721-// doesn't define PrintTo() for it.
4722-template <typename T>
4723-void DefaultPrintTo(IsNotContainer /* dummy */,
4724- false_type /* is not a pointer */,
4725- const T& value, ::std::ostream* os) {
4726- ::testing_internal::DefaultPrintNonContainerTo(value, os);
4727-}
4728-
4729-// Prints the given value using the << operator if it has one;
4730-// otherwise prints the bytes in it. This is what
4731-// UniversalPrinter<T>::Print() does when PrintTo() is not specialized
4732-// or overloaded for type T.
4733-//
4734-// A user can override this behavior for a class type Foo by defining
4735-// an overload of PrintTo() in the namespace where Foo is defined. We
4736-// give the user this option as sometimes defining a << operator for
4737-// Foo is not desirable (e.g. the coding style may prevent doing it,
4738-// or there is already a << operator but it doesn't do what the user
4739-// wants).
4740-template <typename T>
4741-void PrintTo(const T& value, ::std::ostream* os) {
4742- // DefaultPrintTo() is overloaded. The type of its first two
4743- // arguments determine which version will be picked. If T is an
4744- // STL-style container, the version for container will be called; if
4745- // T is a pointer, the pointer version will be called; otherwise the
4746- // generic version will be called.
4747- //
4748- // Note that we check for container types here, prior to we check
4749- // for protocol message types in our operator<<. The rationale is:
4750- //
4751- // For protocol messages, we want to give people a chance to
4752- // override Google Mock's format by defining a PrintTo() or
4753- // operator<<. For STL containers, other formats can be
4754- // incompatible with Google Mock's format for the container
4755- // elements; therefore we check for container types here to ensure
4756- // that our format is used.
4757- //
4758- // The second argument of DefaultPrintTo() is needed to bypass a bug
4759- // in Symbian's C++ compiler that prevents it from picking the right
4760- // overload between:
4761- //
4762- // PrintTo(const T& x, ...);
4763- // PrintTo(T* x, ...);
4764- DefaultPrintTo(IsContainerTest<T>(0), is_pointer<T>(), value, os);
4765-}
4766-
4767-// The following list of PrintTo() overloads tells
4768-// UniversalPrinter<T>::Print() how to print standard types (built-in
4769-// types, strings, plain arrays, and pointers).
4770-
4771-// Overloads for various char types.
4772-GTEST_API_ void PrintTo(unsigned char c, ::std::ostream* os);
4773-GTEST_API_ void PrintTo(signed char c, ::std::ostream* os);
4774-inline void PrintTo(char c, ::std::ostream* os) {
4775- // When printing a plain char, we always treat it as unsigned. This
4776- // way, the output won't be affected by whether the compiler thinks
4777- // char is signed or not.
4778- PrintTo(static_cast<unsigned char>(c), os);
4779-}
4780-
4781-// Overloads for other simple built-in types.
4782-inline void PrintTo(bool x, ::std::ostream* os) {
4783- *os << (x ? "true" : "false");
4784-}
4785-
4786-// Overload for wchar_t type.
4787-// Prints a wchar_t as a symbol if it is printable or as its internal
4788-// code otherwise and also as its decimal code (except for L'\0').
4789-// The L'\0' char is printed as "L'\\0'". The decimal code is printed
4790-// as signed integer when wchar_t is implemented by the compiler
4791-// as a signed type and is printed as an unsigned integer when wchar_t
4792-// is implemented as an unsigned type.
4793-GTEST_API_ void PrintTo(wchar_t wc, ::std::ostream* os);
4794-
4795-// Overloads for C strings.
4796-GTEST_API_ void PrintTo(const char* s, ::std::ostream* os);
4797-inline void PrintTo(char* s, ::std::ostream* os) {
4798- PrintTo(ImplicitCast_<const char*>(s), os);
4799-}
4800-
4801-// signed/unsigned char is often used for representing binary data, so
4802-// we print pointers to it as void* to be safe.
4803-inline void PrintTo(const signed char* s, ::std::ostream* os) {
4804- PrintTo(ImplicitCast_<const void*>(s), os);
4805-}
4806-inline void PrintTo(signed char* s, ::std::ostream* os) {
4807- PrintTo(ImplicitCast_<const void*>(s), os);
4808-}
4809-inline void PrintTo(const unsigned char* s, ::std::ostream* os) {
4810- PrintTo(ImplicitCast_<const void*>(s), os);
4811-}
4812-inline void PrintTo(unsigned char* s, ::std::ostream* os) {
4813- PrintTo(ImplicitCast_<const void*>(s), os);
4814-}
4815-
4816-// MSVC can be configured to define wchar_t as a typedef of unsigned
4817-// short. It defines _NATIVE_WCHAR_T_DEFINED when wchar_t is a native
4818-// type. When wchar_t is a typedef, defining an overload for const
4819-// wchar_t* would cause unsigned short* be printed as a wide string,
4820-// possibly causing invalid memory accesses.
4821-#if !defined(_MSC_VER) || defined(_NATIVE_WCHAR_T_DEFINED)
4822-// Overloads for wide C strings
4823-GTEST_API_ void PrintTo(const wchar_t* s, ::std::ostream* os);
4824-inline void PrintTo(wchar_t* s, ::std::ostream* os) {
4825- PrintTo(ImplicitCast_<const wchar_t*>(s), os);
4826-}
4827-#endif
4828-
4829-// Overload for C arrays. Multi-dimensional arrays are printed
4830-// properly.
4831-
4832-// Prints the given number of elements in an array, without printing
4833-// the curly braces.
4834-template <typename T>
4835-void PrintRawArrayTo(const T a[], size_t count, ::std::ostream* os) {
4836- UniversalPrint(a[0], os);
4837- for (size_t i = 1; i != count; i++) {
4838- *os << ", ";
4839- UniversalPrint(a[i], os);
4840- }
4841-}
4842-
4843-// Overloads for ::string and ::std::string.
4844-#if GTEST_HAS_GLOBAL_STRING
4845-GTEST_API_ void PrintStringTo(const ::string&s, ::std::ostream* os);
4846-inline void PrintTo(const ::string& s, ::std::ostream* os) {
4847- PrintStringTo(s, os);
4848-}
4849-#endif // GTEST_HAS_GLOBAL_STRING
4850-
4851-GTEST_API_ void PrintStringTo(const ::std::string&s, ::std::ostream* os);
4852-inline void PrintTo(const ::std::string& s, ::std::ostream* os) {
4853- PrintStringTo(s, os);
4854-}
4855-
4856-// Overloads for ::wstring and ::std::wstring.
4857-#if GTEST_HAS_GLOBAL_WSTRING
4858-GTEST_API_ void PrintWideStringTo(const ::wstring&s, ::std::ostream* os);
4859-inline void PrintTo(const ::wstring& s, ::std::ostream* os) {
4860- PrintWideStringTo(s, os);
4861-}
4862-#endif // GTEST_HAS_GLOBAL_WSTRING
4863-
4864-#if GTEST_HAS_STD_WSTRING
4865-GTEST_API_ void PrintWideStringTo(const ::std::wstring&s, ::std::ostream* os);
4866-inline void PrintTo(const ::std::wstring& s, ::std::ostream* os) {
4867- PrintWideStringTo(s, os);
4868-}
4869-#endif // GTEST_HAS_STD_WSTRING
4870-
4871-#if GTEST_HAS_TR1_TUPLE
4872-// Overload for ::std::tr1::tuple. Needed for printing function arguments,
4873-// which are packed as tuples.
4874-
4875-// Helper function for printing a tuple. T must be instantiated with
4876-// a tuple type.
4877-template <typename T>
4878-void PrintTupleTo(const T& t, ::std::ostream* os);
4879-
4880-// Overloaded PrintTo() for tuples of various arities. We support
4881-// tuples of up-to 10 fields. The following implementation works
4882-// regardless of whether tr1::tuple is implemented using the
4883-// non-standard variadic template feature or not.
4884-
4885-inline void PrintTo(const ::std::tr1::tuple<>& t, ::std::ostream* os) {
4886- PrintTupleTo(t, os);
4887-}
4888-
4889-template <typename T1>
4890-void PrintTo(const ::std::tr1::tuple<T1>& t, ::std::ostream* os) {
4891- PrintTupleTo(t, os);
4892-}
4893-
4894-template <typename T1, typename T2>
4895-void PrintTo(const ::std::tr1::tuple<T1, T2>& t, ::std::ostream* os) {
4896- PrintTupleTo(t, os);
4897-}
4898-
4899-template <typename T1, typename T2, typename T3>
4900-void PrintTo(const ::std::tr1::tuple<T1, T2, T3>& t, ::std::ostream* os) {
4901- PrintTupleTo(t, os);
4902-}
4903-
4904-template <typename T1, typename T2, typename T3, typename T4>
4905-void PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4>& t, ::std::ostream* os) {
4906- PrintTupleTo(t, os);
4907-}
4908-
4909-template <typename T1, typename T2, typename T3, typename T4, typename T5>
4910-void PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4, T5>& t,
4911- ::std::ostream* os) {
4912- PrintTupleTo(t, os);
4913-}
4914-
4915-template <typename T1, typename T2, typename T3, typename T4, typename T5,
4916- typename T6>
4917-void PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4, T5, T6>& t,
4918- ::std::ostream* os) {
4919- PrintTupleTo(t, os);
4920-}
4921-
4922-template <typename T1, typename T2, typename T3, typename T4, typename T5,
4923- typename T6, typename T7>
4924-void PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7>& t,
4925- ::std::ostream* os) {
4926- PrintTupleTo(t, os);
4927-}
4928-
4929-template <typename T1, typename T2, typename T3, typename T4, typename T5,
4930- typename T6, typename T7, typename T8>
4931-void PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8>& t,
4932- ::std::ostream* os) {
4933- PrintTupleTo(t, os);
4934-}
4935-
4936-template <typename T1, typename T2, typename T3, typename T4, typename T5,
4937- typename T6, typename T7, typename T8, typename T9>
4938-void PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9>& t,
4939- ::std::ostream* os) {
4940- PrintTupleTo(t, os);
4941-}
4942-
4943-template <typename T1, typename T2, typename T3, typename T4, typename T5,
4944- typename T6, typename T7, typename T8, typename T9, typename T10>
4945-void PrintTo(
4946- const ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>& t,
4947- ::std::ostream* os) {
4948- PrintTupleTo(t, os);
4949-}
4950-#endif // GTEST_HAS_TR1_TUPLE
4951-
4952-// Overload for std::pair.
4953-template <typename T1, typename T2>
4954-void PrintTo(const ::std::pair<T1, T2>& value, ::std::ostream* os) {
4955- *os << '(';
4956- // We cannot use UniversalPrint(value.first, os) here, as T1 may be
4957- // a reference type. The same for printing value.second.
4958- UniversalPrinter<T1>::Print(value.first, os);
4959- *os << ", ";
4960- UniversalPrinter<T2>::Print(value.second, os);
4961- *os << ')';
4962-}
4963-
4964-// Implements printing a non-reference type T by letting the compiler
4965-// pick the right overload of PrintTo() for T.
4966-template <typename T>
4967-class UniversalPrinter {
4968- public:
4969- // MSVC warns about adding const to a function type, so we want to
4970- // disable the warning.
4971-#ifdef _MSC_VER
4972-# pragma warning(push) // Saves the current warning state.
4973-# pragma warning(disable:4180) // Temporarily disables warning 4180.
4974-#endif // _MSC_VER
4975-
4976- // Note: we deliberately don't call this PrintTo(), as that name
4977- // conflicts with ::testing::internal::PrintTo in the body of the
4978- // function.
4979- static void Print(const T& value, ::std::ostream* os) {
4980- // By default, ::testing::internal::PrintTo() is used for printing
4981- // the value.
4982- //
4983- // Thanks to Koenig look-up, if T is a class and has its own
4984- // PrintTo() function defined in its namespace, that function will
4985- // be visible here. Since it is more specific than the generic ones
4986- // in ::testing::internal, it will be picked by the compiler in the
4987- // following statement - exactly what we want.
4988- PrintTo(value, os);
4989- }
4990-
4991-#ifdef _MSC_VER
4992-# pragma warning(pop) // Restores the warning state.
4993-#endif // _MSC_VER
4994-};
4995-
4996-// UniversalPrintArray(begin, len, os) prints an array of 'len'
4997-// elements, starting at address 'begin'.
4998-template <typename T>
4999-void UniversalPrintArray(const T* begin, size_t len, ::std::ostream* os) {
5000- if (len == 0) {
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches