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