1 // Copyright 2005, Google Inc.
2 // All rights reserved.
4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are
8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above
11 // copyright notice, this list of conditions and the following disclaimer
12 // in the documentation and/or other materials provided with the
14 // * Neither the name of Google Inc. nor the names of its
15 // contributors may be used to endorse or promote products derived from
16 // this software without specific prior written permission.
18 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 // Author: wan@google.com (Zhanyong Wan)
32 // The Google C++ Testing Framework (Google Test)
34 // This header file defines the public API for Google Test. It should be
35 // included by any test program that uses Google Test.
37 // IMPORTANT NOTE: Due to limitation of the C++ language, we have to
38 // leave some internal implementation details in this header file.
39 // They are clearly marked by comments like this:
41 // // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
43 // Such code is NOT meant to be used by a user directly, and is subject
44 // to CHANGE WITHOUT NOTICE. Therefore DO NOT DEPEND ON IT in a user
47 // Acknowledgment: Google Test borrowed the idea of automatic test
48 // registration from Barthelemy Dagenais' (barthelemy@prologique.com)
49 // easyUnit framework.
51 #ifndef GTEST_INCLUDE_GTEST_GTEST_H_
52 #define GTEST_INCLUDE_GTEST_GTEST_H_
58 // Copyright 2005, Google Inc.
59 // All rights reserved.
61 // Redistribution and use in source and binary forms, with or without
62 // modification, are permitted provided that the following conditions are
65 // * Redistributions of source code must retain the above copyright
66 // notice, this list of conditions and the following disclaimer.
67 // * Redistributions in binary form must reproduce the above
68 // copyright notice, this list of conditions and the following disclaimer
69 // in the documentation and/or other materials provided with the
71 // * Neither the name of Google Inc. nor the names of its
72 // contributors may be used to endorse or promote products derived from
73 // this software without specific prior written permission.
75 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
76 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
77 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
78 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
79 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
80 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
81 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
82 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
83 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
84 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
85 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
87 // Authors: wan@google.com (Zhanyong Wan), eefacm@gmail.com (Sean Mcafee)
89 // The Google C++ Testing Framework (Google Test)
91 // This header file declares functions and macros used internally by
92 // Google Test. They are subject to change without notice.
94 #ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_INTERNAL_H_
95 #define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_INTERNAL_H_
97 // Copyright 2005, Google Inc.
98 // All rights reserved.
100 // Redistribution and use in source and binary forms, with or without
101 // modification, are permitted provided that the following conditions are
104 // * Redistributions of source code must retain the above copyright
105 // notice, this list of conditions and the following disclaimer.
106 // * Redistributions in binary form must reproduce the above
107 // copyright notice, this list of conditions and the following disclaimer
108 // in the documentation and/or other materials provided with the
110 // * Neither the name of Google Inc. nor the names of its
111 // contributors may be used to endorse or promote products derived from
112 // this software without specific prior written permission.
114 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
115 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
116 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
117 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
118 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
119 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
120 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
121 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
122 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
123 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
124 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
126 // Authors: wan@google.com (Zhanyong Wan)
128 // Low-level types and utilities for porting Google Test to various
129 // platforms. They are subject to change without notice. DO NOT USE
130 // THEM IN USER CODE.
132 #ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_H_
133 #define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_H_
135 // The user can define the following macros in the build script to
136 // control Google Test's behavior. If the user doesn't define a macro
137 // in this list, Google Test will define it.
139 // GTEST_HAS_CLONE - Define it to 1/0 to indicate that clone(2)
140 // is/isn't available.
141 // GTEST_HAS_EXCEPTIONS - Define it to 1/0 to indicate that exceptions
143 // GTEST_HAS_GLOBAL_STRING - Define it to 1/0 to indicate that ::string
144 // is/isn't available (some systems define
145 // ::string, which is different to std::string).
146 // GTEST_HAS_GLOBAL_WSTRING - Define it to 1/0 to indicate that ::string
147 // is/isn't available (some systems define
148 // ::wstring, which is different to std::wstring).
149 // GTEST_HAS_POSIX_RE - Define it to 1/0 to indicate that POSIX regular
150 // expressions are/aren't available.
151 // GTEST_HAS_PTHREAD - Define it to 1/0 to indicate that <pthread.h>
152 // is/isn't available.
153 // GTEST_HAS_RTTI - Define it to 1/0 to indicate that RTTI is/isn't
155 // GTEST_HAS_STD_WSTRING - Define it to 1/0 to indicate that
156 // std::wstring does/doesn't work (Google Test can
157 // be used where std::wstring is unavailable).
158 // GTEST_HAS_TR1_TUPLE - Define it to 1/0 to indicate tr1::tuple
159 // is/isn't available.
160 // GTEST_HAS_SEH - Define it to 1/0 to indicate whether the
161 // compiler supports Microsoft's "Structured
162 // Exception Handling".
163 // GTEST_HAS_STREAM_REDIRECTION
164 // - Define it to 1/0 to indicate whether the
165 // platform supports I/O stream redirection using
167 // GTEST_USE_OWN_TR1_TUPLE - Define it to 1/0 to indicate whether Google
168 // Test's own tr1 tuple implementation should be
169 // used. Unused when the user sets
170 // GTEST_HAS_TR1_TUPLE to 0.
171 // GTEST_LANG_CXX11 - Define it to 1/0 to indicate that Google Test
172 // is building in C++11/C++98 mode.
173 // GTEST_LINKED_AS_SHARED_LIBRARY
174 // - Define to 1 when compiling tests that use
175 // Google Test as a shared library (known as
177 // GTEST_CREATE_SHARED_LIBRARY
178 // - Define to 1 when compiling Google Test itself
179 // as a shared library.
181 // This header defines the following utilities:
183 // Macros indicating the current platform (defined to 1 if compiled on
184 // the given platform; otherwise undefined):
185 // GTEST_OS_AIX - IBM AIX
186 // GTEST_OS_CYGWIN - Cygwin
187 // GTEST_OS_HPUX - HP-UX
188 // GTEST_OS_LINUX - Linux
189 // GTEST_OS_LINUX_ANDROID - Google Android
190 // GTEST_OS_MAC - Mac OS X
191 // GTEST_OS_IOS - iOS
192 // GTEST_OS_IOS_SIMULATOR - iOS simulator
193 // GTEST_OS_NACL - Google Native Client (NaCl)
194 // GTEST_OS_OPENBSD - OpenBSD
195 // GTEST_OS_QNX - QNX
196 // GTEST_OS_SOLARIS - Sun Solaris
197 // GTEST_OS_SYMBIAN - Symbian
198 // GTEST_OS_WINDOWS - Windows (Desktop, MinGW, or Mobile)
199 // GTEST_OS_WINDOWS_DESKTOP - Windows Desktop
200 // GTEST_OS_WINDOWS_MINGW - MinGW
201 // GTEST_OS_WINDOWS_MOBILE - Windows Mobile
202 // GTEST_OS_ZOS - z/OS
204 // Among the platforms, Cygwin, Linux, Max OS X, and Windows have the
205 // most stable support. Since core members of the Google Test project
206 // don't have access to other platforms, support for them may be less
207 // stable. If you notice any problems on your platform, please notify
208 // googletestframework@googlegroups.com (patches for fixing them are
209 // even more welcome!).
211 // Note that it is possible that none of the GTEST_OS_* macros are defined.
213 // Macros indicating available Google Test features (defined to 1 if
214 // the corresponding feature is supported; otherwise undefined):
215 // GTEST_HAS_COMBINE - the Combine() function (for value-parameterized
217 // GTEST_HAS_DEATH_TEST - death tests
218 // GTEST_HAS_PARAM_TEST - value-parameterized tests
219 // GTEST_HAS_TYPED_TEST - typed tests
220 // GTEST_HAS_TYPED_TEST_P - type-parameterized tests
221 // GTEST_USES_POSIX_RE - enhanced POSIX regex is used. Do not confuse with
222 // GTEST_HAS_POSIX_RE (see above) which users can
223 // define themselves.
224 // GTEST_USES_SIMPLE_RE - our own simple regex is used;
225 // the above two are mutually exclusive.
226 // GTEST_CAN_COMPARE_NULL - accepts untyped NULL in EXPECT_EQ().
228 // Macros for basic C++ coding:
229 // GTEST_AMBIGUOUS_ELSE_BLOCKER_ - for disabling a gcc warning.
230 // GTEST_ATTRIBUTE_UNUSED_ - declares that a class' instances or a
231 // variable don't have to be used.
232 // GTEST_DISALLOW_ASSIGN_ - disables operator=.
233 // GTEST_DISALLOW_COPY_AND_ASSIGN_ - disables copy ctor and operator=.
234 // GTEST_MUST_USE_RESULT_ - declares that a function's result must be used.
237 // Mutex, MutexLock, ThreadLocal, GetThreadCount()
238 // - synchronization primitives.
239 // GTEST_IS_THREADSAFE - defined to 1 to indicate that the above
240 // synchronization primitives have real implementations
241 // and Google Test is thread-safe; or 0 otherwise.
243 // Template meta programming:
244 // is_pointer - as in TR1; needed on Symbian and IBM XL C/C++ only.
245 // IteratorTraits - partial implementation of std::iterator_traits, which
246 // is not available in libCstd when compiled with Sun C++.
249 // scoped_ptr - as in TR2.
251 // Regular expressions:
252 // RE - a simple regular expression class using the POSIX
253 // Extended Regular Expression syntax on UNIX-like
254 // platforms, or a reduced regular exception syntax on
255 // other platforms, including Windows.
258 // GTEST_LOG_() - logs messages at the specified severity level.
259 // LogToStderr() - directs all log messages to stderr.
260 // FlushInfoLog() - flushes informational log messages.
262 // Stdout and stderr capturing:
263 // CaptureStdout() - starts capturing stdout.
264 // GetCapturedStdout() - stops capturing stdout and returns the captured
266 // CaptureStderr() - starts capturing stderr.
267 // GetCapturedStderr() - stops capturing stderr and returns the captured
271 // TypeWithSize - maps an integer to a int type.
272 // Int32, UInt32, Int64, UInt64, TimeInMillis
273 // - integers of known sizes.
274 // BiggestInt - the biggest signed integer type.
276 // Command-line utilities:
277 // GTEST_FLAG() - references a flag.
278 // GTEST_DECLARE_*() - declares a flag.
279 // GTEST_DEFINE_*() - defines a flag.
280 // GetInjectableArgvs() - returns the command line as a vector of strings.
282 // Environment variable utilities:
283 // GetEnv() - gets the value of an environment variable.
284 // BoolFromGTestEnv() - parses a bool environment variable.
285 // Int32FromGTestEnv() - parses an Int32 environment variable.
286 // StringFromGTestEnv() - parses a string environment variable.
288 #include <ctype.h> // for isspace, etc
289 #include <stddef.h> // for ptrdiff_t
294 # include <sys/types.h>
295 # include <sys/stat.h>
296 #endif // !_WIN32_WCE
298 #if defined __APPLE__
299 # include <AvailabilityMacros.h>
300 # include <TargetConditionals.h>
303 #include <iostream> // NOLINT
304 #include <sstream> // NOLINT
305 #include <string> // NOLINT
307 #define GTEST_DEV_EMAIL_ "googletestframework@@googlegroups.com"
308 #define GTEST_FLAG_PREFIX_ "gtest_"
309 #define GTEST_FLAG_PREFIX_DASH_ "gtest-"
310 #define GTEST_FLAG_PREFIX_UPPER_ "GTEST_"
311 #define GTEST_NAME_ "Google Test"
312 #define GTEST_PROJECT_URL_ "http://code.google.com/p/googletest/"
314 // Determines the version of gcc that is used to compile this.
316 // 40302 means version 4.3.2.
317 # define GTEST_GCC_VER_ \
318 (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__)
321 // Determines the platform on which Google Test is compiled.
323 # define GTEST_OS_CYGWIN 1
324 #elif defined __SYMBIAN32__
325 # define GTEST_OS_SYMBIAN 1
327 # define GTEST_OS_WINDOWS 1
329 # define GTEST_OS_WINDOWS_MOBILE 1
330 # elif defined(__MINGW__) || defined(__MINGW32__)
331 # define GTEST_OS_WINDOWS_MINGW 1
333 # define GTEST_OS_WINDOWS_DESKTOP 1
334 # endif // _WIN32_WCE
335 #elif defined __APPLE__
336 # define GTEST_OS_MAC 1
337 # if TARGET_OS_IPHONE
338 # define GTEST_OS_IOS 1
339 # if TARGET_IPHONE_SIMULATOR
340 # define GTEST_OS_IOS_SIMULATOR 1
343 #elif defined __linux__
344 # define GTEST_OS_LINUX 1
345 # if defined __ANDROID__
346 # define GTEST_OS_LINUX_ANDROID 1
348 #elif defined __MVS__
349 # define GTEST_OS_ZOS 1
350 #elif defined(__sun) && defined(__SVR4)
351 # define GTEST_OS_SOLARIS 1
353 # define GTEST_OS_AIX 1
354 #elif defined(__hpux)
355 # define GTEST_OS_HPUX 1
356 #elif defined __native_client__
357 # define GTEST_OS_NACL 1
358 #elif defined __OpenBSD__
359 # define GTEST_OS_OPENBSD 1
360 #elif defined __QNX__
361 # define GTEST_OS_QNX 1
364 #ifndef GTEST_LANG_CXX11
365 // gcc and clang define __GXX_EXPERIMENTAL_CXX0X__ when
366 // -std={c,gnu}++{0x,11} is passed. The C++11 standard specifies a
367 // value for __cplusplus, and recent versions of clang, gcc, and
368 // probably other compilers set that too in C++11 mode.
369 # if __GXX_EXPERIMENTAL_CXX0X__ || __cplusplus >= 201103L
370 // Compiling in at least C++11 mode.
371 # define GTEST_LANG_CXX11 1
373 # define GTEST_LANG_CXX11 0
377 // Brings in definitions for functions used in the testing::internal::posix
378 // namespace (read, write, close, chdir, isatty, stat). We do not currently
379 // use them on Windows Mobile.
380 #if !GTEST_OS_WINDOWS
381 // This assumes that non-Windows OSes provide unistd.h. For OSes where this
382 // is not the case, we need to include headers that provide the functions
385 # include <strings.h>
386 #elif !GTEST_OS_WINDOWS_MOBILE
391 #if GTEST_OS_LINUX_ANDROID
392 // Used to define __ANDROID_API__ matching the target NDK API level.
393 # include <android/api-level.h> // NOLINT
396 // Defines this to true iff Google Test can use POSIX regular expressions.
397 #ifndef GTEST_HAS_POSIX_RE
398 # if GTEST_OS_LINUX_ANDROID
399 // On Android, <regex.h> is only available starting with Gingerbread.
400 # define GTEST_HAS_POSIX_RE (__ANDROID_API__ >= 9)
402 # define GTEST_HAS_POSIX_RE (!GTEST_OS_WINDOWS)
406 #if GTEST_HAS_POSIX_RE
408 // On some platforms, <regex.h> needs someone to define size_t, and
409 // won't compile otherwise. We can #include it here as we already
410 // included <stdlib.h>, which is guaranteed to define size_t through
412 # include <regex.h> // NOLINT
414 # define GTEST_USES_POSIX_RE 1
416 #elif GTEST_OS_WINDOWS
418 // <regex.h> is not available on Windows. Use our own simple regex
419 // implementation instead.
420 # define GTEST_USES_SIMPLE_RE 1
424 // <regex.h> may not be available on this platform. Use our own
425 // simple regex implementation instead.
426 # define GTEST_USES_SIMPLE_RE 1
428 #endif // GTEST_HAS_POSIX_RE
430 #ifndef GTEST_HAS_EXCEPTIONS
431 // The user didn't tell us whether exceptions are enabled, so we need
433 # if defined(_MSC_VER) || defined(__BORLANDC__)
434 // MSVC's and C++Builder's implementations of the STL use the _HAS_EXCEPTIONS
435 // macro to enable exceptions, so we'll do the same.
436 // Assumes that exceptions are enabled by default.
437 # ifndef _HAS_EXCEPTIONS
438 # define _HAS_EXCEPTIONS 1
439 # endif // _HAS_EXCEPTIONS
440 # define GTEST_HAS_EXCEPTIONS _HAS_EXCEPTIONS
441 # elif defined(__GNUC__) && __EXCEPTIONS
442 // gcc defines __EXCEPTIONS to 1 iff exceptions are enabled.
443 # define GTEST_HAS_EXCEPTIONS 1
444 # elif defined(__SUNPRO_CC)
445 // Sun Pro CC supports exceptions. However, there is no compile-time way of
446 // detecting whether they are enabled or not. Therefore, we assume that
447 // they are enabled unless the user tells us otherwise.
448 # define GTEST_HAS_EXCEPTIONS 1
449 # elif defined(__IBMCPP__) && __EXCEPTIONS
450 // xlC defines __EXCEPTIONS to 1 iff exceptions are enabled.
451 # define GTEST_HAS_EXCEPTIONS 1
452 # elif defined(__HP_aCC)
453 // Exception handling is in effect by default in HP aCC compiler. It has to
454 // be turned of by +noeh compiler option if desired.
455 # define GTEST_HAS_EXCEPTIONS 1
457 // For other compilers, we assume exceptions are disabled to be
459 # define GTEST_HAS_EXCEPTIONS 0
460 # endif // defined(_MSC_VER) || defined(__BORLANDC__)
461 #endif // GTEST_HAS_EXCEPTIONS
463 #if !defined(GTEST_HAS_STD_STRING)
464 // Even though we don't use this macro any longer, we keep it in case
465 // some clients still depend on it.
466 # define GTEST_HAS_STD_STRING 1
467 #elif !GTEST_HAS_STD_STRING
468 // The user told us that ::std::string isn't available.
469 # error "Google Test cannot be used where ::std::string isn't available."
470 #endif // !defined(GTEST_HAS_STD_STRING)
472 #ifndef GTEST_HAS_GLOBAL_STRING
473 // The user didn't tell us whether ::string is available, so we need
476 # define GTEST_HAS_GLOBAL_STRING 0
478 #endif // GTEST_HAS_GLOBAL_STRING
480 #ifndef GTEST_HAS_STD_WSTRING
481 // The user didn't tell us whether ::std::wstring is available, so we need
483 // TODO(wan@google.com): uses autoconf to detect whether ::std::wstring
486 // Cygwin 1.7 and below doesn't support ::std::wstring.
487 // Solaris' libc++ doesn't support it either. Android has
488 // no support for it at least as recent as Froyo (2.2).
489 # define GTEST_HAS_STD_WSTRING \
490 (!(GTEST_OS_LINUX_ANDROID || GTEST_OS_CYGWIN || GTEST_OS_SOLARIS))
492 #endif // GTEST_HAS_STD_WSTRING
494 #ifndef GTEST_HAS_GLOBAL_WSTRING
495 // The user didn't tell us whether ::wstring is available, so we need
497 # define GTEST_HAS_GLOBAL_WSTRING \
498 (GTEST_HAS_STD_WSTRING && GTEST_HAS_GLOBAL_STRING)
499 #endif // GTEST_HAS_GLOBAL_WSTRING
501 // Determines whether RTTI is available.
502 #ifndef GTEST_HAS_RTTI
503 // The user didn't tell us whether RTTI is enabled, so we need to
508 # ifdef _CPPRTTI // MSVC defines this macro iff RTTI is enabled.
509 # define GTEST_HAS_RTTI 1
511 # define GTEST_HAS_RTTI 0
514 // Starting with version 4.3.2, gcc defines __GXX_RTTI iff RTTI is enabled.
515 # elif defined(__GNUC__) && (GTEST_GCC_VER_ >= 40302)
518 // When building against STLport with the Android NDK and with
519 // -frtti -fno-exceptions, the build fails at link time with undefined
520 // references to __cxa_bad_typeid. Note sure if STL or toolchain bug,
521 // so disable RTTI when detected.
522 # if GTEST_OS_LINUX_ANDROID && defined(_STLPORT_MAJOR) && \
523 !defined(__EXCEPTIONS)
524 # define GTEST_HAS_RTTI 0
526 # define GTEST_HAS_RTTI 1
527 # endif // GTEST_OS_LINUX_ANDROID && __STLPORT_MAJOR && !__EXCEPTIONS
529 # define GTEST_HAS_RTTI 0
530 # endif // __GXX_RTTI
532 // Clang defines __GXX_RTTI starting with version 3.0, but its manual recommends
533 // using has_feature instead. has_feature(cxx_rtti) is supported since 2.7, the
534 // first version with C++ support.
535 # elif defined(__clang__)
537 # define GTEST_HAS_RTTI __has_feature(cxx_rtti)
539 // Starting with version 9.0 IBM Visual Age defines __RTTI_ALL__ to 1 if
540 // both the typeid and dynamic_cast features are present.
541 # elif defined(__IBMCPP__) && (__IBMCPP__ >= 900)
544 # define GTEST_HAS_RTTI 1
546 # define GTEST_HAS_RTTI 0
551 // For all other compilers, we assume RTTI is enabled.
552 # define GTEST_HAS_RTTI 1
556 #endif // GTEST_HAS_RTTI
558 // It's this header's responsibility to #include <typeinfo> when RTTI
564 // Determines whether Google Test can use the pthreads library.
565 #ifndef GTEST_HAS_PTHREAD
566 // The user didn't tell us explicitly, so we assume pthreads support is
567 // available on Linux and Mac.
569 // To disable threading support in Google Test, add -DGTEST_HAS_PTHREAD=0
570 // to your compiler flags.
571 # define GTEST_HAS_PTHREAD (GTEST_OS_LINUX || GTEST_OS_MAC || GTEST_OS_HPUX \
573 #endif // GTEST_HAS_PTHREAD
575 #ifdef GTEST_OS_WINDOWS_MINGW
576 // Disable pthread support for MinGW for now. To enable it, we need to:
577 // 1) Implement ThreadLocal object under MinGW. The internal pthread calls are
578 // not available on MinGW.
579 // 2) Replace the nanosleep() with usleep() for MinGW.
580 #undef GTEST_HAS_PTHREAD
581 #define GTEST_HAS_PTHREAD 0
584 #if GTEST_HAS_PTHREAD
585 // gtest-port.h guarantees to #include <pthread.h> when GTEST_HAS_PTHREAD is
587 # include <pthread.h> // NOLINT
589 // For timespec and nanosleep, used below.
590 # include <time.h> // NOLINT
593 // Determines whether Google Test can use tr1/tuple. You can define
594 // this macro to 0 to prevent Google Test from using tuple (any
595 // feature depending on tuple with be disabled in this mode).
596 #ifndef GTEST_HAS_TR1_TUPLE
597 # if GTEST_OS_LINUX_ANDROID && defined(_STLPORT_MAJOR)
598 // STLport, provided with the Android NDK, has neither <tr1/tuple> or <tuple>.
599 # define GTEST_HAS_TR1_TUPLE 0
601 // The user didn't tell us not to do it, so we assume it's OK.
602 # define GTEST_HAS_TR1_TUPLE 1
604 #endif // GTEST_HAS_TR1_TUPLE
606 // Determines whether Google Test's own tr1 tuple implementation
608 #ifndef GTEST_USE_OWN_TR1_TUPLE
609 // The user didn't tell us, so we need to figure it out.
611 // We use our own TR1 tuple if we aren't sure the user has an
612 // implementation of it already. At this time, libstdc++ 4.0.0+ and
613 // MSVC 2010 are the only mainstream standard libraries that come
614 // with a TR1 tuple implementation. NVIDIA's CUDA NVCC compiler
615 // pretends to be GCC by defining __GNUC__ and friends, but cannot
616 // compile GCC's tuple implementation. MSVC 2008 (9.0) provides TR1
617 // tuple in a 323 MB Feature Pack download, which we cannot assume the
618 // user has. QNX's QCC compiler is a modified GCC but it doesn't
619 // support TR1 tuple. libc++ only provides std::tuple, in C++11 mode,
620 // and it can be used with some compilers that define __GNUC__.
621 # if (defined(__GNUC__) && !defined(__CUDACC__) && (GTEST_GCC_VER_ >= 40000) \
622 && !GTEST_OS_QNX && !defined(_LIBCPP_VERSION)) || _MSC_VER >= 1600
623 # define GTEST_ENV_HAS_TR1_TUPLE_ 1
626 // C++11 specifies that <tuple> provides std::tuple. Use that if gtest is used
627 // in C++11 mode and libstdc++ isn't very old (binaries targeting OS X 10.6
628 // can build with clang but need to use gcc4.2's libstdc++).
629 # if GTEST_LANG_CXX11 && (!defined(__GLIBCXX__) || __GLIBCXX__ > 20110325)
630 # define GTEST_ENV_HAS_STD_TUPLE_ 1
633 # if GTEST_ENV_HAS_TR1_TUPLE_ || GTEST_ENV_HAS_STD_TUPLE_
634 # define GTEST_USE_OWN_TR1_TUPLE 0
636 # define GTEST_USE_OWN_TR1_TUPLE 1
639 #endif // GTEST_USE_OWN_TR1_TUPLE
641 // To avoid conditional compilation everywhere, we make it
642 // gtest-port.h's responsibility to #include the header implementing
644 #if GTEST_HAS_TR1_TUPLE
646 # if GTEST_USE_OWN_TR1_TUPLE
647 // This file was GENERATED by command:
648 // pump.py gtest-tuple.h.pump
649 // DO NOT EDIT BY HAND!!!
651 // Copyright 2009 Google Inc.
652 // All Rights Reserved.
654 // Redistribution and use in source and binary forms, with or without
655 // modification, are permitted provided that the following conditions are
658 // * Redistributions of source code must retain the above copyright
659 // notice, this list of conditions and the following disclaimer.
660 // * Redistributions in binary form must reproduce the above
661 // copyright notice, this list of conditions and the following disclaimer
662 // in the documentation and/or other materials provided with the
664 // * Neither the name of Google Inc. nor the names of its
665 // contributors may be used to endorse or promote products derived from
666 // this software without specific prior written permission.
668 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
669 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
670 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
671 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
672 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
673 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
674 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
675 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
676 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
677 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
678 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
680 // Author: wan@google.com (Zhanyong Wan)
682 // Implements a subset of TR1 tuple needed by Google Test and Google Mock.
684 #ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TUPLE_H_
685 #define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TUPLE_H_
687 #include <utility> // For ::std::pair.
689 // The compiler used in Symbian has a bug that prevents us from declaring the
690 // tuple template as a friend (it complains that tuple is redefined). This
691 // hack bypasses the bug by declaring the members that should otherwise be
692 // private as public.
693 // Sun Studio versions < 12 also have the above bug.
694 #if defined(__SYMBIAN32__) || (defined(__SUNPRO_CC) && __SUNPRO_CC < 0x590)
695 # define GTEST_DECLARE_TUPLE_AS_FRIEND_ public:
697 # define GTEST_DECLARE_TUPLE_AS_FRIEND_ \
698 template <GTEST_10_TYPENAMES_(U)> friend class tuple; \
702 // GTEST_n_TUPLE_(T) is the type of an n-tuple.
703 #define GTEST_0_TUPLE_(T) tuple<>
704 #define GTEST_1_TUPLE_(T) tuple<T##0, void, void, void, void, void, void, \
706 #define GTEST_2_TUPLE_(T) tuple<T##0, T##1, void, void, void, void, void, \
708 #define GTEST_3_TUPLE_(T) tuple<T##0, T##1, T##2, void, void, void, void, \
710 #define GTEST_4_TUPLE_(T) tuple<T##0, T##1, T##2, T##3, void, void, void, \
712 #define GTEST_5_TUPLE_(T) tuple<T##0, T##1, T##2, T##3, T##4, void, void, \
714 #define GTEST_6_TUPLE_(T) tuple<T##0, T##1, T##2, T##3, T##4, T##5, void, \
716 #define GTEST_7_TUPLE_(T) tuple<T##0, T##1, T##2, T##3, T##4, T##5, T##6, \
718 #define GTEST_8_TUPLE_(T) tuple<T##0, T##1, T##2, T##3, T##4, T##5, T##6, \
720 #define GTEST_9_TUPLE_(T) tuple<T##0, T##1, T##2, T##3, T##4, T##5, T##6, \
722 #define GTEST_10_TUPLE_(T) tuple<T##0, T##1, T##2, T##3, T##4, T##5, T##6, \
725 // GTEST_n_TYPENAMES_(T) declares a list of n typenames.
726 #define GTEST_0_TYPENAMES_(T)
727 #define GTEST_1_TYPENAMES_(T) typename T##0
728 #define GTEST_2_TYPENAMES_(T) typename T##0, typename T##1
729 #define GTEST_3_TYPENAMES_(T) typename T##0, typename T##1, typename T##2
730 #define GTEST_4_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \
732 #define GTEST_5_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \
733 typename T##3, typename T##4
734 #define GTEST_6_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \
735 typename T##3, typename T##4, typename T##5
736 #define GTEST_7_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \
737 typename T##3, typename T##4, typename T##5, typename T##6
738 #define GTEST_8_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \
739 typename T##3, typename T##4, typename T##5, typename T##6, typename T##7
740 #define GTEST_9_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \
741 typename T##3, typename T##4, typename T##5, typename T##6, \
742 typename T##7, typename T##8
743 #define GTEST_10_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \
744 typename T##3, typename T##4, typename T##5, typename T##6, \
745 typename T##7, typename T##8, typename T##9
747 // In theory, defining stuff in the ::std namespace is undefined
748 // behavior. We can do this as we are playing the role of a standard
753 template <typename T0 = void, typename T1 = void, typename T2 = void,
754 typename T3 = void, typename T4 = void, typename T5 = void,
755 typename T6 = void, typename T7 = void, typename T8 = void,
759 // Anything in namespace gtest_internal is Google Test's INTERNAL
760 // IMPLEMENTATION DETAIL and MUST NOT BE USED DIRECTLY in user code.
761 namespace gtest_internal {
763 // ByRef<T>::type is T if T is a reference; otherwise it's const T&.
764 template <typename T>
765 struct ByRef { typedef const T& type; }; // NOLINT
766 template <typename T>
767 struct ByRef<T&> { typedef T& type; }; // NOLINT
769 // A handy wrapper for ByRef.
770 #define GTEST_BY_REF_(T) typename ::std::tr1::gtest_internal::ByRef<T>::type
772 // AddRef<T>::type is T if T is a reference; otherwise it's T&. This
773 // is the same as tr1::add_reference<T>::type.
774 template <typename T>
775 struct AddRef { typedef T& type; }; // NOLINT
776 template <typename T>
777 struct AddRef<T&> { typedef T& type; }; // NOLINT
779 // A handy wrapper for AddRef.
780 #define GTEST_ADD_REF_(T) typename ::std::tr1::gtest_internal::AddRef<T>::type
782 // A helper for implementing get<k>().
783 template <int k> class Get;
785 // A helper for implementing tuple_element<k, T>. kIndexValid is true
786 // iff k < the number of fields in tuple type T.
787 template <bool kIndexValid, int kIndex, class Tuple>
790 template <GTEST_10_TYPENAMES_(T)>
791 struct TupleElement<true, 0, GTEST_10_TUPLE_(T) > {
795 template <GTEST_10_TYPENAMES_(T)>
796 struct TupleElement<true, 1, GTEST_10_TUPLE_(T) > {
800 template <GTEST_10_TYPENAMES_(T)>
801 struct TupleElement<true, 2, GTEST_10_TUPLE_(T) > {
805 template <GTEST_10_TYPENAMES_(T)>
806 struct TupleElement<true, 3, GTEST_10_TUPLE_(T) > {
810 template <GTEST_10_TYPENAMES_(T)>
811 struct TupleElement<true, 4, GTEST_10_TUPLE_(T) > {
815 template <GTEST_10_TYPENAMES_(T)>
816 struct TupleElement<true, 5, GTEST_10_TUPLE_(T) > {
820 template <GTEST_10_TYPENAMES_(T)>
821 struct TupleElement<true, 6, GTEST_10_TUPLE_(T) > {
825 template <GTEST_10_TYPENAMES_(T)>
826 struct TupleElement<true, 7, GTEST_10_TUPLE_(T) > {
830 template <GTEST_10_TYPENAMES_(T)>
831 struct TupleElement<true, 8, GTEST_10_TUPLE_(T) > {
835 template <GTEST_10_TYPENAMES_(T)>
836 struct TupleElement<true, 9, GTEST_10_TUPLE_(T) > {
840 } // namespace gtest_internal
846 tuple(const tuple& /* t */) {}
847 tuple& operator=(const tuple& /* t */) { return *this; }
850 template <GTEST_1_TYPENAMES_(T)>
851 class GTEST_1_TUPLE_(T) {
853 template <int k> friend class gtest_internal::Get;
857 explicit tuple(GTEST_BY_REF_(T0) f0) : f0_(f0) {}
859 tuple(const tuple& t) : f0_(t.f0_) {}
861 template <GTEST_1_TYPENAMES_(U)>
862 tuple(const GTEST_1_TUPLE_(U)& t) : f0_(t.f0_) {}
864 tuple& operator=(const tuple& t) { return CopyFrom(t); }
866 template <GTEST_1_TYPENAMES_(U)>
867 tuple& operator=(const GTEST_1_TUPLE_(U)& t) {
871 GTEST_DECLARE_TUPLE_AS_FRIEND_
873 template <GTEST_1_TYPENAMES_(U)>
874 tuple& CopyFrom(const GTEST_1_TUPLE_(U)& t) {
882 template <GTEST_2_TYPENAMES_(T)>
883 class GTEST_2_TUPLE_(T) {
885 template <int k> friend class gtest_internal::Get;
887 tuple() : f0_(), f1_() {}
889 explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1) : f0_(f0),
892 tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_) {}
894 template <GTEST_2_TYPENAMES_(U)>
895 tuple(const GTEST_2_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_) {}
896 template <typename U0, typename U1>
897 tuple(const ::std::pair<U0, U1>& p) : f0_(p.first), f1_(p.second) {}
899 tuple& operator=(const tuple& t) { return CopyFrom(t); }
901 template <GTEST_2_TYPENAMES_(U)>
902 tuple& operator=(const GTEST_2_TUPLE_(U)& t) {
905 template <typename U0, typename U1>
906 tuple& operator=(const ::std::pair<U0, U1>& p) {
912 GTEST_DECLARE_TUPLE_AS_FRIEND_
914 template <GTEST_2_TYPENAMES_(U)>
915 tuple& CopyFrom(const GTEST_2_TUPLE_(U)& t) {
925 template <GTEST_3_TYPENAMES_(T)>
926 class GTEST_3_TUPLE_(T) {
928 template <int k> friend class gtest_internal::Get;
930 tuple() : f0_(), f1_(), f2_() {}
932 explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1,
933 GTEST_BY_REF_(T2) f2) : f0_(f0), f1_(f1), f2_(f2) {}
935 tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_) {}
937 template <GTEST_3_TYPENAMES_(U)>
938 tuple(const GTEST_3_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_) {}
940 tuple& operator=(const tuple& t) { return CopyFrom(t); }
942 template <GTEST_3_TYPENAMES_(U)>
943 tuple& operator=(const GTEST_3_TUPLE_(U)& t) {
947 GTEST_DECLARE_TUPLE_AS_FRIEND_
949 template <GTEST_3_TYPENAMES_(U)>
950 tuple& CopyFrom(const GTEST_3_TUPLE_(U)& t) {
962 template <GTEST_4_TYPENAMES_(T)>
963 class GTEST_4_TUPLE_(T) {
965 template <int k> friend class gtest_internal::Get;
967 tuple() : f0_(), f1_(), f2_(), f3_() {}
969 explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1,
970 GTEST_BY_REF_(T2) f2, GTEST_BY_REF_(T3) f3) : f0_(f0), f1_(f1), f2_(f2),
973 tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_) {}
975 template <GTEST_4_TYPENAMES_(U)>
976 tuple(const GTEST_4_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_),
979 tuple& operator=(const tuple& t) { return CopyFrom(t); }
981 template <GTEST_4_TYPENAMES_(U)>
982 tuple& operator=(const GTEST_4_TUPLE_(U)& t) {
986 GTEST_DECLARE_TUPLE_AS_FRIEND_
988 template <GTEST_4_TYPENAMES_(U)>
989 tuple& CopyFrom(const GTEST_4_TUPLE_(U)& t) {
1003 template <GTEST_5_TYPENAMES_(T)>
1004 class GTEST_5_TUPLE_(T) {
1006 template <int k> friend class gtest_internal::Get;
1008 tuple() : f0_(), f1_(), f2_(), f3_(), f4_() {}
1010 explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1,
1011 GTEST_BY_REF_(T2) f2, GTEST_BY_REF_(T3) f3,
1012 GTEST_BY_REF_(T4) f4) : f0_(f0), f1_(f1), f2_(f2), f3_(f3), f4_(f4) {}
1014 tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_),
1017 template <GTEST_5_TYPENAMES_(U)>
1018 tuple(const GTEST_5_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_),
1019 f3_(t.f3_), f4_(t.f4_) {}
1021 tuple& operator=(const tuple& t) { return CopyFrom(t); }
1023 template <GTEST_5_TYPENAMES_(U)>
1024 tuple& operator=(const GTEST_5_TUPLE_(U)& t) {
1028 GTEST_DECLARE_TUPLE_AS_FRIEND_
1030 template <GTEST_5_TYPENAMES_(U)>
1031 tuple& CopyFrom(const GTEST_5_TUPLE_(U)& t) {
1047 template <GTEST_6_TYPENAMES_(T)>
1048 class GTEST_6_TUPLE_(T) {
1050 template <int k> friend class gtest_internal::Get;
1052 tuple() : f0_(), f1_(), f2_(), f3_(), f4_(), f5_() {}
1054 explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1,
1055 GTEST_BY_REF_(T2) f2, GTEST_BY_REF_(T3) f3, GTEST_BY_REF_(T4) f4,
1056 GTEST_BY_REF_(T5) f5) : f0_(f0), f1_(f1), f2_(f2), f3_(f3), f4_(f4),
1059 tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_),
1060 f4_(t.f4_), f5_(t.f5_) {}
1062 template <GTEST_6_TYPENAMES_(U)>
1063 tuple(const GTEST_6_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_),
1064 f3_(t.f3_), f4_(t.f4_), f5_(t.f5_) {}
1066 tuple& operator=(const tuple& t) { return CopyFrom(t); }
1068 template <GTEST_6_TYPENAMES_(U)>
1069 tuple& operator=(const GTEST_6_TUPLE_(U)& t) {
1073 GTEST_DECLARE_TUPLE_AS_FRIEND_
1075 template <GTEST_6_TYPENAMES_(U)>
1076 tuple& CopyFrom(const GTEST_6_TUPLE_(U)& t) {
1094 template <GTEST_7_TYPENAMES_(T)>
1095 class GTEST_7_TUPLE_(T) {
1097 template <int k> friend class gtest_internal::Get;
1099 tuple() : f0_(), f1_(), f2_(), f3_(), f4_(), f5_(), f6_() {}
1101 explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1,
1102 GTEST_BY_REF_(T2) f2, GTEST_BY_REF_(T3) f3, GTEST_BY_REF_(T4) f4,
1103 GTEST_BY_REF_(T5) f5, GTEST_BY_REF_(T6) f6) : f0_(f0), f1_(f1), f2_(f2),
1104 f3_(f3), f4_(f4), f5_(f5), f6_(f6) {}
1106 tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_),
1107 f4_(t.f4_), f5_(t.f5_), f6_(t.f6_) {}
1109 template <GTEST_7_TYPENAMES_(U)>
1110 tuple(const GTEST_7_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_),
1111 f3_(t.f3_), f4_(t.f4_), f5_(t.f5_), f6_(t.f6_) {}
1113 tuple& operator=(const tuple& t) { return CopyFrom(t); }
1115 template <GTEST_7_TYPENAMES_(U)>
1116 tuple& operator=(const GTEST_7_TUPLE_(U)& t) {
1120 GTEST_DECLARE_TUPLE_AS_FRIEND_
1122 template <GTEST_7_TYPENAMES_(U)>
1123 tuple& CopyFrom(const GTEST_7_TUPLE_(U)& t) {
1143 template <GTEST_8_TYPENAMES_(T)>
1144 class GTEST_8_TUPLE_(T) {
1146 template <int k> friend class gtest_internal::Get;
1148 tuple() : f0_(), f1_(), f2_(), f3_(), f4_(), f5_(), f6_(), f7_() {}
1150 explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1,
1151 GTEST_BY_REF_(T2) f2, GTEST_BY_REF_(T3) f3, GTEST_BY_REF_(T4) f4,
1152 GTEST_BY_REF_(T5) f5, GTEST_BY_REF_(T6) f6,
1153 GTEST_BY_REF_(T7) f7) : f0_(f0), f1_(f1), f2_(f2), f3_(f3), f4_(f4),
1154 f5_(f5), f6_(f6), f7_(f7) {}
1156 tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_),
1157 f4_(t.f4_), f5_(t.f5_), f6_(t.f6_), f7_(t.f7_) {}
1159 template <GTEST_8_TYPENAMES_(U)>
1160 tuple(const GTEST_8_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_),
1161 f3_(t.f3_), f4_(t.f4_), f5_(t.f5_), f6_(t.f6_), f7_(t.f7_) {}
1163 tuple& operator=(const tuple& t) { return CopyFrom(t); }
1165 template <GTEST_8_TYPENAMES_(U)>
1166 tuple& operator=(const GTEST_8_TUPLE_(U)& t) {
1170 GTEST_DECLARE_TUPLE_AS_FRIEND_
1172 template <GTEST_8_TYPENAMES_(U)>
1173 tuple& CopyFrom(const GTEST_8_TUPLE_(U)& t) {
1195 template <GTEST_9_TYPENAMES_(T)>
1196 class GTEST_9_TUPLE_(T) {
1198 template <int k> friend class gtest_internal::Get;
1200 tuple() : f0_(), f1_(), f2_(), f3_(), f4_(), f5_(), f6_(), f7_(), f8_() {}
1202 explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1,
1203 GTEST_BY_REF_(T2) f2, GTEST_BY_REF_(T3) f3, GTEST_BY_REF_(T4) f4,
1204 GTEST_BY_REF_(T5) f5, GTEST_BY_REF_(T6) f6, GTEST_BY_REF_(T7) f7,
1205 GTEST_BY_REF_(T8) f8) : f0_(f0), f1_(f1), f2_(f2), f3_(f3), f4_(f4),
1206 f5_(f5), f6_(f6), f7_(f7), f8_(f8) {}
1208 tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_),
1209 f4_(t.f4_), f5_(t.f5_), f6_(t.f6_), f7_(t.f7_), f8_(t.f8_) {}
1211 template <GTEST_9_TYPENAMES_(U)>
1212 tuple(const GTEST_9_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_),
1213 f3_(t.f3_), f4_(t.f4_), f5_(t.f5_), f6_(t.f6_), f7_(t.f7_), f8_(t.f8_) {}
1215 tuple& operator=(const tuple& t) { return CopyFrom(t); }
1217 template <GTEST_9_TYPENAMES_(U)>
1218 tuple& operator=(const GTEST_9_TUPLE_(U)& t) {
1222 GTEST_DECLARE_TUPLE_AS_FRIEND_
1224 template <GTEST_9_TYPENAMES_(U)>
1225 tuple& CopyFrom(const GTEST_9_TUPLE_(U)& t) {
1249 template <GTEST_10_TYPENAMES_(T)>
1252 template <int k> friend class gtest_internal::Get;
1254 tuple() : f0_(), f1_(), f2_(), f3_(), f4_(), f5_(), f6_(), f7_(), f8_(),
1257 explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1,
1258 GTEST_BY_REF_(T2) f2, GTEST_BY_REF_(T3) f3, GTEST_BY_REF_(T4) f4,
1259 GTEST_BY_REF_(T5) f5, GTEST_BY_REF_(T6) f6, GTEST_BY_REF_(T7) f7,
1260 GTEST_BY_REF_(T8) f8, GTEST_BY_REF_(T9) f9) : f0_(f0), f1_(f1), f2_(f2),
1261 f3_(f3), f4_(f4), f5_(f5), f6_(f6), f7_(f7), f8_(f8), f9_(f9) {}
1263 tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_),
1264 f4_(t.f4_), f5_(t.f5_), f6_(t.f6_), f7_(t.f7_), f8_(t.f8_), f9_(t.f9_) {}
1266 template <GTEST_10_TYPENAMES_(U)>
1267 tuple(const GTEST_10_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_),
1268 f3_(t.f3_), f4_(t.f4_), f5_(t.f5_), f6_(t.f6_), f7_(t.f7_), f8_(t.f8_),
1271 tuple& operator=(const tuple& t) { return CopyFrom(t); }
1273 template <GTEST_10_TYPENAMES_(U)>
1274 tuple& operator=(const GTEST_10_TUPLE_(U)& t) {
1278 GTEST_DECLARE_TUPLE_AS_FRIEND_
1280 template <GTEST_10_TYPENAMES_(U)>
1281 tuple& CopyFrom(const GTEST_10_TUPLE_(U)& t) {
1307 // 6.1.3.2 Tuple creation functions.
1309 // Known limitations: we don't support passing an
1310 // std::tr1::reference_wrapper<T> to make_tuple(). And we don't
1313 inline tuple<> make_tuple() { return tuple<>(); }
1315 template <GTEST_1_TYPENAMES_(T)>
1316 inline GTEST_1_TUPLE_(T) make_tuple(const T0& f0) {
1317 return GTEST_1_TUPLE_(T)(f0);
1320 template <GTEST_2_TYPENAMES_(T)>
1321 inline GTEST_2_TUPLE_(T) make_tuple(const T0& f0, const T1& f1) {
1322 return GTEST_2_TUPLE_(T)(f0, f1);
1325 template <GTEST_3_TYPENAMES_(T)>
1326 inline GTEST_3_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2) {
1327 return GTEST_3_TUPLE_(T)(f0, f1, f2);
1330 template <GTEST_4_TYPENAMES_(T)>
1331 inline GTEST_4_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2,
1333 return GTEST_4_TUPLE_(T)(f0, f1, f2, f3);
1336 template <GTEST_5_TYPENAMES_(T)>
1337 inline GTEST_5_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2,
1338 const T3& f3, const T4& f4) {
1339 return GTEST_5_TUPLE_(T)(f0, f1, f2, f3, f4);
1342 template <GTEST_6_TYPENAMES_(T)>
1343 inline GTEST_6_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2,
1344 const T3& f3, const T4& f4, const T5& f5) {
1345 return GTEST_6_TUPLE_(T)(f0, f1, f2, f3, f4, f5);
1348 template <GTEST_7_TYPENAMES_(T)>
1349 inline GTEST_7_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2,
1350 const T3& f3, const T4& f4, const T5& f5, const T6& f6) {
1351 return GTEST_7_TUPLE_(T)(f0, f1, f2, f3, f4, f5, f6);
1354 template <GTEST_8_TYPENAMES_(T)>
1355 inline GTEST_8_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2,
1356 const T3& f3, const T4& f4, const T5& f5, const T6& f6, const T7& f7) {
1357 return GTEST_8_TUPLE_(T)(f0, f1, f2, f3, f4, f5, f6, f7);
1360 template <GTEST_9_TYPENAMES_(T)>
1361 inline GTEST_9_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2,
1362 const T3& f3, const T4& f4, const T5& f5, const T6& f6, const T7& f7,
1364 return GTEST_9_TUPLE_(T)(f0, f1, f2, f3, f4, f5, f6, f7, f8);
1367 template <GTEST_10_TYPENAMES_(T)>
1368 inline GTEST_10_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2,
1369 const T3& f3, const T4& f4, const T5& f5, const T6& f6, const T7& f7,
1370 const T8& f8, const T9& f9) {
1371 return GTEST_10_TUPLE_(T)(f0, f1, f2, f3, f4, f5, f6, f7, f8, f9);
1374 // 6.1.3.3 Tuple helper classes.
1376 template <typename Tuple> struct tuple_size;
1378 template <GTEST_0_TYPENAMES_(T)>
1379 struct tuple_size<GTEST_0_TUPLE_(T) > {
1380 static const int value = 0;
1383 template <GTEST_1_TYPENAMES_(T)>
1384 struct tuple_size<GTEST_1_TUPLE_(T) > {
1385 static const int value = 1;
1388 template <GTEST_2_TYPENAMES_(T)>
1389 struct tuple_size<GTEST_2_TUPLE_(T) > {
1390 static const int value = 2;
1393 template <GTEST_3_TYPENAMES_(T)>
1394 struct tuple_size<GTEST_3_TUPLE_(T) > {
1395 static const int value = 3;
1398 template <GTEST_4_TYPENAMES_(T)>
1399 struct tuple_size<GTEST_4_TUPLE_(T) > {
1400 static const int value = 4;
1403 template <GTEST_5_TYPENAMES_(T)>
1404 struct tuple_size<GTEST_5_TUPLE_(T) > {
1405 static const int value = 5;
1408 template <GTEST_6_TYPENAMES_(T)>
1409 struct tuple_size<GTEST_6_TUPLE_(T) > {
1410 static const int value = 6;
1413 template <GTEST_7_TYPENAMES_(T)>
1414 struct tuple_size<GTEST_7_TUPLE_(T) > {
1415 static const int value = 7;
1418 template <GTEST_8_TYPENAMES_(T)>
1419 struct tuple_size<GTEST_8_TUPLE_(T) > {
1420 static const int value = 8;
1423 template <GTEST_9_TYPENAMES_(T)>
1424 struct tuple_size<GTEST_9_TUPLE_(T) > {
1425 static const int value = 9;
1428 template <GTEST_10_TYPENAMES_(T)>
1429 struct tuple_size<GTEST_10_TUPLE_(T) > {
1430 static const int value = 10;
1433 template <int k, class Tuple>
1434 struct tuple_element {
1435 typedef typename gtest_internal::TupleElement<
1436 k < (tuple_size<Tuple>::value), k, Tuple>::type type;
1439 #define GTEST_TUPLE_ELEMENT_(k, Tuple) typename tuple_element<k, Tuple >::type
1441 // 6.1.3.4 Element access.
1443 namespace gtest_internal {
1448 template <class Tuple>
1449 static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(0, Tuple))
1450 Field(Tuple& t) { return t.f0_; } // NOLINT
1452 template <class Tuple>
1453 static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(0, Tuple))
1454 ConstField(const Tuple& t) { return t.f0_; }
1460 template <class Tuple>
1461 static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(1, Tuple))
1462 Field(Tuple& t) { return t.f1_; } // NOLINT
1464 template <class Tuple>
1465 static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(1, Tuple))
1466 ConstField(const Tuple& t) { return t.f1_; }
1472 template <class Tuple>
1473 static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(2, Tuple))
1474 Field(Tuple& t) { return t.f2_; } // NOLINT
1476 template <class Tuple>
1477 static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(2, Tuple))
1478 ConstField(const Tuple& t) { return t.f2_; }
1484 template <class Tuple>
1485 static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(3, Tuple))
1486 Field(Tuple& t) { return t.f3_; } // NOLINT
1488 template <class Tuple>
1489 static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(3, Tuple))
1490 ConstField(const Tuple& t) { return t.f3_; }
1496 template <class Tuple>
1497 static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(4, Tuple))
1498 Field(Tuple& t) { return t.f4_; } // NOLINT
1500 template <class Tuple>
1501 static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(4, Tuple))
1502 ConstField(const Tuple& t) { return t.f4_; }
1508 template <class Tuple>
1509 static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(5, Tuple))
1510 Field(Tuple& t) { return t.f5_; } // NOLINT
1512 template <class Tuple>
1513 static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(5, Tuple))
1514 ConstField(const Tuple& t) { return t.f5_; }
1520 template <class Tuple>
1521 static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(6, Tuple))
1522 Field(Tuple& t) { return t.f6_; } // NOLINT
1524 template <class Tuple>
1525 static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(6, Tuple))
1526 ConstField(const Tuple& t) { return t.f6_; }
1532 template <class Tuple>
1533 static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(7, Tuple))
1534 Field(Tuple& t) { return t.f7_; } // NOLINT
1536 template <class Tuple>
1537 static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(7, Tuple))
1538 ConstField(const Tuple& t) { return t.f7_; }
1544 template <class Tuple>
1545 static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(8, Tuple))
1546 Field(Tuple& t) { return t.f8_; } // NOLINT
1548 template <class Tuple>
1549 static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(8, Tuple))
1550 ConstField(const Tuple& t) { return t.f8_; }
1556 template <class Tuple>
1557 static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(9, Tuple))
1558 Field(Tuple& t) { return t.f9_; } // NOLINT
1560 template <class Tuple>
1561 static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(9, Tuple))
1562 ConstField(const Tuple& t) { return t.f9_; }
1565 } // namespace gtest_internal
1567 template <int k, GTEST_10_TYPENAMES_(T)>
1568 GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(k, GTEST_10_TUPLE_(T)))
1569 get(GTEST_10_TUPLE_(T)& t) {
1570 return gtest_internal::Get<k>::Field(t);
1573 template <int k, GTEST_10_TYPENAMES_(T)>
1574 GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(k, GTEST_10_TUPLE_(T)))
1575 get(const GTEST_10_TUPLE_(T)& t) {
1576 return gtest_internal::Get<k>::ConstField(t);
1579 // 6.1.3.5 Relational operators
1581 // We only implement == and !=, as we don't have a need for the rest yet.
1583 namespace gtest_internal {
1585 // SameSizeTuplePrefixComparator<k, k>::Eq(t1, t2) returns true if the
1586 // first k fields of t1 equals the first k fields of t2.
1587 // SameSizeTuplePrefixComparator(k1, k2) would be a compiler error if
1589 template <int kSize1, int kSize2>
1590 struct SameSizeTuplePrefixComparator;
1593 struct SameSizeTuplePrefixComparator<0, 0> {
1594 template <class Tuple1, class Tuple2>
1595 static bool Eq(const Tuple1& /* t1 */, const Tuple2& /* t2 */) {
1601 struct SameSizeTuplePrefixComparator<k, k> {
1602 template <class Tuple1, class Tuple2>
1603 static bool Eq(const Tuple1& t1, const Tuple2& t2) {
1604 return SameSizeTuplePrefixComparator<k - 1, k - 1>::Eq(t1, t2) &&
1605 ::std::tr1::get<k - 1>(t1) == ::std::tr1::get<k - 1>(t2);
1609 } // namespace gtest_internal
1611 template <GTEST_10_TYPENAMES_(T), GTEST_10_TYPENAMES_(U)>
1612 inline bool operator==(const GTEST_10_TUPLE_(T)& t,
1613 const GTEST_10_TUPLE_(U)& u) {
1614 return gtest_internal::SameSizeTuplePrefixComparator<
1615 tuple_size<GTEST_10_TUPLE_(T) >::value,
1616 tuple_size<GTEST_10_TUPLE_(U) >::value>::Eq(t, u);
1619 template <GTEST_10_TYPENAMES_(T), GTEST_10_TYPENAMES_(U)>
1620 inline bool operator!=(const GTEST_10_TUPLE_(T)& t,
1621 const GTEST_10_TUPLE_(U)& u) { return !(t == u); }
1629 #undef GTEST_0_TUPLE_
1630 #undef GTEST_1_TUPLE_
1631 #undef GTEST_2_TUPLE_
1632 #undef GTEST_3_TUPLE_
1633 #undef GTEST_4_TUPLE_
1634 #undef GTEST_5_TUPLE_
1635 #undef GTEST_6_TUPLE_
1636 #undef GTEST_7_TUPLE_
1637 #undef GTEST_8_TUPLE_
1638 #undef GTEST_9_TUPLE_
1639 #undef GTEST_10_TUPLE_
1641 #undef GTEST_0_TYPENAMES_
1642 #undef GTEST_1_TYPENAMES_
1643 #undef GTEST_2_TYPENAMES_
1644 #undef GTEST_3_TYPENAMES_
1645 #undef GTEST_4_TYPENAMES_
1646 #undef GTEST_5_TYPENAMES_
1647 #undef GTEST_6_TYPENAMES_
1648 #undef GTEST_7_TYPENAMES_
1649 #undef GTEST_8_TYPENAMES_
1650 #undef GTEST_9_TYPENAMES_
1651 #undef GTEST_10_TYPENAMES_
1653 #undef GTEST_DECLARE_TUPLE_AS_FRIEND_
1654 #undef GTEST_BY_REF_
1655 #undef GTEST_ADD_REF_
1656 #undef GTEST_TUPLE_ELEMENT_
1658 #endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TUPLE_H_
1659 # elif GTEST_ENV_HAS_STD_TUPLE_
1661 // C++11 puts its tuple into the ::std namespace rather than
1662 // ::std::tr1. gtest expects tuple to live in ::std::tr1, so put it there.
1663 // This causes undefined behavior, but supported compilers react in
1664 // the way we intend.
1668 using ::std::make_tuple;
1670 using ::std::tuple_element;
1671 using ::std::tuple_size;
1675 # elif GTEST_OS_SYMBIAN
1677 // On Symbian, BOOST_HAS_TR1_TUPLE causes Boost's TR1 tuple library to
1678 // use STLport's tuple implementation, which unfortunately doesn't
1679 // work as the copy of STLport distributed with Symbian is incomplete.
1680 // By making sure BOOST_HAS_TR1_TUPLE is undefined, we force Boost to
1681 // use its own tuple implementation.
1682 # ifdef BOOST_HAS_TR1_TUPLE
1683 # undef BOOST_HAS_TR1_TUPLE
1684 # endif // BOOST_HAS_TR1_TUPLE
1686 // This prevents <boost/tr1/detail/config.hpp>, which defines
1687 // BOOST_HAS_TR1_TUPLE, from being #included by Boost's <tuple>.
1688 # define BOOST_TR1_DETAIL_CONFIG_HPP_INCLUDED
1691 # elif defined(__GNUC__) && (GTEST_GCC_VER_ >= 40000)
1692 // GCC 4.0+ implements tr1/tuple in the <tr1/tuple> header. This does
1693 // not conform to the TR1 spec, which requires the header to be <tuple>.
1695 # if !GTEST_HAS_RTTI && GTEST_GCC_VER_ < 40302
1696 // Until version 4.3.2, gcc has a bug that causes <tr1/functional>,
1697 // which is #included by <tr1/tuple>, to not compile when RTTI is
1698 // disabled. _TR1_FUNCTIONAL is the header guard for
1699 // <tr1/functional>. Hence the following #define is a hack to prevent
1700 // <tr1/functional> from being included.
1701 # define _TR1_FUNCTIONAL 1
1702 # include <tr1/tuple>
1703 # undef _TR1_FUNCTIONAL // Allows the user to #include
1704 // <tr1/functional> if he chooses to.
1706 # include <tr1/tuple> // NOLINT
1707 # endif // !GTEST_HAS_RTTI && GTEST_GCC_VER_ < 40302
1710 // If the compiler is not GCC 4.0+, we assume the user is using a
1711 // spec-conforming TR1 implementation.
1712 # include <tuple> // NOLINT
1713 # endif // GTEST_USE_OWN_TR1_TUPLE
1715 #endif // GTEST_HAS_TR1_TUPLE
1717 // Determines whether clone(2) is supported.
1718 // Usually it will only be available on Linux, excluding
1719 // Linux on the Itanium architecture.
1720 // Also see http://linux.die.net/man/2/clone.
1721 #ifndef GTEST_HAS_CLONE
1722 // The user didn't tell us, so we need to figure it out.
1724 # if GTEST_OS_LINUX && !defined(__ia64__)
1725 # if GTEST_OS_LINUX_ANDROID
1726 // On Android, clone() is only available on ARM starting with Gingerbread.
1727 # if defined(__arm__) && __ANDROID_API__ >= 9
1728 # define GTEST_HAS_CLONE 1
1730 # define GTEST_HAS_CLONE 0
1733 # define GTEST_HAS_CLONE 1
1736 # define GTEST_HAS_CLONE 0
1737 # endif // GTEST_OS_LINUX && !defined(__ia64__)
1739 #endif // GTEST_HAS_CLONE
1741 // Determines whether to support stream redirection. This is used to test
1742 // output correctness and to implement death tests.
1743 #ifndef GTEST_HAS_STREAM_REDIRECTION
1744 // By default, we assume that stream redirection is supported on all
1745 // platforms except known mobile ones.
1746 # if GTEST_OS_WINDOWS_MOBILE || GTEST_OS_SYMBIAN
1747 # define GTEST_HAS_STREAM_REDIRECTION 0
1749 # define GTEST_HAS_STREAM_REDIRECTION 1
1750 # endif // !GTEST_OS_WINDOWS_MOBILE && !GTEST_OS_SYMBIAN
1751 #endif // GTEST_HAS_STREAM_REDIRECTION
1753 // Determines whether to support death tests.
1754 // Google Test does not support death tests for VC 7.1 and earlier as
1755 // abort() in a VC 7.1 application compiled as GUI in debug config
1756 // pops up a dialog window that cannot be suppressed programmatically.
1757 #if (GTEST_OS_LINUX || GTEST_OS_CYGWIN || GTEST_OS_SOLARIS || \
1758 (GTEST_OS_MAC && !GTEST_OS_IOS) || GTEST_OS_IOS_SIMULATOR || \
1759 (GTEST_OS_WINDOWS_DESKTOP && _MSC_VER >= 1400) || \
1760 GTEST_OS_WINDOWS_MINGW || GTEST_OS_AIX || GTEST_OS_HPUX || \
1761 GTEST_OS_OPENBSD || GTEST_OS_QNX)
1762 # define GTEST_HAS_DEATH_TEST 1
1763 # include <vector> // NOLINT
1766 // We don't support MSVC 7.1 with exceptions disabled now. Therefore
1767 // all the compilers we care about are adequate for supporting
1768 // value-parameterized tests.
1769 #define GTEST_HAS_PARAM_TEST 1
1771 // Determines whether to support type-driven tests.
1773 // Typed tests need <typeinfo> and variadic macros, which GCC, VC++ 8.0,
1774 // Sun Pro CC, IBM Visual Age, and HP aCC support.
1775 #if defined(__GNUC__) || (_MSC_VER >= 1400) || defined(__SUNPRO_CC) || \
1776 defined(__IBMCPP__) || defined(__HP_aCC)
1777 # define GTEST_HAS_TYPED_TEST 1
1778 # define GTEST_HAS_TYPED_TEST_P 1
1781 // Determines whether to support Combine(). This only makes sense when
1782 // value-parameterized tests are enabled. The implementation doesn't
1783 // work on Sun Studio since it doesn't understand templated conversion
1785 #if GTEST_HAS_PARAM_TEST && GTEST_HAS_TR1_TUPLE && !defined(__SUNPRO_CC)
1786 # define GTEST_HAS_COMBINE 1
1789 // Determines whether the system compiler uses UTF-16 for encoding wide strings.
1790 #define GTEST_WIDE_STRING_USES_UTF16_ \
1791 (GTEST_OS_WINDOWS || GTEST_OS_CYGWIN || GTEST_OS_SYMBIAN || GTEST_OS_AIX)
1793 // Determines whether test results can be streamed to a socket.
1795 # define GTEST_CAN_STREAM_RESULTS_ 1
1798 // Defines some utility macros.
1800 // The GNU compiler emits a warning if nested "if" statements are followed by
1801 // an "else" statement and braces are not used to explicitly disambiguate the
1802 // "else" binding. This leads to problems with code like:
1805 // ASSERT_*(condition) << "Some message";
1807 // The "switch (0) case 0:" idiom is used to suppress this.
1808 #ifdef __INTEL_COMPILER
1809 # define GTEST_AMBIGUOUS_ELSE_BLOCKER_
1811 # define GTEST_AMBIGUOUS_ELSE_BLOCKER_ switch (0) case 0: default: // NOLINT
1814 // Use this annotation at the end of a struct/class definition to
1815 // prevent the compiler from optimizing away instances that are never
1816 // used. This is useful when all interesting logic happens inside the
1817 // c'tor and / or d'tor. Example:
1821 // } GTEST_ATTRIBUTE_UNUSED_;
1823 // Also use it after a variable or parameter declaration to tell the
1824 // compiler the variable/parameter does not have to be used.
1825 #if defined(__GNUC__) && !defined(COMPILER_ICC)
1826 # define GTEST_ATTRIBUTE_UNUSED_ __attribute__ ((unused))
1828 # define GTEST_ATTRIBUTE_UNUSED_
1831 // A macro to disallow operator=
1832 // This should be used in the private: declarations for a class.
1833 #define GTEST_DISALLOW_ASSIGN_(type)\
1834 void operator=(type const &)
1836 // A macro to disallow copy constructor and operator=
1837 // This should be used in the private: declarations for a class.
1838 #define GTEST_DISALLOW_COPY_AND_ASSIGN_(type)\
1839 type(type const &);\
1840 GTEST_DISALLOW_ASSIGN_(type)
1842 // Tell the compiler to warn about unused return values for functions declared
1843 // with this macro. The macro should be used on function declarations
1844 // following the argument list:
1846 // Sprocket* AllocateSprocket() GTEST_MUST_USE_RESULT_;
1847 #if defined(__GNUC__) && (GTEST_GCC_VER_ >= 30400) && !defined(COMPILER_ICC)
1848 # define GTEST_MUST_USE_RESULT_ __attribute__ ((warn_unused_result))
1850 # define GTEST_MUST_USE_RESULT_
1851 #endif // __GNUC__ && (GTEST_GCC_VER_ >= 30400) && !COMPILER_ICC
1853 // Determine whether the compiler supports Microsoft's Structured Exception
1854 // Handling. This is supported by several Windows compilers but generally
1855 // does not exist on any other system.
1856 #ifndef GTEST_HAS_SEH
1857 // The user didn't tell us, so we need to figure it out.
1859 # if defined(_MSC_VER) || defined(__BORLANDC__)
1860 // These two compilers are known to support SEH.
1861 # define GTEST_HAS_SEH 1
1864 # define GTEST_HAS_SEH 0
1867 #endif // GTEST_HAS_SEH
1871 # if GTEST_LINKED_AS_SHARED_LIBRARY
1872 # define GTEST_API_ __declspec(dllimport)
1873 # elif GTEST_CREATE_SHARED_LIBRARY
1874 # define GTEST_API_ __declspec(dllexport)
1884 // Ask the compiler to never inline a given function.
1885 # define GTEST_NO_INLINE_ __attribute__((noinline))
1887 # define GTEST_NO_INLINE_
1890 // _LIBCPP_VERSION is defined by the libc++ library from the LLVM project.
1891 #if defined(__GLIBCXX__) || defined(_LIBCPP_VERSION)
1892 # define GTEST_HAS_CXXABI_H_ 1
1894 # define GTEST_HAS_CXXABI_H_ 0
1901 namespace internal {
1903 // The GTEST_COMPILE_ASSERT_ macro can be used to verify that a compile time
1904 // expression is true. For example, you could use it to verify the
1905 // size of a static array:
1907 // GTEST_COMPILE_ASSERT_(ARRAYSIZE(content_type_names) == CONTENT_NUM_TYPES,
1908 // content_type_names_incorrect_size);
1910 // or to make sure a struct is smaller than a certain size:
1912 // GTEST_COMPILE_ASSERT_(sizeof(foo) < 128, foo_too_large);
1914 // The second argument to the macro is the name of the variable. If
1915 // the expression is false, most compilers will issue a warning/error
1916 // containing the name of the variable.
1919 struct CompileAssert {
1922 #define GTEST_COMPILE_ASSERT_(expr, msg) \
1923 typedef ::testing::internal::CompileAssert<(bool(expr))> \
1924 msg[bool(expr) ? 1 : -1]
1926 // Implementation details of GTEST_COMPILE_ASSERT_:
1928 // - GTEST_COMPILE_ASSERT_ works by defining an array type that has -1
1929 // elements (and thus is invalid) when the expression is false.
1931 // - The simpler definition
1933 // #define GTEST_COMPILE_ASSERT_(expr, msg) typedef char msg[(expr) ? 1 : -1]
1935 // does not work, as gcc supports variable-length arrays whose sizes
1936 // are determined at run-time (this is gcc's extension and not part
1937 // of the C++ standard). As a result, gcc fails to reject the
1938 // following code with the simple definition:
1941 // GTEST_COMPILE_ASSERT_(foo, msg); // not supposed to compile as foo is
1942 // // not a compile-time constant.
1944 // - By using the type CompileAssert<(bool(expr))>, we ensures that
1945 // expr is a compile-time constant. (Template arguments must be
1946 // determined at compile-time.)
1948 // - The outter parentheses in CompileAssert<(bool(expr))> are necessary
1949 // to work around a bug in gcc 3.4.4 and 4.0.1. If we had written
1951 // CompileAssert<bool(expr)>
1953 // instead, these compilers will refuse to compile
1955 // GTEST_COMPILE_ASSERT_(5 > 0, some_message);
1957 // (They seem to think the ">" in "5 > 0" marks the end of the
1958 // template argument list.)
1960 // - The array size is (bool(expr) ? 1 : -1), instead of simply
1962 // ((expr) ? 1 : -1).
1964 // This is to avoid running into a bug in MS VC 7.1, which
1965 // causes ((0.0) ? 1 : -1) to incorrectly evaluate to 1.
1967 // StaticAssertTypeEqHelper is used by StaticAssertTypeEq defined in gtest.h.
1969 // This template is declared, but intentionally undefined.
1970 template <typename T1, typename T2>
1971 struct StaticAssertTypeEqHelper;
1973 template <typename T>
1974 struct StaticAssertTypeEqHelper<T, T> {};
1976 #if GTEST_HAS_GLOBAL_STRING
1977 typedef ::string string;
1979 typedef ::std::string string;
1980 #endif // GTEST_HAS_GLOBAL_STRING
1982 #if GTEST_HAS_GLOBAL_WSTRING
1983 typedef ::wstring wstring;
1984 #elif GTEST_HAS_STD_WSTRING
1985 typedef ::std::wstring wstring;
1986 #endif // GTEST_HAS_GLOBAL_WSTRING
1988 // A helper for suppressing warnings on constant condition. It just
1989 // returns 'condition'.
1990 GTEST_API_ bool IsTrue(bool condition);
1992 // Defines scoped_ptr.
1994 // This implementation of scoped_ptr is PARTIAL - it only contains
1995 // enough stuff to satisfy Google Test's need.
1996 template <typename T>
1999 typedef T element_type;
2001 explicit scoped_ptr(T* p = NULL) : ptr_(p) {}
2002 ~scoped_ptr() { reset(); }
2004 T& operator*() const { return *ptr_; }
2005 T* operator->() const { return ptr_; }
2006 T* get() const { return ptr_; }
2009 T* const ptr = ptr_;
2014 void reset(T* p = NULL) {
2016 if (IsTrue(sizeof(T) > 0)) { // Makes sure T is a complete type.
2026 GTEST_DISALLOW_COPY_AND_ASSIGN_(scoped_ptr);
2031 // A simple C++ wrapper for <regex.h>. It uses the POSIX Extended
2032 // Regular Expression syntax.
2033 class GTEST_API_ RE {
2035 // A copy constructor is required by the Standard to initialize object
2036 // references from r-values.
2037 RE(const RE& other) { Init(other.pattern()); }
2039 // Constructs an RE from a string.
2040 RE(const ::std::string& regex) { Init(regex.c_str()); } // NOLINT
2042 #if GTEST_HAS_GLOBAL_STRING
2044 RE(const ::string& regex) { Init(regex.c_str()); } // NOLINT
2046 #endif // GTEST_HAS_GLOBAL_STRING
2048 RE(const char* regex) { Init(regex); } // NOLINT
2051 // Returns the string representation of the regex.
2052 const char* pattern() const { return pattern_; }
2054 // FullMatch(str, re) returns true iff regular expression re matches
2056 // PartialMatch(str, re) returns true iff regular expression re
2057 // matches a substring of str (including str itself).
2059 // TODO(wan@google.com): make FullMatch() and PartialMatch() work
2060 // when str contains NUL characters.
2061 static bool FullMatch(const ::std::string& str, const RE& re) {
2062 return FullMatch(str.c_str(), re);
2064 static bool PartialMatch(const ::std::string& str, const RE& re) {
2065 return PartialMatch(str.c_str(), re);
2068 #if GTEST_HAS_GLOBAL_STRING
2070 static bool FullMatch(const ::string& str, const RE& re) {
2071 return FullMatch(str.c_str(), re);
2073 static bool PartialMatch(const ::string& str, const RE& re) {
2074 return PartialMatch(str.c_str(), re);
2077 #endif // GTEST_HAS_GLOBAL_STRING
2079 static bool FullMatch(const char* str, const RE& re);
2080 static bool PartialMatch(const char* str, const RE& re);
2083 void Init(const char* regex);
2085 // We use a const char* instead of an std::string, as Google Test used to be
2086 // used where std::string is not available. TODO(wan@google.com): change to
2088 const char* pattern_;
2091 #if GTEST_USES_POSIX_RE
2093 regex_t full_regex_; // For FullMatch().
2094 regex_t partial_regex_; // For PartialMatch().
2096 #else // GTEST_USES_SIMPLE_RE
2098 const char* full_pattern_; // For FullMatch();
2102 GTEST_DISALLOW_ASSIGN_(RE);
2105 // Formats a source file path and a line number as they would appear
2106 // in an error message from the compiler used to compile this code.
2107 GTEST_API_ ::std::string FormatFileLocation(const char* file, int line);
2109 // Formats a file location for compiler-independent XML output.
2110 // Although this function is not platform dependent, we put it next to
2111 // FormatFileLocation in order to contrast the two functions.
2112 GTEST_API_ ::std::string FormatCompilerIndependentFileLocation(const char* file,
2115 // Defines logging utilities:
2116 // GTEST_LOG_(severity) - logs messages at the specified severity level. The
2117 // message itself is streamed into the macro.
2118 // LogToStderr() - directs all log messages to stderr.
2119 // FlushInfoLog() - flushes informational log messages.
2121 enum GTestLogSeverity {
2128 // Formats log entry severity, provides a stream object for streaming the
2129 // log message, and terminates the message with a newline when going out of
2131 class GTEST_API_ GTestLog {
2133 GTestLog(GTestLogSeverity severity, const char* file, int line);
2135 // Flushes the buffers and, if severity is GTEST_FATAL, aborts the program.
2138 ::std::ostream& GetStream() { return ::std::cerr; }
2141 const GTestLogSeverity severity_;
2143 GTEST_DISALLOW_COPY_AND_ASSIGN_(GTestLog);
2146 #define GTEST_LOG_(severity) \
2147 ::testing::internal::GTestLog(::testing::internal::GTEST_##severity, \
2148 __FILE__, __LINE__).GetStream()
2150 inline void LogToStderr() {}
2151 inline void FlushInfoLog() { fflush(NULL); }
2153 // INTERNAL IMPLEMENTATION - DO NOT USE.
2155 // GTEST_CHECK_ is an all-mode assert. It aborts the program if the condition
2156 // is not satisfied.
2158 // GTEST_CHECK_(boolean_condition);
2160 // GTEST_CHECK_(boolean_condition) << "Additional message";
2162 // This checks the condition and if the condition is not satisfied
2163 // it prints message about the condition violation, including the
2164 // condition itself, plus additional message streamed into it, if any,
2165 // and then it aborts the program. It aborts the program irrespective of
2166 // whether it is built in the debug mode or not.
2167 #define GTEST_CHECK_(condition) \
2168 GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
2169 if (::testing::internal::IsTrue(condition)) \
2172 GTEST_LOG_(FATAL) << "Condition " #condition " failed. "
2174 // An all-mode assert to verify that the given POSIX-style function
2175 // call returns 0 (indicating success). Known limitation: this
2176 // doesn't expand to a balanced 'if' statement, so enclose the macro
2177 // in {} if you need to use it as the only statement in an 'if'
2179 #define GTEST_CHECK_POSIX_SUCCESS_(posix_call) \
2180 if (const int gtest_error = (posix_call)) \
2181 GTEST_LOG_(FATAL) << #posix_call << "failed with error " \
2184 // INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
2186 // Use ImplicitCast_ as a safe version of static_cast for upcasting in
2187 // the type hierarchy (e.g. casting a Foo* to a SuperclassOfFoo* or a
2188 // const Foo*). When you use ImplicitCast_, the compiler checks that
2189 // the cast is safe. Such explicit ImplicitCast_s are necessary in
2190 // surprisingly many situations where C++ demands an exact type match
2191 // instead of an argument type convertable to a target type.
2193 // The syntax for using ImplicitCast_ is the same as for static_cast:
2195 // ImplicitCast_<ToType>(expr)
2197 // ImplicitCast_ would have been part of the C++ standard library,
2198 // but the proposal was submitted too late. It will probably make
2199 // its way into the language in the future.
2201 // This relatively ugly name is intentional. It prevents clashes with
2202 // similar functions users may have (e.g., implicit_cast). The internal
2203 // namespace alone is not enough because the function can be found by ADL.
2204 template<typename To>
2205 inline To ImplicitCast_(To x) { return x; }
2207 // When you upcast (that is, cast a pointer from type Foo to type
2208 // SuperclassOfFoo), it's fine to use ImplicitCast_<>, since upcasts
2209 // always succeed. When you downcast (that is, cast a pointer from
2210 // type Foo to type SubclassOfFoo), static_cast<> isn't safe, because
2211 // how do you know the pointer is really of type SubclassOfFoo? It
2212 // could be a bare Foo, or of type DifferentSubclassOfFoo. Thus,
2213 // when you downcast, you should use this macro. In debug mode, we
2214 // use dynamic_cast<> to double-check the downcast is legal (we die
2215 // if it's not). In normal mode, we do the efficient static_cast<>
2216 // instead. Thus, it's important to test in debug mode to make sure
2217 // the cast is legal!
2218 // This is the only place in the code we should use dynamic_cast<>.
2219 // In particular, you SHOULDN'T be using dynamic_cast<> in order to
2220 // do RTTI (eg code like this:
2221 // if (dynamic_cast<Subclass1>(foo)) HandleASubclass1Object(foo);
2222 // if (dynamic_cast<Subclass2>(foo)) HandleASubclass2Object(foo);
2223 // You should design the code some other way not to need this.
2225 // This relatively ugly name is intentional. It prevents clashes with
2226 // similar functions users may have (e.g., down_cast). The internal
2227 // namespace alone is not enough because the function can be found by ADL.
2228 template<typename To, typename From> // use like this: DownCast_<T*>(foo);
2229 inline To DownCast_(From* f) { // so we only accept pointers
2230 // Ensures that To is a sub-type of From *. This test is here only
2231 // for compile-time type checking, and has no overhead in an
2232 // optimized build at run-time, as it will be optimized away
2236 ::testing::internal::ImplicitCast_<From*>(to);
2240 // RTTI: debug mode only!
2241 GTEST_CHECK_(f == NULL || dynamic_cast<To>(f) != NULL);
2243 return static_cast<To>(f);
2246 // Downcasts the pointer of type Base to Derived.
2247 // Derived must be a subclass of Base. The parameter MUST
2248 // point to a class of type Derived, not any subclass of it.
2249 // When RTTI is available, the function performs a runtime
2250 // check to enforce this.
2251 template <class Derived, class Base>
2252 Derived* CheckedDowncastToActualType(Base* base) {
2254 GTEST_CHECK_(typeid(*base) == typeid(Derived));
2255 return dynamic_cast<Derived*>(base); // NOLINT
2257 return static_cast<Derived*>(base); // Poor man's downcast.
2261 #if GTEST_HAS_STREAM_REDIRECTION
2263 // Defines the stderr capturer:
2264 // CaptureStdout - starts capturing stdout.
2265 // GetCapturedStdout - stops capturing stdout and returns the captured string.
2266 // CaptureStderr - starts capturing stderr.
2267 // GetCapturedStderr - stops capturing stderr and returns the captured string.
2269 GTEST_API_ void CaptureStdout();
2270 GTEST_API_ std::string GetCapturedStdout();
2271 GTEST_API_ void CaptureStderr();
2272 GTEST_API_ std::string GetCapturedStderr();
2274 #endif // GTEST_HAS_STREAM_REDIRECTION
2277 #if GTEST_HAS_DEATH_TEST
2279 const ::std::vector<testing::internal::string>& GetInjectableArgvs();
2280 void SetInjectableArgvs(const ::std::vector<testing::internal::string>*
2283 // A copy of all command line arguments. Set by InitGoogleTest().
2284 extern ::std::vector<testing::internal::string> g_argvs;
2286 #endif // GTEST_HAS_DEATH_TEST
2288 // Defines synchronization primitives.
2290 #if GTEST_HAS_PTHREAD
2292 // Sleeps for (roughly) n milli-seconds. This function is only for
2293 // testing Google Test's own constructs. Don't use it in user tests,
2294 // either directly or indirectly.
2295 inline void SleepMilliseconds(int n) {
2296 const timespec time = {
2298 n * 1000L * 1000L, // And n ms.
2300 nanosleep(&time, NULL);
2303 // Allows a controller thread to pause execution of newly created
2304 // threads until notified. Instances of this class must be created
2305 // and destroyed in the controller thread.
2307 // This class is only for testing Google Test's own constructs. Do not
2308 // use it in user tests, either directly or indirectly.
2309 class Notification {
2311 Notification() : notified_(false) {
2312 GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_init(&mutex_, NULL));
2315 pthread_mutex_destroy(&mutex_);
2318 // Notifies all threads created with this notification to start. Must
2319 // be called from the controller thread.
2321 pthread_mutex_lock(&mutex_);
2323 pthread_mutex_unlock(&mutex_);
2326 // Blocks until the controller thread notifies. Must be called from a test
2328 void WaitForNotification() {
2330 pthread_mutex_lock(&mutex_);
2331 const bool notified = notified_;
2332 pthread_mutex_unlock(&mutex_);
2335 SleepMilliseconds(10);
2340 pthread_mutex_t mutex_;
2343 GTEST_DISALLOW_COPY_AND_ASSIGN_(Notification);
2346 // As a C-function, ThreadFuncWithCLinkage cannot be templated itself.
2347 // Consequently, it cannot select a correct instantiation of ThreadWithParam
2348 // in order to call its Run(). Introducing ThreadWithParamBase as a
2349 // non-templated base class for ThreadWithParam allows us to bypass this
2351 class ThreadWithParamBase {
2353 virtual ~ThreadWithParamBase() {}
2354 virtual void Run() = 0;
2357 // pthread_create() accepts a pointer to a function type with the C linkage.
2358 // According to the Standard (7.5/1), function types with different linkages
2359 // are different even if they are otherwise identical. Some compilers (for
2360 // example, SunStudio) treat them as different types. Since class methods
2361 // cannot be defined with C-linkage we need to define a free C-function to
2362 // pass into pthread_create().
2363 extern "C" inline void* ThreadFuncWithCLinkage(void* thread) {
2364 static_cast<ThreadWithParamBase*>(thread)->Run();
2368 // Helper class for testing Google Test's multi-threading constructs.
2369 // To use it, write:
2371 // void ThreadFunc(int param) { /* Do things with param */ }
2372 // Notification thread_can_start;
2374 // // The thread_can_start parameter is optional; you can supply NULL.
2375 // ThreadWithParam<int> thread(&ThreadFunc, 5, &thread_can_start);
2376 // thread_can_start.Notify();
2378 // These classes are only for testing Google Test's own constructs. Do
2379 // not use them in user tests, either directly or indirectly.
2380 template <typename T>
2381 class ThreadWithParam : public ThreadWithParamBase {
2383 typedef void (*UserThreadFunc)(T);
2386 UserThreadFunc func, T param, Notification* thread_can_start)
2389 thread_can_start_(thread_can_start),
2391 ThreadWithParamBase* const base = this;
2392 // The thread can be created only after all fields except thread_
2393 // have been initialized.
2394 GTEST_CHECK_POSIX_SUCCESS_(
2395 pthread_create(&thread_, 0, &ThreadFuncWithCLinkage, base));
2397 ~ThreadWithParam() { Join(); }
2401 GTEST_CHECK_POSIX_SUCCESS_(pthread_join(thread_, 0));
2406 virtual void Run() {
2407 if (thread_can_start_ != NULL)
2408 thread_can_start_->WaitForNotification();
2413 const UserThreadFunc func_; // User-supplied thread function.
2414 const T param_; // User-supplied parameter to the thread function.
2415 // When non-NULL, used to block execution until the controller thread
2417 Notification* const thread_can_start_;
2418 bool finished_; // true iff we know that the thread function has finished.
2419 pthread_t thread_; // The native thread object.
2421 GTEST_DISALLOW_COPY_AND_ASSIGN_(ThreadWithParam);
2424 // MutexBase and Mutex implement mutex on pthreads-based platforms. They
2425 // are used in conjunction with class MutexLock:
2429 // MutexLock lock(&mutex); // Acquires the mutex and releases it at the end
2430 // // of the current scope.
2432 // MutexBase implements behavior for both statically and dynamically
2433 // allocated mutexes. Do not use MutexBase directly. Instead, write
2434 // the following to define a static mutex:
2436 // GTEST_DEFINE_STATIC_MUTEX_(g_some_mutex);
2438 // You can forward declare a static mutex like this:
2440 // GTEST_DECLARE_STATIC_MUTEX_(g_some_mutex);
2442 // To create a dynamic mutex, just define an object of type Mutex.
2445 // Acquires this mutex.
2447 GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_lock(&mutex_));
2448 owner_ = pthread_self();
2452 // Releases this mutex.
2454 // Since the lock is being released the owner_ field should no longer be
2455 // considered valid. We don't protect writing to has_owner_ here, as it's
2456 // the caller's responsibility to ensure that the current thread holds the
2457 // mutex when this is called.
2459 GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_unlock(&mutex_));
2462 // Does nothing if the current thread holds the mutex. Otherwise, crashes
2463 // with high probability.
2464 void AssertHeld() const {
2465 GTEST_CHECK_(has_owner_ && pthread_equal(owner_, pthread_self()))
2466 << "The current thread is not holding the mutex @" << this;
2469 // A static mutex may be used before main() is entered. It may even
2470 // be used before the dynamic initialization stage. Therefore we
2471 // must be able to initialize a static mutex object at link time.
2472 // This means MutexBase has to be a POD and its member variables
2473 // have to be public.
2475 pthread_mutex_t mutex_; // The underlying pthread mutex.
2476 // has_owner_ indicates whether the owner_ field below contains a valid thread
2477 // ID and is therefore safe to inspect (e.g., to use in pthread_equal()). All
2478 // accesses to the owner_ field should be protected by a check of this field.
2479 // An alternative might be to memset() owner_ to all zeros, but there's no
2480 // guarantee that a zero'd pthread_t is necessarily invalid or even different
2481 // from pthread_self().
2483 pthread_t owner_; // The thread holding the mutex.
2486 // Forward-declares a static mutex.
2487 # define GTEST_DECLARE_STATIC_MUTEX_(mutex) \
2488 extern ::testing::internal::MutexBase mutex
2490 // Defines and statically (i.e. at link time) initializes a static mutex.
2491 // The initialization list here does not explicitly initialize each field,
2492 // instead relying on default initialization for the unspecified fields. In
2493 // particular, the owner_ field (a pthread_t) is not explicitly initialized.
2494 // This allows initialization to work whether pthread_t is a scalar or struct.
2495 // The flag -Wmissing-field-initializers must not be specified for this to work.
2496 # define GTEST_DEFINE_STATIC_MUTEX_(mutex) \
2497 ::testing::internal::MutexBase mutex = { PTHREAD_MUTEX_INITIALIZER, false }
2499 // The Mutex class can only be used for mutexes created at runtime. It
2500 // shares its API with MutexBase otherwise.
2501 class Mutex : public MutexBase {
2504 GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_init(&mutex_, NULL));
2508 GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_destroy(&mutex_));
2512 GTEST_DISALLOW_COPY_AND_ASSIGN_(Mutex);
2515 // We cannot name this class MutexLock as the ctor declaration would
2516 // conflict with a macro named MutexLock, which is defined on some
2517 // platforms. Hence the typedef trick below.
2518 class GTestMutexLock {
2520 explicit GTestMutexLock(MutexBase* mutex)
2521 : mutex_(mutex) { mutex_->Lock(); }
2523 ~GTestMutexLock() { mutex_->Unlock(); }
2526 MutexBase* const mutex_;
2528 GTEST_DISALLOW_COPY_AND_ASSIGN_(GTestMutexLock);
2531 typedef GTestMutexLock MutexLock;
2533 // Helpers for ThreadLocal.
2535 // pthread_key_create() requires DeleteThreadLocalValue() to have
2536 // C-linkage. Therefore it cannot be templatized to access
2537 // ThreadLocal<T>. Hence the need for class
2538 // ThreadLocalValueHolderBase.
2539 class ThreadLocalValueHolderBase {
2541 virtual ~ThreadLocalValueHolderBase() {}
2544 // Called by pthread to delete thread-local data stored by
2545 // pthread_setspecific().
2546 extern "C" inline void DeleteThreadLocalValue(void* value_holder) {
2547 delete static_cast<ThreadLocalValueHolderBase*>(value_holder);
2550 // Implements thread-local storage on pthreads-based systems.
2553 // ThreadLocal<int> tl(100); // 100 is the default value for each thread.
2556 // tl.set(150); // Changes the value for thread 2 only.
2557 // EXPECT_EQ(150, tl.get());
2560 // EXPECT_EQ(100, tl.get()); // In thread 1, tl has the original value.
2562 // EXPECT_EQ(200, tl.get());
2564 // The template type argument T must have a public copy constructor.
2565 // In addition, the default ThreadLocal constructor requires T to have
2566 // a public default constructor.
2568 // An object managed for a thread by a ThreadLocal instance is deleted
2569 // when the thread exits. Or, if the ThreadLocal instance dies in
2570 // that thread, when the ThreadLocal dies. It's the user's
2571 // responsibility to ensure that all other threads using a ThreadLocal
2572 // have exited when it dies, or the per-thread objects for those
2573 // threads will not be deleted.
2575 // Google Test only uses global ThreadLocal objects. That means they
2576 // will die after main() has returned. Therefore, no per-thread
2577 // object managed by Google Test will be leaked as long as all threads
2578 // using Google Test have exited when main() returns.
2579 template <typename T>
2582 ThreadLocal() : key_(CreateKey()),
2584 explicit ThreadLocal(const T& value) : key_(CreateKey()),
2588 // Destroys the managed object for the current thread, if any.
2589 DeleteThreadLocalValue(pthread_getspecific(key_));
2591 // Releases resources associated with the key. This will *not*
2592 // delete managed objects for other threads.
2593 GTEST_CHECK_POSIX_SUCCESS_(pthread_key_delete(key_));
2596 T* pointer() { return GetOrCreateValue(); }
2597 const T* pointer() const { return GetOrCreateValue(); }
2598 const T& get() const { return *pointer(); }
2599 void set(const T& value) { *pointer() = value; }
2602 // Holds a value of type T.
2603 class ValueHolder : public ThreadLocalValueHolderBase {
2605 explicit ValueHolder(const T& value) : value_(value) {}
2607 T* pointer() { return &value_; }
2611 GTEST_DISALLOW_COPY_AND_ASSIGN_(ValueHolder);
2614 static pthread_key_t CreateKey() {
2616 // When a thread exits, DeleteThreadLocalValue() will be called on
2617 // the object managed for that thread.
2618 GTEST_CHECK_POSIX_SUCCESS_(
2619 pthread_key_create(&key, &DeleteThreadLocalValue));
2623 T* GetOrCreateValue() const {
2624 ThreadLocalValueHolderBase* const holder =
2625 static_cast<ThreadLocalValueHolderBase*>(pthread_getspecific(key_));
2626 if (holder != NULL) {
2627 return CheckedDowncastToActualType<ValueHolder>(holder)->pointer();
2630 ValueHolder* const new_holder = new ValueHolder(default_);
2631 ThreadLocalValueHolderBase* const holder_base = new_holder;
2632 GTEST_CHECK_POSIX_SUCCESS_(pthread_setspecific(key_, holder_base));
2633 return new_holder->pointer();
2636 // A key pthreads uses for looking up per-thread values.
2637 const pthread_key_t key_;
2638 const T default_; // The default value for each thread.
2640 GTEST_DISALLOW_COPY_AND_ASSIGN_(ThreadLocal);
2643 # define GTEST_IS_THREADSAFE 1
2645 #else // GTEST_HAS_PTHREAD
2647 // A dummy implementation of synchronization primitives (mutex, lock,
2648 // and thread-local variable). Necessary for compiling Google Test where
2649 // mutex is not supported - using Google Test in multiple threads is not
2650 // supported on such platforms.
2657 void AssertHeld() const {}
2660 # define GTEST_DECLARE_STATIC_MUTEX_(mutex) \
2661 extern ::testing::internal::Mutex mutex
2663 # define GTEST_DEFINE_STATIC_MUTEX_(mutex) ::testing::internal::Mutex mutex
2665 class GTestMutexLock {
2667 explicit GTestMutexLock(Mutex*) {} // NOLINT
2670 typedef GTestMutexLock MutexLock;
2672 template <typename T>
2675 ThreadLocal() : value_() {}
2676 explicit ThreadLocal(const T& value) : value_(value) {}
2677 T* pointer() { return &value_; }
2678 const T* pointer() const { return &value_; }
2679 const T& get() const { return value_; }
2680 void set(const T& value) { value_ = value; }
2685 // The above synchronization primitives have dummy implementations.
2686 // Therefore Google Test is not thread-safe.
2687 # define GTEST_IS_THREADSAFE 0
2689 #endif // GTEST_HAS_PTHREAD
2691 // Returns the number of threads running in the process, or 0 to indicate that
2692 // we cannot detect it.
2693 GTEST_API_ size_t GetThreadCount();
2695 // Passing non-POD classes through ellipsis (...) crashes the ARM
2696 // compiler and generates a warning in Sun Studio. The Nokia Symbian
2697 // and the IBM XL C/C++ compiler try to instantiate a copy constructor
2698 // for objects passed through ellipsis (...), failing for uncopyable
2699 // objects. We define this to ensure that only POD is passed through
2700 // ellipsis on these systems.
2701 #if defined(__SYMBIAN32__) || defined(__IBMCPP__) || defined(__SUNPRO_CC)
2702 // We lose support for NULL detection where the compiler doesn't like
2703 // passing non-POD classes through ellipsis (...).
2704 # define GTEST_ELLIPSIS_NEEDS_POD_ 1
2706 # define GTEST_CAN_COMPARE_NULL 1
2709 // The Nokia Symbian and IBM XL C/C++ compilers cannot decide between
2710 // const T& and const T* in a function template. These compilers
2711 // _can_ decide between class template specializations for T and T*,
2712 // so a tr1::type_traits-like is_pointer works.
2713 #if defined(__SYMBIAN32__) || defined(__IBMCPP__)
2714 # define GTEST_NEEDS_IS_POINTER_ 1
2717 template <bool bool_value>
2718 struct bool_constant {
2719 typedef bool_constant<bool_value> type;
2720 static const bool value = bool_value;
2722 template <bool bool_value> const bool bool_constant<bool_value>::value;
2724 typedef bool_constant<false> false_type;
2725 typedef bool_constant<true> true_type;
2727 template <typename T>
2728 struct is_pointer : public false_type {};
2730 template <typename T>
2731 struct is_pointer<T*> : public true_type {};
2733 template <typename Iterator>
2734 struct IteratorTraits {
2735 typedef typename Iterator::value_type value_type;
2738 template <typename T>
2739 struct IteratorTraits<T*> {
2740 typedef T value_type;
2743 template <typename T>
2744 struct IteratorTraits<const T*> {
2745 typedef T value_type;
2748 #if GTEST_OS_WINDOWS
2749 # define GTEST_PATH_SEP_ "\\"
2750 # define GTEST_HAS_ALT_PATH_SEP_ 1
2751 // The biggest signed integer type the compiler supports.
2752 typedef __int64 BiggestInt;
2754 # define GTEST_PATH_SEP_ "/"
2755 # define GTEST_HAS_ALT_PATH_SEP_ 0
2756 typedef long long BiggestInt; // NOLINT
2757 #endif // GTEST_OS_WINDOWS
2759 // Utilities for char.
2761 // isspace(int ch) and friends accept an unsigned char or EOF. char
2762 // may be signed, depending on the compiler (or compiler flags).
2763 // Therefore we need to cast a char to unsigned char before calling
2766 inline bool IsAlpha(char ch) {
2767 return isalpha(static_cast<unsigned char>(ch)) != 0;
2769 inline bool IsAlNum(char ch) {
2770 return isalnum(static_cast<unsigned char>(ch)) != 0;
2772 inline bool IsDigit(char ch) {
2773 return isdigit(static_cast<unsigned char>(ch)) != 0;
2775 inline bool IsLower(char ch) {
2776 return islower(static_cast<unsigned char>(ch)) != 0;
2778 inline bool IsSpace(char ch) {
2779 return isspace(static_cast<unsigned char>(ch)) != 0;
2781 inline bool IsUpper(char ch) {
2782 return isupper(static_cast<unsigned char>(ch)) != 0;
2784 inline bool IsXDigit(char ch) {
2785 return isxdigit(static_cast<unsigned char>(ch)) != 0;
2787 inline bool IsXDigit(wchar_t ch) {
2788 const unsigned char low_byte = static_cast<unsigned char>(ch);
2789 return ch == low_byte && isxdigit(low_byte) != 0;
2792 inline char ToLower(char ch) {
2793 return static_cast<char>(tolower(static_cast<unsigned char>(ch)));
2795 inline char ToUpper(char ch) {
2796 return static_cast<char>(toupper(static_cast<unsigned char>(ch)));
2799 // The testing::internal::posix namespace holds wrappers for common
2800 // POSIX functions. These wrappers hide the differences between
2801 // Windows/MSVC and POSIX systems. Since some compilers define these
2802 // standard functions as macros, the wrapper cannot have the same name
2803 // as the wrapped function.
2807 // Functions with a different name on Windows.
2809 #if GTEST_OS_WINDOWS
2811 typedef struct _stat StatStruct;
2813 # ifdef __BORLANDC__
2814 inline int IsATTY(int fd) { return isatty(fd); }
2815 inline int StrCaseCmp(const char* s1, const char* s2) {
2816 return stricmp(s1, s2);
2818 inline char* StrDup(const char* src) { return strdup(src); }
2819 # else // !__BORLANDC__
2820 # if GTEST_OS_WINDOWS_MOBILE
2821 inline int IsATTY(int /* fd */) { return 0; }
2823 inline int IsATTY(int fd) { return _isatty(fd); }
2824 # endif // GTEST_OS_WINDOWS_MOBILE
2825 inline int StrCaseCmp(const char* s1, const char* s2) {
2826 return _stricmp(s1, s2);
2828 inline char* StrDup(const char* src) { return _strdup(src); }
2829 # endif // __BORLANDC__
2831 # if GTEST_OS_WINDOWS_MOBILE
2832 inline int FileNo(FILE* file) { return reinterpret_cast<int>(_fileno(file)); }
2833 // Stat(), RmDir(), and IsDir() are not needed on Windows CE at this
2834 // time and thus not defined there.
2836 inline int FileNo(FILE* file) { return _fileno(file); }
2837 inline int Stat(const char* path, StatStruct* buf) { return _stat(path, buf); }
2838 inline int RmDir(const char* dir) { return _rmdir(dir); }
2839 inline bool IsDir(const StatStruct& st) {
2840 return (_S_IFDIR & st.st_mode) != 0;
2842 # endif // GTEST_OS_WINDOWS_MOBILE
2846 typedef struct stat StatStruct;
2848 inline int FileNo(FILE* file) { return fileno(file); }
2849 inline int IsATTY(int fd) { return isatty(fd); }
2850 inline int Stat(const char* path, StatStruct* buf) { return stat(path, buf); }
2851 inline int StrCaseCmp(const char* s1, const char* s2) {
2852 return strcasecmp(s1, s2);
2854 inline char* StrDup(const char* src) { return strdup(src); }
2855 inline int RmDir(const char* dir) { return rmdir(dir); }
2856 inline bool IsDir(const StatStruct& st) { return S_ISDIR(st.st_mode); }
2858 #endif // GTEST_OS_WINDOWS
2860 // Functions deprecated by MSVC 8.0.
2863 // Temporarily disable warning 4996 (deprecated function).
2864 # pragma warning(push)
2865 # pragma warning(disable:4996)
2868 inline const char* StrNCpy(char* dest, const char* src, size_t n) {
2869 return strncpy(dest, src, n);
2872 // ChDir(), FReopen(), FDOpen(), Read(), Write(), Close(), and
2873 // StrError() aren't needed on Windows CE at this time and thus not
2876 #if !GTEST_OS_WINDOWS_MOBILE
2877 inline int ChDir(const char* dir) { return chdir(dir); }
2879 inline FILE* FOpen(const char* path, const char* mode) {
2880 return fopen(path, mode);
2882 #if !GTEST_OS_WINDOWS_MOBILE
2883 inline FILE *FReopen(const char* path, const char* mode, FILE* stream) {
2884 return freopen(path, mode, stream);
2886 inline FILE* FDOpen(int fd, const char* mode) { return fdopen(fd, mode); }
2888 inline int FClose(FILE* fp) { return fclose(fp); }
2889 #if !GTEST_OS_WINDOWS_MOBILE
2890 inline int Read(int fd, void* buf, unsigned int count) {
2891 return static_cast<int>(read(fd, buf, count));
2893 inline int Write(int fd, const void* buf, unsigned int count) {
2894 return static_cast<int>(write(fd, buf, count));
2896 inline int Close(int fd) { return close(fd); }
2897 inline const char* StrError(int errnum) { return strerror(errnum); }
2899 inline const char* GetEnv(const char* name) {
2900 #if GTEST_OS_WINDOWS_MOBILE
2901 // We are on Windows CE, which has no environment variables.
2903 #elif defined(__BORLANDC__) || defined(__SunOS_5_8) || defined(__SunOS_5_9)
2904 // Environment variables which we programmatically clear will be set to the
2905 // empty string rather than unset (NULL). Handle that case.
2906 const char* const env = getenv(name);
2907 return (env != NULL && env[0] != '\0') ? env : NULL;
2909 return getenv(name);
2914 # pragma warning(pop) // Restores the warning state.
2917 #if GTEST_OS_WINDOWS_MOBILE
2918 // Windows CE has no C library. The abort() function is used in
2919 // several places in Google Test. This implementation provides a reasonable
2920 // imitation of standard behaviour.
2923 inline void Abort() { abort(); }
2924 #endif // GTEST_OS_WINDOWS_MOBILE
2926 } // namespace posix
2928 // MSVC "deprecates" snprintf and issues warnings wherever it is used. In
2929 // order to avoid these warnings, we need to use _snprintf or _snprintf_s on
2930 // MSVC-based platforms. We map the GTEST_SNPRINTF_ macro to the appropriate
2931 // function in order to achieve that. We use macro definition here because
2932 // snprintf is a variadic function.
2933 #if _MSC_VER >= 1400 && !GTEST_OS_WINDOWS_MOBILE
2934 // MSVC 2005 and above support variadic macros.
2935 # define GTEST_SNPRINTF_(buffer, size, format, ...) \
2936 _snprintf_s(buffer, size, size, format, __VA_ARGS__)
2937 #elif defined(_MSC_VER)
2938 // Windows CE does not define _snprintf_s and MSVC prior to 2005 doesn't
2939 // complain about _snprintf.
2940 # define GTEST_SNPRINTF_ _snprintf
2942 # define GTEST_SNPRINTF_ snprintf
2945 // The maximum number a BiggestInt can represent. This definition
2946 // works no matter BiggestInt is represented in one's complement or
2947 // two's complement.
2949 // We cannot rely on numeric_limits in STL, as __int64 and long long
2950 // are not part of standard C++ and numeric_limits doesn't need to be
2951 // defined for them.
2952 const BiggestInt kMaxBiggestInt =
2953 ~(static_cast<BiggestInt>(1) << (8*sizeof(BiggestInt) - 1));
2955 // This template class serves as a compile-time function from size to
2956 // type. It maps a size in bytes to a primitive type with that
2959 // TypeWithSize<4>::UInt
2961 // is typedef-ed to be unsigned int (unsigned integer made up of 4
2964 // Such functionality should belong to STL, but I cannot find it
2967 // Google Test uses this class in the implementation of floating-point
2970 // For now it only handles UInt (unsigned int) as that's all Google Test
2971 // needs. Other types can be easily added in the future if need
2973 template <size_t size>
2974 class TypeWithSize {
2976 // This prevents the user from using TypeWithSize<N> with incorrect
2981 // The specialization for size 4.
2983 class TypeWithSize<4> {
2985 // unsigned int has size 4 in both gcc and MSVC.
2987 // As base/basictypes.h doesn't compile on Windows, we cannot use
2988 // uint32, uint64, and etc here.
2990 typedef unsigned int UInt;
2993 // The specialization for size 8.
2995 class TypeWithSize<8> {
2997 #if GTEST_OS_WINDOWS
2998 typedef __int64 Int;
2999 typedef unsigned __int64 UInt;
3001 typedef long long Int; // NOLINT
3002 typedef unsigned long long UInt; // NOLINT
3003 #endif // GTEST_OS_WINDOWS
3006 // Integer types of known sizes.
3007 typedef TypeWithSize<4>::Int Int32;
3008 typedef TypeWithSize<4>::UInt UInt32;
3009 typedef TypeWithSize<8>::Int Int64;
3010 typedef TypeWithSize<8>::UInt UInt64;
3011 typedef TypeWithSize<8>::Int TimeInMillis; // Represents time in milliseconds.
3013 // Utilities for command line flags and environment variables.
3015 // Macro for referencing flags.
3016 #define GTEST_FLAG(name) FLAGS_gtest_##name
3018 // Macros for declaring flags.
3019 #define GTEST_DECLARE_bool_(name) GTEST_API_ extern bool GTEST_FLAG(name)
3020 #define GTEST_DECLARE_int32_(name) \
3021 GTEST_API_ extern ::testing::internal::Int32 GTEST_FLAG(name)
3022 #define GTEST_DECLARE_string_(name) \
3023 GTEST_API_ extern ::std::string GTEST_FLAG(name)
3025 // Macros for defining flags.
3026 #define GTEST_DEFINE_bool_(name, default_val, doc) \
3027 GTEST_API_ bool GTEST_FLAG(name) = (default_val)
3028 #define GTEST_DEFINE_int32_(name, default_val, doc) \
3029 GTEST_API_ ::testing::internal::Int32 GTEST_FLAG(name) = (default_val)
3030 #define GTEST_DEFINE_string_(name, default_val, doc) \
3031 GTEST_API_ ::std::string GTEST_FLAG(name) = (default_val)
3033 // Thread annotations
3034 #define GTEST_EXCLUSIVE_LOCK_REQUIRED_(locks)
3035 #define GTEST_LOCK_EXCLUDED_(locks)
3037 // Parses 'str' for a 32-bit signed integer. If successful, writes the result
3038 // to *value and returns true; otherwise leaves *value unchanged and returns
3040 // TODO(chandlerc): Find a better way to refactor flag and environment parsing
3041 // out of both gtest-port.cc and gtest.cc to avoid exporting this utility
3043 bool ParseInt32(const Message& src_text, const char* str, Int32* value);
3045 // Parses a bool/Int32/string from the environment variable
3046 // corresponding to the given Google Test flag.
3047 bool BoolFromGTestEnv(const char* flag, bool default_val);
3048 GTEST_API_ Int32 Int32FromGTestEnv(const char* flag, Int32 default_val);
3049 const char* StringFromGTestEnv(const char* flag, const char* default_val);
3051 } // namespace internal
3052 } // namespace testing
3054 #endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_H_
3057 # include <stdlib.h>
3058 # include <sys/types.h>
3059 # include <sys/wait.h>
3060 # include <unistd.h>
3061 #endif // GTEST_OS_LINUX
3069 // Copyright 2005, Google Inc.
3070 // All rights reserved.
3072 // Redistribution and use in source and binary forms, with or without
3073 // modification, are permitted provided that the following conditions are
3076 // * Redistributions of source code must retain the above copyright
3077 // notice, this list of conditions and the following disclaimer.
3078 // * Redistributions in binary form must reproduce the above
3079 // copyright notice, this list of conditions and the following disclaimer
3080 // in the documentation and/or other materials provided with the
3082 // * Neither the name of Google Inc. nor the names of its
3083 // contributors may be used to endorse or promote products derived from
3084 // this software without specific prior written permission.
3086 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
3087 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
3088 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
3089 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
3090 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
3091 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
3092 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
3093 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
3094 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3095 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
3096 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3098 // Authors: wan@google.com (Zhanyong Wan), eefacm@gmail.com (Sean Mcafee)
3100 // The Google C++ Testing Framework (Google Test)
3102 // This header file declares the String class and functions used internally by
3103 // Google Test. They are subject to change without notice. They should not used
3104 // by code external to Google Test.
3106 // This header file is #included by <gtest/internal/gtest-internal.h>.
3107 // It should not be #included by other files.
3109 #ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_STRING_H_
3110 #define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_STRING_H_
3113 // string.h is not guaranteed to provide strcpy on C++ Builder.
3122 namespace internal {
3124 // String - an abstract class holding static string utilities.
3125 class GTEST_API_ String {
3127 // Static utility methods
3129 // Clones a 0-terminated C string, allocating memory using new. The
3130 // caller is responsible for deleting the return value using
3131 // delete[]. Returns the cloned string, or NULL if the input is
3134 // This is different from strdup() in string.h, which allocates
3135 // memory using malloc().
3136 static const char* CloneCString(const char* c_str);
3138 #if GTEST_OS_WINDOWS_MOBILE
3139 // Windows CE does not have the 'ANSI' versions of Win32 APIs. To be
3140 // able to pass strings to Win32 APIs on CE we need to convert them
3141 // to 'Unicode', UTF-16.
3143 // Creates a UTF-16 wide string from the given ANSI string, allocating
3144 // memory using new. The caller is responsible for deleting the return
3145 // value using delete[]. Returns the wide string, or NULL if the
3148 // The wide string is created using the ANSI codepage (CP_ACP) to
3149 // match the behaviour of the ANSI versions of Win32 calls and the
3151 static LPCWSTR AnsiToUtf16(const char* c_str);
3153 // Creates an ANSI string from the given wide string, allocating
3154 // memory using new. The caller is responsible for deleting the return
3155 // value using delete[]. Returns the ANSI string, or NULL if the
3158 // The returned string is created using the ANSI codepage (CP_ACP) to
3159 // match the behaviour of the ANSI versions of Win32 calls and the
3161 static const char* Utf16ToAnsi(LPCWSTR utf16_str);
3164 // Compares two C strings. Returns true iff they have the same content.
3166 // Unlike strcmp(), this function can handle NULL argument(s). A
3167 // NULL C string is considered different to any non-NULL C string,
3168 // including the empty string.
3169 static bool CStringEquals(const char* lhs, const char* rhs);
3171 // Converts a wide C string to a String using the UTF-8 encoding.
3172 // NULL will be converted to "(null)". If an error occurred during
3173 // the conversion, "(failed to convert from wide string)" is
3175 static std::string ShowWideCString(const wchar_t* wide_c_str);
3177 // Compares two wide C strings. Returns true iff they have the same
3180 // Unlike wcscmp(), this function can handle NULL argument(s). A
3181 // NULL C string is considered different to any non-NULL C string,
3182 // including the empty string.
3183 static bool WideCStringEquals(const wchar_t* lhs, const wchar_t* rhs);
3185 // Compares two C strings, ignoring case. Returns true iff they
3186 // have the same content.
3188 // Unlike strcasecmp(), this function can handle NULL argument(s).
3189 // A NULL C string is considered different to any non-NULL C string,
3190 // including the empty string.
3191 static bool CaseInsensitiveCStringEquals(const char* lhs,
3194 // Compares two wide C strings, ignoring case. Returns true iff they
3195 // have the same content.
3197 // Unlike wcscasecmp(), this function can handle NULL argument(s).
3198 // A NULL C string is considered different to any non-NULL wide C string,
3199 // including the empty string.
3200 // NB: The implementations on different platforms slightly differ.
3201 // On windows, this method uses _wcsicmp which compares according to LC_CTYPE
3202 // environment variable. On GNU platform this method uses wcscasecmp
3203 // which compares according to LC_CTYPE category of the current locale.
3204 // On MacOS X, it uses towlower, which also uses LC_CTYPE category of the
3206 static bool CaseInsensitiveWideCStringEquals(const wchar_t* lhs,
3207 const wchar_t* rhs);
3209 // Returns true iff the given string ends with the given suffix, ignoring
3210 // case. Any string is considered to end with an empty suffix.
3211 static bool EndsWithCaseInsensitive(
3212 const std::string& str, const std::string& suffix);
3214 // Formats a list of arguments to an std::string, using the same format
3215 // spec string as for printf.
3217 // We do not use the StringPrintf class as it is not universally
3220 // The result is limited to 4096 characters (including the tailing
3221 // 0). If 4096 characters are not enough to format the input,
3222 // "<buffer exceeded>" is returned.
3223 static std::string Format(const char* format, ...);
3226 String(); // Not meant to be instantiated.
3229 // Gets the content of the stringstream's buffer as an std::string. Each '\0'
3230 // character in the buffer is replaced with "\\0".
3231 GTEST_API_ std::string StringStreamToString(::std::stringstream* stream);
3233 // Converts a streamable value to an std::string. A NULL pointer is
3234 // converted to "(null)". When the input value is a ::string,
3235 // ::std::string, ::wstring, or ::std::wstring object, each NUL
3236 // character in it is replaced with "\\0".
3238 // Declared here but defined in gtest.h, so that it has access
3239 // to the definition of the Message class, required by the ARM
3241 template <typename T>
3242 std::string StreamableToString(const T& streamable);
3244 } // namespace internal
3245 } // namespace testing
3247 #endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_STRING_H_
3248 // Copyright 2008, Google Inc.
3249 // All rights reserved.
3251 // Redistribution and use in source and binary forms, with or without
3252 // modification, are permitted provided that the following conditions are
3255 // * Redistributions of source code must retain the above copyright
3256 // notice, this list of conditions and the following disclaimer.
3257 // * Redistributions in binary form must reproduce the above
3258 // copyright notice, this list of conditions and the following disclaimer
3259 // in the documentation and/or other materials provided with the
3261 // * Neither the name of Google Inc. nor the names of its
3262 // contributors may be used to endorse or promote products derived from
3263 // this software without specific prior written permission.
3265 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
3266 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
3267 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
3268 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
3269 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
3270 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
3271 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
3272 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
3273 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3274 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
3275 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3277 // Author: keith.ray@gmail.com (Keith Ray)
3279 // Google Test filepath utilities
3281 // This header file declares classes and functions used internally by
3282 // Google Test. They are subject to change without notice.
3284 // This file is #included in <gtest/internal/gtest-internal.h>.
3285 // Do not include this header file separately!
3287 #ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_FILEPATH_H_
3288 #define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_FILEPATH_H_
3292 namespace internal {
3294 // FilePath - a class for file and directory pathname manipulation which
3295 // handles platform-specific conventions (like the pathname separator).
3296 // Used for helper functions for naming files in a directory for xml output.
3297 // Except for Set methods, all methods are const or static, which provides an
3298 // "immutable value object" -- useful for peace of mind.
3299 // A FilePath with a value ending in a path separator ("like/this/") represents
3300 // a directory, otherwise it is assumed to represent a file. In either case,
3301 // it may or may not represent an actual file or directory in the file system.
3302 // Names are NOT checked for syntax correctness -- no checking for illegal
3303 // characters, malformed paths, etc.
3305 class GTEST_API_ FilePath {
3307 FilePath() : pathname_("") { }
3308 FilePath(const FilePath& rhs) : pathname_(rhs.pathname_) { }
3310 explicit FilePath(const std::string& pathname) : pathname_(pathname) {
3314 FilePath& operator=(const FilePath& rhs) {
3319 void Set(const FilePath& rhs) {
3320 pathname_ = rhs.pathname_;
3323 const std::string& string() const { return pathname_; }
3324 const char* c_str() const { return pathname_.c_str(); }
3326 // Returns the current working directory, or "" if unsuccessful.
3327 static FilePath GetCurrentDir();
3329 // Given directory = "dir", base_name = "test", number = 0,
3330 // extension = "xml", returns "dir/test.xml". If number is greater
3331 // than zero (e.g., 12), returns "dir/test_12.xml".
3332 // On Windows platform, uses \ as the separator rather than /.
3333 static FilePath MakeFileName(const FilePath& directory,
3334 const FilePath& base_name,
3336 const char* extension);
3338 // Given directory = "dir", relative_path = "test.xml",
3339 // returns "dir/test.xml".
3340 // On Windows, uses \ as the separator rather than /.
3341 static FilePath ConcatPaths(const FilePath& directory,
3342 const FilePath& relative_path);
3344 // Returns a pathname for a file that does not currently exist. The pathname
3345 // will be directory/base_name.extension or
3346 // directory/base_name_<number>.extension if directory/base_name.extension
3347 // already exists. The number will be incremented until a pathname is found
3348 // that does not already exist.
3349 // Examples: 'dir/foo_test.xml' or 'dir/foo_test_1.xml'.
3350 // There could be a race condition if two or more processes are calling this
3351 // function at the same time -- they could both pick the same filename.
3352 static FilePath GenerateUniqueFileName(const FilePath& directory,
3353 const FilePath& base_name,
3354 const char* extension);
3356 // Returns true iff the path is "".
3357 bool IsEmpty() const { return pathname_.empty(); }
3359 // If input name has a trailing separator character, removes it and returns
3360 // the name, otherwise return the name string unmodified.
3361 // On Windows platform, uses \ as the separator, other platforms use /.
3362 FilePath RemoveTrailingPathSeparator() const;
3364 // Returns a copy of the FilePath with the directory part removed.
3365 // Example: FilePath("path/to/file").RemoveDirectoryName() returns
3366 // FilePath("file"). If there is no directory part ("just_a_file"), it returns
3367 // the FilePath unmodified. If there is no file part ("just_a_dir/") it
3368 // returns an empty FilePath ("").
3369 // On Windows platform, '\' is the path separator, otherwise it is '/'.
3370 FilePath RemoveDirectoryName() const;
3372 // RemoveFileName returns the directory path with the filename removed.
3373 // Example: FilePath("path/to/file").RemoveFileName() returns "path/to/".
3374 // If the FilePath is "a_file" or "/a_file", RemoveFileName returns
3375 // FilePath("./") or, on Windows, FilePath(".\\"). If the filepath does
3376 // not have a file, like "just/a/dir/", it returns the FilePath unmodified.
3377 // On Windows platform, '\' is the path separator, otherwise it is '/'.
3378 FilePath RemoveFileName() const;
3380 // Returns a copy of the FilePath with the case-insensitive extension removed.
3381 // Example: FilePath("dir/file.exe").RemoveExtension("EXE") returns
3382 // FilePath("dir/file"). If a case-insensitive extension is not
3383 // found, returns a copy of the original FilePath.
3384 FilePath RemoveExtension(const char* extension) const;
3386 // Creates directories so that path exists. Returns true if successful or if
3387 // the directories already exist; returns false if unable to create
3388 // directories for any reason. Will also return false if the FilePath does
3389 // not represent a directory (that is, it doesn't end with a path separator).
3390 bool CreateDirectoriesRecursively() const;
3392 // Create the directory so that path exists. Returns true if successful or
3393 // if the directory already exists; returns false if unable to create the
3394 // directory for any reason, including if the parent directory does not
3395 // exist. Not named "CreateDirectory" because that's a macro on Windows.
3396 bool CreateFolder() const;
3398 // Returns true if FilePath describes something in the file-system,
3399 // either a file, directory, or whatever, and that something exists.
3400 bool FileOrDirectoryExists() const;
3402 // Returns true if pathname describes a directory in the file-system
3404 bool DirectoryExists() const;
3406 // Returns true if FilePath ends with a path separator, which indicates that
3407 // it is intended to represent a directory. Returns false otherwise.
3408 // This does NOT check that a directory (or file) actually exists.
3409 bool IsDirectory() const;
3411 // Returns true if pathname describes a root directory. (Windows has one
3412 // root directory per disk drive.)
3413 bool IsRootDirectory() const;
3415 // Returns true if pathname describes an absolute path.
3416 bool IsAbsolutePath() const;
3419 // Replaces multiple consecutive separators with a single separator.
3420 // For example, "bar///foo" becomes "bar/foo". Does not eliminate other
3421 // redundancies that might be in a pathname involving "." or "..".
3423 // A pathname with multiple consecutive separators may occur either through
3424 // user error or as a result of some scripts or APIs that generate a pathname
3425 // with a trailing separator. On other platforms the same API or script
3426 // may NOT generate a pathname with a trailing "/". Then elsewhere that
3427 // pathname may have another "/" and pathname components added to it,
3428 // without checking for the separator already being there.
3429 // The script language and operating system may allow paths like "foo//bar"
3430 // but some of the functions in FilePath will not handle that correctly. In
3431 // particular, RemoveTrailingPathSeparator() only removes one separator, and
3432 // it is called in CreateDirectoriesRecursively() assuming that it will change
3433 // a pathname from directory syntax (trailing separator) to filename syntax.
3435 // On Windows this method also replaces the alternate path separator '/' with
3436 // the primary path separator '\\', so that for example "bar\\/\\foo" becomes
3441 // Returns a pointer to the last occurence of a valid path separator in
3442 // the FilePath. On Windows, for example, both '/' and '\' are valid path
3443 // separators. Returns NULL if no path separator was found.
3444 const char* FindLastPathSeparator() const;
3446 std::string pathname_;
3447 }; // class FilePath
3449 } // namespace internal
3450 } // namespace testing
3452 #endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_FILEPATH_H_
3453 // This file was GENERATED by command:
3454 // pump.py gtest-type-util.h.pump
3455 // DO NOT EDIT BY HAND!!!
3457 // Copyright 2008 Google Inc.
3458 // All Rights Reserved.
3460 // Redistribution and use in source and binary forms, with or without
3461 // modification, are permitted provided that the following conditions are
3464 // * Redistributions of source code must retain the above copyright
3465 // notice, this list of conditions and the following disclaimer.
3466 // * Redistributions in binary form must reproduce the above
3467 // copyright notice, this list of conditions and the following disclaimer
3468 // in the documentation and/or other materials provided with the
3470 // * Neither the name of Google Inc. nor the names of its
3471 // contributors may be used to endorse or promote products derived from
3472 // this software without specific prior written permission.
3474 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
3475 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
3476 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
3477 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
3478 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
3479 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
3480 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
3481 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
3482 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3483 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
3484 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3486 // Author: wan@google.com (Zhanyong Wan)
3488 // Type utilities needed for implementing typed and type-parameterized
3489 // tests. This file is generated by a SCRIPT. DO NOT EDIT BY HAND!
3491 // Currently we support at most 50 types in a list, and at most 50
3492 // type-parameterized tests in one type-parameterized test case.
3493 // Please contact googletestframework@googlegroups.com if you need
3496 #ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_
3497 #define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_
3500 // #ifdef __GNUC__ is too general here. It is possible to use gcc without using
3501 // libstdc++ (which is where cxxabi.h comes from).
3502 # if GTEST_HAS_CXXABI_H_
3503 # include <cxxabi.h>
3504 # elif defined(__HP_aCC)
3505 # include <acxx_demangle.h>
3506 # endif // GTEST_HASH_CXXABI_H_
3509 namespace internal {
3511 // GetTypeName<T>() returns a human-readable name of type T.
3512 // NB: This function is also used in Google Mock, so don't move it inside of
3513 // the typed-test-only section below.
3514 template <typename T>
3515 std::string GetTypeName() {
3518 const char* const name = typeid(T).name();
3519 # if GTEST_HAS_CXXABI_H_ || defined(__HP_aCC)
3521 // gcc's implementation of typeid(T).name() mangles the type name,
3522 // so we have to demangle it.
3523 # if GTEST_HAS_CXXABI_H_
3524 using abi::__cxa_demangle;
3525 # endif // GTEST_HAS_CXXABI_H_
3526 char* const readable_name = __cxa_demangle(name, 0, 0, &status);
3527 const std::string name_str(status == 0 ? readable_name : name);
3528 free(readable_name);
3532 # endif // GTEST_HAS_CXXABI_H_ || __HP_aCC
3538 # endif // GTEST_HAS_RTTI
3541 #if GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P
3543 // AssertyTypeEq<T1, T2>::type is defined iff T1 and T2 are the same
3544 // type. This can be used as a compile-time assertion to ensure that
3545 // two types are equal.
3547 template <typename T1, typename T2>
3548 struct AssertTypeEq;
3550 template <typename T>
3551 struct AssertTypeEq<T, T> {
3555 // A unique type used as the default value for the arguments of class
3556 // template Types. This allows us to simulate variadic templates
3557 // (e.g. Types<int>, Type<int, double>, and etc), which C++ doesn't
3558 // support directly.
3561 // The following family of struct and struct templates are used to
3562 // represent type lists. In particular, TypesN<T1, T2, ..., TN>
3563 // represents a type list with N types (T1, T2, ..., and TN) in it.
3564 // Except for Types0, every struct in the family has two member types:
3565 // Head for the first type in the list, and Tail for the rest of the
3568 // The empty type list.
3571 // Type lists of length 1, 2, 3, and so on.
3573 template <typename T1>
3576 typedef Types0 Tail;
3578 template <typename T1, typename T2>
3581 typedef Types1<T2> Tail;
3584 template <typename T1, typename T2, typename T3>
3587 typedef Types2<T2, T3> Tail;
3590 template <typename T1, typename T2, typename T3, typename T4>
3593 typedef Types3<T2, T3, T4> Tail;
3596 template <typename T1, typename T2, typename T3, typename T4, typename T5>
3599 typedef Types4<T2, T3, T4, T5> Tail;
3602 template <typename T1, typename T2, typename T3, typename T4, typename T5,
3606 typedef Types5<T2, T3, T4, T5, T6> Tail;
3609 template <typename T1, typename T2, typename T3, typename T4, typename T5,
3610 typename T6, typename T7>
3613 typedef Types6<T2, T3, T4, T5, T6, T7> Tail;
3616 template <typename T1, typename T2, typename T3, typename T4, typename T5,
3617 typename T6, typename T7, typename T8>
3620 typedef Types7<T2, T3, T4, T5, T6, T7, T8> Tail;
3623 template <typename T1, typename T2, typename T3, typename T4, typename T5,
3624 typename T6, typename T7, typename T8, typename T9>
3627 typedef Types8<T2, T3, T4, T5, T6, T7, T8, T9> Tail;
3630 template <typename T1, typename T2, typename T3, typename T4, typename T5,
3631 typename T6, typename T7, typename T8, typename T9, typename T10>
3634 typedef Types9<T2, T3, T4, T5, T6, T7, T8, T9, T10> Tail;
3637 template <typename T1, typename T2, typename T3, typename T4, typename T5,
3638 typename T6, typename T7, typename T8, typename T9, typename T10,
3642 typedef Types10<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> Tail;
3645 template <typename T1, typename T2, typename T3, typename T4, typename T5,
3646 typename T6, typename T7, typename T8, typename T9, typename T10,
3647 typename T11, typename T12>
3650 typedef Types11<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> Tail;
3653 template <typename T1, typename T2, typename T3, typename T4, typename T5,
3654 typename T6, typename T7, typename T8, typename T9, typename T10,
3655 typename T11, typename T12, typename T13>
3658 typedef Types12<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> Tail;
3661 template <typename T1, typename T2, typename T3, typename T4, typename T5,
3662 typename T6, typename T7, typename T8, typename T9, typename T10,
3663 typename T11, typename T12, typename T13, typename T14>
3666 typedef Types13<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> Tail;
3669 template <typename T1, typename T2, typename T3, typename T4, typename T5,
3670 typename T6, typename T7, typename T8, typename T9, typename T10,
3671 typename T11, typename T12, typename T13, typename T14, typename T15>
3674 typedef Types14<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
3678 template <typename T1, typename T2, typename T3, typename T4, typename T5,
3679 typename T6, typename T7, typename T8, typename T9, typename T10,
3680 typename T11, typename T12, typename T13, typename T14, typename T15,
3684 typedef Types15<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
3688 template <typename T1, typename T2, typename T3, typename T4, typename T5,
3689 typename T6, typename T7, typename T8, typename T9, typename T10,
3690 typename T11, typename T12, typename T13, typename T14, typename T15,
3691 typename T16, typename T17>
3694 typedef Types16<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
3698 template <typename T1, typename T2, typename T3, typename T4, typename T5,
3699 typename T6, typename T7, typename T8, typename T9, typename T10,
3700 typename T11, typename T12, typename T13, typename T14, typename T15,
3701 typename T16, typename T17, typename T18>
3704 typedef Types17<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
3705 T16, T17, T18> Tail;
3708 template <typename T1, typename T2, typename T3, typename T4, typename T5,
3709 typename T6, typename T7, typename T8, typename T9, typename T10,
3710 typename T11, typename T12, typename T13, typename T14, typename T15,
3711 typename T16, typename T17, typename T18, typename T19>
3714 typedef Types18<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
3715 T16, T17, T18, T19> Tail;
3718 template <typename T1, typename T2, typename T3, typename T4, typename T5,
3719 typename T6, typename T7, typename T8, typename T9, typename T10,
3720 typename T11, typename T12, typename T13, typename T14, typename T15,
3721 typename T16, typename T17, typename T18, typename T19, typename T20>
3724 typedef Types19<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
3725 T16, T17, T18, T19, T20> Tail;
3728 template <typename T1, typename T2, typename T3, typename T4, typename T5,
3729 typename T6, typename T7, typename T8, typename T9, typename T10,
3730 typename T11, typename T12, typename T13, typename T14, typename T15,
3731 typename T16, typename T17, typename T18, typename T19, typename T20,
3735 typedef Types20<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
3736 T16, T17, T18, T19, T20, T21> Tail;
3739 template <typename T1, typename T2, typename T3, typename T4, typename T5,
3740 typename T6, typename T7, typename T8, typename T9, typename T10,
3741 typename T11, typename T12, typename T13, typename T14, typename T15,
3742 typename T16, typename T17, typename T18, typename T19, typename T20,
3743 typename T21, typename T22>
3746 typedef Types21<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
3747 T16, T17, T18, T19, T20, T21, T22> Tail;
3750 template <typename T1, typename T2, typename T3, typename T4, typename T5,
3751 typename T6, typename T7, typename T8, typename T9, typename T10,
3752 typename T11, typename T12, typename T13, typename T14, typename T15,
3753 typename T16, typename T17, typename T18, typename T19, typename T20,
3754 typename T21, typename T22, typename T23>
3757 typedef Types22<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
3758 T16, T17, T18, T19, T20, T21, T22, T23> Tail;
3761 template <typename T1, typename T2, typename T3, typename T4, typename T5,
3762 typename T6, typename T7, typename T8, typename T9, typename T10,
3763 typename T11, typename T12, typename T13, typename T14, typename T15,
3764 typename T16, typename T17, typename T18, typename T19, typename T20,
3765 typename T21, typename T22, typename T23, typename T24>
3768 typedef Types23<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
3769 T16, T17, T18, T19, T20, T21, T22, T23, T24> Tail;
3772 template <typename T1, typename T2, typename T3, typename T4, typename T5,
3773 typename T6, typename T7, typename T8, typename T9, typename T10,
3774 typename T11, typename T12, typename T13, typename T14, typename T15,
3775 typename T16, typename T17, typename T18, typename T19, typename T20,
3776 typename T21, typename T22, typename T23, typename T24, typename T25>
3779 typedef Types24<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
3780 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25> Tail;
3783 template <typename T1, typename T2, typename T3, typename T4, typename T5,
3784 typename T6, typename T7, typename T8, typename T9, typename T10,
3785 typename T11, typename T12, typename T13, typename T14, typename T15,
3786 typename T16, typename T17, typename T18, typename T19, typename T20,
3787 typename T21, typename T22, typename T23, typename T24, typename T25,
3791 typedef Types25<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
3792 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26> Tail;
3795 template <typename T1, typename T2, typename T3, typename T4, typename T5,
3796 typename T6, typename T7, typename T8, typename T9, typename T10,
3797 typename T11, typename T12, typename T13, typename T14, typename T15,
3798 typename T16, typename T17, typename T18, typename T19, typename T20,
3799 typename T21, typename T22, typename T23, typename T24, typename T25,
3800 typename T26, typename T27>
3803 typedef Types26<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
3804 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27> Tail;
3807 template <typename T1, typename T2, typename T3, typename T4, typename T5,
3808 typename T6, typename T7, typename T8, typename T9, typename T10,
3809 typename T11, typename T12, typename T13, typename T14, typename T15,
3810 typename T16, typename T17, typename T18, typename T19, typename T20,
3811 typename T21, typename T22, typename T23, typename T24, typename T25,
3812 typename T26, typename T27, typename T28>
3815 typedef Types27<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
3816 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28> Tail;
3819 template <typename T1, typename T2, typename T3, typename T4, typename T5,
3820 typename T6, typename T7, typename T8, typename T9, typename T10,
3821 typename T11, typename T12, typename T13, typename T14, typename T15,
3822 typename T16, typename T17, typename T18, typename T19, typename T20,
3823 typename T21, typename T22, typename T23, typename T24, typename T25,
3824 typename T26, typename T27, typename T28, typename T29>
3827 typedef Types28<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
3828 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
3832 template <typename T1, typename T2, typename T3, typename T4, typename T5,
3833 typename T6, typename T7, typename T8, typename T9, typename T10,
3834 typename T11, typename T12, typename T13, typename T14, typename T15,
3835 typename T16, typename T17, typename T18, typename T19, typename T20,
3836 typename T21, typename T22, typename T23, typename T24, typename T25,
3837 typename T26, typename T27, typename T28, typename T29, typename T30>
3840 typedef Types29<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
3841 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
3845 template <typename T1, typename T2, typename T3, typename T4, typename T5,
3846 typename T6, typename T7, typename T8, typename T9, typename T10,
3847 typename T11, typename T12, typename T13, typename T14, typename T15,
3848 typename T16, typename T17, typename T18, typename T19, typename T20,
3849 typename T21, typename T22, typename T23, typename T24, typename T25,
3850 typename T26, typename T27, typename T28, typename T29, typename T30,
3854 typedef Types30<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
3855 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
3859 template <typename T1, typename T2, typename T3, typename T4, typename T5,
3860 typename T6, typename T7, typename T8, typename T9, typename T10,
3861 typename T11, typename T12, typename T13, typename T14, typename T15,
3862 typename T16, typename T17, typename T18, typename T19, typename T20,
3863 typename T21, typename T22, typename T23, typename T24, typename T25,
3864 typename T26, typename T27, typename T28, typename T29, typename T30,
3865 typename T31, typename T32>
3868 typedef Types31<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
3869 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
3870 T30, T31, T32> Tail;
3873 template <typename T1, typename T2, typename T3, typename T4, typename T5,
3874 typename T6, typename T7, typename T8, typename T9, typename T10,
3875 typename T11, typename T12, typename T13, typename T14, typename T15,
3876 typename T16, typename T17, typename T18, typename T19, typename T20,
3877 typename T21, typename T22, typename T23, typename T24, typename T25,
3878 typename T26, typename T27, typename T28, typename T29, typename T30,
3879 typename T31, typename T32, typename T33>
3882 typedef Types32<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
3883 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
3884 T30, T31, T32, T33> Tail;
3887 template <typename T1, typename T2, typename T3, typename T4, typename T5,
3888 typename T6, typename T7, typename T8, typename T9, typename T10,
3889 typename T11, typename T12, typename T13, typename T14, typename T15,
3890 typename T16, typename T17, typename T18, typename T19, typename T20,
3891 typename T21, typename T22, typename T23, typename T24, typename T25,
3892 typename T26, typename T27, typename T28, typename T29, typename T30,
3893 typename T31, typename T32, typename T33, typename T34>
3896 typedef Types33<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
3897 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
3898 T30, T31, T32, T33, T34> Tail;
3901 template <typename T1, typename T2, typename T3, typename T4, typename T5,
3902 typename T6, typename T7, typename T8, typename T9, typename T10,
3903 typename T11, typename T12, typename T13, typename T14, typename T15,
3904 typename T16, typename T17, typename T18, typename T19, typename T20,
3905 typename T21, typename T22, typename T23, typename T24, typename T25,
3906 typename T26, typename T27, typename T28, typename T29, typename T30,
3907 typename T31, typename T32, typename T33, typename T34, typename T35>
3910 typedef Types34<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
3911 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
3912 T30, T31, T32, T33, T34, T35> Tail;
3915 template <typename T1, typename T2, typename T3, typename T4, typename T5,
3916 typename T6, typename T7, typename T8, typename T9, typename T10,
3917 typename T11, typename T12, typename T13, typename T14, typename T15,
3918 typename T16, typename T17, typename T18, typename T19, typename T20,
3919 typename T21, typename T22, typename T23, typename T24, typename T25,
3920 typename T26, typename T27, typename T28, typename T29, typename T30,
3921 typename T31, typename T32, typename T33, typename T34, typename T35,
3925 typedef Types35<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
3926 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
3927 T30, T31, T32, T33, T34, T35, T36> Tail;
3930 template <typename T1, typename T2, typename T3, typename T4, typename T5,
3931 typename T6, typename T7, typename T8, typename T9, typename T10,
3932 typename T11, typename T12, typename T13, typename T14, typename T15,
3933 typename T16, typename T17, typename T18, typename T19, typename T20,
3934 typename T21, typename T22, typename T23, typename T24, typename T25,
3935 typename T26, typename T27, typename T28, typename T29, typename T30,
3936 typename T31, typename T32, typename T33, typename T34, typename T35,
3937 typename T36, typename T37>
3940 typedef Types36<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
3941 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
3942 T30, T31, T32, T33, T34, T35, T36, T37> Tail;
3945 template <typename T1, typename T2, typename T3, typename T4, typename T5,
3946 typename T6, typename T7, typename T8, typename T9, typename T10,
3947 typename T11, typename T12, typename T13, typename T14, typename T15,
3948 typename T16, typename T17, typename T18, typename T19, typename T20,
3949 typename T21, typename T22, typename T23, typename T24, typename T25,
3950 typename T26, typename T27, typename T28, typename T29, typename T30,
3951 typename T31, typename T32, typename T33, typename T34, typename T35,
3952 typename T36, typename T37, typename T38>
3955 typedef Types37<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
3956 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
3957 T30, T31, T32, T33, T34, T35, T36, T37, T38> Tail;
3960 template <typename T1, typename T2, typename T3, typename T4, typename T5,
3961 typename T6, typename T7, typename T8, typename T9, typename T10,
3962 typename T11, typename T12, typename T13, typename T14, typename T15,
3963 typename T16, typename T17, typename T18, typename T19, typename T20,
3964 typename T21, typename T22, typename T23, typename T24, typename T25,
3965 typename T26, typename T27, typename T28, typename T29, typename T30,
3966 typename T31, typename T32, typename T33, typename T34, typename T35,
3967 typename T36, typename T37, typename T38, typename T39>
3970 typedef Types38<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
3971 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
3972 T30, T31, T32, T33, T34, T35, T36, T37, T38, T39> Tail;
3975 template <typename T1, typename T2, typename T3, typename T4, typename T5,
3976 typename T6, typename T7, typename T8, typename T9, typename T10,
3977 typename T11, typename T12, typename T13, typename T14, typename T15,
3978 typename T16, typename T17, typename T18, typename T19, typename T20,
3979 typename T21, typename T22, typename T23, typename T24, typename T25,
3980 typename T26, typename T27, typename T28, typename T29, typename T30,
3981 typename T31, typename T32, typename T33, typename T34, typename T35,
3982 typename T36, typename T37, typename T38, typename T39, typename T40>
3985 typedef Types39<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
3986 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
3987 T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40> Tail;
3990 template <typename T1, typename T2, typename T3, typename T4, typename T5,
3991 typename T6, typename T7, typename T8, typename T9, typename T10,
3992 typename T11, typename T12, typename T13, typename T14, typename T15,
3993 typename T16, typename T17, typename T18, typename T19, typename T20,
3994 typename T21, typename T22, typename T23, typename T24, typename T25,
3995 typename T26, typename T27, typename T28, typename T29, typename T30,
3996 typename T31, typename T32, typename T33, typename T34, typename T35,
3997 typename T36, typename T37, typename T38, typename T39, typename T40,
4001 typedef Types40<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4002 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
4003 T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41> Tail;
4006 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4007 typename T6, typename T7, typename T8, typename T9, typename T10,
4008 typename T11, typename T12, typename T13, typename T14, typename T15,
4009 typename T16, typename T17, typename T18, typename T19, typename T20,
4010 typename T21, typename T22, typename T23, typename T24, typename T25,
4011 typename T26, typename T27, typename T28, typename T29, typename T30,
4012 typename T31, typename T32, typename T33, typename T34, typename T35,
4013 typename T36, typename T37, typename T38, typename T39, typename T40,
4014 typename T41, typename T42>
4017 typedef Types41<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4018 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
4019 T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42> Tail;
4022 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4023 typename T6, typename T7, typename T8, typename T9, typename T10,
4024 typename T11, typename T12, typename T13, typename T14, typename T15,
4025 typename T16, typename T17, typename T18, typename T19, typename T20,
4026 typename T21, typename T22, typename T23, typename T24, typename T25,
4027 typename T26, typename T27, typename T28, typename T29, typename T30,
4028 typename T31, typename T32, typename T33, typename T34, typename T35,
4029 typename T36, typename T37, typename T38, typename T39, typename T40,
4030 typename T41, typename T42, typename T43>
4033 typedef Types42<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4034 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
4035 T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,
4039 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4040 typename T6, typename T7, typename T8, typename T9, typename T10,
4041 typename T11, typename T12, typename T13, typename T14, typename T15,
4042 typename T16, typename T17, typename T18, typename T19, typename T20,
4043 typename T21, typename T22, typename T23, typename T24, typename T25,
4044 typename T26, typename T27, typename T28, typename T29, typename T30,
4045 typename T31, typename T32, typename T33, typename T34, typename T35,
4046 typename T36, typename T37, typename T38, typename T39, typename T40,
4047 typename T41, typename T42, typename T43, typename T44>
4050 typedef Types43<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4051 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
4052 T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
4056 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4057 typename T6, typename T7, typename T8, typename T9, typename T10,
4058 typename T11, typename T12, typename T13, typename T14, typename T15,
4059 typename T16, typename T17, typename T18, typename T19, typename T20,
4060 typename T21, typename T22, typename T23, typename T24, typename T25,
4061 typename T26, typename T27, typename T28, typename T29, typename T30,
4062 typename T31, typename T32, typename T33, typename T34, typename T35,
4063 typename T36, typename T37, typename T38, typename T39, typename T40,
4064 typename T41, typename T42, typename T43, typename T44, typename T45>
4067 typedef Types44<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4068 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
4069 T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
4073 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4074 typename T6, typename T7, typename T8, typename T9, typename T10,
4075 typename T11, typename T12, typename T13, typename T14, typename T15,
4076 typename T16, typename T17, typename T18, typename T19, typename T20,
4077 typename T21, typename T22, typename T23, typename T24, typename T25,
4078 typename T26, typename T27, typename T28, typename T29, typename T30,
4079 typename T31, typename T32, typename T33, typename T34, typename T35,
4080 typename T36, typename T37, typename T38, typename T39, typename T40,
4081 typename T41, typename T42, typename T43, typename T44, typename T45,
4085 typedef Types45<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4086 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
4087 T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
4088 T44, T45, T46> Tail;
4091 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4092 typename T6, typename T7, typename T8, typename T9, typename T10,
4093 typename T11, typename T12, typename T13, typename T14, typename T15,
4094 typename T16, typename T17, typename T18, typename T19, typename T20,
4095 typename T21, typename T22, typename T23, typename T24, typename T25,
4096 typename T26, typename T27, typename T28, typename T29, typename T30,
4097 typename T31, typename T32, typename T33, typename T34, typename T35,
4098 typename T36, typename T37, typename T38, typename T39, typename T40,
4099 typename T41, typename T42, typename T43, typename T44, typename T45,
4100 typename T46, typename T47>
4103 typedef Types46<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4104 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
4105 T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
4106 T44, T45, T46, T47> Tail;
4109 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4110 typename T6, typename T7, typename T8, typename T9, typename T10,
4111 typename T11, typename T12, typename T13, typename T14, typename T15,
4112 typename T16, typename T17, typename T18, typename T19, typename T20,
4113 typename T21, typename T22, typename T23, typename T24, typename T25,
4114 typename T26, typename T27, typename T28, typename T29, typename T30,
4115 typename T31, typename T32, typename T33, typename T34, typename T35,
4116 typename T36, typename T37, typename T38, typename T39, typename T40,
4117 typename T41, typename T42, typename T43, typename T44, typename T45,
4118 typename T46, typename T47, typename T48>
4121 typedef Types47<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4122 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
4123 T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
4124 T44, T45, T46, T47, T48> Tail;
4127 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4128 typename T6, typename T7, typename T8, typename T9, typename T10,
4129 typename T11, typename T12, typename T13, typename T14, typename T15,
4130 typename T16, typename T17, typename T18, typename T19, typename T20,
4131 typename T21, typename T22, typename T23, typename T24, typename T25,
4132 typename T26, typename T27, typename T28, typename T29, typename T30,
4133 typename T31, typename T32, typename T33, typename T34, typename T35,
4134 typename T36, typename T37, typename T38, typename T39, typename T40,
4135 typename T41, typename T42, typename T43, typename T44, typename T45,
4136 typename T46, typename T47, typename T48, typename T49>
4139 typedef Types48<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4140 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
4141 T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
4142 T44, T45, T46, T47, T48, T49> Tail;
4145 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4146 typename T6, typename T7, typename T8, typename T9, typename T10,
4147 typename T11, typename T12, typename T13, typename T14, typename T15,
4148 typename T16, typename T17, typename T18, typename T19, typename T20,
4149 typename T21, typename T22, typename T23, typename T24, typename T25,
4150 typename T26, typename T27, typename T28, typename T29, typename T30,
4151 typename T31, typename T32, typename T33, typename T34, typename T35,
4152 typename T36, typename T37, typename T38, typename T39, typename T40,
4153 typename T41, typename T42, typename T43, typename T44, typename T45,
4154 typename T46, typename T47, typename T48, typename T49, typename T50>
4157 typedef Types49<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4158 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
4159 T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
4160 T44, T45, T46, T47, T48, T49, T50> Tail;
4164 } // namespace internal
4166 // We don't want to require the users to write TypesN<...> directly,
4167 // as that would require them to count the length. Types<...> is much
4168 // easier to write, but generates horrible messages when there is a
4169 // compiler error, as gcc insists on printing out each template
4170 // argument, even if it has the default value (this means Types<int>
4171 // will appear as Types<int, None, None, ..., None> in the compiler
4174 // Our solution is to combine the best part of the two approaches: a
4175 // user would write Types<T1, ..., TN>, and Google Test will translate
4176 // that to TypesN<T1, ..., TN> internally to make error messages
4177 // readable. The translation is done by the 'type' member of the
4179 template <typename T1 = internal::None, typename T2 = internal::None,
4180 typename T3 = internal::None, typename T4 = internal::None,
4181 typename T5 = internal::None, typename T6 = internal::None,
4182 typename T7 = internal::None, typename T8 = internal::None,
4183 typename T9 = internal::None, typename T10 = internal::None,
4184 typename T11 = internal::None, typename T12 = internal::None,
4185 typename T13 = internal::None, typename T14 = internal::None,
4186 typename T15 = internal::None, typename T16 = internal::None,
4187 typename T17 = internal::None, typename T18 = internal::None,
4188 typename T19 = internal::None, typename T20 = internal::None,
4189 typename T21 = internal::None, typename T22 = internal::None,
4190 typename T23 = internal::None, typename T24 = internal::None,
4191 typename T25 = internal::None, typename T26 = internal::None,
4192 typename T27 = internal::None, typename T28 = internal::None,
4193 typename T29 = internal::None, typename T30 = internal::None,
4194 typename T31 = internal::None, typename T32 = internal::None,
4195 typename T33 = internal::None, typename T34 = internal::None,
4196 typename T35 = internal::None, typename T36 = internal::None,
4197 typename T37 = internal::None, typename T38 = internal::None,
4198 typename T39 = internal::None, typename T40 = internal::None,
4199 typename T41 = internal::None, typename T42 = internal::None,
4200 typename T43 = internal::None, typename T44 = internal::None,
4201 typename T45 = internal::None, typename T46 = internal::None,
4202 typename T47 = internal::None, typename T48 = internal::None,
4203 typename T49 = internal::None, typename T50 = internal::None>
4205 typedef internal::Types50<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
4206 T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
4207 T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
4208 T41, T42, T43, T44, T45, T46, T47, T48, T49, T50> type;
4212 struct Types<internal::None, internal::None, internal::None, internal::None,
4213 internal::None, internal::None, internal::None, internal::None,
4214 internal::None, internal::None, internal::None, internal::None,
4215 internal::None, internal::None, internal::None, internal::None,
4216 internal::None, internal::None, internal::None, internal::None,
4217 internal::None, internal::None, internal::None, internal::None,
4218 internal::None, internal::None, internal::None, internal::None,
4219 internal::None, internal::None, internal::None, internal::None,
4220 internal::None, internal::None, internal::None, internal::None,
4221 internal::None, internal::None, internal::None, internal::None,
4222 internal::None, internal::None, internal::None, internal::None,
4223 internal::None, internal::None, internal::None, internal::None,
4224 internal::None, internal::None> {
4225 typedef internal::Types0 type;
4227 template <typename T1>
4228 struct Types<T1, internal::None, internal::None, internal::None,
4229 internal::None, internal::None, internal::None, internal::None,
4230 internal::None, internal::None, internal::None, internal::None,
4231 internal::None, internal::None, internal::None, internal::None,
4232 internal::None, internal::None, internal::None, internal::None,
4233 internal::None, internal::None, internal::None, internal::None,
4234 internal::None, internal::None, internal::None, internal::None,
4235 internal::None, internal::None, internal::None, internal::None,
4236 internal::None, internal::None, internal::None, internal::None,
4237 internal::None, internal::None, internal::None, internal::None,
4238 internal::None, internal::None, internal::None, internal::None,
4239 internal::None, internal::None, internal::None, internal::None,
4240 internal::None, internal::None> {
4241 typedef internal::Types1<T1> type;
4243 template <typename T1, typename T2>
4244 struct Types<T1, T2, internal::None, internal::None, internal::None,
4245 internal::None, internal::None, internal::None, internal::None,
4246 internal::None, internal::None, internal::None, internal::None,
4247 internal::None, internal::None, internal::None, internal::None,
4248 internal::None, internal::None, internal::None, internal::None,
4249 internal::None, internal::None, internal::None, internal::None,
4250 internal::None, internal::None, internal::None, internal::None,
4251 internal::None, internal::None, internal::None, internal::None,
4252 internal::None, internal::None, internal::None, internal::None,
4253 internal::None, internal::None, internal::None, internal::None,
4254 internal::None, internal::None, internal::None, internal::None,
4255 internal::None, internal::None, internal::None, internal::None,
4257 typedef internal::Types2<T1, T2> type;
4259 template <typename T1, typename T2, typename T3>
4260 struct Types<T1, T2, T3, internal::None, internal::None, internal::None,
4261 internal::None, internal::None, internal::None, internal::None,
4262 internal::None, internal::None, internal::None, internal::None,
4263 internal::None, internal::None, internal::None, internal::None,
4264 internal::None, internal::None, internal::None, internal::None,
4265 internal::None, internal::None, internal::None, internal::None,
4266 internal::None, internal::None, internal::None, internal::None,
4267 internal::None, internal::None, internal::None, internal::None,
4268 internal::None, internal::None, internal::None, internal::None,
4269 internal::None, internal::None, internal::None, internal::None,
4270 internal::None, internal::None, internal::None, internal::None,
4271 internal::None, internal::None, internal::None, internal::None> {
4272 typedef internal::Types3<T1, T2, T3> type;
4274 template <typename T1, typename T2, typename T3, typename T4>
4275 struct Types<T1, T2, T3, T4, internal::None, internal::None, internal::None,
4276 internal::None, internal::None, internal::None, internal::None,
4277 internal::None, internal::None, internal::None, internal::None,
4278 internal::None, internal::None, internal::None, internal::None,
4279 internal::None, internal::None, internal::None, internal::None,
4280 internal::None, internal::None, internal::None, internal::None,
4281 internal::None, internal::None, internal::None, internal::None,
4282 internal::None, internal::None, internal::None, internal::None,
4283 internal::None, internal::None, internal::None, internal::None,
4284 internal::None, internal::None, internal::None, internal::None,
4285 internal::None, internal::None, internal::None, internal::None,
4286 internal::None, internal::None, internal::None> {
4287 typedef internal::Types4<T1, T2, T3, T4> type;
4289 template <typename T1, typename T2, typename T3, typename T4, typename T5>
4290 struct Types<T1, T2, T3, T4, T5, internal::None, internal::None,
4291 internal::None, internal::None, internal::None, internal::None,
4292 internal::None, internal::None, internal::None, internal::None,
4293 internal::None, internal::None, internal::None, internal::None,
4294 internal::None, internal::None, internal::None, internal::None,
4295 internal::None, internal::None, internal::None, internal::None,
4296 internal::None, internal::None, internal::None, internal::None,
4297 internal::None, internal::None, internal::None, internal::None,
4298 internal::None, internal::None, internal::None, internal::None,
4299 internal::None, internal::None, internal::None, internal::None,
4300 internal::None, internal::None, internal::None, internal::None,
4301 internal::None, internal::None, internal::None> {
4302 typedef internal::Types5<T1, T2, T3, T4, T5> type;
4304 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4306 struct Types<T1, T2, T3, T4, T5, T6, internal::None, internal::None,
4307 internal::None, internal::None, internal::None, internal::None,
4308 internal::None, internal::None, internal::None, internal::None,
4309 internal::None, internal::None, internal::None, internal::None,
4310 internal::None, internal::None, internal::None, internal::None,
4311 internal::None, internal::None, internal::None, internal::None,
4312 internal::None, internal::None, internal::None, internal::None,
4313 internal::None, internal::None, internal::None, internal::None,
4314 internal::None, internal::None, internal::None, internal::None,
4315 internal::None, internal::None, internal::None, internal::None,
4316 internal::None, internal::None, internal::None, internal::None,
4317 internal::None, internal::None> {
4318 typedef internal::Types6<T1, T2, T3, T4, T5, T6> type;
4320 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4321 typename T6, typename T7>
4322 struct Types<T1, T2, T3, T4, T5, T6, T7, internal::None, internal::None,
4323 internal::None, internal::None, internal::None, internal::None,
4324 internal::None, internal::None, internal::None, internal::None,
4325 internal::None, internal::None, internal::None, internal::None,
4326 internal::None, internal::None, internal::None, internal::None,
4327 internal::None, internal::None, internal::None, internal::None,
4328 internal::None, internal::None, internal::None, internal::None,
4329 internal::None, internal::None, internal::None, internal::None,
4330 internal::None, internal::None, internal::None, internal::None,
4331 internal::None, internal::None, internal::None, internal::None,
4332 internal::None, internal::None, internal::None, internal::None,
4334 typedef internal::Types7<T1, T2, T3, T4, T5, T6, T7> type;
4336 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4337 typename T6, typename T7, typename T8>
4338 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, internal::None, internal::None,
4339 internal::None, internal::None, internal::None, internal::None,
4340 internal::None, internal::None, internal::None, internal::None,
4341 internal::None, internal::None, internal::None, internal::None,
4342 internal::None, internal::None, internal::None, internal::None,
4343 internal::None, internal::None, internal::None, internal::None,
4344 internal::None, internal::None, internal::None, internal::None,
4345 internal::None, internal::None, internal::None, internal::None,
4346 internal::None, internal::None, internal::None, internal::None,
4347 internal::None, internal::None, internal::None, internal::None,
4348 internal::None, internal::None, internal::None, internal::None> {
4349 typedef internal::Types8<T1, T2, T3, T4, T5, T6, T7, T8> type;
4351 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4352 typename T6, typename T7, typename T8, typename T9>
4353 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, internal::None,
4354 internal::None, internal::None, internal::None, internal::None,
4355 internal::None, internal::None, internal::None, internal::None,
4356 internal::None, internal::None, internal::None, internal::None,
4357 internal::None, internal::None, internal::None, internal::None,
4358 internal::None, internal::None, internal::None, internal::None,
4359 internal::None, internal::None, internal::None, internal::None,
4360 internal::None, internal::None, internal::None, internal::None,
4361 internal::None, internal::None, internal::None, internal::None,
4362 internal::None, internal::None, internal::None, internal::None,
4363 internal::None, internal::None, internal::None, internal::None> {
4364 typedef internal::Types9<T1, T2, T3, T4, T5, T6, T7, T8, T9> type;
4366 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4367 typename T6, typename T7, typename T8, typename T9, typename T10>
4368 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, internal::None,
4369 internal::None, internal::None, internal::None, internal::None,
4370 internal::None, internal::None, internal::None, internal::None,
4371 internal::None, internal::None, internal::None, internal::None,
4372 internal::None, internal::None, internal::None, internal::None,
4373 internal::None, internal::None, internal::None, internal::None,
4374 internal::None, internal::None, internal::None, internal::None,
4375 internal::None, internal::None, internal::None, internal::None,
4376 internal::None, internal::None, internal::None, internal::None,
4377 internal::None, internal::None, internal::None, internal::None,
4378 internal::None, internal::None, internal::None> {
4379 typedef internal::Types10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> type;
4381 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4382 typename T6, typename T7, typename T8, typename T9, typename T10,
4384 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, internal::None,
4385 internal::None, internal::None, internal::None, internal::None,
4386 internal::None, internal::None, internal::None, internal::None,
4387 internal::None, internal::None, internal::None, internal::None,
4388 internal::None, internal::None, internal::None, internal::None,
4389 internal::None, internal::None, internal::None, internal::None,
4390 internal::None, internal::None, internal::None, internal::None,
4391 internal::None, internal::None, internal::None, internal::None,
4392 internal::None, internal::None, internal::None, internal::None,
4393 internal::None, internal::None, internal::None, internal::None,
4394 internal::None, internal::None> {
4395 typedef internal::Types11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> type;
4397 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4398 typename T6, typename T7, typename T8, typename T9, typename T10,
4399 typename T11, typename T12>
4400 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, internal::None,
4401 internal::None, internal::None, internal::None, internal::None,
4402 internal::None, internal::None, internal::None, internal::None,
4403 internal::None, internal::None, internal::None, internal::None,
4404 internal::None, internal::None, internal::None, internal::None,
4405 internal::None, internal::None, internal::None, internal::None,
4406 internal::None, internal::None, internal::None, internal::None,
4407 internal::None, internal::None, internal::None, internal::None,
4408 internal::None, internal::None, internal::None, internal::None,
4409 internal::None, internal::None, internal::None, internal::None,
4411 typedef internal::Types12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
4414 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4415 typename T6, typename T7, typename T8, typename T9, typename T10,
4416 typename T11, typename T12, typename T13>
4417 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
4418 internal::None, internal::None, internal::None, internal::None,
4419 internal::None, internal::None, internal::None, internal::None,
4420 internal::None, internal::None, internal::None, internal::None,
4421 internal::None, internal::None, internal::None, internal::None,
4422 internal::None, internal::None, internal::None, internal::None,
4423 internal::None, internal::None, internal::None, internal::None,
4424 internal::None, internal::None, internal::None, internal::None,
4425 internal::None, internal::None, internal::None, internal::None,
4426 internal::None, internal::None, internal::None, internal::None,
4428 typedef internal::Types13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
4431 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4432 typename T6, typename T7, typename T8, typename T9, typename T10,
4433 typename T11, typename T12, typename T13, typename T14>
4434 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
4435 internal::None, internal::None, internal::None, internal::None,
4436 internal::None, internal::None, internal::None, internal::None,
4437 internal::None, internal::None, internal::None, internal::None,
4438 internal::None, internal::None, internal::None, internal::None,
4439 internal::None, internal::None, internal::None, internal::None,
4440 internal::None, internal::None, internal::None, internal::None,
4441 internal::None, internal::None, internal::None, internal::None,
4442 internal::None, internal::None, internal::None, internal::None,
4443 internal::None, internal::None, internal::None, internal::None> {
4444 typedef internal::Types14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
4447 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4448 typename T6, typename T7, typename T8, typename T9, typename T10,
4449 typename T11, typename T12, typename T13, typename T14, typename T15>
4450 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4451 internal::None, internal::None, internal::None, internal::None,
4452 internal::None, internal::None, internal::None, internal::None,
4453 internal::None, internal::None, internal::None, internal::None,
4454 internal::None, internal::None, internal::None, internal::None,
4455 internal::None, internal::None, internal::None, internal::None,
4456 internal::None, internal::None, internal::None, internal::None,
4457 internal::None, internal::None, internal::None, internal::None,
4458 internal::None, internal::None, internal::None, internal::None,
4459 internal::None, internal::None, internal::None> {
4460 typedef internal::Types15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
4461 T13, T14, T15> type;
4463 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4464 typename T6, typename T7, typename T8, typename T9, typename T10,
4465 typename T11, typename T12, typename T13, typename T14, typename T15,
4467 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4468 T16, internal::None, internal::None, internal::None, internal::None,
4469 internal::None, internal::None, internal::None, internal::None,
4470 internal::None, internal::None, internal::None, internal::None,
4471 internal::None, internal::None, internal::None, internal::None,
4472 internal::None, internal::None, internal::None, internal::None,
4473 internal::None, internal::None, internal::None, internal::None,
4474 internal::None, internal::None, internal::None, internal::None,
4475 internal::None, internal::None, internal::None, internal::None,
4476 internal::None, internal::None> {
4477 typedef internal::Types16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
4478 T13, T14, T15, T16> type;
4480 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4481 typename T6, typename T7, typename T8, typename T9, typename T10,
4482 typename T11, typename T12, typename T13, typename T14, typename T15,
4483 typename T16, typename T17>
4484 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4485 T16, T17, internal::None, internal::None, internal::None, internal::None,
4486 internal::None, internal::None, internal::None, internal::None,
4487 internal::None, internal::None, internal::None, internal::None,
4488 internal::None, internal::None, internal::None, internal::None,
4489 internal::None, internal::None, internal::None, internal::None,
4490 internal::None, internal::None, internal::None, internal::None,
4491 internal::None, internal::None, internal::None, internal::None,
4492 internal::None, internal::None, internal::None, internal::None,
4494 typedef internal::Types17<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
4495 T13, T14, T15, T16, T17> type;
4497 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4498 typename T6, typename T7, typename T8, typename T9, typename T10,
4499 typename T11, typename T12, typename T13, typename T14, typename T15,
4500 typename T16, typename T17, typename T18>
4501 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4502 T16, T17, T18, internal::None, internal::None, internal::None,
4503 internal::None, internal::None, internal::None, internal::None,
4504 internal::None, internal::None, internal::None, internal::None,
4505 internal::None, internal::None, internal::None, internal::None,
4506 internal::None, internal::None, internal::None, internal::None,
4507 internal::None, internal::None, internal::None, internal::None,
4508 internal::None, internal::None, internal::None, internal::None,
4509 internal::None, internal::None, internal::None, internal::None,
4511 typedef internal::Types18<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
4512 T13, T14, T15, T16, T17, T18> type;
4514 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4515 typename T6, typename T7, typename T8, typename T9, typename T10,
4516 typename T11, typename T12, typename T13, typename T14, typename T15,
4517 typename T16, typename T17, typename T18, typename T19>
4518 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4519 T16, T17, T18, T19, internal::None, internal::None, internal::None,
4520 internal::None, internal::None, internal::None, internal::None,
4521 internal::None, internal::None, internal::None, internal::None,
4522 internal::None, internal::None, internal::None, internal::None,
4523 internal::None, internal::None, internal::None, internal::None,
4524 internal::None, internal::None, internal::None, internal::None,
4525 internal::None, internal::None, internal::None, internal::None,
4526 internal::None, internal::None, internal::None, internal::None> {
4527 typedef internal::Types19<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
4528 T13, T14, T15, T16, T17, T18, T19> type;
4530 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4531 typename T6, typename T7, typename T8, typename T9, typename T10,
4532 typename T11, typename T12, typename T13, typename T14, typename T15,
4533 typename T16, typename T17, typename T18, typename T19, typename T20>
4534 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4535 T16, T17, T18, T19, T20, internal::None, internal::None, internal::None,
4536 internal::None, internal::None, internal::None, internal::None,
4537 internal::None, internal::None, internal::None, internal::None,
4538 internal::None, internal::None, internal::None, internal::None,
4539 internal::None, internal::None, internal::None, internal::None,
4540 internal::None, internal::None, internal::None, internal::None,
4541 internal::None, internal::None, internal::None, internal::None,
4542 internal::None, internal::None, internal::None> {
4543 typedef internal::Types20<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
4544 T13, T14, T15, T16, T17, T18, T19, T20> type;
4546 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4547 typename T6, typename T7, typename T8, typename T9, typename T10,
4548 typename T11, typename T12, typename T13, typename T14, typename T15,
4549 typename T16, typename T17, typename T18, typename T19, typename T20,
4551 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4552 T16, T17, T18, T19, T20, T21, internal::None, internal::None,
4553 internal::None, internal::None, internal::None, internal::None,
4554 internal::None, internal::None, internal::None, internal::None,
4555 internal::None, internal::None, internal::None, internal::None,
4556 internal::None, internal::None, internal::None, internal::None,
4557 internal::None, internal::None, internal::None, internal::None,
4558 internal::None, internal::None, internal::None, internal::None,
4559 internal::None, internal::None, internal::None> {
4560 typedef internal::Types21<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
4561 T13, T14, T15, T16, T17, T18, T19, T20, T21> type;
4563 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4564 typename T6, typename T7, typename T8, typename T9, typename T10,
4565 typename T11, typename T12, typename T13, typename T14, typename T15,
4566 typename T16, typename T17, typename T18, typename T19, typename T20,
4567 typename T21, typename T22>
4568 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4569 T16, T17, T18, T19, T20, T21, T22, internal::None, internal::None,
4570 internal::None, internal::None, internal::None, internal::None,
4571 internal::None, internal::None, internal::None, internal::None,
4572 internal::None, internal::None, internal::None, internal::None,
4573 internal::None, internal::None, internal::None, internal::None,
4574 internal::None, internal::None, internal::None, internal::None,
4575 internal::None, internal::None, internal::None, internal::None,
4576 internal::None, internal::None> {
4577 typedef internal::Types22<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
4578 T13, T14, T15, T16, T17, T18, T19, T20, T21, T22> type;
4580 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4581 typename T6, typename T7, typename T8, typename T9, typename T10,
4582 typename T11, typename T12, typename T13, typename T14, typename T15,
4583 typename T16, typename T17, typename T18, typename T19, typename T20,
4584 typename T21, typename T22, typename T23>
4585 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4586 T16, T17, T18, T19, T20, T21, T22, T23, internal::None, internal::None,
4587 internal::None, internal::None, internal::None, internal::None,
4588 internal::None, internal::None, internal::None, internal::None,
4589 internal::None, internal::None, internal::None, internal::None,
4590 internal::None, internal::None, internal::None, internal::None,
4591 internal::None, internal::None, internal::None, internal::None,
4592 internal::None, internal::None, internal::None, internal::None,
4594 typedef internal::Types23<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
4595 T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23> type;
4597 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4598 typename T6, typename T7, typename T8, typename T9, typename T10,
4599 typename T11, typename T12, typename T13, typename T14, typename T15,
4600 typename T16, typename T17, typename T18, typename T19, typename T20,
4601 typename T21, typename T22, typename T23, typename T24>
4602 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4603 T16, T17, T18, T19, T20, T21, T22, T23, T24, internal::None,
4604 internal::None, internal::None, internal::None, internal::None,
4605 internal::None, internal::None, internal::None, internal::None,
4606 internal::None, internal::None, internal::None, internal::None,
4607 internal::None, internal::None, internal::None, internal::None,
4608 internal::None, internal::None, internal::None, internal::None,
4609 internal::None, internal::None, internal::None, internal::None,
4611 typedef internal::Types24<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
4612 T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24> type;
4614 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4615 typename T6, typename T7, typename T8, typename T9, typename T10,
4616 typename T11, typename T12, typename T13, typename T14, typename T15,
4617 typename T16, typename T17, typename T18, typename T19, typename T20,
4618 typename T21, typename T22, typename T23, typename T24, typename T25>
4619 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4620 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, internal::None,
4621 internal::None, internal::None, internal::None, internal::None,
4622 internal::None, internal::None, internal::None, internal::None,
4623 internal::None, internal::None, internal::None, internal::None,
4624 internal::None, internal::None, internal::None, internal::None,
4625 internal::None, internal::None, internal::None, internal::None,
4626 internal::None, internal::None, internal::None, internal::None> {
4627 typedef internal::Types25<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
4628 T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25> type;
4630 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4631 typename T6, typename T7, typename T8, typename T9, typename T10,
4632 typename T11, typename T12, typename T13, typename T14, typename T15,
4633 typename T16, typename T17, typename T18, typename T19, typename T20,
4634 typename T21, typename T22, typename T23, typename T24, typename T25,
4636 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4637 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, internal::None,
4638 internal::None, internal::None, internal::None, internal::None,
4639 internal::None, internal::None, internal::None, internal::None,
4640 internal::None, internal::None, internal::None, internal::None,
4641 internal::None, internal::None, internal::None, internal::None,
4642 internal::None, internal::None, internal::None, internal::None,
4643 internal::None, internal::None, internal::None> {
4644 typedef internal::Types26<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
4645 T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
4648 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4649 typename T6, typename T7, typename T8, typename T9, typename T10,
4650 typename T11, typename T12, typename T13, typename T14, typename T15,
4651 typename T16, typename T17, typename T18, typename T19, typename T20,
4652 typename T21, typename T22, typename T23, typename T24, typename T25,
4653 typename T26, typename T27>
4654 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4655 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, internal::None,
4656 internal::None, internal::None, internal::None, internal::None,
4657 internal::None, internal::None, internal::None, internal::None,
4658 internal::None, internal::None, internal::None, internal::None,
4659 internal::None, internal::None, internal::None, internal::None,
4660 internal::None, internal::None, internal::None, internal::None,
4661 internal::None, internal::None> {
4662 typedef internal::Types27<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
4663 T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
4666 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4667 typename T6, typename T7, typename T8, typename T9, typename T10,
4668 typename T11, typename T12, typename T13, typename T14, typename T15,
4669 typename T16, typename T17, typename T18, typename T19, typename T20,
4670 typename T21, typename T22, typename T23, typename T24, typename T25,
4671 typename T26, typename T27, typename T28>
4672 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4673 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
4674 internal::None, internal::None, internal::None, internal::None,
4675 internal::None, internal::None, internal::None, internal::None,
4676 internal::None, internal::None, internal::None, internal::None,
4677 internal::None, internal::None, internal::None, internal::None,
4678 internal::None, internal::None, internal::None, internal::None,
4679 internal::None, internal::None> {
4680 typedef internal::Types28<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
4681 T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
4684 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4685 typename T6, typename T7, typename T8, typename T9, typename T10,
4686 typename T11, typename T12, typename T13, typename T14, typename T15,
4687 typename T16, typename T17, typename T18, typename T19, typename T20,
4688 typename T21, typename T22, typename T23, typename T24, typename T25,
4689 typename T26, typename T27, typename T28, typename T29>
4690 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4691 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
4692 internal::None, internal::None, internal::None, internal::None,
4693 internal::None, internal::None, internal::None, internal::None,
4694 internal::None, internal::None, internal::None, internal::None,
4695 internal::None, internal::None, internal::None, internal::None,
4696 internal::None, internal::None, internal::None, internal::None,
4698 typedef internal::Types29<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
4699 T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
4700 T27, T28, T29> type;
4702 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4703 typename T6, typename T7, typename T8, typename T9, typename T10,
4704 typename T11, typename T12, typename T13, typename T14, typename T15,
4705 typename T16, typename T17, typename T18, typename T19, typename T20,
4706 typename T21, typename T22, typename T23, typename T24, typename T25,
4707 typename T26, typename T27, typename T28, typename T29, typename T30>
4708 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4709 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
4710 internal::None, internal::None, internal::None, internal::None,
4711 internal::None, internal::None, internal::None, internal::None,
4712 internal::None, internal::None, internal::None, internal::None,
4713 internal::None, internal::None, internal::None, internal::None,
4714 internal::None, internal::None, internal::None, internal::None> {
4715 typedef internal::Types30<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
4716 T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
4717 T27, T28, T29, T30> type;
4719 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4720 typename T6, typename T7, typename T8, typename T9, typename T10,
4721 typename T11, typename T12, typename T13, typename T14, typename T15,
4722 typename T16, typename T17, typename T18, typename T19, typename T20,
4723 typename T21, typename T22, typename T23, typename T24, typename T25,
4724 typename T26, typename T27, typename T28, typename T29, typename T30,
4726 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4727 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
4728 T31, internal::None, internal::None, internal::None, internal::None,
4729 internal::None, internal::None, internal::None, internal::None,
4730 internal::None, internal::None, internal::None, internal::None,
4731 internal::None, internal::None, internal::None, internal::None,
4732 internal::None, internal::None, internal::None> {
4733 typedef internal::Types31<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
4734 T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
4735 T27, T28, T29, T30, T31> type;
4737 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4738 typename T6, typename T7, typename T8, typename T9, typename T10,
4739 typename T11, typename T12, typename T13, typename T14, typename T15,
4740 typename T16, typename T17, typename T18, typename T19, typename T20,
4741 typename T21, typename T22, typename T23, typename T24, typename T25,
4742 typename T26, typename T27, typename T28, typename T29, typename T30,
4743 typename T31, typename T32>
4744 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4745 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
4746 T31, T32, internal::None, internal::None, internal::None, internal::None,
4747 internal::None, internal::None, internal::None, internal::None,
4748 internal::None, internal::None, internal::None, internal::None,
4749 internal::None, internal::None, internal::None, internal::None,
4750 internal::None, internal::None> {
4751 typedef internal::Types32<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
4752 T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
4753 T27, T28, T29, T30, T31, T32> type;
4755 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4756 typename T6, typename T7, typename T8, typename T9, typename T10,
4757 typename T11, typename T12, typename T13, typename T14, typename T15,
4758 typename T16, typename T17, typename T18, typename T19, typename T20,
4759 typename T21, typename T22, typename T23, typename T24, typename T25,
4760 typename T26, typename T27, typename T28, typename T29, typename T30,
4761 typename T31, typename T32, typename T33>
4762 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4763 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
4764 T31, T32, T33, internal::None, internal::None, internal::None,
4765 internal::None, internal::None, internal::None, internal::None,
4766 internal::None, internal::None, internal::None, internal::None,
4767 internal::None, internal::None, internal::None, internal::None,
4768 internal::None, internal::None> {
4769 typedef internal::Types33<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
4770 T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
4771 T27, T28, T29, T30, T31, T32, T33> type;
4773 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4774 typename T6, typename T7, typename T8, typename T9, typename T10,
4775 typename T11, typename T12, typename T13, typename T14, typename T15,
4776 typename T16, typename T17, typename T18, typename T19, typename T20,
4777 typename T21, typename T22, typename T23, typename T24, typename T25,
4778 typename T26, typename T27, typename T28, typename T29, typename T30,
4779 typename T31, typename T32, typename T33, typename T34>
4780 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4781 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
4782 T31, T32, T33, T34, internal::None, internal::None, internal::None,
4783 internal::None, internal::None, internal::None, internal::None,
4784 internal::None, internal::None, internal::None, internal::None,
4785 internal::None, internal::None, internal::None, internal::None,
4787 typedef internal::Types34<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
4788 T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
4789 T27, T28, T29, T30, T31, T32, T33, T34> type;
4791 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4792 typename T6, typename T7, typename T8, typename T9, typename T10,
4793 typename T11, typename T12, typename T13, typename T14, typename T15,
4794 typename T16, typename T17, typename T18, typename T19, typename T20,
4795 typename T21, typename T22, typename T23, typename T24, typename T25,
4796 typename T26, typename T27, typename T28, typename T29, typename T30,
4797 typename T31, typename T32, typename T33, typename T34, typename T35>
4798 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4799 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
4800 T31, T32, T33, T34, T35, internal::None, internal::None, internal::None,
4801 internal::None, internal::None, internal::None, internal::None,
4802 internal::None, internal::None, internal::None, internal::None,
4803 internal::None, internal::None, internal::None, internal::None> {
4804 typedef internal::Types35<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
4805 T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
4806 T27, T28, T29, T30, T31, T32, T33, T34, T35> type;
4808 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4809 typename T6, typename T7, typename T8, typename T9, typename T10,
4810 typename T11, typename T12, typename T13, typename T14, typename T15,
4811 typename T16, typename T17, typename T18, typename T19, typename T20,
4812 typename T21, typename T22, typename T23, typename T24, typename T25,
4813 typename T26, typename T27, typename T28, typename T29, typename T30,
4814 typename T31, typename T32, typename T33, typename T34, typename T35,
4816 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4817 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
4818 T31, T32, T33, T34, T35, T36, internal::None, internal::None,
4819 internal::None, internal::None, internal::None, internal::None,
4820 internal::None, internal::None, internal::None, internal::None,
4821 internal::None, internal::None, internal::None, internal::None> {
4822 typedef internal::Types36<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
4823 T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
4824 T27, T28, T29, T30, T31, T32, T33, T34, T35, T36> type;
4826 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4827 typename T6, typename T7, typename T8, typename T9, typename T10,
4828 typename T11, typename T12, typename T13, typename T14, typename T15,
4829 typename T16, typename T17, typename T18, typename T19, typename T20,
4830 typename T21, typename T22, typename T23, typename T24, typename T25,
4831 typename T26, typename T27, typename T28, typename T29, typename T30,
4832 typename T31, typename T32, typename T33, typename T34, typename T35,
4833 typename T36, typename T37>
4834 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4835 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
4836 T31, T32, T33, T34, T35, T36, T37, internal::None, internal::None,
4837 internal::None, internal::None, internal::None, internal::None,
4838 internal::None, internal::None, internal::None, internal::None,
4839 internal::None, internal::None, internal::None> {
4840 typedef internal::Types37<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
4841 T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
4842 T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37> type;
4844 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4845 typename T6, typename T7, typename T8, typename T9, typename T10,
4846 typename T11, typename T12, typename T13, typename T14, typename T15,
4847 typename T16, typename T17, typename T18, typename T19, typename T20,
4848 typename T21, typename T22, typename T23, typename T24, typename T25,
4849 typename T26, typename T27, typename T28, typename T29, typename T30,
4850 typename T31, typename T32, typename T33, typename T34, typename T35,
4851 typename T36, typename T37, typename T38>
4852 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4853 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
4854 T31, T32, T33, T34, T35, T36, T37, T38, internal::None, internal::None,
4855 internal::None, internal::None, internal::None, internal::None,
4856 internal::None, internal::None, internal::None, internal::None,
4857 internal::None, internal::None> {
4858 typedef internal::Types38<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
4859 T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
4860 T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38> type;
4862 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4863 typename T6, typename T7, typename T8, typename T9, typename T10,
4864 typename T11, typename T12, typename T13, typename T14, typename T15,
4865 typename T16, typename T17, typename T18, typename T19, typename T20,
4866 typename T21, typename T22, typename T23, typename T24, typename T25,
4867 typename T26, typename T27, typename T28, typename T29, typename T30,
4868 typename T31, typename T32, typename T33, typename T34, typename T35,
4869 typename T36, typename T37, typename T38, typename T39>
4870 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4871 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
4872 T31, T32, T33, T34, T35, T36, T37, T38, T39, internal::None,
4873 internal::None, internal::None, internal::None, internal::None,
4874 internal::None, internal::None, internal::None, internal::None,
4875 internal::None, internal::None> {
4876 typedef internal::Types39<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
4877 T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
4878 T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39> type;
4880 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4881 typename T6, typename T7, typename T8, typename T9, typename T10,
4882 typename T11, typename T12, typename T13, typename T14, typename T15,
4883 typename T16, typename T17, typename T18, typename T19, typename T20,
4884 typename T21, typename T22, typename T23, typename T24, typename T25,
4885 typename T26, typename T27, typename T28, typename T29, typename T30,
4886 typename T31, typename T32, typename T33, typename T34, typename T35,
4887 typename T36, typename T37, typename T38, typename T39, typename T40>
4888 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4889 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
4890 T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, internal::None,
4891 internal::None, internal::None, internal::None, internal::None,
4892 internal::None, internal::None, internal::None, internal::None,
4894 typedef internal::Types40<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
4895 T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
4896 T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
4899 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4900 typename T6, typename T7, typename T8, typename T9, typename T10,
4901 typename T11, typename T12, typename T13, typename T14, typename T15,
4902 typename T16, typename T17, typename T18, typename T19, typename T20,
4903 typename T21, typename T22, typename T23, typename T24, typename T25,
4904 typename T26, typename T27, typename T28, typename T29, typename T30,
4905 typename T31, typename T32, typename T33, typename T34, typename T35,
4906 typename T36, typename T37, typename T38, typename T39, typename T40,
4908 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4909 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
4910 T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, internal::None,
4911 internal::None, internal::None, internal::None, internal::None,
4912 internal::None, internal::None, internal::None, internal::None> {
4913 typedef internal::Types41<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
4914 T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
4915 T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
4918 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4919 typename T6, typename T7, typename T8, typename T9, typename T10,
4920 typename T11, typename T12, typename T13, typename T14, typename T15,
4921 typename T16, typename T17, typename T18, typename T19, typename T20,
4922 typename T21, typename T22, typename T23, typename T24, typename T25,
4923 typename T26, typename T27, typename T28, typename T29, typename T30,
4924 typename T31, typename T32, typename T33, typename T34, typename T35,
4925 typename T36, typename T37, typename T38, typename T39, typename T40,
4926 typename T41, typename T42>
4927 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4928 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
4929 T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, internal::None,
4930 internal::None, internal::None, internal::None, internal::None,
4931 internal::None, internal::None, internal::None> {
4932 typedef internal::Types42<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
4933 T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
4934 T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
4937 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4938 typename T6, typename T7, typename T8, typename T9, typename T10,
4939 typename T11, typename T12, typename T13, typename T14, typename T15,
4940 typename T16, typename T17, typename T18, typename T19, typename T20,
4941 typename T21, typename T22, typename T23, typename T24, typename T25,
4942 typename T26, typename T27, typename T28, typename T29, typename T30,
4943 typename T31, typename T32, typename T33, typename T34, typename T35,
4944 typename T36, typename T37, typename T38, typename T39, typename T40,
4945 typename T41, typename T42, typename T43>
4946 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4947 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
4948 T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
4949 internal::None, internal::None, internal::None, internal::None,
4950 internal::None, internal::None, internal::None> {
4951 typedef internal::Types43<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
4952 T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
4953 T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
4954 T41, T42, T43> type;
4956 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4957 typename T6, typename T7, typename T8, typename T9, typename T10,
4958 typename T11, typename T12, typename T13, typename T14, typename T15,
4959 typename T16, typename T17, typename T18, typename T19, typename T20,
4960 typename T21, typename T22, typename T23, typename T24, typename T25,
4961 typename T26, typename T27, typename T28, typename T29, typename T30,
4962 typename T31, typename T32, typename T33, typename T34, typename T35,
4963 typename T36, typename T37, typename T38, typename T39, typename T40,
4964 typename T41, typename T42, typename T43, typename T44>
4965 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4966 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
4967 T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44,
4968 internal::None, internal::None, internal::None, internal::None,
4969 internal::None, internal::None> {
4970 typedef internal::Types44<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
4971 T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
4972 T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
4973 T41, T42, T43, T44> type;
4975 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4976 typename T6, typename T7, typename T8, typename T9, typename T10,
4977 typename T11, typename T12, typename T13, typename T14, typename T15,
4978 typename T16, typename T17, typename T18, typename T19, typename T20,
4979 typename T21, typename T22, typename T23, typename T24, typename T25,
4980 typename T26, typename T27, typename T28, typename T29, typename T30,
4981 typename T31, typename T32, typename T33, typename T34, typename T35,
4982 typename T36, typename T37, typename T38, typename T39, typename T40,
4983 typename T41, typename T42, typename T43, typename T44, typename T45>
4984 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
4985 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
4986 T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44, T45,
4987 internal::None, internal::None, internal::None, internal::None,
4989 typedef internal::Types45<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
4990 T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
4991 T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
4992 T41, T42, T43, T44, T45> type;
4994 template <typename T1, typename T2, typename T3, typename T4, typename T5,
4995 typename T6, typename T7, typename T8, typename T9, typename T10,
4996 typename T11, typename T12, typename T13, typename T14, typename T15,
4997 typename T16, typename T17, typename T18, typename T19, typename T20,
4998 typename T21, typename T22, typename T23, typename T24, typename T25,
4999 typename T26, typename T27, typename T28, typename T29, typename T30,
5000 typename T31, typename T32, typename T33, typename T34, typename T35,
5001 typename T36, typename T37, typename T38, typename T39, typename T40,
5002 typename T41, typename T42, typename T43, typename T44, typename T45,
5004 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
5005 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
5006 T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44, T45,
5007 T46, internal::None, internal::None, internal::None, internal::None> {
5008 typedef internal::Types46<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
5009 T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
5010 T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
5011 T41, T42, T43, T44, T45, T46> type;
5013 template <typename T1, typename T2, typename T3, typename T4, typename T5,
5014 typename T6, typename T7, typename T8, typename T9, typename T10,
5015 typename T11, typename T12, typename T13, typename T14, typename T15,
5016 typename T16, typename T17, typename T18, typename T19, typename T20,
5017 typename T21, typename T22, typename T23, typename T24, typename T25,
5018 typename T26, typename T27, typename T28, typename T29, typename T30,
5019 typename T31, typename T32, typename T33, typename T34, typename T35,
5020 typename T36, typename T37, typename T38, typename T39, typename T40,
5021 typename T41, typename T42, typename T43, typename T44, typename T45,
5022 typename T46, typename T47>
5023 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
5024 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
5025 T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44, T45,
5026 T46, T47, internal::None, internal::None, internal::None> {
5027 typedef internal::Types47<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
5028 T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
5029 T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
5030 T41, T42, T43, T44, T45, T46, T47> type;
5032 template <typename T1, typename T2, typename T3, typename T4, typename T5,
5033 typename T6, typename T7, typename T8, typename T9, typename T10,
5034 typename T11, typename T12, typename T13, typename T14, typename T15,
5035 typename T16, typename T17, typename T18, typename T19, typename T20,
5036 typename T21, typename T22, typename T23, typename T24, typename T25,
5037 typename T26, typename T27, typename T28, typename T29, typename T30,
5038 typename T31, typename T32, typename T33, typename T34, typename T35,
5039 typename T36, typename T37, typename T38, typename T39, typename T40,
5040 typename T41, typename T42, typename T43, typename T44, typename T45,
5041 typename T46, typename T47, typename T48>
5042 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
5043 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
5044 T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44, T45,
5045 T46, T47, T48, internal::None, internal::None> {
5046 typedef internal::Types48<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
5047 T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
5048 T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
5049 T41, T42, T43, T44, T45, T46, T47, T48> type;
5051 template <typename T1, typename T2, typename T3, typename T4, typename T5,
5052 typename T6, typename T7, typename T8, typename T9, typename T10,
5053 typename T11, typename T12, typename T13, typename T14, typename T15,
5054 typename T16, typename T17, typename T18, typename T19, typename T20,
5055 typename T21, typename T22, typename T23, typename T24, typename T25,
5056 typename T26, typename T27, typename T28, typename T29, typename T30,
5057 typename T31, typename T32, typename T33, typename T34, typename T35,
5058 typename T36, typename T37, typename T38, typename T39, typename T40,
5059 typename T41, typename T42, typename T43, typename T44, typename T45,
5060 typename T46, typename T47, typename T48, typename T49>
5061 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15,
5062 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30,
5063 T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44, T45,
5064 T46, T47, T48, T49, internal::None> {
5065 typedef internal::Types49<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
5066 T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
5067 T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
5068 T41, T42, T43, T44, T45, T46, T47, T48, T49> type;
5071 namespace internal {
5073 # define GTEST_TEMPLATE_ template <typename T> class
5075 // The template "selector" struct TemplateSel<Tmpl> is used to
5076 // represent Tmpl, which must be a class template with one type
5077 // parameter, as a type. TemplateSel<Tmpl>::Bind<T>::type is defined
5078 // as the type Tmpl<T>. This allows us to actually instantiate the
5079 // template "selected" by TemplateSel<Tmpl>.
5081 // This trick is necessary for simulating typedef for class templates,
5082 // which C++ doesn't support directly.
5083 template <GTEST_TEMPLATE_ Tmpl>
5084 struct TemplateSel {
5085 template <typename T>
5087 typedef Tmpl<T> type;
5091 # define GTEST_BIND_(TmplSel, T) \
5092 TmplSel::template Bind<T>::type
5094 // A unique struct template used as the default value for the
5095 // arguments of class template Templates. This allows us to simulate
5096 // variadic templates (e.g. Templates<int>, Templates<int, double>,
5097 // and etc), which C++ doesn't support directly.
5098 template <typename T>
5101 // The following family of struct and struct templates are used to
5102 // represent template lists. In particular, TemplatesN<T1, T2, ...,
5103 // TN> represents a list of N templates (T1, T2, ..., and TN). Except
5104 // for Templates0, every struct in the family has two member types:
5105 // Head for the selector of the first template in the list, and Tail
5106 // for the rest of the list.
5108 // The empty template list.
5109 struct Templates0 {};
5111 // Template lists of length 1, 2, 3, and so on.
5113 template <GTEST_TEMPLATE_ T1>
5115 typedef TemplateSel<T1> Head;
5116 typedef Templates0 Tail;
5118 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2>
5120 typedef TemplateSel<T1> Head;
5121 typedef Templates1<T2> Tail;
5124 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3>
5126 typedef TemplateSel<T1> Head;
5127 typedef Templates2<T2, T3> Tail;
5130 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5133 typedef TemplateSel<T1> Head;
5134 typedef Templates3<T2, T3, T4> Tail;
5137 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5138 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5>
5140 typedef TemplateSel<T1> Head;
5141 typedef Templates4<T2, T3, T4, T5> Tail;
5144 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5145 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6>
5147 typedef TemplateSel<T1> Head;
5148 typedef Templates5<T2, T3, T4, T5, T6> Tail;
5151 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5152 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5155 typedef TemplateSel<T1> Head;
5156 typedef Templates6<T2, T3, T4, T5, T6, T7> Tail;
5159 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5160 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5161 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8>
5163 typedef TemplateSel<T1> Head;
5164 typedef Templates7<T2, T3, T4, T5, T6, T7, T8> Tail;
5167 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5168 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5169 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9>
5171 typedef TemplateSel<T1> Head;
5172 typedef Templates8<T2, T3, T4, T5, T6, T7, T8, T9> Tail;
5175 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5176 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5177 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
5178 GTEST_TEMPLATE_ T10>
5179 struct Templates10 {
5180 typedef TemplateSel<T1> Head;
5181 typedef Templates9<T2, T3, T4, T5, T6, T7, T8, T9, T10> Tail;
5184 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5185 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5186 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
5187 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11>
5188 struct Templates11 {
5189 typedef TemplateSel<T1> Head;
5190 typedef Templates10<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> Tail;
5193 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5194 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5195 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
5196 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12>
5197 struct Templates12 {
5198 typedef TemplateSel<T1> Head;
5199 typedef Templates11<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> Tail;
5202 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5203 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5204 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
5205 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
5206 GTEST_TEMPLATE_ T13>
5207 struct Templates13 {
5208 typedef TemplateSel<T1> Head;
5209 typedef Templates12<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> Tail;
5212 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5213 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5214 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
5215 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
5216 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14>
5217 struct Templates14 {
5218 typedef TemplateSel<T1> Head;
5219 typedef Templates13<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
5223 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5224 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5225 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
5226 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
5227 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15>
5228 struct Templates15 {
5229 typedef TemplateSel<T1> Head;
5230 typedef Templates14<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
5234 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5235 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5236 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
5237 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
5238 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
5239 GTEST_TEMPLATE_ T16>
5240 struct Templates16 {
5241 typedef TemplateSel<T1> Head;
5242 typedef Templates15<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
5246 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5247 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5248 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
5249 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
5250 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
5251 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17>
5252 struct Templates17 {
5253 typedef TemplateSel<T1> Head;
5254 typedef Templates16<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
5255 T15, T16, T17> Tail;
5258 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5259 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5260 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
5261 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
5262 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
5263 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18>
5264 struct Templates18 {
5265 typedef TemplateSel<T1> Head;
5266 typedef Templates17<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
5267 T15, T16, T17, T18> Tail;
5270 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5271 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5272 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
5273 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
5274 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
5275 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
5276 GTEST_TEMPLATE_ T19>
5277 struct Templates19 {
5278 typedef TemplateSel<T1> Head;
5279 typedef Templates18<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
5280 T15, T16, T17, T18, T19> Tail;
5283 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5284 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5285 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
5286 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
5287 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
5288 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
5289 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20>
5290 struct Templates20 {
5291 typedef TemplateSel<T1> Head;
5292 typedef Templates19<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
5293 T15, T16, T17, T18, T19, T20> Tail;
5296 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5297 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5298 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
5299 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
5300 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
5301 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
5302 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21>
5303 struct Templates21 {
5304 typedef TemplateSel<T1> Head;
5305 typedef Templates20<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
5306 T15, T16, T17, T18, T19, T20, T21> Tail;
5309 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5310 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5311 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
5312 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
5313 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
5314 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
5315 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
5316 GTEST_TEMPLATE_ T22>
5317 struct Templates22 {
5318 typedef TemplateSel<T1> Head;
5319 typedef Templates21<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
5320 T15, T16, T17, T18, T19, T20, T21, T22> Tail;
5323 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5324 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5325 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
5326 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
5327 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
5328 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
5329 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
5330 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23>
5331 struct Templates23 {
5332 typedef TemplateSel<T1> Head;
5333 typedef Templates22<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
5334 T15, T16, T17, T18, T19, T20, T21, T22, T23> Tail;
5337 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5338 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5339 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
5340 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
5341 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
5342 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
5343 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
5344 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24>
5345 struct Templates24 {
5346 typedef TemplateSel<T1> Head;
5347 typedef Templates23<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
5348 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24> Tail;
5351 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5352 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5353 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
5354 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
5355 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
5356 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
5357 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
5358 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
5359 GTEST_TEMPLATE_ T25>
5360 struct Templates25 {
5361 typedef TemplateSel<T1> Head;
5362 typedef Templates24<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
5363 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25> Tail;
5366 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5367 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5368 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
5369 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
5370 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
5371 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
5372 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
5373 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
5374 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26>
5375 struct Templates26 {
5376 typedef TemplateSel<T1> Head;
5377 typedef Templates25<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
5378 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26> Tail;
5381 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5382 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5383 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
5384 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
5385 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
5386 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
5387 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
5388 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
5389 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27>
5390 struct Templates27 {
5391 typedef TemplateSel<T1> Head;
5392 typedef Templates26<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
5393 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27> Tail;
5396 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5397 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5398 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
5399 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
5400 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
5401 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
5402 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
5403 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
5404 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
5405 GTEST_TEMPLATE_ T28>
5406 struct Templates28 {
5407 typedef TemplateSel<T1> Head;
5408 typedef Templates27<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
5409 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
5413 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5414 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5415 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
5416 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
5417 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
5418 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
5419 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
5420 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
5421 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
5422 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29>
5423 struct Templates29 {
5424 typedef TemplateSel<T1> Head;
5425 typedef Templates28<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
5426 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
5430 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5431 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5432 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
5433 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
5434 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
5435 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
5436 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
5437 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
5438 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
5439 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30>
5440 struct Templates30 {
5441 typedef TemplateSel<T1> Head;
5442 typedef Templates29<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
5443 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
5447 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5448 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5449 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
5450 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
5451 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
5452 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
5453 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
5454 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
5455 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
5456 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
5457 GTEST_TEMPLATE_ T31>
5458 struct Templates31 {
5459 typedef TemplateSel<T1> Head;
5460 typedef Templates30<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
5461 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
5462 T29, T30, T31> Tail;
5465 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5466 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5467 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
5468 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
5469 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
5470 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
5471 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
5472 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
5473 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
5474 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
5475 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32>
5476 struct Templates32 {
5477 typedef TemplateSel<T1> Head;
5478 typedef Templates31<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
5479 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
5480 T29, T30, T31, T32> Tail;
5483 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5484 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5485 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
5486 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
5487 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
5488 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
5489 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
5490 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
5491 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
5492 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
5493 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33>
5494 struct Templates33 {
5495 typedef TemplateSel<T1> Head;
5496 typedef Templates32<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
5497 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
5498 T29, T30, T31, T32, T33> Tail;
5501 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5502 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5503 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
5504 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
5505 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
5506 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
5507 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
5508 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
5509 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
5510 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
5511 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
5512 GTEST_TEMPLATE_ T34>
5513 struct Templates34 {
5514 typedef TemplateSel<T1> Head;
5515 typedef Templates33<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
5516 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
5517 T29, T30, T31, T32, T33, T34> Tail;
5520 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5521 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5522 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
5523 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
5524 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
5525 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
5526 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
5527 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
5528 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
5529 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
5530 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
5531 GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35>
5532 struct Templates35 {
5533 typedef TemplateSel<T1> Head;
5534 typedef Templates34<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
5535 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
5536 T29, T30, T31, T32, T33, T34, T35> Tail;
5539 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5540 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5541 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
5542 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
5543 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
5544 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
5545 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
5546 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
5547 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
5548 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
5549 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
5550 GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36>
5551 struct Templates36 {
5552 typedef TemplateSel<T1> Head;
5553 typedef Templates35<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
5554 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
5555 T29, T30, T31, T32, T33, T34, T35, T36> Tail;
5558 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5559 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5560 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
5561 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
5562 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
5563 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
5564 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
5565 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
5566 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
5567 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
5568 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
5569 GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
5570 GTEST_TEMPLATE_ T37>
5571 struct Templates37 {
5572 typedef TemplateSel<T1> Head;
5573 typedef Templates36<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
5574 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
5575 T29, T30, T31, T32, T33, T34, T35, T36, T37> Tail;
5578 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5579 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5580 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
5581 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
5582 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
5583 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
5584 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
5585 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
5586 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
5587 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
5588 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
5589 GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
5590 GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38>
5591 struct Templates38 {
5592 typedef TemplateSel<T1> Head;
5593 typedef Templates37<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
5594 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
5595 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38> Tail;
5598 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5599 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5600 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
5601 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
5602 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
5603 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
5604 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
5605 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
5606 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
5607 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
5608 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
5609 GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
5610 GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39>
5611 struct Templates39 {
5612 typedef TemplateSel<T1> Head;
5613 typedef Templates38<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
5614 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
5615 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39> Tail;
5618 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5619 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5620 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
5621 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
5622 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
5623 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
5624 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
5625 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
5626 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
5627 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
5628 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
5629 GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
5630 GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
5631 GTEST_TEMPLATE_ T40>
5632 struct Templates40 {
5633 typedef TemplateSel<T1> Head;
5634 typedef Templates39<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
5635 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
5636 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40> Tail;
5639 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5640 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5641 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
5642 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
5643 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
5644 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
5645 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
5646 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
5647 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
5648 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
5649 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
5650 GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
5651 GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
5652 GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41>
5653 struct Templates41 {
5654 typedef TemplateSel<T1> Head;
5655 typedef Templates40<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
5656 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
5657 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41> Tail;
5660 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5661 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5662 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
5663 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
5664 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
5665 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
5666 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
5667 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
5668 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
5669 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
5670 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
5671 GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
5672 GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
5673 GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42>
5674 struct Templates42 {
5675 typedef TemplateSel<T1> Head;
5676 typedef Templates41<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
5677 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
5678 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,
5682 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5683 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5684 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
5685 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
5686 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
5687 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
5688 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
5689 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
5690 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
5691 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
5692 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
5693 GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
5694 GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
5695 GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
5696 GTEST_TEMPLATE_ T43>
5697 struct Templates43 {
5698 typedef TemplateSel<T1> Head;
5699 typedef Templates42<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
5700 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
5701 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,
5705 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5706 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5707 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
5708 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
5709 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
5710 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
5711 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
5712 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
5713 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
5714 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
5715 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
5716 GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
5717 GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
5718 GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
5719 GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44>
5720 struct Templates44 {
5721 typedef TemplateSel<T1> Head;
5722 typedef Templates43<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
5723 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
5724 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,
5728 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5729 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5730 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
5731 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
5732 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
5733 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
5734 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
5735 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
5736 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
5737 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
5738 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
5739 GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
5740 GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
5741 GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
5742 GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45>
5743 struct Templates45 {
5744 typedef TemplateSel<T1> Head;
5745 typedef Templates44<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
5746 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
5747 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,
5748 T43, T44, T45> Tail;
5751 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5752 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5753 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
5754 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
5755 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
5756 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
5757 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
5758 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
5759 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
5760 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
5761 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
5762 GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
5763 GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
5764 GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
5765 GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45,
5766 GTEST_TEMPLATE_ T46>
5767 struct Templates46 {
5768 typedef TemplateSel<T1> Head;
5769 typedef Templates45<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
5770 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
5771 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,
5772 T43, T44, T45, T46> Tail;
5775 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5776 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5777 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
5778 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
5779 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
5780 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
5781 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
5782 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
5783 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
5784 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
5785 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
5786 GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
5787 GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
5788 GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
5789 GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45,
5790 GTEST_TEMPLATE_ T46, GTEST_TEMPLATE_ T47>
5791 struct Templates47 {
5792 typedef TemplateSel<T1> Head;
5793 typedef Templates46<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
5794 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
5795 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,
5796 T43, T44, T45, T46, T47> Tail;
5799 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5800 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5801 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
5802 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
5803 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
5804 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
5805 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
5806 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
5807 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
5808 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
5809 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
5810 GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
5811 GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
5812 GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
5813 GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45,
5814 GTEST_TEMPLATE_ T46, GTEST_TEMPLATE_ T47, GTEST_TEMPLATE_ T48>
5815 struct Templates48 {
5816 typedef TemplateSel<T1> Head;
5817 typedef Templates47<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
5818 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
5819 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,
5820 T43, T44, T45, T46, T47, T48> Tail;
5823 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5824 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5825 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
5826 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
5827 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
5828 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
5829 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
5830 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
5831 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
5832 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
5833 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
5834 GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
5835 GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
5836 GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
5837 GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45,
5838 GTEST_TEMPLATE_ T46, GTEST_TEMPLATE_ T47, GTEST_TEMPLATE_ T48,
5839 GTEST_TEMPLATE_ T49>
5840 struct Templates49 {
5841 typedef TemplateSel<T1> Head;
5842 typedef Templates48<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
5843 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
5844 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,
5845 T43, T44, T45, T46, T47, T48, T49> Tail;
5848 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5849 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5850 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
5851 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
5852 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
5853 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
5854 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
5855 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
5856 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
5857 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
5858 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
5859 GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
5860 GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
5861 GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
5862 GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45,
5863 GTEST_TEMPLATE_ T46, GTEST_TEMPLATE_ T47, GTEST_TEMPLATE_ T48,
5864 GTEST_TEMPLATE_ T49, GTEST_TEMPLATE_ T50>
5865 struct Templates50 {
5866 typedef TemplateSel<T1> Head;
5867 typedef Templates49<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
5868 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
5869 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,
5870 T43, T44, T45, T46, T47, T48, T49, T50> Tail;
5874 // We don't want to require the users to write TemplatesN<...> directly,
5875 // as that would require them to count the length. Templates<...> is much
5876 // easier to write, but generates horrible messages when there is a
5877 // compiler error, as gcc insists on printing out each template
5878 // argument, even if it has the default value (this means Templates<list>
5879 // will appear as Templates<list, NoneT, NoneT, ..., NoneT> in the compiler
5882 // Our solution is to combine the best part of the two approaches: a
5883 // user would write Templates<T1, ..., TN>, and Google Test will translate
5884 // that to TemplatesN<T1, ..., TN> internally to make error messages
5885 // readable. The translation is done by the 'type' member of the
5886 // Templates template.
5887 template <GTEST_TEMPLATE_ T1 = NoneT, GTEST_TEMPLATE_ T2 = NoneT,
5888 GTEST_TEMPLATE_ T3 = NoneT, GTEST_TEMPLATE_ T4 = NoneT,
5889 GTEST_TEMPLATE_ T5 = NoneT, GTEST_TEMPLATE_ T6 = NoneT,
5890 GTEST_TEMPLATE_ T7 = NoneT, GTEST_TEMPLATE_ T8 = NoneT,
5891 GTEST_TEMPLATE_ T9 = NoneT, GTEST_TEMPLATE_ T10 = NoneT,
5892 GTEST_TEMPLATE_ T11 = NoneT, GTEST_TEMPLATE_ T12 = NoneT,
5893 GTEST_TEMPLATE_ T13 = NoneT, GTEST_TEMPLATE_ T14 = NoneT,
5894 GTEST_TEMPLATE_ T15 = NoneT, GTEST_TEMPLATE_ T16 = NoneT,
5895 GTEST_TEMPLATE_ T17 = NoneT, GTEST_TEMPLATE_ T18 = NoneT,
5896 GTEST_TEMPLATE_ T19 = NoneT, GTEST_TEMPLATE_ T20 = NoneT,
5897 GTEST_TEMPLATE_ T21 = NoneT, GTEST_TEMPLATE_ T22 = NoneT,
5898 GTEST_TEMPLATE_ T23 = NoneT, GTEST_TEMPLATE_ T24 = NoneT,
5899 GTEST_TEMPLATE_ T25 = NoneT, GTEST_TEMPLATE_ T26 = NoneT,
5900 GTEST_TEMPLATE_ T27 = NoneT, GTEST_TEMPLATE_ T28 = NoneT,
5901 GTEST_TEMPLATE_ T29 = NoneT, GTEST_TEMPLATE_ T30 = NoneT,
5902 GTEST_TEMPLATE_ T31 = NoneT, GTEST_TEMPLATE_ T32 = NoneT,
5903 GTEST_TEMPLATE_ T33 = NoneT, GTEST_TEMPLATE_ T34 = NoneT,
5904 GTEST_TEMPLATE_ T35 = NoneT, GTEST_TEMPLATE_ T36 = NoneT,
5905 GTEST_TEMPLATE_ T37 = NoneT, GTEST_TEMPLATE_ T38 = NoneT,
5906 GTEST_TEMPLATE_ T39 = NoneT, GTEST_TEMPLATE_ T40 = NoneT,
5907 GTEST_TEMPLATE_ T41 = NoneT, GTEST_TEMPLATE_ T42 = NoneT,
5908 GTEST_TEMPLATE_ T43 = NoneT, GTEST_TEMPLATE_ T44 = NoneT,
5909 GTEST_TEMPLATE_ T45 = NoneT, GTEST_TEMPLATE_ T46 = NoneT,
5910 GTEST_TEMPLATE_ T47 = NoneT, GTEST_TEMPLATE_ T48 = NoneT,
5911 GTEST_TEMPLATE_ T49 = NoneT, GTEST_TEMPLATE_ T50 = NoneT>
5913 typedef Templates50<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
5914 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
5915 T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,
5916 T42, T43, T44, T45, T46, T47, T48, T49, T50> type;
5920 struct Templates<NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
5921 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
5922 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
5923 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
5924 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
5926 typedef Templates0 type;
5928 template <GTEST_TEMPLATE_ T1>
5929 struct Templates<T1, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
5930 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
5931 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
5932 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
5933 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
5935 typedef Templates1<T1> type;
5937 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2>
5938 struct Templates<T1, T2, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
5939 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
5940 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
5941 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
5942 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
5944 typedef Templates2<T1, T2> type;
5946 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3>
5947 struct Templates<T1, T2, T3, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
5948 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
5949 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
5950 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
5951 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
5952 typedef Templates3<T1, T2, T3> type;
5954 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5956 struct Templates<T1, T2, T3, T4, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
5957 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
5958 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
5959 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
5960 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
5961 typedef Templates4<T1, T2, T3, T4> type;
5963 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5964 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5>
5965 struct Templates<T1, T2, T3, T4, T5, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
5966 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
5967 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
5968 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
5969 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
5970 typedef Templates5<T1, T2, T3, T4, T5> type;
5972 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5973 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6>
5974 struct Templates<T1, T2, T3, T4, T5, T6, NoneT, NoneT, NoneT, NoneT, NoneT,
5975 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
5976 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
5977 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
5978 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
5979 typedef Templates6<T1, T2, T3, T4, T5, T6> type;
5981 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5982 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5984 struct Templates<T1, T2, T3, T4, T5, T6, T7, NoneT, NoneT, NoneT, NoneT, NoneT,
5985 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
5986 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
5987 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
5988 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
5989 typedef Templates7<T1, T2, T3, T4, T5, T6, T7> type;
5991 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
5992 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
5993 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8>
5994 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, NoneT, NoneT, NoneT, NoneT,
5995 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
5996 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
5997 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
5998 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
5999 typedef Templates8<T1, T2, T3, T4, T5, T6, T7, T8> type;
6001 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6002 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6003 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9>
6004 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, NoneT, NoneT, NoneT,
6005 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6006 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6007 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6008 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
6009 typedef Templates9<T1, T2, T3, T4, T5, T6, T7, T8, T9> type;
6011 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6012 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6013 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6014 GTEST_TEMPLATE_ T10>
6015 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, NoneT, NoneT, NoneT,
6016 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6017 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6018 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6019 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
6020 typedef Templates10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> type;
6022 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6023 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6024 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6025 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11>
6026 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, NoneT, NoneT,
6027 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6028 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6029 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6030 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
6031 typedef Templates11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> type;
6033 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6034 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6035 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6036 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12>
6037 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, NoneT,
6038 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6039 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6040 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6041 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
6042 typedef Templates12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> type;
6044 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6045 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6046 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6047 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6048 GTEST_TEMPLATE_ T13>
6049 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, NoneT,
6050 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6051 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6052 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6053 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
6054 typedef Templates13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
6057 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6058 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6059 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6060 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6061 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14>
6062 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6063 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6064 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6065 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6066 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
6067 typedef Templates14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
6070 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6071 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6072 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6073 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6074 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15>
6075 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6076 T15, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6077 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6078 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6079 NoneT, NoneT, NoneT, NoneT, NoneT> {
6080 typedef Templates15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
6083 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6084 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6085 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6086 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6087 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6088 GTEST_TEMPLATE_ T16>
6089 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6090 T15, T16, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6091 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6092 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6093 NoneT, NoneT, NoneT, NoneT, NoneT> {
6094 typedef Templates16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
6095 T14, T15, T16> type;
6097 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6098 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6099 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6100 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6101 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6102 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17>
6103 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6104 T15, T16, T17, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6105 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6106 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6107 NoneT, NoneT, NoneT, NoneT, NoneT> {
6108 typedef Templates17<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
6109 T14, T15, T16, T17> type;
6111 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6112 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6113 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6114 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6115 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6116 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18>
6117 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6118 T15, T16, T17, T18, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6119 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6120 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6121 NoneT, NoneT, NoneT, NoneT> {
6122 typedef Templates18<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
6123 T14, T15, T16, T17, T18> type;
6125 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6126 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6127 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6128 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6129 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6130 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6131 GTEST_TEMPLATE_ T19>
6132 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6133 T15, T16, T17, T18, T19, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6134 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6135 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6136 NoneT, NoneT, NoneT, NoneT> {
6137 typedef Templates19<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
6138 T14, T15, T16, T17, T18, T19> type;
6140 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6141 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6142 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6143 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6144 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6145 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6146 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20>
6147 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6148 T15, T16, T17, T18, T19, T20, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6149 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6150 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6151 NoneT, NoneT, NoneT, NoneT> {
6152 typedef Templates20<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
6153 T14, T15, T16, T17, T18, T19, T20> type;
6155 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6156 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6157 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6158 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6159 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6160 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6161 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21>
6162 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6163 T15, T16, T17, T18, T19, T20, T21, NoneT, NoneT, NoneT, NoneT, NoneT,
6164 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6165 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6166 NoneT, NoneT, NoneT, NoneT> {
6167 typedef Templates21<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
6168 T14, T15, T16, T17, T18, T19, T20, T21> type;
6170 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6171 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6172 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6173 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6174 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6175 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6176 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
6177 GTEST_TEMPLATE_ T22>
6178 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6179 T15, T16, T17, T18, T19, T20, T21, T22, NoneT, NoneT, NoneT, NoneT, NoneT,
6180 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6181 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6182 NoneT, NoneT, NoneT> {
6183 typedef Templates22<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
6184 T14, T15, T16, T17, T18, T19, T20, T21, T22> type;
6186 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6187 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6188 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6189 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6190 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6191 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6192 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
6193 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23>
6194 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6195 T15, T16, T17, T18, T19, T20, T21, T22, T23, NoneT, NoneT, NoneT, NoneT,
6196 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6197 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6198 NoneT, NoneT, NoneT> {
6199 typedef Templates23<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
6200 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23> type;
6202 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6203 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6204 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6205 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6206 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6207 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6208 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
6209 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24>
6210 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6211 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, NoneT, NoneT, NoneT,
6212 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6213 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6214 NoneT, NoneT, NoneT> {
6215 typedef Templates24<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
6216 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24> type;
6218 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6219 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6220 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6221 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6222 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6223 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6224 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
6225 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
6226 GTEST_TEMPLATE_ T25>
6227 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6228 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, NoneT, NoneT, NoneT,
6229 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6230 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6232 typedef Templates25<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
6233 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25> type;
6235 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6236 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6237 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6238 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6239 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6240 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6241 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
6242 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
6243 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26>
6244 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6245 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, NoneT, NoneT,
6246 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6247 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6249 typedef Templates26<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
6250 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26> type;
6252 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6253 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6254 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6255 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6256 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6257 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6258 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
6259 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
6260 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27>
6261 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6262 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, NoneT,
6263 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6264 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6266 typedef Templates27<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
6267 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
6270 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6271 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6272 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6273 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6274 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6275 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6276 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
6277 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
6278 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
6279 GTEST_TEMPLATE_ T28>
6280 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6281 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
6282 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6283 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6285 typedef Templates28<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
6286 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
6289 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6290 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6291 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6292 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6293 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6294 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6295 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
6296 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
6297 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
6298 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29>
6299 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6300 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
6301 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6302 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6304 typedef Templates29<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
6305 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
6308 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6309 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6310 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6311 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6312 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6313 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6314 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
6315 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
6316 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
6317 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30>
6318 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6319 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
6320 T30, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6321 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
6322 typedef Templates30<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
6323 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
6324 T28, T29, T30> type;
6326 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6327 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6328 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6329 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6330 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6331 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6332 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
6333 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
6334 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
6335 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
6336 GTEST_TEMPLATE_ T31>
6337 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6338 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
6339 T30, T31, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6340 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
6341 typedef Templates31<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
6342 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
6343 T28, T29, T30, T31> type;
6345 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6346 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6347 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6348 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6349 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6350 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6351 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
6352 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
6353 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
6354 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
6355 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32>
6356 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6357 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
6358 T30, T31, T32, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6359 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
6360 typedef Templates32<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
6361 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
6362 T28, T29, T30, T31, T32> type;
6364 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6365 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6366 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6367 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6368 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6369 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6370 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
6371 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
6372 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
6373 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
6374 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33>
6375 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6376 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
6377 T30, T31, T32, T33, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6378 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
6379 typedef Templates33<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
6380 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
6381 T28, T29, T30, T31, T32, T33> type;
6383 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6384 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6385 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6386 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6387 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6388 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6389 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
6390 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
6391 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
6392 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
6393 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
6394 GTEST_TEMPLATE_ T34>
6395 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6396 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
6397 T30, T31, T32, T33, T34, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6398 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
6399 typedef Templates34<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
6400 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
6401 T28, T29, T30, T31, T32, T33, T34> type;
6403 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6404 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6405 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6406 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6407 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6408 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6409 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
6410 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
6411 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
6412 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
6413 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
6414 GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35>
6415 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6416 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
6417 T30, T31, T32, T33, T34, T35, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT,
6418 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
6419 typedef Templates35<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
6420 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
6421 T28, T29, T30, T31, T32, T33, T34, T35> type;
6423 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6424 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6425 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6426 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6427 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6428 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6429 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
6430 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
6431 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
6432 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
6433 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
6434 GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36>
6435 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6436 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
6437 T30, T31, T32, T33, T34, T35, T36, NoneT, NoneT, NoneT, NoneT, NoneT,
6438 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
6439 typedef Templates36<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
6440 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
6441 T28, T29, T30, T31, T32, T33, T34, T35, T36> type;
6443 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6444 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6445 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6446 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6447 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6448 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6449 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
6450 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
6451 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
6452 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
6453 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
6454 GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
6455 GTEST_TEMPLATE_ T37>
6456 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6457 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
6458 T30, T31, T32, T33, T34, T35, T36, T37, NoneT, NoneT, NoneT, NoneT, NoneT,
6459 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
6460 typedef Templates37<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
6461 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
6462 T28, T29, T30, T31, T32, T33, T34, T35, T36, T37> type;
6464 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6465 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6466 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6467 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6468 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6469 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6470 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
6471 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
6472 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
6473 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
6474 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
6475 GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
6476 GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38>
6477 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6478 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
6479 T30, T31, T32, T33, T34, T35, T36, T37, T38, NoneT, NoneT, NoneT, NoneT,
6480 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
6481 typedef Templates38<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
6482 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
6483 T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38> type;
6485 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6486 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6487 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6488 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6489 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6490 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6491 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
6492 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
6493 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
6494 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
6495 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
6496 GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
6497 GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39>
6498 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6499 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
6500 T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, NoneT, NoneT, NoneT,
6501 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
6502 typedef Templates39<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
6503 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
6504 T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39> type;
6506 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6507 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6508 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6509 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6510 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6511 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6512 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
6513 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
6514 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
6515 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
6516 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
6517 GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
6518 GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
6519 GTEST_TEMPLATE_ T40>
6520 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6521 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
6522 T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, NoneT, NoneT, NoneT,
6523 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
6524 typedef Templates40<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
6525 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
6526 T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40> type;
6528 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6529 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6530 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6531 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6532 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6533 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6534 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
6535 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
6536 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
6537 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
6538 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
6539 GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
6540 GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
6541 GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41>
6542 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6543 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
6544 T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, NoneT, NoneT,
6545 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
6546 typedef Templates41<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
6547 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
6548 T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
6551 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6552 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6553 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6554 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6555 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6556 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6557 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
6558 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
6559 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
6560 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
6561 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
6562 GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
6563 GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
6564 GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42>
6565 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6566 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
6567 T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, NoneT,
6568 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
6569 typedef Templates42<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
6570 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
6571 T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,
6574 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6575 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6576 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6577 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6578 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6579 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6580 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
6581 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
6582 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
6583 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
6584 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
6585 GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
6586 GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
6587 GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
6588 GTEST_TEMPLATE_ T43>
6589 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6590 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
6591 T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
6592 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
6593 typedef Templates43<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
6594 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
6595 T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,
6598 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6599 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6600 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6601 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6602 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6603 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6604 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
6605 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
6606 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
6607 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
6608 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
6609 GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
6610 GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
6611 GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
6612 GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44>
6613 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6614 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
6615 T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44,
6616 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> {
6617 typedef Templates44<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
6618 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
6619 T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,
6620 T42, T43, T44> type;
6622 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6623 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6624 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6625 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6626 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6627 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6628 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
6629 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
6630 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
6631 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
6632 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
6633 GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
6634 GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
6635 GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
6636 GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45>
6637 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6638 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
6639 T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44,
6640 T45, NoneT, NoneT, NoneT, NoneT, NoneT> {
6641 typedef Templates45<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
6642 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
6643 T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,
6644 T42, T43, T44, T45> type;
6646 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6647 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6648 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6649 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6650 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6651 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6652 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
6653 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
6654 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
6655 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
6656 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
6657 GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
6658 GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
6659 GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
6660 GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45,
6661 GTEST_TEMPLATE_ T46>
6662 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6663 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
6664 T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44,
6665 T45, T46, NoneT, NoneT, NoneT, NoneT> {
6666 typedef Templates46<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
6667 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
6668 T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,
6669 T42, T43, T44, T45, T46> type;
6671 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6672 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6673 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6674 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6675 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6676 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6677 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
6678 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
6679 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
6680 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
6681 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
6682 GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
6683 GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
6684 GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
6685 GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45,
6686 GTEST_TEMPLATE_ T46, GTEST_TEMPLATE_ T47>
6687 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6688 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
6689 T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44,
6690 T45, T46, T47, NoneT, NoneT, NoneT> {
6691 typedef Templates47<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
6692 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
6693 T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,
6694 T42, T43, T44, T45, T46, T47> type;
6696 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6697 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6698 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6699 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6700 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6701 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6702 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
6703 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
6704 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
6705 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
6706 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
6707 GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
6708 GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
6709 GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
6710 GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45,
6711 GTEST_TEMPLATE_ T46, GTEST_TEMPLATE_ T47, GTEST_TEMPLATE_ T48>
6712 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6713 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
6714 T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44,
6715 T45, T46, T47, T48, NoneT, NoneT> {
6716 typedef Templates48<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
6717 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
6718 T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,
6719 T42, T43, T44, T45, T46, T47, T48> type;
6721 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3,
6722 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6,
6723 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9,
6724 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12,
6725 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15,
6726 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18,
6727 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21,
6728 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24,
6729 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27,
6730 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30,
6731 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33,
6732 GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36,
6733 GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39,
6734 GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42,
6735 GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45,
6736 GTEST_TEMPLATE_ T46, GTEST_TEMPLATE_ T47, GTEST_TEMPLATE_ T48,
6737 GTEST_TEMPLATE_ T49>
6738 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14,
6739 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29,
6740 T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44,
6741 T45, T46, T47, T48, T49, NoneT> {
6742 typedef Templates49<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
6743 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
6744 T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,
6745 T42, T43, T44, T45, T46, T47, T48, T49> type;
6748 // The TypeList template makes it possible to use either a single type
6749 // or a Types<...> list in TYPED_TEST_CASE() and
6750 // INSTANTIATE_TYPED_TEST_CASE_P().
6752 template <typename T>
6754 typedef Types1<T> type;
6757 template <typename T1, typename T2, typename T3, typename T4, typename T5,
6758 typename T6, typename T7, typename T8, typename T9, typename T10,
6759 typename T11, typename T12, typename T13, typename T14, typename T15,
6760 typename T16, typename T17, typename T18, typename T19, typename T20,
6761 typename T21, typename T22, typename T23, typename T24, typename T25,
6762 typename T26, typename T27, typename T28, typename T29, typename T30,
6763 typename T31, typename T32, typename T33, typename T34, typename T35,
6764 typename T36, typename T37, typename T38, typename T39, typename T40,
6765 typename T41, typename T42, typename T43, typename T44, typename T45,
6766 typename T46, typename T47, typename T48, typename T49, typename T50>
6767 struct TypeList<Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
6768 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
6769 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
6770 T44, T45, T46, T47, T48, T49, T50> > {
6771 typedef typename Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
6772 T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
6773 T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
6774 T41, T42, T43, T44, T45, T46, T47, T48, T49, T50>::type type;
6777 #endif // GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P
6779 } // namespace internal
6780 } // namespace testing
6782 #endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_
6784 // Due to C++ preprocessor weirdness, we need double indirection to
6785 // concatenate two tokens when one of them is __LINE__. Writing
6789 // will result in the token foo__LINE__, instead of foo followed by
6790 // the current line number. For more details, see
6791 // http://www.parashift.com/c++-faq-lite/misc-technical-issues.html#faq-39.6
6792 #define GTEST_CONCAT_TOKEN_(foo, bar) GTEST_CONCAT_TOKEN_IMPL_(foo, bar)
6793 #define GTEST_CONCAT_TOKEN_IMPL_(foo, bar) foo ## bar
6795 // Google Test defines the testing::Message class to allow construction of
6796 // test messages via the << operator. The idea is that anything
6797 // streamable to std::ostream can be streamed to a testing::Message.
6798 // This allows a user to use his own types in Google Test assertions by
6799 // overloading the << operator.
6801 // util/gtl/stl_logging.h overloads << for STL containers. These
6802 // overloads cannot be defined in the std namespace, as that will be
6803 // undefined behavior. Therefore, they are defined in the global
6804 // namespace instead.
6806 // C++'s symbol lookup rule (i.e. Koenig lookup) says that these
6807 // overloads are visible in either the std namespace or the global
6808 // namespace, but not other namespaces, including the testing
6809 // namespace which Google Test's Message class is in.
6811 // To allow STL containers (and other types that has a << operator
6812 // defined in the global namespace) to be used in Google Test assertions,
6813 // testing::Message must access the custom << operator from the global
6814 // namespace. Hence this helper function.
6816 // Note: Jeffrey Yasskin suggested an alternative fix by "using
6817 // ::operator<<;" in the definition of Message's operator<<. That fix
6818 // doesn't require a helper function, but unfortunately doesn't
6819 // compile with MSVC.
6820 template <typename T>
6821 inline void GTestStreamToHelper(std::ostream* os, const T& val) {
6825 class ProtocolMessage;
6826 namespace proto2 { class Message; }
6830 // Forward declarations.
6832 class AssertionResult; // Result of an assertion.
6833 class Message; // Represents a failure message.
6834 class Test; // Represents a test.
6835 class TestInfo; // Information about a test.
6836 class TestPartResult; // Result of a test part.
6837 class UnitTest; // A collection of test cases.
6839 template <typename T>
6840 ::std::string PrintToString(const T& value);
6842 namespace internal {
6844 struct TraceInfo; // Information about a trace point.
6845 class ScopedTrace; // Implements scoped trace.
6846 class TestInfoImpl; // Opaque implementation of TestInfo
6847 class UnitTestImpl; // Opaque implementation of UnitTest
6849 // How many times InitGoogleTest() has been called.
6850 GTEST_API_ extern int g_init_gtest_count;
6852 // The text used in failure messages to indicate the start of the
6854 GTEST_API_ extern const char kStackTraceMarker[];
6856 // A secret type that Google Test users don't know about. It has no
6857 // definition on purpose. Therefore it's impossible to create a
6858 // Secret object, which is what we want.
6861 // Two overloaded helpers for checking at compile time whether an
6862 // expression is a null pointer literal (i.e. NULL or any 0-valued
6863 // compile-time integral constant). Their return values have
6864 // different sizes, so we can use sizeof() to test which version is
6865 // picked by the compiler. These helpers have no implementations, as
6866 // we only need their signatures.
6868 // Given IsNullLiteralHelper(x), the compiler will pick the first
6869 // version if x can be implicitly converted to Secret*, and pick the
6870 // second version otherwise. Since Secret is a secret and incomplete
6871 // type, the only expression a user can write that has type Secret* is
6872 // a null pointer literal. Therefore, we know that x is a null
6873 // pointer literal if and only if the first version is picked by the
6875 char IsNullLiteralHelper(Secret* p);
6876 char (&IsNullLiteralHelper(...))[2]; // NOLINT
6878 // A compile-time bool constant that is true if and only if x is a
6879 // null pointer literal (i.e. NULL or any 0-valued compile-time
6880 // integral constant).
6881 #ifdef GTEST_ELLIPSIS_NEEDS_POD_
6882 // We lose support for NULL detection where the compiler doesn't like
6883 // passing non-POD classes through ellipsis (...).
6884 # define GTEST_IS_NULL_LITERAL_(x) false
6886 # define GTEST_IS_NULL_LITERAL_(x) \
6887 (sizeof(::testing::internal::IsNullLiteralHelper(x)) == 1)
6888 #endif // GTEST_ELLIPSIS_NEEDS_POD_
6890 // Appends the user-supplied message to the Google-Test-generated message.
6891 GTEST_API_ std::string AppendUserMessage(
6892 const std::string& gtest_msg, const Message& user_msg);
6894 // A helper class for creating scoped traces in user programs.
6895 class GTEST_API_ ScopedTrace {
6897 // The c'tor pushes the given source file location and message onto
6898 // a trace stack maintained by Google Test.
6899 ScopedTrace(const char* file, int line, const Message& message);
6901 // The d'tor pops the info pushed by the c'tor.
6903 // Note that the d'tor is not virtual in order to be efficient.
6904 // Don't inherit from ScopedTrace!
6908 GTEST_DISALLOW_COPY_AND_ASSIGN_(ScopedTrace);
6909 } GTEST_ATTRIBUTE_UNUSED_; // A ScopedTrace object does its job in its
6910 // c'tor and d'tor. Therefore it doesn't
6911 // need to be used otherwise.
6913 // Converts a streamable value to an std::string. A NULL pointer is
6914 // converted to "(null)". When the input value is a ::string,
6915 // ::std::string, ::wstring, or ::std::wstring object, each NUL
6916 // character in it is replaced with "\\0".
6917 // Declared here but defined in gtest.h, so that it has access
6918 // to the definition of the Message class, required by the ARM
6920 template <typename T>
6921 std::string StreamableToString(const T& streamable);
6923 // Constructs and returns the message for an equality assertion
6924 // (e.g. ASSERT_EQ, EXPECT_STREQ, etc) failure.
6926 // The first four parameters are the expressions used in the assertion
6927 // and their values, as strings. For example, for ASSERT_EQ(foo, bar)
6928 // where foo is 5 and bar is 6, we have:
6930 // expected_expression: "foo"
6931 // actual_expression: "bar"
6932 // expected_value: "5"
6933 // actual_value: "6"
6935 // The ignoring_case parameter is true iff the assertion is a
6936 // *_STRCASEEQ*. When it's true, the string " (ignoring case)" will
6937 // be inserted into the message.
6938 GTEST_API_ AssertionResult EqFailure(const char* expected_expression,
6939 const char* actual_expression,
6940 const std::string& expected_value,
6941 const std::string& actual_value,
6942 bool ignoring_case);
6944 // Constructs a failure message for Boolean assertions such as EXPECT_TRUE.
6945 GTEST_API_ std::string GetBoolAssertionFailureMessage(
6946 const AssertionResult& assertion_result,
6947 const char* expression_text,
6948 const char* actual_predicate_value,
6949 const char* expected_predicate_value);
6951 // This template class represents an IEEE floating-point number
6952 // (either single-precision or double-precision, depending on the
6953 // template parameters).
6955 // The purpose of this class is to do more sophisticated number
6956 // comparison. (Due to round-off error, etc, it's very unlikely that
6957 // two floating-points will be equal exactly. Hence a naive
6958 // comparison by the == operation often doesn't work.)
6960 // Format of IEEE floating-point:
6962 // The most-significant bit being the leftmost, an IEEE
6963 // floating-point looks like
6965 // sign_bit exponent_bits fraction_bits
6967 // Here, sign_bit is a single bit that designates the sign of the
6970 // For float, there are 8 exponent bits and 23 fraction bits.
6972 // For double, there are 11 exponent bits and 52 fraction bits.
6974 // More details can be found at
6975 // http://en.wikipedia.org/wiki/IEEE_floating-point_standard.
6977 // Template parameter:
6979 // RawType: the raw floating-point type (either float or double)
6980 template <typename RawType>
6981 class FloatingPoint {
6983 // Defines the unsigned integer type that has the same size as the
6984 // floating point number.
6985 typedef typename TypeWithSize<sizeof(RawType)>::UInt Bits;
6989 // # of bits in a number.
6990 static const size_t kBitCount = 8*sizeof(RawType);
6992 // # of fraction bits in a number.
6993 static const size_t kFractionBitCount =
6994 std::numeric_limits<RawType>::digits - 1;
6996 // # of exponent bits in a number.
6997 static const size_t kExponentBitCount = kBitCount - 1 - kFractionBitCount;
6999 // The mask for the sign bit.
7000 static const Bits kSignBitMask = static_cast<Bits>(1) << (kBitCount - 1);
7002 // The mask for the fraction bits.
7003 static const Bits kFractionBitMask =
7004 ~static_cast<Bits>(0) >> (kExponentBitCount + 1);
7006 // The mask for the exponent bits.
7007 static const Bits kExponentBitMask = ~(kSignBitMask | kFractionBitMask);
7009 // How many ULP's (Units in the Last Place) we want to tolerate when
7010 // comparing two numbers. The larger the value, the more error we
7011 // allow. A 0 value means that two numbers must be exactly the same
7012 // to be considered equal.
7014 // The maximum error of a single floating-point operation is 0.5
7015 // units in the last place. On Intel CPU's, all floating-point
7016 // calculations are done with 80-bit precision, while double has 64
7017 // bits. Therefore, 4 should be enough for ordinary use.
7019 // See the following article for more details on ULP:
7020 // http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm.
7021 static const size_t kMaxUlps = 4;
7023 // Constructs a FloatingPoint from a raw floating-point number.
7025 // On an Intel CPU, passing a non-normalized NAN (Not a Number)
7026 // around may change its bits, although the new value is guaranteed
7027 // to be also a NAN. Therefore, don't expect this constructor to
7028 // preserve the bits in x when x is a NAN.
7029 explicit FloatingPoint(const RawType& x) { u_.value_ = x; }
7033 // Reinterprets a bit pattern as a floating-point number.
7035 // This function is needed to test the AlmostEquals() method.
7036 static RawType ReinterpretBits(const Bits bits) {
7037 FloatingPoint fp(0);
7039 return fp.u_.value_;
7042 // Returns the floating-point number that represent positive infinity.
7043 static RawType Infinity() {
7044 return ReinterpretBits(kExponentBitMask);
7047 // Non-static methods
7049 // Returns the bits that represents this number.
7050 const Bits &bits() const { return u_.bits_; }
7052 // Returns the exponent bits of this number.
7053 Bits exponent_bits() const { return kExponentBitMask & u_.bits_; }
7055 // Returns the fraction bits of this number.
7056 Bits fraction_bits() const { return kFractionBitMask & u_.bits_; }
7058 // Returns the sign bit of this number.
7059 Bits sign_bit() const { return kSignBitMask & u_.bits_; }
7061 // Returns true iff this is NAN (not a number).
7062 bool is_nan() const {
7063 // It's a NAN if the exponent bits are all ones and the fraction
7064 // bits are not entirely zeros.
7065 return (exponent_bits() == kExponentBitMask) && (fraction_bits() != 0);
7068 // Returns true iff this number is at most kMaxUlps ULP's away from
7069 // rhs. In particular, this function:
7071 // - returns false if either number is (or both are) NAN.
7072 // - treats really large numbers as almost equal to infinity.
7073 // - thinks +0.0 and -0.0 are 0 DLP's apart.
7074 bool AlmostEquals(const FloatingPoint& rhs) const {
7075 // The IEEE standard says that any comparison operation involving
7076 // a NAN must return false.
7077 if (is_nan() || rhs.is_nan()) return false;
7079 return DistanceBetweenSignAndMagnitudeNumbers(u_.bits_, rhs.u_.bits_)
7084 // The data type used to store the actual floating-point number.
7085 union FloatingPointUnion {
7086 RawType value_; // The raw floating-point number.
7087 Bits bits_; // The bits that represent the number.
7090 // Converts an integer from the sign-and-magnitude representation to
7091 // the biased representation. More precisely, let N be 2 to the
7092 // power of (kBitCount - 1), an integer x is represented by the
7093 // unsigned number x + N.
7097 // -N + 1 (the most negative number representable using
7098 // sign-and-magnitude) is represented by 1;
7099 // 0 is represented by N; and
7100 // N - 1 (the biggest number representable using
7101 // sign-and-magnitude) is represented by 2N - 1.
7103 // Read http://en.wikipedia.org/wiki/Signed_number_representations
7104 // for more details on signed number representations.
7105 static Bits SignAndMagnitudeToBiased(const Bits &sam) {
7106 if (kSignBitMask & sam) {
7107 // sam represents a negative number.
7110 // sam represents a positive number.
7111 return kSignBitMask | sam;
7115 // Given two numbers in the sign-and-magnitude representation,
7116 // returns the distance between them as an unsigned number.
7117 static Bits DistanceBetweenSignAndMagnitudeNumbers(const Bits &sam1,
7119 const Bits biased1 = SignAndMagnitudeToBiased(sam1);
7120 const Bits biased2 = SignAndMagnitudeToBiased(sam2);
7121 return (biased1 >= biased2) ? (biased1 - biased2) : (biased2 - biased1);
7124 FloatingPointUnion u_;
7127 // Typedefs the instances of the FloatingPoint template class that we
7129 typedef FloatingPoint<float> Float;
7130 typedef FloatingPoint<double> Double;
7132 // In order to catch the mistake of putting tests that use different
7133 // test fixture classes in the same test case, we need to assign
7134 // unique IDs to fixture classes and compare them. The TypeId type is
7135 // used to hold such IDs. The user should treat TypeId as an opaque
7136 // type: the only operation allowed on TypeId values is to compare
7137 // them for equality using the == operator.
7138 typedef const void* TypeId;
7140 template <typename T>
7141 class TypeIdHelper {
7143 // dummy_ must not have a const type. Otherwise an overly eager
7144 // compiler (e.g. MSVC 7.1 & 8.0) may try to merge
7145 // TypeIdHelper<T>::dummy_ for different Ts as an "optimization".
7149 template <typename T>
7150 bool TypeIdHelper<T>::dummy_ = false;
7152 // GetTypeId<T>() returns the ID of type T. Different values will be
7153 // returned for different types. Calling the function twice with the
7154 // same type argument is guaranteed to return the same ID.
7155 template <typename T>
7156 TypeId GetTypeId() {
7157 // The compiler is required to allocate a different
7158 // TypeIdHelper<T>::dummy_ variable for each T used to instantiate
7159 // the template. Therefore, the address of dummy_ is guaranteed to
7161 return &(TypeIdHelper<T>::dummy_);
7164 // Returns the type ID of ::testing::Test. Always call this instead
7165 // of GetTypeId< ::testing::Test>() to get the type ID of
7166 // ::testing::Test, as the latter may give the wrong result due to a
7167 // suspected linker bug when compiling Google Test as a Mac OS X
7169 GTEST_API_ TypeId GetTestTypeId();
7171 // Defines the abstract factory interface that creates instances
7172 // of a Test object.
7173 class TestFactoryBase {
7175 virtual ~TestFactoryBase() {}
7177 // Creates a test instance to run. The instance is both created and destroyed
7178 // within TestInfoImpl::Run()
7179 virtual Test* CreateTest() = 0;
7182 TestFactoryBase() {}
7185 GTEST_DISALLOW_COPY_AND_ASSIGN_(TestFactoryBase);
7188 // This class provides implementation of TeastFactoryBase interface.
7189 // It is used in TEST and TEST_F macros.
7190 template <class TestClass>
7191 class TestFactoryImpl : public TestFactoryBase {
7193 virtual Test* CreateTest() { return new TestClass; }
7196 #if GTEST_OS_WINDOWS
7198 // Predicate-formatters for implementing the HRESULT checking macros
7199 // {ASSERT|EXPECT}_HRESULT_{SUCCEEDED|FAILED}
7200 // We pass a long instead of HRESULT to avoid causing an
7201 // include dependency for the HRESULT type.
7202 GTEST_API_ AssertionResult IsHRESULTSuccess(const char* expr,
7204 GTEST_API_ AssertionResult IsHRESULTFailure(const char* expr,
7207 #endif // GTEST_OS_WINDOWS
7209 // Types of SetUpTestCase() and TearDownTestCase() functions.
7210 typedef void (*SetUpTestCaseFunc)();
7211 typedef void (*TearDownTestCaseFunc)();
7213 // Creates a new TestInfo object and registers it with Google Test;
7214 // returns the created object.
7218 // test_case_name: name of the test case
7219 // name: name of the test
7220 // type_param the name of the test's type parameter, or NULL if
7221 // this is not a typed or a type-parameterized test.
7222 // value_param text representation of the test's value parameter,
7223 // or NULL if this is not a type-parameterized test.
7224 // fixture_class_id: ID of the test fixture class
7225 // set_up_tc: pointer to the function that sets up the test case
7226 // tear_down_tc: pointer to the function that tears down the test case
7227 // factory: pointer to the factory that creates a test object.
7228 // The newly created TestInfo instance will assume
7229 // ownership of the factory object.
7230 GTEST_API_ TestInfo* MakeAndRegisterTestInfo(
7231 const char* test_case_name, const char* name,
7232 const char* type_param,
7233 const char* value_param,
7234 TypeId fixture_class_id,
7235 SetUpTestCaseFunc set_up_tc,
7236 TearDownTestCaseFunc tear_down_tc,
7237 TestFactoryBase* factory);
7239 // If *pstr starts with the given prefix, modifies *pstr to be right
7240 // past the prefix and returns true; otherwise leaves *pstr unchanged
7241 // and returns false. None of pstr, *pstr, and prefix can be NULL.
7242 GTEST_API_ bool SkipPrefix(const char* prefix, const char** pstr);
7244 #if GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P
7246 // State of the definition of a type-parameterized test case.
7247 class GTEST_API_ TypedTestCasePState {
7249 TypedTestCasePState() : registered_(false) {}
7251 // Adds the given test name to defined_test_names_ and return true
7252 // if the test case hasn't been registered; otherwise aborts the
7254 bool AddTestName(const char* file, int line, const char* case_name,
7255 const char* test_name) {
7257 fprintf(stderr, "%s Test %s must be defined before "
7258 "REGISTER_TYPED_TEST_CASE_P(%s, ...).\n",
7259 FormatFileLocation(file, line).c_str(), test_name, case_name);
7263 defined_test_names_.insert(test_name);
7267 // Verifies that registered_tests match the test names in
7268 // defined_test_names_; returns registered_tests if successful, or
7269 // aborts the program otherwise.
7270 const char* VerifyRegisteredTestNames(
7271 const char* file, int line, const char* registered_tests);
7275 ::std::set<const char*> defined_test_names_;
7278 // Skips to the first non-space char after the first comma in 'str';
7279 // returns NULL if no comma is found in 'str'.
7280 inline const char* SkipComma(const char* str) {
7281 const char* comma = strchr(str, ',');
7282 if (comma == NULL) {
7285 while (IsSpace(*(++comma))) {}
7289 // Returns the prefix of 'str' before the first comma in it; returns
7290 // the entire string if it contains no comma.
7291 inline std::string GetPrefixUntilComma(const char* str) {
7292 const char* comma = strchr(str, ',');
7293 return comma == NULL ? str : std::string(str, comma);
7296 // TypeParameterizedTest<Fixture, TestSel, Types>::Register()
7297 // registers a list of type-parameterized tests with Google Test. The
7298 // return value is insignificant - we just need to return something
7299 // such that we can call this function in a namespace scope.
7301 // Implementation note: The GTEST_TEMPLATE_ macro declares a template
7302 // template parameter. It's defined in gtest-type-util.h.
7303 template <GTEST_TEMPLATE_ Fixture, class TestSel, typename Types>
7304 class TypeParameterizedTest {
7306 // 'index' is the index of the test in the type list 'Types'
7307 // specified in INSTANTIATE_TYPED_TEST_CASE_P(Prefix, TestCase,
7308 // Types). Valid values for 'index' are [0, N - 1] where N is the
7310 static bool Register(const char* prefix, const char* case_name,
7311 const char* test_names, int index) {
7312 typedef typename Types::Head Type;
7313 typedef Fixture<Type> FixtureClass;
7314 typedef typename GTEST_BIND_(TestSel, Type) TestClass;
7316 // First, registers the first type-parameterized test in the type
7318 MakeAndRegisterTestInfo(
7319 String::Format("%s%s%s/%d", prefix, prefix[0] == '\0' ? "" : "/",
7320 case_name, index).c_str(),
7321 GetPrefixUntilComma(test_names).c_str(),
7322 GetTypeName<Type>().c_str(),
7323 NULL, // No value parameter.
7324 GetTypeId<FixtureClass>(),
7325 TestClass::SetUpTestCase,
7326 TestClass::TearDownTestCase,
7327 new TestFactoryImpl<TestClass>);
7329 // Next, recurses (at compile time) with the tail of the type list.
7330 return TypeParameterizedTest<Fixture, TestSel, typename Types::Tail>
7331 ::Register(prefix, case_name, test_names, index + 1);
7335 // The base case for the compile time recursion.
7336 template <GTEST_TEMPLATE_ Fixture, class TestSel>
7337 class TypeParameterizedTest<Fixture, TestSel, Types0> {
7339 static bool Register(const char* /*prefix*/, const char* /*case_name*/,
7340 const char* /*test_names*/, int /*index*/) {
7345 // TypeParameterizedTestCase<Fixture, Tests, Types>::Register()
7346 // registers *all combinations* of 'Tests' and 'Types' with Google
7347 // Test. The return value is insignificant - we just need to return
7348 // something such that we can call this function in a namespace scope.
7349 template <GTEST_TEMPLATE_ Fixture, typename Tests, typename Types>
7350 class TypeParameterizedTestCase {
7352 static bool Register(const char* prefix, const char* case_name,
7353 const char* test_names) {
7354 typedef typename Tests::Head Head;
7356 // First, register the first test in 'Test' for each type in 'Types'.
7357 TypeParameterizedTest<Fixture, Head, Types>::Register(
7358 prefix, case_name, test_names, 0);
7360 // Next, recurses (at compile time) with the tail of the test list.
7361 return TypeParameterizedTestCase<Fixture, typename Tests::Tail, Types>
7362 ::Register(prefix, case_name, SkipComma(test_names));
7366 // The base case for the compile time recursion.
7367 template <GTEST_TEMPLATE_ Fixture, typename Types>
7368 class TypeParameterizedTestCase<Fixture, Templates0, Types> {
7370 static bool Register(const char* /*prefix*/, const char* /*case_name*/,
7371 const char* /*test_names*/) {
7376 #endif // GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P
7378 // Returns the current OS stack trace as an std::string.
7380 // The maximum number of stack frames to be included is specified by
7381 // the gtest_stack_trace_depth flag. The skip_count parameter
7382 // specifies the number of top frames to be skipped, which doesn't
7383 // count against the number of frames to be included.
7385 // For example, if Foo() calls Bar(), which in turn calls
7386 // GetCurrentOsStackTraceExceptTop(..., 1), Foo() will be included in
7387 // the trace but Bar() and GetCurrentOsStackTraceExceptTop() won't.
7388 GTEST_API_ std::string GetCurrentOsStackTraceExceptTop(
7389 UnitTest* unit_test, int skip_count);
7391 // Helpers for suppressing warnings on unreachable code or constant
7394 // Always returns true.
7395 GTEST_API_ bool AlwaysTrue();
7397 // Always returns false.
7398 inline bool AlwaysFalse() { return !AlwaysTrue(); }
7400 // Helper for suppressing false warning from Clang on a const char*
7401 // variable declared in a conditional expression always being NULL in
7403 struct GTEST_API_ ConstCharPtr {
7404 ConstCharPtr(const char* str) : value(str) {}
7405 operator bool() const { return true; }
7409 // A simple Linear Congruential Generator for generating random
7410 // numbers with a uniform distribution. Unlike rand() and srand(), it
7411 // doesn't use global state (and therefore can't interfere with user
7412 // code). Unlike rand_r(), it's portable. An LCG isn't very random,
7413 // but it's good enough for our purposes.
7414 class GTEST_API_ Random {
7416 static const UInt32 kMaxRange = 1u << 31;
7418 explicit Random(UInt32 seed) : state_(seed) {}
7420 void Reseed(UInt32 seed) { state_ = seed; }
7422 // Generates a random number from [0, range). Crashes if 'range' is
7423 // 0 or greater than kMaxRange.
7424 UInt32 Generate(UInt32 range);
7428 GTEST_DISALLOW_COPY_AND_ASSIGN_(Random);
7431 // Defining a variable of type CompileAssertTypesEqual<T1, T2> will cause a
7432 // compiler error iff T1 and T2 are different types.
7433 template <typename T1, typename T2>
7434 struct CompileAssertTypesEqual;
7436 template <typename T>
7437 struct CompileAssertTypesEqual<T, T> {
7440 // Removes the reference from a type if it is a reference type,
7441 // otherwise leaves it unchanged. This is the same as
7442 // tr1::remove_reference, which is not widely available yet.
7443 template <typename T>
7444 struct RemoveReference { typedef T type; }; // NOLINT
7445 template <typename T>
7446 struct RemoveReference<T&> { typedef T type; }; // NOLINT
7448 // A handy wrapper around RemoveReference that works when the argument
7449 // T depends on template parameters.
7450 #define GTEST_REMOVE_REFERENCE_(T) \
7451 typename ::testing::internal::RemoveReference<T>::type
7453 // Removes const from a type if it is a const type, otherwise leaves
7454 // it unchanged. This is the same as tr1::remove_const, which is not
7455 // widely available yet.
7456 template <typename T>
7457 struct RemoveConst { typedef T type; }; // NOLINT
7458 template <typename T>
7459 struct RemoveConst<const T> { typedef T type; }; // NOLINT
7461 // MSVC 8.0, Sun C++, and IBM XL C++ have a bug which causes the above
7462 // definition to fail to remove the const in 'const int[3]' and 'const
7463 // char[3][4]'. The following specialization works around the bug.
7464 template <typename T, size_t N>
7465 struct RemoveConst<const T[N]> {
7466 typedef typename RemoveConst<T>::type type[N];
7469 #if defined(_MSC_VER) && _MSC_VER < 1400
7470 // This is the only specialization that allows VC++ 7.1 to remove const in
7471 // 'const int[3] and 'const int[3][4]'. However, it causes trouble with GCC
7472 // and thus needs to be conditionally compiled.
7473 template <typename T, size_t N>
7474 struct RemoveConst<T[N]> {
7475 typedef typename RemoveConst<T>::type type[N];
7479 // A handy wrapper around RemoveConst that works when the argument
7480 // T depends on template parameters.
7481 #define GTEST_REMOVE_CONST_(T) \
7482 typename ::testing::internal::RemoveConst<T>::type
7484 // Turns const U&, U&, const U, and U all into U.
7485 #define GTEST_REMOVE_REFERENCE_AND_CONST_(T) \
7486 GTEST_REMOVE_CONST_(GTEST_REMOVE_REFERENCE_(T))
7488 // Adds reference to a type if it is not a reference type,
7489 // otherwise leaves it unchanged. This is the same as
7490 // tr1::add_reference, which is not widely available yet.
7491 template <typename T>
7492 struct AddReference { typedef T& type; }; // NOLINT
7493 template <typename T>
7494 struct AddReference<T&> { typedef T& type; }; // NOLINT
7496 // A handy wrapper around AddReference that works when the argument T
7497 // depends on template parameters.
7498 #define GTEST_ADD_REFERENCE_(T) \
7499 typename ::testing::internal::AddReference<T>::type
7501 // Adds a reference to const on top of T as necessary. For example,
7504 // char ==> const char&
7505 // const char ==> const char&
7506 // char& ==> const char&
7507 // const char& ==> const char&
7509 // The argument T must depend on some template parameters.
7510 #define GTEST_REFERENCE_TO_CONST_(T) \
7511 GTEST_ADD_REFERENCE_(const GTEST_REMOVE_REFERENCE_(T))
7513 // ImplicitlyConvertible<From, To>::value is a compile-time bool
7514 // constant that's true iff type From can be implicitly converted to
7516 template <typename From, typename To>
7517 class ImplicitlyConvertible {
7519 // We need the following helper functions only for their types.
7520 // They have no implementations.
7522 // MakeFrom() is an expression whose type is From. We cannot simply
7523 // use From(), as the type From may not have a public default
7525 static From MakeFrom();
7527 // These two functions are overloaded. Given an expression
7528 // Helper(x), the compiler will pick the first version if x can be
7529 // implicitly converted to type To; otherwise it will pick the
7532 // The first version returns a value of size 1, and the second
7533 // version returns a value of size 2. Therefore, by checking the
7534 // size of Helper(x), which can be done at compile time, we can tell
7535 // which version of Helper() is used, and hence whether x can be
7536 // implicitly converted to type To.
7537 static char Helper(To);
7538 static char (&Helper(...))[2]; // NOLINT
7540 // We have to put the 'public' section after the 'private' section,
7541 // or MSVC refuses to compile the code.
7543 // MSVC warns about implicitly converting from double to int for
7544 // possible loss of data, so we need to temporarily disable the
7547 # pragma warning(push) // Saves the current warning state.
7548 # pragma warning(disable:4244) // Temporarily disables warning 4244.
7550 static const bool value =
7551 sizeof(Helper(ImplicitlyConvertible::MakeFrom())) == 1;
7552 # pragma warning(pop) // Restores the warning state.
7553 #elif defined(__BORLANDC__)
7554 // C++Builder cannot use member overload resolution during template
7555 // instantiation. The simplest workaround is to use its C++0x type traits
7556 // functions (C++Builder 2009 and above only).
7557 static const bool value = __is_convertible(From, To);
7559 static const bool value =
7560 sizeof(Helper(ImplicitlyConvertible::MakeFrom())) == 1;
7563 template <typename From, typename To>
7564 const bool ImplicitlyConvertible<From, To>::value;
7566 // IsAProtocolMessage<T>::value is a compile-time bool constant that's
7567 // true iff T is type ProtocolMessage, proto2::Message, or a subclass
7569 template <typename T>
7570 struct IsAProtocolMessage
7571 : public bool_constant<
7572 ImplicitlyConvertible<const T*, const ::ProtocolMessage*>::value ||
7573 ImplicitlyConvertible<const T*, const ::proto2::Message*>::value> {
7576 // When the compiler sees expression IsContainerTest<C>(0), if C is an
7577 // STL-style container class, the first overload of IsContainerTest
7578 // will be viable (since both C::iterator* and C::const_iterator* are
7579 // valid types and NULL can be implicitly converted to them). It will
7580 // be picked over the second overload as 'int' is a perfect match for
7581 // the type of argument 0. If C::iterator or C::const_iterator is not
7582 // a valid type, the first overload is not viable, and the second
7583 // overload will be picked. Therefore, we can determine whether C is
7584 // a container class by checking the type of IsContainerTest<C>(0).
7585 // The value of the expression is insignificant.
7587 // Note that we look for both C::iterator and C::const_iterator. The
7588 // reason is that C++ injects the name of a class as a member of the
7589 // class itself (e.g. you can refer to class iterator as either
7590 // 'iterator' or 'iterator::iterator'). If we look for C::iterator
7591 // only, for example, we would mistakenly think that a class named
7592 // iterator is an STL container.
7594 // Also note that the simpler approach of overloading
7595 // IsContainerTest(typename C::const_iterator*) and
7596 // IsContainerTest(...) doesn't work with Visual Age C++ and Sun C++.
7597 typedef int IsContainer;
7599 IsContainer IsContainerTest(int /* dummy */,
7600 typename C::iterator* /* it */ = NULL,
7601 typename C::const_iterator* /* const_it */ = NULL) {
7605 typedef char IsNotContainer;
7607 IsNotContainer IsContainerTest(long /* dummy */) { return '\0'; }
7609 // EnableIf<condition>::type is void when 'Cond' is true, and
7610 // undefined when 'Cond' is false. To use SFINAE to make a function
7611 // overload only apply when a particular expression is true, add
7612 // "typename EnableIf<expression>::type* = 0" as the last parameter.
7613 template<bool> struct EnableIf;
7614 template<> struct EnableIf<true> { typedef void type; }; // NOLINT
7616 // Utilities for native arrays.
7618 // ArrayEq() compares two k-dimensional native arrays using the
7619 // elements' operator==, where k can be any integer >= 0. When k is
7620 // 0, ArrayEq() degenerates into comparing a single pair of values.
7622 template <typename T, typename U>
7623 bool ArrayEq(const T* lhs, size_t size, const U* rhs);
7625 // This generic version is used when k is 0.
7626 template <typename T, typename U>
7627 inline bool ArrayEq(const T& lhs, const U& rhs) { return lhs == rhs; }
7629 // This overload is used when k >= 1.
7630 template <typename T, typename U, size_t N>
7631 inline bool ArrayEq(const T(&lhs)[N], const U(&rhs)[N]) {
7632 return internal::ArrayEq(lhs, N, rhs);
7635 // This helper reduces code bloat. If we instead put its logic inside
7636 // the previous ArrayEq() function, arrays with different sizes would
7637 // lead to different copies of the template code.
7638 template <typename T, typename U>
7639 bool ArrayEq(const T* lhs, size_t size, const U* rhs) {
7640 for (size_t i = 0; i != size; i++) {
7641 if (!internal::ArrayEq(lhs[i], rhs[i]))
7647 // Finds the first element in the iterator range [begin, end) that
7648 // equals elem. Element may be a native array type itself.
7649 template <typename Iter, typename Element>
7650 Iter ArrayAwareFind(Iter begin, Iter end, const Element& elem) {
7651 for (Iter it = begin; it != end; ++it) {
7652 if (internal::ArrayEq(*it, elem))
7658 // CopyArray() copies a k-dimensional native array using the elements'
7659 // operator=, where k can be any integer >= 0. When k is 0,
7660 // CopyArray() degenerates into copying a single value.
7662 template <typename T, typename U>
7663 void CopyArray(const T* from, size_t size, U* to);
7665 // This generic version is used when k is 0.
7666 template <typename T, typename U>
7667 inline void CopyArray(const T& from, U* to) { *to = from; }
7669 // This overload is used when k >= 1.
7670 template <typename T, typename U, size_t N>
7671 inline void CopyArray(const T(&from)[N], U(*to)[N]) {
7672 internal::CopyArray(from, N, *to);
7675 // This helper reduces code bloat. If we instead put its logic inside
7676 // the previous CopyArray() function, arrays with different sizes
7677 // would lead to different copies of the template code.
7678 template <typename T, typename U>
7679 void CopyArray(const T* from, size_t size, U* to) {
7680 for (size_t i = 0; i != size; i++) {
7681 internal::CopyArray(from[i], to + i);
7685 // The relation between an NativeArray object (see below) and the
7686 // native array it represents.
7687 enum RelationToSource {
7688 kReference, // The NativeArray references the native array.
7689 kCopy // The NativeArray makes a copy of the native array and
7693 // Adapts a native array to a read-only STL-style container. Instead
7694 // of the complete STL container concept, this adaptor only implements
7695 // members useful for Google Mock's container matchers. New members
7696 // should be added as needed. To simplify the implementation, we only
7697 // support Element being a raw type (i.e. having no top-level const or
7698 // reference modifier). It's the client's responsibility to satisfy
7699 // this requirement. Element can be an array type itself (hence
7700 // multi-dimensional arrays are supported).
7701 template <typename Element>
7704 // STL-style container typedefs.
7705 typedef Element value_type;
7706 typedef Element* iterator;
7707 typedef const Element* const_iterator;
7709 // Constructs from a native array.
7710 NativeArray(const Element* array, size_t count, RelationToSource relation) {
7711 Init(array, count, relation);
7714 // Copy constructor.
7715 NativeArray(const NativeArray& rhs) {
7716 Init(rhs.array_, rhs.size_, rhs.relation_to_source_);
7720 // Ensures that the user doesn't instantiate NativeArray with a
7721 // const or reference type.
7722 static_cast<void>(StaticAssertTypeEqHelper<Element,
7723 GTEST_REMOVE_REFERENCE_AND_CONST_(Element)>());
7724 if (relation_to_source_ == kCopy)
7728 // STL-style container methods.
7729 size_t size() const { return size_; }
7730 const_iterator begin() const { return array_; }
7731 const_iterator end() const { return array_ + size_; }
7732 bool operator==(const NativeArray& rhs) const {
7733 return size() == rhs.size() &&
7734 ArrayEq(begin(), size(), rhs.begin());
7738 // Initializes this object; makes a copy of the input array if
7739 // 'relation' is kCopy.
7740 void Init(const Element* array, size_t a_size, RelationToSource relation) {
7741 if (relation == kReference) {
7744 Element* const copy = new Element[a_size];
7745 CopyArray(array, a_size, copy);
7749 relation_to_source_ = relation;
7752 const Element* array_;
7754 RelationToSource relation_to_source_;
7756 GTEST_DISALLOW_ASSIGN_(NativeArray);
7759 } // namespace internal
7760 } // namespace testing
7762 #define GTEST_MESSAGE_AT_(file, line, message, result_type) \
7763 ::testing::internal::AssertHelper(result_type, file, line, message) \
7764 = ::testing::Message()
7766 #define GTEST_MESSAGE_(message, result_type) \
7767 GTEST_MESSAGE_AT_(__FILE__, __LINE__, message, result_type)
7769 #define GTEST_FATAL_FAILURE_(message) \
7770 return GTEST_MESSAGE_(message, ::testing::TestPartResult::kFatalFailure)
7772 #define GTEST_NONFATAL_FAILURE_(message) \
7773 GTEST_MESSAGE_(message, ::testing::TestPartResult::kNonFatalFailure)
7775 #define GTEST_SUCCESS_(message) \
7776 GTEST_MESSAGE_(message, ::testing::TestPartResult::kSuccess)
7778 // Suppresses MSVC warnings 4072 (unreachable code) for the code following
7779 // statement if it returns or throws (or doesn't return or throw in some
7781 #define GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement) \
7782 if (::testing::internal::AlwaysTrue()) { statement; }
7784 #define GTEST_TEST_THROW_(statement, expected_exception, fail) \
7785 GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
7786 if (::testing::internal::ConstCharPtr gtest_msg = "") { \
7787 bool gtest_caught_expected = false; \
7789 GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
7791 catch (expected_exception const&) { \
7792 gtest_caught_expected = true; \
7796 "Expected: " #statement " throws an exception of type " \
7797 #expected_exception ".\n Actual: it throws a different type."; \
7798 goto GTEST_CONCAT_TOKEN_(gtest_label_testthrow_, __LINE__); \
7800 if (!gtest_caught_expected) { \
7802 "Expected: " #statement " throws an exception of type " \
7803 #expected_exception ".\n Actual: it throws nothing."; \
7804 goto GTEST_CONCAT_TOKEN_(gtest_label_testthrow_, __LINE__); \
7807 GTEST_CONCAT_TOKEN_(gtest_label_testthrow_, __LINE__): \
7808 fail(gtest_msg.value)
7810 #define GTEST_TEST_NO_THROW_(statement, fail) \
7811 GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
7812 if (::testing::internal::AlwaysTrue()) { \
7814 GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
7817 goto GTEST_CONCAT_TOKEN_(gtest_label_testnothrow_, __LINE__); \
7820 GTEST_CONCAT_TOKEN_(gtest_label_testnothrow_, __LINE__): \
7821 fail("Expected: " #statement " doesn't throw an exception.\n" \
7822 " Actual: it throws.")
7824 #define GTEST_TEST_ANY_THROW_(statement, fail) \
7825 GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
7826 if (::testing::internal::AlwaysTrue()) { \
7827 bool gtest_caught_any = false; \
7829 GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
7832 gtest_caught_any = true; \
7834 if (!gtest_caught_any) { \
7835 goto GTEST_CONCAT_TOKEN_(gtest_label_testanythrow_, __LINE__); \
7838 GTEST_CONCAT_TOKEN_(gtest_label_testanythrow_, __LINE__): \
7839 fail("Expected: " #statement " throws an exception.\n" \
7840 " Actual: it doesn't.")
7843 // Implements Boolean test assertions such as EXPECT_TRUE. expression can be
7844 // either a boolean expression or an AssertionResult. text is a textual
7845 // represenation of expression as it was passed into the EXPECT_TRUE.
7846 #define GTEST_TEST_BOOLEAN_(expression, text, actual, expected, fail) \
7847 GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
7848 if (const ::testing::AssertionResult gtest_ar_ = \
7849 ::testing::AssertionResult(expression)) \
7852 fail(::testing::internal::GetBoolAssertionFailureMessage(\
7853 gtest_ar_, text, #actual, #expected).c_str())
7855 #define GTEST_TEST_NO_FATAL_FAILURE_(statement, fail) \
7856 GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
7857 if (::testing::internal::AlwaysTrue()) { \
7858 ::testing::internal::HasNewFatalFailureHelper gtest_fatal_failure_checker; \
7859 GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
7860 if (gtest_fatal_failure_checker.has_new_fatal_failure()) { \
7861 goto GTEST_CONCAT_TOKEN_(gtest_label_testnofatal_, __LINE__); \
7864 GTEST_CONCAT_TOKEN_(gtest_label_testnofatal_, __LINE__): \
7865 fail("Expected: " #statement " doesn't generate new fatal " \
7866 "failures in the current thread.\n" \
7867 " Actual: it does.")
7869 // Expands to the name of the class that implements the given test.
7870 #define GTEST_TEST_CLASS_NAME_(test_case_name, test_name) \
7871 test_case_name##_##test_name##_Test
7873 // Helper macro for defining tests.
7874 #define GTEST_TEST_(test_case_name, test_name, parent_class, parent_id)\
7875 class GTEST_TEST_CLASS_NAME_(test_case_name, test_name) : public parent_class {\
7877 GTEST_TEST_CLASS_NAME_(test_case_name, test_name)() {}\
7879 virtual void TestBody();\
7880 static ::testing::TestInfo* const test_info_ GTEST_ATTRIBUTE_UNUSED_;\
7881 GTEST_DISALLOW_COPY_AND_ASSIGN_(\
7882 GTEST_TEST_CLASS_NAME_(test_case_name, test_name));\
7885 ::testing::TestInfo* const GTEST_TEST_CLASS_NAME_(test_case_name, test_name)\
7887 ::testing::internal::MakeAndRegisterTestInfo(\
7888 #test_case_name, #test_name, NULL, NULL, \
7890 parent_class::SetUpTestCase, \
7891 parent_class::TearDownTestCase, \
7892 new ::testing::internal::TestFactoryImpl<\
7893 GTEST_TEST_CLASS_NAME_(test_case_name, test_name)>);\
7894 void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::TestBody()
7896 #endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_INTERNAL_H_
7897 // Copyright 2005, Google Inc.
7898 // All rights reserved.
7900 // Redistribution and use in source and binary forms, with or without
7901 // modification, are permitted provided that the following conditions are
7904 // * Redistributions of source code must retain the above copyright
7905 // notice, this list of conditions and the following disclaimer.
7906 // * Redistributions in binary form must reproduce the above
7907 // copyright notice, this list of conditions and the following disclaimer
7908 // in the documentation and/or other materials provided with the
7910 // * Neither the name of Google Inc. nor the names of its
7911 // contributors may be used to endorse or promote products derived from
7912 // this software without specific prior written permission.
7914 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
7915 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
7916 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
7917 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
7918 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
7919 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
7920 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
7921 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
7922 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
7923 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
7924 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
7926 // Author: wan@google.com (Zhanyong Wan)
7928 // The Google C++ Testing Framework (Google Test)
7930 // This header file defines the public API for death tests. It is
7931 // #included by gtest.h so a user doesn't need to include this
7934 #ifndef GTEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H_
7935 #define GTEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H_
7937 // Copyright 2005, Google Inc.
7938 // All rights reserved.
7940 // Redistribution and use in source and binary forms, with or without
7941 // modification, are permitted provided that the following conditions are
7944 // * Redistributions of source code must retain the above copyright
7945 // notice, this list of conditions and the following disclaimer.
7946 // * Redistributions in binary form must reproduce the above
7947 // copyright notice, this list of conditions and the following disclaimer
7948 // in the documentation and/or other materials provided with the
7950 // * Neither the name of Google Inc. nor the names of its
7951 // contributors may be used to endorse or promote products derived from
7952 // this software without specific prior written permission.
7954 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
7955 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
7956 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
7957 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
7958 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
7959 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
7960 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
7961 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
7962 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
7963 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
7964 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
7966 // Authors: wan@google.com (Zhanyong Wan), eefacm@gmail.com (Sean Mcafee)
7968 // The Google C++ Testing Framework (Google Test)
7970 // This header file defines internal utilities needed for implementing
7971 // death tests. They are subject to change without notice.
7973 #ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_DEATH_TEST_INTERNAL_H_
7974 #define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_DEATH_TEST_INTERNAL_H_
7980 namespace internal {
7982 GTEST_DECLARE_string_(internal_run_death_test);
7984 // Names of the flags (needed for parsing Google Test flags).
7985 const char kDeathTestStyleFlag[] = "death_test_style";
7986 const char kDeathTestUseFork[] = "death_test_use_fork";
7987 const char kInternalRunDeathTestFlag[] = "internal_run_death_test";
7989 #if GTEST_HAS_DEATH_TEST
7991 // DeathTest is a class that hides much of the complexity of the
7992 // GTEST_DEATH_TEST_ macro. It is abstract; its static Create method
7993 // returns a concrete class that depends on the prevailing death test
7994 // style, as defined by the --gtest_death_test_style and/or
7995 // --gtest_internal_run_death_test flags.
7997 // In describing the results of death tests, these terms are used with
7998 // the corresponding definitions:
8000 // exit status: The integer exit information in the format specified
8002 // exit code: The integer code passed to exit(3), _exit(2), or
8003 // returned from main()
8004 class GTEST_API_ DeathTest {
8006 // Create returns false if there was an error determining the
8007 // appropriate action to take for the current death test; for example,
8008 // if the gtest_death_test_style flag is set to an invalid value.
8009 // The LastMessage method will return a more detailed message in that
8010 // case. Otherwise, the DeathTest pointer pointed to by the "test"
8011 // argument is set. If the death test should be skipped, the pointer
8012 // is set to NULL; otherwise, it is set to the address of a new concrete
8013 // DeathTest object that controls the execution of the current test.
8014 static bool Create(const char* statement, const RE* regex,
8015 const char* file, int line, DeathTest** test);
8017 virtual ~DeathTest() { }
8019 // A helper class that aborts a death test when it's deleted.
8020 class ReturnSentinel {
8022 explicit ReturnSentinel(DeathTest* test) : test_(test) { }
8023 ~ReturnSentinel() { test_->Abort(TEST_ENCOUNTERED_RETURN_STATEMENT); }
8025 DeathTest* const test_;
8026 GTEST_DISALLOW_COPY_AND_ASSIGN_(ReturnSentinel);
8027 } GTEST_ATTRIBUTE_UNUSED_;
8029 // An enumeration of possible roles that may be taken when a death
8030 // test is encountered. EXECUTE means that the death test logic should
8031 // be executed immediately. OVERSEE means that the program should prepare
8032 // the appropriate environment for a child process to execute the death
8033 // test, then wait for it to complete.
8034 enum TestRole { OVERSEE_TEST, EXECUTE_TEST };
8036 // An enumeration of the three reasons that a test might be aborted.
8038 TEST_ENCOUNTERED_RETURN_STATEMENT,
8039 TEST_THREW_EXCEPTION,
8043 // Assumes one of the above roles.
8044 virtual TestRole AssumeRole() = 0;
8046 // Waits for the death test to finish and returns its status.
8047 virtual int Wait() = 0;
8049 // Returns true if the death test passed; that is, the test process
8050 // exited during the test, its exit status matches a user-supplied
8051 // predicate, and its stderr output matches a user-supplied regular
8053 // The user-supplied predicate may be a macro expression rather
8054 // than a function pointer or functor, or else Wait and Passed could
8056 virtual bool Passed(bool exit_status_ok) = 0;
8058 // Signals that the death test did not die as expected.
8059 virtual void Abort(AbortReason reason) = 0;
8061 // Returns a human-readable outcome message regarding the outcome of
8062 // the last death test.
8063 static const char* LastMessage();
8065 static void set_last_death_test_message(const std::string& message);
8068 // A string containing a description of the outcome of the last death test.
8069 static std::string last_death_test_message_;
8071 GTEST_DISALLOW_COPY_AND_ASSIGN_(DeathTest);
8074 // Factory interface for death tests. May be mocked out for testing.
8075 class DeathTestFactory {
8077 virtual ~DeathTestFactory() { }
8078 virtual bool Create(const char* statement, const RE* regex,
8079 const char* file, int line, DeathTest** test) = 0;
8082 // A concrete DeathTestFactory implementation for normal use.
8083 class DefaultDeathTestFactory : public DeathTestFactory {
8085 virtual bool Create(const char* statement, const RE* regex,
8086 const char* file, int line, DeathTest** test);
8089 // Returns true if exit_status describes a process that was terminated
8090 // by a signal, or exited normally with a nonzero exit code.
8091 GTEST_API_ bool ExitedUnsuccessfully(int exit_status);
8093 // Traps C++ exceptions escaping statement and reports them as test
8094 // failures. Note that trapping SEH exceptions is not implemented here.
8095 # if GTEST_HAS_EXCEPTIONS
8096 # define GTEST_EXECUTE_DEATH_TEST_STATEMENT_(statement, death_test) \
8098 GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
8099 } catch (const ::std::exception& gtest_exception) { \
8102 "\n%s: Caught std::exception-derived exception escaping the " \
8103 "death test statement. Exception message: %s\n", \
8104 ::testing::internal::FormatFileLocation(__FILE__, __LINE__).c_str(), \
8105 gtest_exception.what()); \
8107 death_test->Abort(::testing::internal::DeathTest::TEST_THREW_EXCEPTION); \
8109 death_test->Abort(::testing::internal::DeathTest::TEST_THREW_EXCEPTION); \
8113 # define GTEST_EXECUTE_DEATH_TEST_STATEMENT_(statement, death_test) \
8114 GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement)
8118 // This macro is for implementing ASSERT_DEATH*, EXPECT_DEATH*,
8119 // ASSERT_EXIT*, and EXPECT_EXIT*.
8120 # define GTEST_DEATH_TEST_(statement, predicate, regex, fail) \
8121 GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
8122 if (::testing::internal::AlwaysTrue()) { \
8123 const ::testing::internal::RE& gtest_regex = (regex); \
8124 ::testing::internal::DeathTest* gtest_dt; \
8125 if (!::testing::internal::DeathTest::Create(#statement, >est_regex, \
8126 __FILE__, __LINE__, >est_dt)) { \
8127 goto GTEST_CONCAT_TOKEN_(gtest_label_, __LINE__); \
8129 if (gtest_dt != NULL) { \
8130 ::testing::internal::scoped_ptr< ::testing::internal::DeathTest> \
8131 gtest_dt_ptr(gtest_dt); \
8132 switch (gtest_dt->AssumeRole()) { \
8133 case ::testing::internal::DeathTest::OVERSEE_TEST: \
8134 if (!gtest_dt->Passed(predicate(gtest_dt->Wait()))) { \
8135 goto GTEST_CONCAT_TOKEN_(gtest_label_, __LINE__); \
8138 case ::testing::internal::DeathTest::EXECUTE_TEST: { \
8139 ::testing::internal::DeathTest::ReturnSentinel \
8140 gtest_sentinel(gtest_dt); \
8141 GTEST_EXECUTE_DEATH_TEST_STATEMENT_(statement, gtest_dt); \
8142 gtest_dt->Abort(::testing::internal::DeathTest::TEST_DID_NOT_DIE); \
8150 GTEST_CONCAT_TOKEN_(gtest_label_, __LINE__): \
8151 fail(::testing::internal::DeathTest::LastMessage())
8152 // The symbol "fail" here expands to something into which a message
8155 // This macro is for implementing ASSERT/EXPECT_DEBUG_DEATH when compiled in
8156 // NDEBUG mode. In this case we need the statements to be executed, the regex is
8157 // ignored, and the macro must accept a streamed message even though the message
8158 // is never printed.
8159 # define GTEST_EXECUTE_STATEMENT_(statement, regex) \
8160 GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
8161 if (::testing::internal::AlwaysTrue()) { \
8162 GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
8164 ::testing::Message()
8166 // A class representing the parsed contents of the
8167 // --gtest_internal_run_death_test flag, as it existed when
8168 // RUN_ALL_TESTS was called.
8169 class InternalRunDeathTestFlag {
8171 InternalRunDeathTestFlag(const std::string& a_file,
8175 : file_(a_file), line_(a_line), index_(an_index),
8176 write_fd_(a_write_fd) {}
8178 ~InternalRunDeathTestFlag() {
8180 posix::Close(write_fd_);
8183 const std::string& file() const { return file_; }
8184 int line() const { return line_; }
8185 int index() const { return index_; }
8186 int write_fd() const { return write_fd_; }
8194 GTEST_DISALLOW_COPY_AND_ASSIGN_(InternalRunDeathTestFlag);
8197 // Returns a newly created InternalRunDeathTestFlag object with fields
8198 // initialized from the GTEST_FLAG(internal_run_death_test) flag if
8199 // the flag is specified; otherwise returns NULL.
8200 InternalRunDeathTestFlag* ParseInternalRunDeathTestFlag();
8202 #else // GTEST_HAS_DEATH_TEST
8204 // This macro is used for implementing macros such as
8205 // EXPECT_DEATH_IF_SUPPORTED and ASSERT_DEATH_IF_SUPPORTED on systems where
8206 // death tests are not supported. Those macros must compile on such systems
8207 // iff EXPECT_DEATH and ASSERT_DEATH compile with the same parameters on
8208 // systems that support death tests. This allows one to write such a macro
8209 // on a system that does not support death tests and be sure that it will
8210 // compile on a death-test supporting system.
8213 // statement - A statement that a macro such as EXPECT_DEATH would test
8214 // for program termination. This macro has to make sure this
8215 // statement is compiled but not executed, to ensure that
8216 // EXPECT_DEATH_IF_SUPPORTED compiles with a certain
8217 // parameter iff EXPECT_DEATH compiles with it.
8218 // regex - A regex that a macro such as EXPECT_DEATH would use to test
8219 // the output of statement. This parameter has to be
8220 // compiled but not evaluated by this macro, to ensure that
8221 // this macro only accepts expressions that a macro such as
8222 // EXPECT_DEATH would accept.
8223 // terminator - Must be an empty statement for EXPECT_DEATH_IF_SUPPORTED
8224 // and a return statement for ASSERT_DEATH_IF_SUPPORTED.
8225 // This ensures that ASSERT_DEATH_IF_SUPPORTED will not
8226 // compile inside functions where ASSERT_DEATH doesn't
8229 // The branch that has an always false condition is used to ensure that
8230 // statement and regex are compiled (and thus syntactically correct) but
8231 // never executed. The unreachable code macro protects the terminator
8232 // statement from generating an 'unreachable code' warning in case
8233 // statement unconditionally returns or throws. The Message constructor at
8234 // the end allows the syntax of streaming additional messages into the
8235 // macro, for compilational compatibility with EXPECT_DEATH/ASSERT_DEATH.
8236 # define GTEST_UNSUPPORTED_DEATH_TEST_(statement, regex, terminator) \
8237 GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
8238 if (::testing::internal::AlwaysTrue()) { \
8239 GTEST_LOG_(WARNING) \
8240 << "Death tests are not supported on this platform.\n" \
8241 << "Statement '" #statement "' cannot be verified."; \
8242 } else if (::testing::internal::AlwaysFalse()) { \
8243 ::testing::internal::RE::PartialMatch(".*", (regex)); \
8244 GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
8247 ::testing::Message()
8249 #endif // GTEST_HAS_DEATH_TEST
8251 } // namespace internal
8252 } // namespace testing
8254 #endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_DEATH_TEST_INTERNAL_H_
8258 // This flag controls the style of death tests. Valid values are "threadsafe",
8259 // meaning that the death test child process will re-execute the test binary
8260 // from the start, running only a single death test, or "fast",
8261 // meaning that the child process will execute the test logic immediately
8263 GTEST_DECLARE_string_(death_test_style);
8265 #if GTEST_HAS_DEATH_TEST
8267 namespace internal {
8269 // Returns a Boolean value indicating whether the caller is currently
8270 // executing in the context of the death test child process. Tools such as
8271 // Valgrind heap checkers may need this to modify their behavior in death
8272 // tests. IMPORTANT: This is an internal utility. Using it may break the
8273 // implementation of death tests. User code MUST NOT use it.
8274 GTEST_API_ bool InDeathTestChild();
8276 } // namespace internal
8278 // The following macros are useful for writing death tests.
8280 // Here's what happens when an ASSERT_DEATH* or EXPECT_DEATH* is
8283 // 1. It generates a warning if there is more than one active
8284 // thread. This is because it's safe to fork() or clone() only
8285 // when there is a single thread.
8287 // 2. The parent process clone()s a sub-process and runs the death
8288 // test in it; the sub-process exits with code 0 at the end of the
8289 // death test, if it hasn't exited already.
8291 // 3. The parent process waits for the sub-process to terminate.
8293 // 4. The parent process checks the exit code and error message of
8298 // ASSERT_DEATH(server.SendMessage(56, "Hello"), "Invalid port number");
8299 // for (int i = 0; i < 5; i++) {
8300 // EXPECT_DEATH(server.ProcessRequest(i),
8301 // "Invalid request .* in ProcessRequest()")
8302 // << "Failed to die on request " << i;
8305 // ASSERT_EXIT(server.ExitNow(), ::testing::ExitedWithCode(0), "Exiting");
8307 // bool KilledBySIGHUP(int exit_code) {
8308 // return WIFSIGNALED(exit_code) && WTERMSIG(exit_code) == SIGHUP;
8311 // ASSERT_EXIT(client.HangUpServer(), KilledBySIGHUP, "Hanging up!");
8313 // On the regular expressions used in death tests:
8315 // On POSIX-compliant systems (*nix), we use the <regex.h> library,
8316 // which uses the POSIX extended regex syntax.
8318 // On other platforms (e.g. Windows), we only support a simple regex
8319 // syntax implemented as part of Google Test. This limited
8320 // implementation should be enough most of the time when writing
8321 // death tests; though it lacks many features you can find in PCRE
8322 // or POSIX extended regex syntax. For example, we don't support
8323 // union ("x|y"), grouping ("(xy)"), brackets ("[xy]"), and
8324 // repetition count ("x{5,7}"), among others.
8326 // Below is the syntax that we do support. We chose it to be a
8327 // subset of both PCRE and POSIX extended regex, so it's easy to
8328 // learn wherever you come from. In the following: 'A' denotes a
8329 // literal character, period (.), or a single \\ escape sequence;
8330 // 'x' and 'y' denote regular expressions; 'm' and 'n' are for
8333 // c matches any literal character c
8334 // \\d matches any decimal digit
8335 // \\D matches any character that's not a decimal digit
8339 // \\s matches any ASCII whitespace, including \n
8340 // \\S matches any character that's not a whitespace
8343 // \\w matches any letter, _, or decimal digit
8344 // \\W matches any character that \\w doesn't match
8345 // \\c matches any literal character c, which must be a punctuation
8346 // . matches any single character except \n
8347 // A? matches 0 or 1 occurrences of A
8348 // A* matches 0 or many occurrences of A
8349 // A+ matches 1 or many occurrences of A
8350 // ^ matches the beginning of a string (not that of each line)
8351 // $ matches the end of a string (not that of each line)
8352 // xy matches x followed by y
8354 // If you accidentally use PCRE or POSIX extended regex features
8355 // not implemented by us, you will get a run-time failure. In that
8356 // case, please try to rewrite your regular expression within the
8359 // This implementation is *not* meant to be as highly tuned or robust
8360 // as a compiled regex library, but should perform well enough for a
8361 // death test, which already incurs significant overhead by launching
8366 // A "threadsafe" style death test obtains the path to the test
8367 // program from argv[0] and re-executes it in the sub-process. For
8368 // simplicity, the current implementation doesn't search the PATH
8369 // when launching the sub-process. This means that the user must
8370 // invoke the test program via a path that contains at least one
8371 // path separator (e.g. path/to/foo_test and
8372 // /absolute/path/to/bar_test are fine, but foo_test is not). This
8373 // is rarely a problem as people usually don't put the test binary
8374 // directory in PATH.
8376 // TODO(wan@google.com): make thread-safe death tests search the PATH.
8378 // Asserts that a given statement causes the program to exit, with an
8379 // integer exit status that satisfies predicate, and emitting error output
8380 // that matches regex.
8381 # define ASSERT_EXIT(statement, predicate, regex) \
8382 GTEST_DEATH_TEST_(statement, predicate, regex, GTEST_FATAL_FAILURE_)
8384 // Like ASSERT_EXIT, but continues on to successive tests in the
8385 // test case, if any:
8386 # define EXPECT_EXIT(statement, predicate, regex) \
8387 GTEST_DEATH_TEST_(statement, predicate, regex, GTEST_NONFATAL_FAILURE_)
8389 // Asserts that a given statement causes the program to exit, either by
8390 // explicitly exiting with a nonzero exit code or being killed by a
8391 // signal, and emitting error output that matches regex.
8392 # define ASSERT_DEATH(statement, regex) \
8393 ASSERT_EXIT(statement, ::testing::internal::ExitedUnsuccessfully, regex)
8395 // Like ASSERT_DEATH, but continues on to successive tests in the
8396 // test case, if any:
8397 # define EXPECT_DEATH(statement, regex) \
8398 EXPECT_EXIT(statement, ::testing::internal::ExitedUnsuccessfully, regex)
8400 // Two predicate classes that can be used in {ASSERT,EXPECT}_EXIT*:
8402 // Tests that an exit code describes a normal exit with a given exit code.
8403 class GTEST_API_ ExitedWithCode {
8405 explicit ExitedWithCode(int exit_code);
8406 bool operator()(int exit_status) const;
8408 // No implementation - assignment is unsupported.
8409 void operator=(const ExitedWithCode& other);
8411 const int exit_code_;
8414 # if !GTEST_OS_WINDOWS
8415 // Tests that an exit code describes an exit due to termination by a
8417 class GTEST_API_ KilledBySignal {
8419 explicit KilledBySignal(int signum);
8420 bool operator()(int exit_status) const;
8424 # endif // !GTEST_OS_WINDOWS
8426 // EXPECT_DEBUG_DEATH asserts that the given statements die in debug mode.
8427 // The death testing framework causes this to have interesting semantics,
8428 // since the sideeffects of the call are only visible in opt mode, and not
8431 // In practice, this can be used to test functions that utilize the
8432 // LOG(DFATAL) macro using the following style:
8434 // int DieInDebugOr12(int* sideeffect) {
8435 // if (sideeffect) {
8436 // *sideeffect = 12;
8438 // LOG(DFATAL) << "death";
8442 // TEST(TestCase, TestDieOr12WorksInDgbAndOpt) {
8443 // int sideeffect = 0;
8444 // // Only asserts in dbg.
8445 // EXPECT_DEBUG_DEATH(DieInDebugOr12(&sideeffect), "death");
8448 // // opt-mode has sideeffect visible.
8449 // EXPECT_EQ(12, sideeffect);
8451 // // dbg-mode no visible sideeffect.
8452 // EXPECT_EQ(0, sideeffect);
8456 // This will assert that DieInDebugReturn12InOpt() crashes in debug
8457 // mode, usually due to a DCHECK or LOG(DFATAL), but returns the
8458 // appropriate fallback value (12 in this case) in opt mode. If you
8459 // need to test that a function has appropriate side-effects in opt
8460 // mode, include assertions against the side-effects. A general
8461 // pattern for this is:
8463 // EXPECT_DEBUG_DEATH({
8464 // // Side-effects here will have an effect after this statement in
8465 // // opt mode, but none in debug mode.
8466 // EXPECT_EQ(12, DieInDebugOr12(&sideeffect));
8471 # define EXPECT_DEBUG_DEATH(statement, regex) \
8472 GTEST_EXECUTE_STATEMENT_(statement, regex)
8474 # define ASSERT_DEBUG_DEATH(statement, regex) \
8475 GTEST_EXECUTE_STATEMENT_(statement, regex)
8479 # define EXPECT_DEBUG_DEATH(statement, regex) \
8480 EXPECT_DEATH(statement, regex)
8482 # define ASSERT_DEBUG_DEATH(statement, regex) \
8483 ASSERT_DEATH(statement, regex)
8485 # endif // NDEBUG for EXPECT_DEBUG_DEATH
8486 #endif // GTEST_HAS_DEATH_TEST
8488 // EXPECT_DEATH_IF_SUPPORTED(statement, regex) and
8489 // ASSERT_DEATH_IF_SUPPORTED(statement, regex) expand to real death tests if
8490 // death tests are supported; otherwise they just issue a warning. This is
8491 // useful when you are combining death test assertions with normal test
8492 // assertions in one test.
8493 #if GTEST_HAS_DEATH_TEST
8494 # define EXPECT_DEATH_IF_SUPPORTED(statement, regex) \
8495 EXPECT_DEATH(statement, regex)
8496 # define ASSERT_DEATH_IF_SUPPORTED(statement, regex) \
8497 ASSERT_DEATH(statement, regex)
8499 # define EXPECT_DEATH_IF_SUPPORTED(statement, regex) \
8500 GTEST_UNSUPPORTED_DEATH_TEST_(statement, regex, )
8501 # define ASSERT_DEATH_IF_SUPPORTED(statement, regex) \
8502 GTEST_UNSUPPORTED_DEATH_TEST_(statement, regex, return)
8505 } // namespace testing
8507 #endif // GTEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H_
8508 // Copyright 2005, Google Inc.
8509 // All rights reserved.
8511 // Redistribution and use in source and binary forms, with or without
8512 // modification, are permitted provided that the following conditions are
8515 // * Redistributions of source code must retain the above copyright
8516 // notice, this list of conditions and the following disclaimer.
8517 // * Redistributions in binary form must reproduce the above
8518 // copyright notice, this list of conditions and the following disclaimer
8519 // in the documentation and/or other materials provided with the
8521 // * Neither the name of Google Inc. nor the names of its
8522 // contributors may be used to endorse or promote products derived from
8523 // this software without specific prior written permission.
8525 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
8526 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
8527 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
8528 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
8529 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
8530 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
8531 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
8532 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
8533 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
8534 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
8535 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
8537 // Author: wan@google.com (Zhanyong Wan)
8539 // The Google C++ Testing Framework (Google Test)
8541 // This header file defines the Message class.
8543 // IMPORTANT NOTE: Due to limitation of the C++ language, we have to
8544 // leave some internal implementation details in this header file.
8545 // They are clearly marked by comments like this:
8547 // // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
8549 // Such code is NOT meant to be used by a user directly, and is subject
8550 // to CHANGE WITHOUT NOTICE. Therefore DO NOT DEPEND ON IT in a user
8553 #ifndef GTEST_INCLUDE_GTEST_GTEST_MESSAGE_H_
8554 #define GTEST_INCLUDE_GTEST_GTEST_MESSAGE_H_
8561 // The Message class works like an ostream repeater.
8565 // 1. You stream a bunch of values to a Message object.
8566 // It will remember the text in a stringstream.
8567 // 2. Then you stream the Message object to an ostream.
8568 // This causes the text in the Message to be streamed
8573 // testing::Message foo;
8574 // foo << 1 << " != " << 2;
8575 // std::cout << foo;
8577 // will print "1 != 2".
8579 // Message is not intended to be inherited from. In particular, its
8580 // destructor is not virtual.
8582 // Note that stringstream behaves differently in gcc and in MSVC. You
8583 // can stream a NULL char pointer to it in the former, but not in the
8584 // latter (it causes an access violation if you do). The Message
8585 // class hides this difference by treating a NULL char pointer as
8587 class GTEST_API_ Message {
8589 // The type of basic IO manipulators (endl, ends, and flush) for
8591 typedef std::ostream& (*BasicNarrowIoManip)(std::ostream&);
8594 // Constructs an empty Message.
8595 // We allocate the stringstream separately because otherwise each use of
8596 // ASSERT/EXPECT in a procedure adds over 200 bytes to the procedure's
8597 // stack frame leading to huge stack frames in some cases; gcc does not reuse
8599 Message() : ss_(new ::std::stringstream) {
8600 // By default, we want there to be enough precision when printing
8601 // a double to a Message.
8602 *ss_ << std::setprecision(std::numeric_limits<double>::digits10 + 2);
8605 // Copy constructor.
8606 Message(const Message& msg) : ss_(new ::std::stringstream) { // NOLINT
8607 *ss_ << msg.GetString();
8610 // Constructs a Message from a C-string.
8611 explicit Message(const char* str) : ss_(new ::std::stringstream) {
8615 #if GTEST_OS_SYMBIAN
8616 // Streams a value (either a pointer or not) to this object.
8617 template <typename T>
8618 inline Message& operator <<(const T& value) {
8619 StreamHelper(typename internal::is_pointer<T>::type(), value);
8623 // Streams a non-pointer value to this object.
8624 template <typename T>
8625 inline Message& operator <<(const T& val) {
8626 ::GTestStreamToHelper(ss_.get(), val);
8630 // Streams a pointer value to this object.
8632 // This function is an overload of the previous one. When you
8633 // stream a pointer to a Message, this definition will be used as it
8634 // is more specialized. (The C++ Standard, section
8635 // [temp.func.order].) If you stream a non-pointer, then the
8636 // previous definition will be used.
8638 // The reason for this overload is that streaming a NULL pointer to
8639 // ostream is undefined behavior. Depending on the compiler, you
8640 // may get "0", "(nil)", "(null)", or an access violation. To
8641 // ensure consistent result across compilers, we always treat NULL
8643 template <typename T>
8644 inline Message& operator <<(T* const& pointer) { // NOLINT
8645 if (pointer == NULL) {
8648 ::GTestStreamToHelper(ss_.get(), pointer);
8652 #endif // GTEST_OS_SYMBIAN
8654 // Since the basic IO manipulators are overloaded for both narrow
8655 // and wide streams, we have to provide this specialized definition
8656 // of operator <<, even though its body is the same as the
8657 // templatized version above. Without this definition, streaming
8658 // endl or other basic IO manipulators to Message will confuse the
8660 Message& operator <<(BasicNarrowIoManip val) {
8665 // Instead of 1/0, we want to see true/false for bool values.
8666 Message& operator <<(bool b) {
8667 return *this << (b ? "true" : "false");
8670 // These two overloads allow streaming a wide C string to a Message
8671 // using the UTF-8 encoding.
8672 Message& operator <<(const wchar_t* wide_c_str) {
8673 return *this << internal::String::ShowWideCString(wide_c_str);
8675 Message& operator <<(wchar_t* wide_c_str) {
8676 return *this << internal::String::ShowWideCString(wide_c_str);
8679 #if GTEST_HAS_STD_WSTRING
8680 // Converts the given wide string to a narrow string using the UTF-8
8681 // encoding, and streams the result to this Message object.
8682 Message& operator <<(const ::std::wstring& wstr);
8683 #endif // GTEST_HAS_STD_WSTRING
8685 #if GTEST_HAS_GLOBAL_WSTRING
8686 // Converts the given wide string to a narrow string using the UTF-8
8687 // encoding, and streams the result to this Message object.
8688 Message& operator <<(const ::wstring& wstr);
8689 #endif // GTEST_HAS_GLOBAL_WSTRING
8691 // Gets the text streamed to this object so far as an std::string.
8692 // Each '\0' character in the buffer is replaced with "\\0".
8694 // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
8695 std::string GetString() const {
8696 return internal::StringStreamToString(ss_.get());
8701 #if GTEST_OS_SYMBIAN
8702 // These are needed as the Nokia Symbian Compiler cannot decide between
8703 // const T& and const T* in a function template. The Nokia compiler _can_
8704 // decide between class template specializations for T and T*, so a
8705 // tr1::type_traits-like is_pointer works, and we can overload on that.
8706 template <typename T>
8707 inline void StreamHelper(internal::true_type /*dummy*/, T* pointer) {
8708 if (pointer == NULL) {
8711 ::GTestStreamToHelper(ss_.get(), pointer);
8714 template <typename T>
8715 inline void StreamHelper(internal::false_type /*dummy*/, const T& value) {
8716 ::GTestStreamToHelper(ss_.get(), value);
8718 #endif // GTEST_OS_SYMBIAN
8720 // We'll hold the text streamed to this object here.
8721 const internal::scoped_ptr< ::std::stringstream> ss_;
8723 // We declare (but don't implement) this to prevent the compiler
8724 // from implementing the assignment operator.
8725 void operator=(const Message&);
8728 // Streams a Message to an ostream.
8729 inline std::ostream& operator <<(std::ostream& os, const Message& sb) {
8730 return os << sb.GetString();
8733 } // namespace testing
8735 #endif // GTEST_INCLUDE_GTEST_GTEST_MESSAGE_H_
8736 // This file was GENERATED by command:
8737 // pump.py gtest-param-test.h.pump
8738 // DO NOT EDIT BY HAND!!!
8740 // Copyright 2008, Google Inc.
8741 // All rights reserved.
8743 // Redistribution and use in source and binary forms, with or without
8744 // modification, are permitted provided that the following conditions are
8747 // * Redistributions of source code must retain the above copyright
8748 // notice, this list of conditions and the following disclaimer.
8749 // * Redistributions in binary form must reproduce the above
8750 // copyright notice, this list of conditions and the following disclaimer
8751 // in the documentation and/or other materials provided with the
8753 // * Neither the name of Google Inc. nor the names of its
8754 // contributors may be used to endorse or promote products derived from
8755 // this software without specific prior written permission.
8757 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
8758 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
8759 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
8760 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
8761 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
8762 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
8763 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
8764 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
8765 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
8766 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
8767 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
8769 // Authors: vladl@google.com (Vlad Losev)
8771 // Macros and functions for implementing parameterized tests
8772 // in Google C++ Testing Framework (Google Test)
8774 // This file is generated by a SCRIPT. DO NOT EDIT BY HAND!
8776 #ifndef GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_
8777 #define GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_
8780 // Value-parameterized tests allow you to test your code with different
8781 // parameters without writing multiple copies of the same test.
8783 // Here is how you use value-parameterized tests:
8787 // To write value-parameterized tests, first you should define a fixture
8788 // class. It is usually derived from testing::TestWithParam<T> (see below for
8789 // another inheritance scheme that's sometimes useful in more complicated
8790 // class hierarchies), where the type of your parameter values.
8791 // TestWithParam<T> is itself derived from testing::Test. T can be any
8792 // copyable type. If it's a raw pointer, you are responsible for managing the
8793 // lifespan of the pointed values.
8795 class FooTest : public ::testing::TestWithParam<const char*> {
8796 // You can implement all the usual class fixture members here.
8799 // Then, use the TEST_P macro to define as many parameterized tests
8800 // for this fixture as you want. The _P suffix is for "parameterized"
8801 // or "pattern", whichever you prefer to think.
8803 TEST_P(FooTest, DoesBlah) {
8804 // Inside a test, access the test parameter with the GetParam() method
8805 // of the TestWithParam<T> class:
8806 EXPECT_TRUE(foo.Blah(GetParam()));
8810 TEST_P(FooTest, HasBlahBlah) {
8814 // Finally, you can use INSTANTIATE_TEST_CASE_P to instantiate the test
8815 // case with any set of parameters you want. Google Test defines a number
8816 // of functions for generating test parameters. They return what we call
8817 // (surprise!) parameter generators. Here is a summary of them, which
8818 // are all in the testing namespace:
8821 // Range(begin, end [, step]) - Yields values {begin, begin+step,
8822 // begin+step+step, ...}. The values do not
8823 // include end. step defaults to 1.
8824 // Values(v1, v2, ..., vN) - Yields values {v1, v2, ..., vN}.
8825 // ValuesIn(container) - Yields values from a C-style array, an STL
8826 // ValuesIn(begin,end) container, or an iterator range [begin, end).
8827 // Bool() - Yields sequence {false, true}.
8828 // Combine(g1, g2, ..., gN) - Yields all combinations (the Cartesian product
8829 // for the math savvy) of the values generated
8830 // by the N generators.
8832 // For more details, see comments at the definitions of these functions below
8835 // The following statement will instantiate tests from the FooTest test case
8836 // each with parameter values "meeny", "miny", and "moe".
8838 INSTANTIATE_TEST_CASE_P(InstantiationName,
8840 Values("meeny", "miny", "moe"));
8842 // To distinguish different instances of the pattern, (yes, you
8843 // can instantiate it more then once) the first argument to the
8844 // INSTANTIATE_TEST_CASE_P macro is a prefix that will be added to the
8845 // actual test case name. Remember to pick unique prefixes for different
8846 // instantiations. The tests from the instantiation above will have
8849 // * InstantiationName/FooTest.DoesBlah/0 for "meeny"
8850 // * InstantiationName/FooTest.DoesBlah/1 for "miny"
8851 // * InstantiationName/FooTest.DoesBlah/2 for "moe"
8852 // * InstantiationName/FooTest.HasBlahBlah/0 for "meeny"
8853 // * InstantiationName/FooTest.HasBlahBlah/1 for "miny"
8854 // * InstantiationName/FooTest.HasBlahBlah/2 for "moe"
8856 // You can use these names in --gtest_filter.
8858 // This statement will instantiate all tests from FooTest again, each
8859 // with parameter values "cat" and "dog":
8861 const char* pets[] = {"cat", "dog"};
8862 INSTANTIATE_TEST_CASE_P(AnotherInstantiationName, FooTest, ValuesIn(pets));
8864 // The tests from the instantiation above will have these names:
8866 // * AnotherInstantiationName/FooTest.DoesBlah/0 for "cat"
8867 // * AnotherInstantiationName/FooTest.DoesBlah/1 for "dog"
8868 // * AnotherInstantiationName/FooTest.HasBlahBlah/0 for "cat"
8869 // * AnotherInstantiationName/FooTest.HasBlahBlah/1 for "dog"
8871 // Please note that INSTANTIATE_TEST_CASE_P will instantiate all tests
8872 // in the given test case, whether their definitions come before or
8873 // AFTER the INSTANTIATE_TEST_CASE_P statement.
8875 // Please also note that generator expressions (including parameters to the
8876 // generators) are evaluated in InitGoogleTest(), after main() has started.
8877 // This allows the user on one hand, to adjust generator parameters in order
8878 // to dynamically determine a set of tests to run and on the other hand,
8879 // give the user a chance to inspect the generated tests with Google Test
8880 // reflection API before RUN_ALL_TESTS() is executed.
8882 // You can see samples/sample7_unittest.cc and samples/sample8_unittest.cc
8883 // for more examples.
8885 // In the future, we plan to publish the API for defining new parameter
8886 // generators. But for now this interface remains part of the internal
8887 // implementation and is subject to change.
8890 // A parameterized test fixture must be derived from testing::Test and from
8891 // testing::WithParamInterface<T>, where T is the type of the parameter
8892 // values. Inheriting from TestWithParam<T> satisfies that requirement because
8893 // TestWithParam<T> inherits from both Test and WithParamInterface. In more
8894 // complicated hierarchies, however, it is occasionally useful to inherit
8895 // separately from Test and WithParamInterface. For example:
8897 class BaseTest : public ::testing::Test {
8898 // You can inherit all the usual members for a non-parameterized test
8902 class DerivedTest : public BaseTest, public ::testing::WithParamInterface<int> {
8903 // The usual test fixture members go here too.
8906 TEST_F(BaseTest, HasFoo) {
8907 // This is an ordinary non-parameterized test.
8910 TEST_P(DerivedTest, DoesBlah) {
8911 // GetParam works just the same here as if you inherit from TestWithParam.
8912 EXPECT_TRUE(foo.Blah(GetParam()));
8918 #if !GTEST_OS_SYMBIAN
8922 // scripts/fuse_gtest.py depends on gtest's own header being #included
8923 // *unconditionally*. Therefore these #includes cannot be moved
8924 // inside #if GTEST_HAS_PARAM_TEST.
8925 // Copyright 2008 Google Inc.
8926 // All Rights Reserved.
8928 // Redistribution and use in source and binary forms, with or without
8929 // modification, are permitted provided that the following conditions are
8932 // * Redistributions of source code must retain the above copyright
8933 // notice, this list of conditions and the following disclaimer.
8934 // * Redistributions in binary form must reproduce the above
8935 // copyright notice, this list of conditions and the following disclaimer
8936 // in the documentation and/or other materials provided with the
8938 // * Neither the name of Google Inc. nor the names of its
8939 // contributors may be used to endorse or promote products derived from
8940 // this software without specific prior written permission.
8942 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
8943 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
8944 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
8945 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
8946 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
8947 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
8948 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
8949 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
8950 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
8951 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
8952 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
8954 // Author: vladl@google.com (Vlad Losev)
8956 // Type and function utilities for implementing parameterized tests.
8958 #ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_H_
8959 #define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_H_
8965 // scripts/fuse_gtest.py depends on gtest's own header being #included
8966 // *unconditionally*. Therefore these #includes cannot be moved
8967 // inside #if GTEST_HAS_PARAM_TEST.
8968 // Copyright 2003 Google Inc.
8969 // All rights reserved.
8971 // Redistribution and use in source and binary forms, with or without
8972 // modification, are permitted provided that the following conditions are
8975 // * Redistributions of source code must retain the above copyright
8976 // notice, this list of conditions and the following disclaimer.
8977 // * Redistributions in binary form must reproduce the above
8978 // copyright notice, this list of conditions and the following disclaimer
8979 // in the documentation and/or other materials provided with the
8981 // * Neither the name of Google Inc. nor the names of its
8982 // contributors may be used to endorse or promote products derived from
8983 // this software without specific prior written permission.
8985 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
8986 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
8987 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
8988 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
8989 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
8990 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
8991 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
8992 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
8993 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
8994 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
8995 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
8997 // Authors: Dan Egnor (egnor@google.com)
8999 // A "smart" pointer type with reference tracking. Every pointer to a
9000 // particular object is kept on a circular linked list. When the last pointer
9001 // to an object is destroyed or reassigned, the object is deleted.
9003 // Used properly, this deletes the object when the last reference goes away.
9004 // There are several caveats:
9005 // - Like all reference counting schemes, cycles lead to leaks.
9006 // - Each smart pointer is actually two pointers (8 bytes instead of 4).
9007 // - Every time a pointer is assigned, the entire list of pointers to that
9008 // object is traversed. This class is therefore NOT SUITABLE when there
9009 // will often be more than two or three pointers to a particular object.
9010 // - References are only tracked as long as linked_ptr<> objects are copied.
9011 // If a linked_ptr<> is converted to a raw pointer and back, BAD THINGS
9012 // will happen (double deletion).
9014 // A good use of this class is storing object references in STL containers.
9015 // You can safely put linked_ptr<> in a vector<>.
9016 // Other uses may not be as good.
9018 // Note: If you use an incomplete type with linked_ptr<>, the class
9019 // *containing* linked_ptr<> must have a constructor and destructor (even
9020 // if they do nothing!).
9022 // Bill Gibbons suggested we use something like this.
9025 // Unlike other linked_ptr implementations, in this implementation
9026 // a linked_ptr object is thread-safe in the sense that:
9027 // - it's safe to copy linked_ptr objects concurrently,
9028 // - it's safe to copy *from* a linked_ptr and read its underlying
9029 // raw pointer (e.g. via get()) concurrently, and
9030 // - it's safe to write to two linked_ptrs that point to the same
9031 // shared object concurrently.
9032 // TODO(wan@google.com): rename this to safe_linked_ptr to avoid
9033 // confusion with normal linked_ptr.
9035 #ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_LINKED_PTR_H_
9036 #define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_LINKED_PTR_H_
9043 namespace internal {
9045 // Protects copying of all linked_ptr objects.
9046 GTEST_API_ GTEST_DECLARE_STATIC_MUTEX_(g_linked_ptr_mutex);
9048 // This is used internally by all instances of linked_ptr<>. It needs to be
9049 // a non-template class because different types of linked_ptr<> can refer to
9050 // the same object (linked_ptr<Superclass>(obj) vs linked_ptr<Subclass>(obj)).
9051 // So, it needs to be possible for different types of linked_ptr to participate
9052 // in the same circular linked list, so we need a single class type here.
9054 // DO NOT USE THIS CLASS DIRECTLY YOURSELF. Use linked_ptr<T>.
9055 class linked_ptr_internal {
9057 // Create a new circle that includes only this instance.
9062 // Many linked_ptr operations may change p.link_ for some linked_ptr
9063 // variable p in the same circle as this object. Therefore we need
9064 // to prevent two such operations from occurring concurrently.
9066 // Note that different types of linked_ptr objects can coexist in a
9067 // circle (e.g. linked_ptr<Base>, linked_ptr<Derived1>, and
9068 // linked_ptr<Derived2>). Therefore we must use a single mutex to
9069 // protect all linked_ptr objects. This can create serious
9070 // contention in production code, but is acceptable in a testing
9073 // Join an existing circle.
9074 void join(linked_ptr_internal const* ptr)
9075 GTEST_LOCK_EXCLUDED_(g_linked_ptr_mutex) {
9076 MutexLock lock(&g_linked_ptr_mutex);
9078 linked_ptr_internal const* p = ptr;
9079 while (p->next_ != ptr) p = p->next_;
9084 // Leave whatever circle we're part of. Returns true if we were the
9085 // last member of the circle. Once this is done, you can join() another.
9087 GTEST_LOCK_EXCLUDED_(g_linked_ptr_mutex) {
9088 MutexLock lock(&g_linked_ptr_mutex);
9090 if (next_ == this) return true;
9091 linked_ptr_internal const* p = next_;
9092 while (p->next_ != this) p = p->next_;
9098 mutable linked_ptr_internal const* next_;
9101 template <typename T>
9104 typedef T element_type;
9106 // Take over ownership of a raw pointer. This should happen as soon as
9107 // possible after the object is created.
9108 explicit linked_ptr(T* ptr = NULL) { capture(ptr); }
9109 ~linked_ptr() { depart(); }
9111 // Copy an existing linked_ptr<>, adding ourselves to the list of references.
9112 template <typename U> linked_ptr(linked_ptr<U> const& ptr) { copy(&ptr); }
9113 linked_ptr(linked_ptr const& ptr) { // NOLINT
9114 assert(&ptr != this);
9118 // Assignment releases the old value and acquires the new.
9119 template <typename U> linked_ptr& operator=(linked_ptr<U> const& ptr) {
9125 linked_ptr& operator=(linked_ptr const& ptr) {
9133 // Smart pointer members.
9134 void reset(T* ptr = NULL) {
9138 T* get() const { return value_; }
9139 T* operator->() const { return value_; }
9140 T& operator*() const { return *value_; }
9142 bool operator==(T* p) const { return value_ == p; }
9143 bool operator!=(T* p) const { return value_ != p; }
9144 template <typename U>
9145 bool operator==(linked_ptr<U> const& ptr) const {
9146 return value_ == ptr.get();
9148 template <typename U>
9149 bool operator!=(linked_ptr<U> const& ptr) const {
9150 return value_ != ptr.get();
9154 template <typename U>
9155 friend class linked_ptr;
9158 linked_ptr_internal link_;
9161 if (link_.depart()) delete value_;
9164 void capture(T* ptr) {
9169 template <typename U> void copy(linked_ptr<U> const* ptr) {
9170 value_ = ptr->get();
9172 link_.join(&ptr->link_);
9178 template<typename T> inline
9179 bool operator==(T* ptr, const linked_ptr<T>& x) {
9180 return ptr == x.get();
9183 template<typename T> inline
9184 bool operator!=(T* ptr, const linked_ptr<T>& x) {
9185 return ptr != x.get();
9188 // A function to convert T* into linked_ptr<T>
9189 // Doing e.g. make_linked_ptr(new FooBarBaz<type>(arg)) is a shorter notation
9190 // for linked_ptr<FooBarBaz<type> >(new FooBarBaz<type>(arg))
9191 template <typename T>
9192 linked_ptr<T> make_linked_ptr(T* ptr) {
9193 return linked_ptr<T>(ptr);
9196 } // namespace internal
9197 } // namespace testing
9199 #endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_LINKED_PTR_H_
9200 // Copyright 2007, Google Inc.
9201 // All rights reserved.
9203 // Redistribution and use in source and binary forms, with or without
9204 // modification, are permitted provided that the following conditions are
9207 // * Redistributions of source code must retain the above copyright
9208 // notice, this list of conditions and the following disclaimer.
9209 // * Redistributions in binary form must reproduce the above
9210 // copyright notice, this list of conditions and the following disclaimer
9211 // in the documentation and/or other materials provided with the
9213 // * Neither the name of Google Inc. nor the names of its
9214 // contributors may be used to endorse or promote products derived from
9215 // this software without specific prior written permission.
9217 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
9218 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
9219 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
9220 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
9221 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
9222 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
9223 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
9224 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
9225 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
9226 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
9227 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
9229 // Author: wan@google.com (Zhanyong Wan)
9231 // Google Test - The Google C++ Testing Framework
9233 // This file implements a universal value printer that can print a
9234 // value of any type T:
9236 // void ::testing::internal::UniversalPrinter<T>::Print(value, ostream_ptr);
9238 // A user can teach this function how to print a class type T by
9239 // defining either operator<<() or PrintTo() in the namespace that
9240 // defines T. More specifically, the FIRST defined function in the
9241 // following list will be used (assuming T is defined in namespace
9244 // 1. foo::PrintTo(const T&, ostream*)
9245 // 2. operator<<(ostream&, const T&) defined in either foo or the
9246 // global namespace.
9248 // If none of the above is defined, it will print the debug string of
9249 // the value if it is a protocol buffer, or print the raw bytes in the
9252 // To aid debugging: when T is a reference type, the address of the
9253 // value is also printed; when T is a (const) char pointer, both the
9254 // pointer value and the NUL-terminated string it points to are
9257 // We also provide some convenient wrappers:
9259 // // Prints a value to a string. For a (const or not) char
9260 // // pointer, the NUL-terminated string (but not the pointer) is
9262 // std::string ::testing::PrintToString(const T& value);
9264 // // Prints a value tersely: for a reference type, the referenced
9265 // // value (but not the address) is printed; for a (const or not) char
9266 // // pointer, the NUL-terminated string (but not the pointer) is
9268 // void ::testing::internal::UniversalTersePrint(const T& value, ostream*);
9270 // // Prints value using the type inferred by the compiler. The difference
9271 // // from UniversalTersePrint() is that this function prints both the
9272 // // pointer and the NUL-terminated string for a (const or not) char pointer.
9273 // void ::testing::internal::UniversalPrint(const T& value, ostream*);
9275 // // Prints the fields of a tuple tersely to a string vector, one
9276 // // element for each field. Tuple support must be enabled in
9278 // std::vector<string> UniversalTersePrintTupleFieldsToStrings(
9279 // const Tuple& value);
9281 // Known limitation:
9283 // The print primitives print the elements of an STL-style container
9284 // using the compiler-inferred type of *iter where iter is a
9285 // const_iterator of the container. When const_iterator is an input
9286 // iterator but not a forward iterator, this inferred type may not
9287 // match value_type, and the print output may be incorrect. In
9288 // practice, this is rarely a problem as for most containers
9289 // const_iterator is a forward iterator. We'll fix this if there's an
9290 // actual need for it. Note that this fix cannot rely on value_type
9291 // being defined as many user-defined container types don't have
9294 #ifndef GTEST_INCLUDE_GTEST_GTEST_PRINTERS_H_
9295 #define GTEST_INCLUDE_GTEST_GTEST_PRINTERS_H_
9297 #include <ostream> // NOLINT
9305 // Definitions in the 'internal' and 'internal2' name spaces are
9306 // subject to change without notice. DO NOT USE THEM IN USER CODE!
9307 namespace internal2 {
9309 // Prints the given number of bytes in the given object to the given
9311 GTEST_API_ void PrintBytesInObjectTo(const unsigned char* obj_bytes,
9313 ::std::ostream* os);
9315 // For selecting which printer to use when a given type has neither <<
9318 kProtobuf, // a protobuf type
9319 kConvertibleToInteger, // a type implicitly convertible to BiggestInt
9320 // (e.g. a named or unnamed enum type)
9321 kOtherType // anything else
9324 // TypeWithoutFormatter<T, kTypeKind>::PrintValue(value, os) is called
9325 // by the universal printer to print a value of type T when neither
9326 // operator<< nor PrintTo() is defined for T, where kTypeKind is the
9327 // "kind" of T as defined by enum TypeKind.
9328 template <typename T, TypeKind kTypeKind>
9329 class TypeWithoutFormatter {
9331 // This default version is called when kTypeKind is kOtherType.
9332 static void PrintValue(const T& value, ::std::ostream* os) {
9333 PrintBytesInObjectTo(reinterpret_cast<const unsigned char*>(&value),
9338 // We print a protobuf using its ShortDebugString() when the string
9339 // doesn't exceed this many characters; otherwise we print it using
9340 // DebugString() for better readability.
9341 const size_t kProtobufOneLinerMaxLength = 50;
9343 template <typename T>
9344 class TypeWithoutFormatter<T, kProtobuf> {
9346 static void PrintValue(const T& value, ::std::ostream* os) {
9347 const ::testing::internal::string short_str = value.ShortDebugString();
9348 const ::testing::internal::string pretty_str =
9349 short_str.length() <= kProtobufOneLinerMaxLength ?
9350 short_str : ("\n" + value.DebugString());
9351 *os << ("<" + pretty_str + ">");
9355 template <typename T>
9356 class TypeWithoutFormatter<T, kConvertibleToInteger> {
9358 // Since T has no << operator or PrintTo() but can be implicitly
9359 // converted to BiggestInt, we print it as a BiggestInt.
9361 // Most likely T is an enum type (either named or unnamed), in which
9362 // case printing it as an integer is the desired behavior. In case
9363 // T is not an enum, printing it as an integer is the best we can do
9364 // given that it has no user-defined printer.
9365 static void PrintValue(const T& value, ::std::ostream* os) {
9366 const internal::BiggestInt kBigInt = value;
9371 // Prints the given value to the given ostream. If the value is a
9372 // protocol message, its debug string is printed; if it's an enum or
9373 // of a type implicitly convertible to BiggestInt, it's printed as an
9374 // integer; otherwise the bytes in the value are printed. This is
9375 // what UniversalPrinter<T>::Print() does when it knows nothing about
9376 // type T and T has neither << operator nor PrintTo().
9378 // A user can override this behavior for a class type Foo by defining
9379 // a << operator in the namespace where Foo is defined.
9381 // We put this operator in namespace 'internal2' instead of 'internal'
9382 // to simplify the implementation, as much code in 'internal' needs to
9383 // use << in STL, which would conflict with our own << were it defined
9386 // Note that this operator<< takes a generic std::basic_ostream<Char,
9387 // CharTraits> type instead of the more restricted std::ostream. If
9388 // we define it to take an std::ostream instead, we'll get an
9389 // "ambiguous overloads" compiler error when trying to print a type
9390 // Foo that supports streaming to std::basic_ostream<Char,
9391 // CharTraits>, as the compiler cannot tell whether
9392 // operator<<(std::ostream&, const T&) or
9393 // operator<<(std::basic_stream<Char, CharTraits>, const Foo&) is more
9395 template <typename Char, typename CharTraits, typename T>
9396 ::std::basic_ostream<Char, CharTraits>& operator<<(
9397 ::std::basic_ostream<Char, CharTraits>& os, const T& x) {
9398 TypeWithoutFormatter<T,
9399 (internal::IsAProtocolMessage<T>::value ? kProtobuf :
9400 internal::ImplicitlyConvertible<const T&, internal::BiggestInt>::value ?
9401 kConvertibleToInteger : kOtherType)>::PrintValue(x, &os);
9405 } // namespace internal2
9406 } // namespace testing
9408 // This namespace MUST NOT BE NESTED IN ::testing, or the name look-up
9409 // magic needed for implementing UniversalPrinter won't work.
9410 namespace testing_internal {
9412 // Used to print a value that is not an STL-style container when the
9413 // user doesn't define PrintTo() for it.
9414 template <typename T>
9415 void DefaultPrintNonContainerTo(const T& value, ::std::ostream* os) {
9416 // With the following statement, during unqualified name lookup,
9417 // testing::internal2::operator<< appears as if it was declared in
9418 // the nearest enclosing namespace that contains both
9419 // ::testing_internal and ::testing::internal2, i.e. the global
9420 // namespace. For more details, refer to the C++ Standard section
9421 // 7.3.4-1 [namespace.udir]. This allows us to fall back onto
9422 // testing::internal2::operator<< in case T doesn't come with a <<
9425 // We cannot write 'using ::testing::internal2::operator<<;', which
9426 // gcc 3.3 fails to compile due to a compiler bug.
9427 using namespace ::testing::internal2; // NOLINT
9429 // Assuming T is defined in namespace foo, in the next statement,
9430 // the compiler will consider all of:
9432 // 1. foo::operator<< (thanks to Koenig look-up),
9433 // 2. ::operator<< (as the current namespace is enclosed in ::),
9434 // 3. testing::internal2::operator<< (thanks to the using statement above).
9436 // The operator<< whose type matches T best will be picked.
9438 // We deliberately allow #2 to be a candidate, as sometimes it's
9439 // impossible to define #1 (e.g. when foo is ::std, defining
9440 // anything in it is undefined behavior unless you are a compiler
9445 } // namespace testing_internal
9448 namespace internal {
9450 // UniversalPrinter<T>::Print(value, ostream_ptr) prints the given
9451 // value to the given ostream. The caller must ensure that
9452 // 'ostream_ptr' is not NULL, or the behavior is undefined.
9454 // We define UniversalPrinter as a class template (as opposed to a
9455 // function template), as we need to partially specialize it for
9456 // reference types, which cannot be done with function templates.
9457 template <typename T>
9458 class UniversalPrinter;
9460 template <typename T>
9461 void UniversalPrint(const T& value, ::std::ostream* os);
9463 // Used to print an STL-style container when the user doesn't define
9464 // a PrintTo() for it.
9465 template <typename C>
9466 void DefaultPrintTo(IsContainer /* dummy */,
9467 false_type /* is not a pointer */,
9468 const C& container, ::std::ostream* os) {
9469 const size_t kMaxCount = 32; // The maximum number of elements to print.
9472 for (typename C::const_iterator it = container.begin();
9473 it != container.end(); ++it, ++count) {
9476 if (count == kMaxCount) { // Enough has been printed.
9482 // We cannot call PrintTo(*it, os) here as PrintTo() doesn't
9483 // handle *it being a native array.
9484 internal::UniversalPrint(*it, os);
9493 // Used to print a pointer that is neither a char pointer nor a member
9494 // pointer, when the user doesn't define PrintTo() for it. (A member
9495 // variable pointer or member function pointer doesn't really point to
9496 // a location in the address space. Their representation is
9497 // implementation-defined. Therefore they will be printed as raw
9499 template <typename T>
9500 void DefaultPrintTo(IsNotContainer /* dummy */,
9501 true_type /* is a pointer */,
9502 T* p, ::std::ostream* os) {
9506 // C++ doesn't allow casting from a function pointer to any object
9509 // IsTrue() silences warnings: "Condition is always true",
9510 // "unreachable code".
9511 if (IsTrue(ImplicitlyConvertible<T*, const void*>::value)) {
9512 // T is not a function type. We just call << to print p,
9513 // relying on ADL to pick up user-defined << for their pointer
9517 // T is a function type, so '*os << p' doesn't do what we want
9518 // (it just prints p as bool). We want to print p as a const
9519 // void*. However, we cannot cast it to const void* directly,
9520 // even using reinterpret_cast, as earlier versions of gcc
9521 // (e.g. 3.4.5) cannot compile the cast when p is a function
9522 // pointer. Casting to UInt64 first solves the problem.
9523 *os << reinterpret_cast<const void*>(
9524 reinterpret_cast<internal::UInt64>(p));
9529 // Used to print a non-container, non-pointer value when the user
9530 // doesn't define PrintTo() for it.
9531 template <typename T>
9532 void DefaultPrintTo(IsNotContainer /* dummy */,
9533 false_type /* is not a pointer */,
9534 const T& value, ::std::ostream* os) {
9535 ::testing_internal::DefaultPrintNonContainerTo(value, os);
9538 // Prints the given value using the << operator if it has one;
9539 // otherwise prints the bytes in it. This is what
9540 // UniversalPrinter<T>::Print() does when PrintTo() is not specialized
9541 // or overloaded for type T.
9543 // A user can override this behavior for a class type Foo by defining
9544 // an overload of PrintTo() in the namespace where Foo is defined. We
9545 // give the user this option as sometimes defining a << operator for
9546 // Foo is not desirable (e.g. the coding style may prevent doing it,
9547 // or there is already a << operator but it doesn't do what the user
9549 template <typename T>
9550 void PrintTo(const T& value, ::std::ostream* os) {
9551 // DefaultPrintTo() is overloaded. The type of its first two
9552 // arguments determine which version will be picked. If T is an
9553 // STL-style container, the version for container will be called; if
9554 // T is a pointer, the pointer version will be called; otherwise the
9555 // generic version will be called.
9557 // Note that we check for container types here, prior to we check
9558 // for protocol message types in our operator<<. The rationale is:
9560 // For protocol messages, we want to give people a chance to
9561 // override Google Mock's format by defining a PrintTo() or
9562 // operator<<. For STL containers, other formats can be
9563 // incompatible with Google Mock's format for the container
9564 // elements; therefore we check for container types here to ensure
9565 // that our format is used.
9567 // The second argument of DefaultPrintTo() is needed to bypass a bug
9568 // in Symbian's C++ compiler that prevents it from picking the right
9569 // overload between:
9571 // PrintTo(const T& x, ...);
9572 // PrintTo(T* x, ...);
9573 DefaultPrintTo(IsContainerTest<T>(0), is_pointer<T>(), value, os);
9576 // The following list of PrintTo() overloads tells
9577 // UniversalPrinter<T>::Print() how to print standard types (built-in
9578 // types, strings, plain arrays, and pointers).
9580 // Overloads for various char types.
9581 GTEST_API_ void PrintTo(unsigned char c, ::std::ostream* os);
9582 GTEST_API_ void PrintTo(signed char c, ::std::ostream* os);
9583 inline void PrintTo(char c, ::std::ostream* os) {
9584 // When printing a plain char, we always treat it as unsigned. This
9585 // way, the output won't be affected by whether the compiler thinks
9586 // char is signed or not.
9587 PrintTo(static_cast<unsigned char>(c), os);
9590 // Overloads for other simple built-in types.
9591 inline void PrintTo(bool x, ::std::ostream* os) {
9592 *os << (x ? "true" : "false");
9595 // Overload for wchar_t type.
9596 // Prints a wchar_t as a symbol if it is printable or as its internal
9597 // code otherwise and also as its decimal code (except for L'\0').
9598 // The L'\0' char is printed as "L'\\0'". The decimal code is printed
9599 // as signed integer when wchar_t is implemented by the compiler
9600 // as a signed type and is printed as an unsigned integer when wchar_t
9601 // is implemented as an unsigned type.
9602 GTEST_API_ void PrintTo(wchar_t wc, ::std::ostream* os);
9604 // Overloads for C strings.
9605 GTEST_API_ void PrintTo(const char* s, ::std::ostream* os);
9606 inline void PrintTo(char* s, ::std::ostream* os) {
9607 PrintTo(ImplicitCast_<const char*>(s), os);
9610 // signed/unsigned char is often used for representing binary data, so
9611 // we print pointers to it as void* to be safe.
9612 inline void PrintTo(const signed char* s, ::std::ostream* os) {
9613 PrintTo(ImplicitCast_<const void*>(s), os);
9615 inline void PrintTo(signed char* s, ::std::ostream* os) {
9616 PrintTo(ImplicitCast_<const void*>(s), os);
9618 inline void PrintTo(const unsigned char* s, ::std::ostream* os) {
9619 PrintTo(ImplicitCast_<const void*>(s), os);
9621 inline void PrintTo(unsigned char* s, ::std::ostream* os) {
9622 PrintTo(ImplicitCast_<const void*>(s), os);
9625 // MSVC can be configured to define wchar_t as a typedef of unsigned
9626 // short. It defines _NATIVE_WCHAR_T_DEFINED when wchar_t is a native
9627 // type. When wchar_t is a typedef, defining an overload for const
9628 // wchar_t* would cause unsigned short* be printed as a wide string,
9629 // possibly causing invalid memory accesses.
9630 #if !defined(_MSC_VER) || defined(_NATIVE_WCHAR_T_DEFINED)
9631 // Overloads for wide C strings
9632 GTEST_API_ void PrintTo(const wchar_t* s, ::std::ostream* os);
9633 inline void PrintTo(wchar_t* s, ::std::ostream* os) {
9634 PrintTo(ImplicitCast_<const wchar_t*>(s), os);
9638 // Overload for C arrays. Multi-dimensional arrays are printed
9641 // Prints the given number of elements in an array, without printing
9642 // the curly braces.
9643 template <typename T>
9644 void PrintRawArrayTo(const T a[], size_t count, ::std::ostream* os) {
9645 UniversalPrint(a[0], os);
9646 for (size_t i = 1; i != count; i++) {
9648 UniversalPrint(a[i], os);
9652 // Overloads for ::string and ::std::string.
9653 #if GTEST_HAS_GLOBAL_STRING
9654 GTEST_API_ void PrintStringTo(const ::string&s, ::std::ostream* os);
9655 inline void PrintTo(const ::string& s, ::std::ostream* os) {
9656 PrintStringTo(s, os);
9658 #endif // GTEST_HAS_GLOBAL_STRING
9660 GTEST_API_ void PrintStringTo(const ::std::string&s, ::std::ostream* os);
9661 inline void PrintTo(const ::std::string& s, ::std::ostream* os) {
9662 PrintStringTo(s, os);
9665 // Overloads for ::wstring and ::std::wstring.
9666 #if GTEST_HAS_GLOBAL_WSTRING
9667 GTEST_API_ void PrintWideStringTo(const ::wstring&s, ::std::ostream* os);
9668 inline void PrintTo(const ::wstring& s, ::std::ostream* os) {
9669 PrintWideStringTo(s, os);
9671 #endif // GTEST_HAS_GLOBAL_WSTRING
9673 #if GTEST_HAS_STD_WSTRING
9674 GTEST_API_ void PrintWideStringTo(const ::std::wstring&s, ::std::ostream* os);
9675 inline void PrintTo(const ::std::wstring& s, ::std::ostream* os) {
9676 PrintWideStringTo(s, os);
9678 #endif // GTEST_HAS_STD_WSTRING
9680 #if GTEST_HAS_TR1_TUPLE
9681 // Overload for ::std::tr1::tuple. Needed for printing function arguments,
9682 // which are packed as tuples.
9684 // Helper function for printing a tuple. T must be instantiated with
9686 template <typename T>
9687 void PrintTupleTo(const T& t, ::std::ostream* os);
9689 // Overloaded PrintTo() for tuples of various arities. We support
9690 // tuples of up-to 10 fields. The following implementation works
9691 // regardless of whether tr1::tuple is implemented using the
9692 // non-standard variadic template feature or not.
9694 inline void PrintTo(const ::std::tr1::tuple<>& t, ::std::ostream* os) {
9695 PrintTupleTo(t, os);
9698 template <typename T1>
9699 void PrintTo(const ::std::tr1::tuple<T1>& t, ::std::ostream* os) {
9700 PrintTupleTo(t, os);
9703 template <typename T1, typename T2>
9704 void PrintTo(const ::std::tr1::tuple<T1, T2>& t, ::std::ostream* os) {
9705 PrintTupleTo(t, os);
9708 template <typename T1, typename T2, typename T3>
9709 void PrintTo(const ::std::tr1::tuple<T1, T2, T3>& t, ::std::ostream* os) {
9710 PrintTupleTo(t, os);
9713 template <typename T1, typename T2, typename T3, typename T4>
9714 void PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4>& t, ::std::ostream* os) {
9715 PrintTupleTo(t, os);
9718 template <typename T1, typename T2, typename T3, typename T4, typename T5>
9719 void PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4, T5>& t,
9720 ::std::ostream* os) {
9721 PrintTupleTo(t, os);
9724 template <typename T1, typename T2, typename T3, typename T4, typename T5,
9726 void PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4, T5, T6>& t,
9727 ::std::ostream* os) {
9728 PrintTupleTo(t, os);
9731 template <typename T1, typename T2, typename T3, typename T4, typename T5,
9732 typename T6, typename T7>
9733 void PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7>& t,
9734 ::std::ostream* os) {
9735 PrintTupleTo(t, os);
9738 template <typename T1, typename T2, typename T3, typename T4, typename T5,
9739 typename T6, typename T7, typename T8>
9740 void PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8>& t,
9741 ::std::ostream* os) {
9742 PrintTupleTo(t, os);
9745 template <typename T1, typename T2, typename T3, typename T4, typename T5,
9746 typename T6, typename T7, typename T8, typename T9>
9747 void PrintTo(const ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9>& t,
9748 ::std::ostream* os) {
9749 PrintTupleTo(t, os);
9752 template <typename T1, typename T2, typename T3, typename T4, typename T5,
9753 typename T6, typename T7, typename T8, typename T9, typename T10>
9755 const ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>& t,
9756 ::std::ostream* os) {
9757 PrintTupleTo(t, os);
9759 #endif // GTEST_HAS_TR1_TUPLE
9761 // Overload for std::pair.
9762 template <typename T1, typename T2>
9763 void PrintTo(const ::std::pair<T1, T2>& value, ::std::ostream* os) {
9765 // We cannot use UniversalPrint(value.first, os) here, as T1 may be
9766 // a reference type. The same for printing value.second.
9767 UniversalPrinter<T1>::Print(value.first, os);
9769 UniversalPrinter<T2>::Print(value.second, os);
9773 // Implements printing a non-reference type T by letting the compiler
9774 // pick the right overload of PrintTo() for T.
9775 template <typename T>
9776 class UniversalPrinter {
9778 // MSVC warns about adding const to a function type, so we want to
9779 // disable the warning.
9781 # pragma warning(push) // Saves the current warning state.
9782 # pragma warning(disable:4180) // Temporarily disables warning 4180.
9785 // Note: we deliberately don't call this PrintTo(), as that name
9786 // conflicts with ::testing::internal::PrintTo in the body of the
9788 static void Print(const T& value, ::std::ostream* os) {
9789 // By default, ::testing::internal::PrintTo() is used for printing
9792 // Thanks to Koenig look-up, if T is a class and has its own
9793 // PrintTo() function defined in its namespace, that function will
9794 // be visible here. Since it is more specific than the generic ones
9795 // in ::testing::internal, it will be picked by the compiler in the
9796 // following statement - exactly what we want.
9801 # pragma warning(pop) // Restores the warning state.
9805 // UniversalPrintArray(begin, len, os) prints an array of 'len'
9806 // elements, starting at address 'begin'.
9807 template <typename T>
9808 void UniversalPrintArray(const T* begin, size_t len, ::std::ostream* os) {
9813 const size_t kThreshold = 18;
9814 const size_t kChunkSize = 8;
9815 // If the array has more than kThreshold elements, we'll have to
9816 // omit some details by printing only the first and the last
9817 // kChunkSize elements.
9818 // TODO(wan@google.com): let the user control the threshold using a flag.
9819 if (len <= kThreshold) {
9820 PrintRawArrayTo(begin, len, os);
9822 PrintRawArrayTo(begin, kChunkSize, os);
9824 PrintRawArrayTo(begin + len - kChunkSize, kChunkSize, os);
9829 // This overload prints a (const) char array compactly.
9830 GTEST_API_ void UniversalPrintArray(
9831 const char* begin, size_t len, ::std::ostream* os);
9833 // This overload prints a (const) wchar_t array compactly.
9834 GTEST_API_ void UniversalPrintArray(
9835 const wchar_t* begin, size_t len, ::std::ostream* os);
9837 // Implements printing an array type T[N].
9838 template <typename T, size_t N>
9839 class UniversalPrinter<T[N]> {
9841 // Prints the given array, omitting some elements when there are too
9843 static void Print(const T (&a)[N], ::std::ostream* os) {
9844 UniversalPrintArray(a, N, os);
9848 // Implements printing a reference type T&.
9849 template <typename T>
9850 class UniversalPrinter<T&> {
9852 // MSVC warns about adding const to a function type, so we want to
9853 // disable the warning.
9855 # pragma warning(push) // Saves the current warning state.
9856 # pragma warning(disable:4180) // Temporarily disables warning 4180.
9859 static void Print(const T& value, ::std::ostream* os) {
9860 // Prints the address of the value. We use reinterpret_cast here
9861 // as static_cast doesn't compile when T is a function type.
9862 *os << "@" << reinterpret_cast<const void*>(&value) << " ";
9864 // Then prints the value itself.
9865 UniversalPrint(value, os);
9869 # pragma warning(pop) // Restores the warning state.
9873 // Prints a value tersely: for a reference type, the referenced value
9874 // (but not the address) is printed; for a (const) char pointer, the
9875 // NUL-terminated string (but not the pointer) is printed.
9877 template <typename T>
9878 class UniversalTersePrinter {
9880 static void Print(const T& value, ::std::ostream* os) {
9881 UniversalPrint(value, os);
9884 template <typename T>
9885 class UniversalTersePrinter<T&> {
9887 static void Print(const T& value, ::std::ostream* os) {
9888 UniversalPrint(value, os);
9891 template <typename T, size_t N>
9892 class UniversalTersePrinter<T[N]> {
9894 static void Print(const T (&value)[N], ::std::ostream* os) {
9895 UniversalPrinter<T[N]>::Print(value, os);
9899 class UniversalTersePrinter<const char*> {
9901 static void Print(const char* str, ::std::ostream* os) {
9905 UniversalPrint(string(str), os);
9910 class UniversalTersePrinter<char*> {
9912 static void Print(char* str, ::std::ostream* os) {
9913 UniversalTersePrinter<const char*>::Print(str, os);
9917 #if GTEST_HAS_STD_WSTRING
9919 class UniversalTersePrinter<const wchar_t*> {
9921 static void Print(const wchar_t* str, ::std::ostream* os) {
9925 UniversalPrint(::std::wstring(str), os);
9932 class UniversalTersePrinter<wchar_t*> {
9934 static void Print(wchar_t* str, ::std::ostream* os) {
9935 UniversalTersePrinter<const wchar_t*>::Print(str, os);
9939 template <typename T>
9940 void UniversalTersePrint(const T& value, ::std::ostream* os) {
9941 UniversalTersePrinter<T>::Print(value, os);
9944 // Prints a value using the type inferred by the compiler. The
9945 // difference between this and UniversalTersePrint() is that for a
9946 // (const) char pointer, this prints both the pointer and the
9947 // NUL-terminated string.
9948 template <typename T>
9949 void UniversalPrint(const T& value, ::std::ostream* os) {
9950 // A workarond for the bug in VC++ 7.1 that prevents us from instantiating
9951 // UniversalPrinter with T directly.
9953 UniversalPrinter<T1>::Print(value, os);
9956 #if GTEST_HAS_TR1_TUPLE
9957 typedef ::std::vector<string> Strings;
9959 // This helper template allows PrintTo() for tuples and
9960 // UniversalTersePrintTupleFieldsToStrings() to be defined by
9961 // induction on the number of tuple fields. The idea is that
9962 // TuplePrefixPrinter<N>::PrintPrefixTo(t, os) prints the first N
9963 // fields in tuple t, and can be defined in terms of
9964 // TuplePrefixPrinter<N - 1>.
9966 // The inductive case.
9968 struct TuplePrefixPrinter {
9969 // Prints the first N fields of a tuple.
9970 template <typename Tuple>
9971 static void PrintPrefixTo(const Tuple& t, ::std::ostream* os) {
9972 TuplePrefixPrinter<N - 1>::PrintPrefixTo(t, os);
9974 UniversalPrinter<typename ::std::tr1::tuple_element<N - 1, Tuple>::type>
9975 ::Print(::std::tr1::get<N - 1>(t), os);
9978 // Tersely prints the first N fields of a tuple to a string vector,
9979 // one element for each field.
9980 template <typename Tuple>
9981 static void TersePrintPrefixToStrings(const Tuple& t, Strings* strings) {
9982 TuplePrefixPrinter<N - 1>::TersePrintPrefixToStrings(t, strings);
9983 ::std::stringstream ss;
9984 UniversalTersePrint(::std::tr1::get<N - 1>(t), &ss);
9985 strings->push_back(ss.str());
9991 struct TuplePrefixPrinter<0> {
9992 template <typename Tuple>
9993 static void PrintPrefixTo(const Tuple&, ::std::ostream*) {}
9995 template <typename Tuple>
9996 static void TersePrintPrefixToStrings(const Tuple&, Strings*) {}
9998 // We have to specialize the entire TuplePrefixPrinter<> class
9999 // template here, even though the definition of
10000 // TersePrintPrefixToStrings() is the same as the generic version, as
10001 // Embarcadero (formerly CodeGear, formerly Borland) C++ doesn't
10002 // support specializing a method template of a class template.
10004 struct TuplePrefixPrinter<1> {
10005 template <typename Tuple>
10006 static void PrintPrefixTo(const Tuple& t, ::std::ostream* os) {
10007 UniversalPrinter<typename ::std::tr1::tuple_element<0, Tuple>::type>::
10008 Print(::std::tr1::get<0>(t), os);
10011 template <typename Tuple>
10012 static void TersePrintPrefixToStrings(const Tuple& t, Strings* strings) {
10013 ::std::stringstream ss;
10014 UniversalTersePrint(::std::tr1::get<0>(t), &ss);
10015 strings->push_back(ss.str());
10019 // Helper function for printing a tuple. T must be instantiated with
10021 template <typename T>
10022 void PrintTupleTo(const T& t, ::std::ostream* os) {
10024 TuplePrefixPrinter< ::std::tr1::tuple_size<T>::value>::
10025 PrintPrefixTo(t, os);
10029 // Prints the fields of a tuple tersely to a string vector, one
10030 // element for each field. See the comment before
10031 // UniversalTersePrint() for how we define "tersely".
10032 template <typename Tuple>
10033 Strings UniversalTersePrintTupleFieldsToStrings(const Tuple& value) {
10035 TuplePrefixPrinter< ::std::tr1::tuple_size<Tuple>::value>::
10036 TersePrintPrefixToStrings(value, &result);
10039 #endif // GTEST_HAS_TR1_TUPLE
10041 } // namespace internal
10043 template <typename T>
10044 ::std::string PrintToString(const T& value) {
10045 ::std::stringstream ss;
10046 internal::UniversalTersePrinter<T>::Print(value, &ss);
10050 } // namespace testing
10052 #endif // GTEST_INCLUDE_GTEST_GTEST_PRINTERS_H_
10054 #if GTEST_HAS_PARAM_TEST
10056 namespace testing {
10057 namespace internal {
10059 // INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
10061 // Outputs a message explaining invalid registration of different
10062 // fixture class for the same test case. This may happen when
10063 // TEST_P macro is used to define two tests with the same name
10064 // but in different namespaces.
10065 GTEST_API_ void ReportInvalidTestCaseType(const char* test_case_name,
10066 const char* file, int line);
10068 template <typename> class ParamGeneratorInterface;
10069 template <typename> class ParamGenerator;
10071 // Interface for iterating over elements provided by an implementation
10072 // of ParamGeneratorInterface<T>.
10073 template <typename T>
10074 class ParamIteratorInterface {
10076 virtual ~ParamIteratorInterface() {}
10077 // A pointer to the base generator instance.
10078 // Used only for the purposes of iterator comparison
10079 // to make sure that two iterators belong to the same generator.
10080 virtual const ParamGeneratorInterface<T>* BaseGenerator() const = 0;
10081 // Advances iterator to point to the next element
10082 // provided by the generator. The caller is responsible
10083 // for not calling Advance() on an iterator equal to
10084 // BaseGenerator()->End().
10085 virtual void Advance() = 0;
10086 // Clones the iterator object. Used for implementing copy semantics
10087 // of ParamIterator<T>.
10088 virtual ParamIteratorInterface* Clone() const = 0;
10089 // Dereferences the current iterator and provides (read-only) access
10090 // to the pointed value. It is the caller's responsibility not to call
10091 // Current() on an iterator equal to BaseGenerator()->End().
10092 // Used for implementing ParamGenerator<T>::operator*().
10093 virtual const T* Current() const = 0;
10094 // Determines whether the given iterator and other point to the same
10095 // element in the sequence generated by the generator.
10096 // Used for implementing ParamGenerator<T>::operator==().
10097 virtual bool Equals(const ParamIteratorInterface& other) const = 0;
10100 // Class iterating over elements provided by an implementation of
10101 // ParamGeneratorInterface<T>. It wraps ParamIteratorInterface<T>
10102 // and implements the const forward iterator concept.
10103 template <typename T>
10104 class ParamIterator {
10106 typedef T value_type;
10107 typedef const T& reference;
10108 typedef ptrdiff_t difference_type;
10110 // ParamIterator assumes ownership of the impl_ pointer.
10111 ParamIterator(const ParamIterator& other) : impl_(other.impl_->Clone()) {}
10112 ParamIterator& operator=(const ParamIterator& other) {
10113 if (this != &other)
10114 impl_.reset(other.impl_->Clone());
10118 const T& operator*() const { return *impl_->Current(); }
10119 const T* operator->() const { return impl_->Current(); }
10120 // Prefix version of operator++.
10121 ParamIterator& operator++() {
10125 // Postfix version of operator++.
10126 ParamIterator operator++(int /*unused*/) {
10127 ParamIteratorInterface<T>* clone = impl_->Clone();
10129 return ParamIterator(clone);
10131 bool operator==(const ParamIterator& other) const {
10132 return impl_.get() == other.impl_.get() || impl_->Equals(*other.impl_);
10134 bool operator!=(const ParamIterator& other) const {
10135 return !(*this == other);
10139 friend class ParamGenerator<T>;
10140 explicit ParamIterator(ParamIteratorInterface<T>* impl) : impl_(impl) {}
10141 scoped_ptr<ParamIteratorInterface<T> > impl_;
10144 // ParamGeneratorInterface<T> is the binary interface to access generators
10145 // defined in other translation units.
10146 template <typename T>
10147 class ParamGeneratorInterface {
10149 typedef T ParamType;
10151 virtual ~ParamGeneratorInterface() {}
10153 // Generator interface definition
10154 virtual ParamIteratorInterface<T>* Begin() const = 0;
10155 virtual ParamIteratorInterface<T>* End() const = 0;
10158 // Wraps ParamGeneratorInterface<T> and provides general generator syntax
10159 // compatible with the STL Container concept.
10160 // This class implements copy initialization semantics and the contained
10161 // ParamGeneratorInterface<T> instance is shared among all copies
10162 // of the original object. This is possible because that instance is immutable.
10163 template<typename T>
10164 class ParamGenerator {
10166 typedef ParamIterator<T> iterator;
10168 explicit ParamGenerator(ParamGeneratorInterface<T>* impl) : impl_(impl) {}
10169 ParamGenerator(const ParamGenerator& other) : impl_(other.impl_) {}
10171 ParamGenerator& operator=(const ParamGenerator& other) {
10172 impl_ = other.impl_;
10176 iterator begin() const { return iterator(impl_->Begin()); }
10177 iterator end() const { return iterator(impl_->End()); }
10180 linked_ptr<const ParamGeneratorInterface<T> > impl_;
10183 // Generates values from a range of two comparable values. Can be used to
10184 // generate sequences of user-defined types that implement operator+() and
10186 // This class is used in the Range() function.
10187 template <typename T, typename IncrementT>
10188 class RangeGenerator : public ParamGeneratorInterface<T> {
10190 RangeGenerator(T begin, T end, IncrementT step)
10191 : begin_(begin), end_(end),
10192 step_(step), end_index_(CalculateEndIndex(begin, end, step)) {}
10193 virtual ~RangeGenerator() {}
10195 virtual ParamIteratorInterface<T>* Begin() const {
10196 return new Iterator(this, begin_, 0, step_);
10198 virtual ParamIteratorInterface<T>* End() const {
10199 return new Iterator(this, end_, end_index_, step_);
10203 class Iterator : public ParamIteratorInterface<T> {
10205 Iterator(const ParamGeneratorInterface<T>* base, T value, int index,
10207 : base_(base), value_(value), index_(index), step_(step) {}
10208 virtual ~Iterator() {}
10210 virtual const ParamGeneratorInterface<T>* BaseGenerator() const {
10213 virtual void Advance() {
10214 value_ = value_ + step_;
10217 virtual ParamIteratorInterface<T>* Clone() const {
10218 return new Iterator(*this);
10220 virtual const T* Current() const { return &value_; }
10221 virtual bool Equals(const ParamIteratorInterface<T>& other) const {
10222 // Having the same base generator guarantees that the other
10223 // iterator is of the same type and we can downcast.
10224 GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
10225 << "The program attempted to compare iterators "
10226 << "from different generators." << std::endl;
10227 const int other_index =
10228 CheckedDowncastToActualType<const Iterator>(&other)->index_;
10229 return index_ == other_index;
10233 Iterator(const Iterator& other)
10234 : ParamIteratorInterface<T>(),
10235 base_(other.base_), value_(other.value_), index_(other.index_),
10236 step_(other.step_) {}
10238 // No implementation - assignment is unsupported.
10239 void operator=(const Iterator& other);
10241 const ParamGeneratorInterface<T>* const base_;
10244 const IncrementT step_;
10245 }; // class RangeGenerator::Iterator
10247 static int CalculateEndIndex(const T& begin,
10249 const IncrementT& step) {
10251 for (T i = begin; i < end; i = i + step)
10256 // No implementation - assignment is unsupported.
10257 void operator=(const RangeGenerator& other);
10261 const IncrementT step_;
10262 // The index for the end() iterator. All the elements in the generated
10263 // sequence are indexed (0-based) to aid iterator comparison.
10264 const int end_index_;
10265 }; // class RangeGenerator
10268 // Generates values from a pair of STL-style iterators. Used in the
10269 // ValuesIn() function. The elements are copied from the source range
10270 // since the source can be located on the stack, and the generator
10271 // is likely to persist beyond that stack frame.
10272 template <typename T>
10273 class ValuesInIteratorRangeGenerator : public ParamGeneratorInterface<T> {
10275 template <typename ForwardIterator>
10276 ValuesInIteratorRangeGenerator(ForwardIterator begin, ForwardIterator end)
10277 : container_(begin, end) {}
10278 virtual ~ValuesInIteratorRangeGenerator() {}
10280 virtual ParamIteratorInterface<T>* Begin() const {
10281 return new Iterator(this, container_.begin());
10283 virtual ParamIteratorInterface<T>* End() const {
10284 return new Iterator(this, container_.end());
10288 typedef typename ::std::vector<T> ContainerType;
10290 class Iterator : public ParamIteratorInterface<T> {
10292 Iterator(const ParamGeneratorInterface<T>* base,
10293 typename ContainerType::const_iterator iterator)
10294 : base_(base), iterator_(iterator) {}
10295 virtual ~Iterator() {}
10297 virtual const ParamGeneratorInterface<T>* BaseGenerator() const {
10300 virtual void Advance() {
10304 virtual ParamIteratorInterface<T>* Clone() const {
10305 return new Iterator(*this);
10307 // We need to use cached value referenced by iterator_ because *iterator_
10308 // can return a temporary object (and of type other then T), so just
10309 // having "return &*iterator_;" doesn't work.
10310 // value_ is updated here and not in Advance() because Advance()
10311 // can advance iterator_ beyond the end of the range, and we cannot
10312 // detect that fact. The client code, on the other hand, is
10313 // responsible for not calling Current() on an out-of-range iterator.
10314 virtual const T* Current() const {
10315 if (value_.get() == NULL)
10316 value_.reset(new T(*iterator_));
10317 return value_.get();
10319 virtual bool Equals(const ParamIteratorInterface<T>& other) const {
10320 // Having the same base generator guarantees that the other
10321 // iterator is of the same type and we can downcast.
10322 GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
10323 << "The program attempted to compare iterators "
10324 << "from different generators." << std::endl;
10325 return iterator_ ==
10326 CheckedDowncastToActualType<const Iterator>(&other)->iterator_;
10330 Iterator(const Iterator& other)
10331 // The explicit constructor call suppresses a false warning
10332 // emitted by gcc when supplied with the -Wextra option.
10333 : ParamIteratorInterface<T>(),
10334 base_(other.base_),
10335 iterator_(other.iterator_) {}
10337 const ParamGeneratorInterface<T>* const base_;
10338 typename ContainerType::const_iterator iterator_;
10339 // A cached value of *iterator_. We keep it here to allow access by
10340 // pointer in the wrapping iterator's operator->().
10341 // value_ needs to be mutable to be accessed in Current().
10342 // Use of scoped_ptr helps manage cached value's lifetime,
10343 // which is bound by the lifespan of the iterator itself.
10344 mutable scoped_ptr<const T> value_;
10345 }; // class ValuesInIteratorRangeGenerator::Iterator
10347 // No implementation - assignment is unsupported.
10348 void operator=(const ValuesInIteratorRangeGenerator& other);
10350 const ContainerType container_;
10351 }; // class ValuesInIteratorRangeGenerator
10353 // INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
10355 // Stores a parameter value and later creates tests parameterized with that
10357 template <class TestClass>
10358 class ParameterizedTestFactory : public TestFactoryBase {
10360 typedef typename TestClass::ParamType ParamType;
10361 explicit ParameterizedTestFactory(ParamType parameter) :
10362 parameter_(parameter) {}
10363 virtual Test* CreateTest() {
10364 TestClass::SetParam(¶meter_);
10365 return new TestClass();
10369 const ParamType parameter_;
10371 GTEST_DISALLOW_COPY_AND_ASSIGN_(ParameterizedTestFactory);
10374 // INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
10376 // TestMetaFactoryBase is a base class for meta-factories that create
10377 // test factories for passing into MakeAndRegisterTestInfo function.
10378 template <class ParamType>
10379 class TestMetaFactoryBase {
10381 virtual ~TestMetaFactoryBase() {}
10383 virtual TestFactoryBase* CreateTestFactory(ParamType parameter) = 0;
10386 // INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
10388 // TestMetaFactory creates test factories for passing into
10389 // MakeAndRegisterTestInfo function. Since MakeAndRegisterTestInfo receives
10390 // ownership of test factory pointer, same factory object cannot be passed
10391 // into that method twice. But ParameterizedTestCaseInfo is going to call
10392 // it for each Test/Parameter value combination. Thus it needs meta factory
10394 template <class TestCase>
10395 class TestMetaFactory
10396 : public TestMetaFactoryBase<typename TestCase::ParamType> {
10398 typedef typename TestCase::ParamType ParamType;
10400 TestMetaFactory() {}
10402 virtual TestFactoryBase* CreateTestFactory(ParamType parameter) {
10403 return new ParameterizedTestFactory<TestCase>(parameter);
10407 GTEST_DISALLOW_COPY_AND_ASSIGN_(TestMetaFactory);
10410 // INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
10412 // ParameterizedTestCaseInfoBase is a generic interface
10413 // to ParameterizedTestCaseInfo classes. ParameterizedTestCaseInfoBase
10414 // accumulates test information provided by TEST_P macro invocations
10415 // and generators provided by INSTANTIATE_TEST_CASE_P macro invocations
10416 // and uses that information to register all resulting test instances
10417 // in RegisterTests method. The ParameterizeTestCaseRegistry class holds
10418 // a collection of pointers to the ParameterizedTestCaseInfo objects
10419 // and calls RegisterTests() on each of them when asked.
10420 class ParameterizedTestCaseInfoBase {
10422 virtual ~ParameterizedTestCaseInfoBase() {}
10424 // Base part of test case name for display purposes.
10425 virtual const string& GetTestCaseName() const = 0;
10426 // Test case id to verify identity.
10427 virtual TypeId GetTestCaseTypeId() const = 0;
10428 // UnitTest class invokes this method to register tests in this
10429 // test case right before running them in RUN_ALL_TESTS macro.
10430 // This method should not be called more then once on any single
10431 // instance of a ParameterizedTestCaseInfoBase derived class.
10432 virtual void RegisterTests() = 0;
10435 ParameterizedTestCaseInfoBase() {}
10438 GTEST_DISALLOW_COPY_AND_ASSIGN_(ParameterizedTestCaseInfoBase);
10441 // INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
10443 // ParameterizedTestCaseInfo accumulates tests obtained from TEST_P
10444 // macro invocations for a particular test case and generators
10445 // obtained from INSTANTIATE_TEST_CASE_P macro invocations for that
10446 // test case. It registers tests with all values generated by all
10447 // generators when asked.
10448 template <class TestCase>
10449 class ParameterizedTestCaseInfo : public ParameterizedTestCaseInfoBase {
10451 // ParamType and GeneratorCreationFunc are private types but are required
10452 // for declarations of public methods AddTestPattern() and
10453 // AddTestCaseInstantiation().
10454 typedef typename TestCase::ParamType ParamType;
10455 // A function that returns an instance of appropriate generator type.
10456 typedef ParamGenerator<ParamType>(GeneratorCreationFunc)();
10458 explicit ParameterizedTestCaseInfo(const char* name)
10459 : test_case_name_(name) {}
10461 // Test case base name for display purposes.
10462 virtual const string& GetTestCaseName() const { return test_case_name_; }
10463 // Test case id to verify identity.
10464 virtual TypeId GetTestCaseTypeId() const { return GetTypeId<TestCase>(); }
10465 // TEST_P macro uses AddTestPattern() to record information
10466 // about a single test in a LocalTestInfo structure.
10467 // test_case_name is the base name of the test case (without invocation
10468 // prefix). test_base_name is the name of an individual test without
10469 // parameter index. For the test SequenceA/FooTest.DoBar/1 FooTest is
10470 // test case base name and DoBar is test base name.
10471 void AddTestPattern(const char* test_case_name,
10472 const char* test_base_name,
10473 TestMetaFactoryBase<ParamType>* meta_factory) {
10474 tests_.push_back(linked_ptr<TestInfo>(new TestInfo(test_case_name,
10478 // INSTANTIATE_TEST_CASE_P macro uses AddGenerator() to record information
10479 // about a generator.
10480 int AddTestCaseInstantiation(const string& instantiation_name,
10481 GeneratorCreationFunc* func,
10482 const char* /* file */,
10484 instantiations_.push_back(::std::make_pair(instantiation_name, func));
10485 return 0; // Return value used only to run this method in namespace scope.
10487 // UnitTest class invokes this method to register tests in this test case
10488 // test cases right before running tests in RUN_ALL_TESTS macro.
10489 // This method should not be called more then once on any single
10490 // instance of a ParameterizedTestCaseInfoBase derived class.
10491 // UnitTest has a guard to prevent from calling this method more then once.
10492 virtual void RegisterTests() {
10493 for (typename TestInfoContainer::iterator test_it = tests_.begin();
10494 test_it != tests_.end(); ++test_it) {
10495 linked_ptr<TestInfo> test_info = *test_it;
10496 for (typename InstantiationContainer::iterator gen_it =
10497 instantiations_.begin(); gen_it != instantiations_.end();
10499 const string& instantiation_name = gen_it->first;
10500 ParamGenerator<ParamType> generator((*gen_it->second)());
10502 Message test_case_name_stream;
10503 if ( !instantiation_name.empty() )
10504 test_case_name_stream << instantiation_name << "/";
10505 test_case_name_stream << test_info->test_case_base_name;
10508 for (typename ParamGenerator<ParamType>::iterator param_it =
10510 param_it != generator.end(); ++param_it, ++i) {
10511 Message test_name_stream;
10512 test_name_stream << test_info->test_base_name << "/" << i;
10513 MakeAndRegisterTestInfo(
10514 test_case_name_stream.GetString().c_str(),
10515 test_name_stream.GetString().c_str(),
10516 NULL, // No type parameter.
10517 PrintToString(*param_it).c_str(),
10518 GetTestCaseTypeId(),
10519 TestCase::SetUpTestCase,
10520 TestCase::TearDownTestCase,
10521 test_info->test_meta_factory->CreateTestFactory(*param_it));
10528 // LocalTestInfo structure keeps information about a single test registered
10529 // with TEST_P macro.
10531 TestInfo(const char* a_test_case_base_name,
10532 const char* a_test_base_name,
10533 TestMetaFactoryBase<ParamType>* a_test_meta_factory) :
10534 test_case_base_name(a_test_case_base_name),
10535 test_base_name(a_test_base_name),
10536 test_meta_factory(a_test_meta_factory) {}
10538 const string test_case_base_name;
10539 const string test_base_name;
10540 const scoped_ptr<TestMetaFactoryBase<ParamType> > test_meta_factory;
10542 typedef ::std::vector<linked_ptr<TestInfo> > TestInfoContainer;
10543 // Keeps pairs of <Instantiation name, Sequence generator creation function>
10544 // received from INSTANTIATE_TEST_CASE_P macros.
10545 typedef ::std::vector<std::pair<string, GeneratorCreationFunc*> >
10546 InstantiationContainer;
10548 const string test_case_name_;
10549 TestInfoContainer tests_;
10550 InstantiationContainer instantiations_;
10552 GTEST_DISALLOW_COPY_AND_ASSIGN_(ParameterizedTestCaseInfo);
10553 }; // class ParameterizedTestCaseInfo
10555 // INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
10557 // ParameterizedTestCaseRegistry contains a map of ParameterizedTestCaseInfoBase
10558 // classes accessed by test case names. TEST_P and INSTANTIATE_TEST_CASE_P
10559 // macros use it to locate their corresponding ParameterizedTestCaseInfo
10561 class ParameterizedTestCaseRegistry {
10563 ParameterizedTestCaseRegistry() {}
10564 ~ParameterizedTestCaseRegistry() {
10565 for (TestCaseInfoContainer::iterator it = test_case_infos_.begin();
10566 it != test_case_infos_.end(); ++it) {
10571 // Looks up or creates and returns a structure containing information about
10572 // tests and instantiations of a particular test case.
10573 template <class TestCase>
10574 ParameterizedTestCaseInfo<TestCase>* GetTestCasePatternHolder(
10575 const char* test_case_name,
10578 ParameterizedTestCaseInfo<TestCase>* typed_test_info = NULL;
10579 for (TestCaseInfoContainer::iterator it = test_case_infos_.begin();
10580 it != test_case_infos_.end(); ++it) {
10581 if ((*it)->GetTestCaseName() == test_case_name) {
10582 if ((*it)->GetTestCaseTypeId() != GetTypeId<TestCase>()) {
10583 // Complain about incorrect usage of Google Test facilities
10584 // and terminate the program since we cannot guaranty correct
10585 // test case setup and tear-down in this case.
10586 ReportInvalidTestCaseType(test_case_name, file, line);
10589 // At this point we are sure that the object we found is of the same
10590 // type we are looking for, so we downcast it to that type
10591 // without further checks.
10592 typed_test_info = CheckedDowncastToActualType<
10593 ParameterizedTestCaseInfo<TestCase> >(*it);
10598 if (typed_test_info == NULL) {
10599 typed_test_info = new ParameterizedTestCaseInfo<TestCase>(test_case_name);
10600 test_case_infos_.push_back(typed_test_info);
10602 return typed_test_info;
10604 void RegisterTests() {
10605 for (TestCaseInfoContainer::iterator it = test_case_infos_.begin();
10606 it != test_case_infos_.end(); ++it) {
10607 (*it)->RegisterTests();
10612 typedef ::std::vector<ParameterizedTestCaseInfoBase*> TestCaseInfoContainer;
10614 TestCaseInfoContainer test_case_infos_;
10616 GTEST_DISALLOW_COPY_AND_ASSIGN_(ParameterizedTestCaseRegistry);
10619 } // namespace internal
10620 } // namespace testing
10622 #endif // GTEST_HAS_PARAM_TEST
10624 #endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_H_
10625 // This file was GENERATED by command:
10626 // pump.py gtest-param-util-generated.h.pump
10627 // DO NOT EDIT BY HAND!!!
10629 // Copyright 2008 Google Inc.
10630 // All Rights Reserved.
10632 // Redistribution and use in source and binary forms, with or without
10633 // modification, are permitted provided that the following conditions are
10636 // * Redistributions of source code must retain the above copyright
10637 // notice, this list of conditions and the following disclaimer.
10638 // * Redistributions in binary form must reproduce the above
10639 // copyright notice, this list of conditions and the following disclaimer
10640 // in the documentation and/or other materials provided with the
10642 // * Neither the name of Google Inc. nor the names of its
10643 // contributors may be used to endorse or promote products derived from
10644 // this software without specific prior written permission.
10646 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
10647 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
10648 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
10649 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
10650 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
10651 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
10652 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
10653 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
10654 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
10655 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
10656 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
10658 // Author: vladl@google.com (Vlad Losev)
10660 // Type and function utilities for implementing parameterized tests.
10661 // This file is generated by a SCRIPT. DO NOT EDIT BY HAND!
10663 // Currently Google Test supports at most 50 arguments in Values,
10664 // and at most 10 arguments in Combine. Please contact
10665 // googletestframework@googlegroups.com if you need more.
10666 // Please note that the number of arguments to Combine is limited
10667 // by the maximum arity of the implementation of tr1::tuple which is
10668 // currently set at 10.
10670 #ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_GENERATED_H_
10671 #define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_GENERATED_H_
10673 // scripts/fuse_gtest.py depends on gtest's own header being #included
10674 // *unconditionally*. Therefore these #includes cannot be moved
10675 // inside #if GTEST_HAS_PARAM_TEST.
10677 #if GTEST_HAS_PARAM_TEST
10679 namespace testing {
10681 // Forward declarations of ValuesIn(), which is implemented in
10682 // include/gtest/gtest-param-test.h.
10683 template <typename ForwardIterator>
10684 internal::ParamGenerator<
10685 typename ::testing::internal::IteratorTraits<ForwardIterator>::value_type>
10686 ValuesIn(ForwardIterator begin, ForwardIterator end);
10688 template <typename T, size_t N>
10689 internal::ParamGenerator<T> ValuesIn(const T (&array)[N]);
10691 template <class Container>
10692 internal::ParamGenerator<typename Container::value_type> ValuesIn(
10693 const Container& container);
10695 namespace internal {
10697 // Used in the Values() function to provide polymorphic capabilities.
10698 template <typename T1>
10699 class ValueArray1 {
10701 explicit ValueArray1(T1 v1) : v1_(v1) {}
10703 template <typename T>
10704 operator ParamGenerator<T>() const { return ValuesIn(&v1_, &v1_ + 1); }
10707 // No implementation - assignment is unsupported.
10708 void operator=(const ValueArray1& other);
10713 template <typename T1, typename T2>
10714 class ValueArray2 {
10716 ValueArray2(T1 v1, T2 v2) : v1_(v1), v2_(v2) {}
10718 template <typename T>
10719 operator ParamGenerator<T>() const {
10720 const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_)};
10721 return ValuesIn(array);
10725 // No implementation - assignment is unsupported.
10726 void operator=(const ValueArray2& other);
10732 template <typename T1, typename T2, typename T3>
10733 class ValueArray3 {
10735 ValueArray3(T1 v1, T2 v2, T3 v3) : v1_(v1), v2_(v2), v3_(v3) {}
10737 template <typename T>
10738 operator ParamGenerator<T>() const {
10739 const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
10740 static_cast<T>(v3_)};
10741 return ValuesIn(array);
10745 // No implementation - assignment is unsupported.
10746 void operator=(const ValueArray3& other);
10753 template <typename T1, typename T2, typename T3, typename T4>
10754 class ValueArray4 {
10756 ValueArray4(T1 v1, T2 v2, T3 v3, T4 v4) : v1_(v1), v2_(v2), v3_(v3),
10759 template <typename T>
10760 operator ParamGenerator<T>() const {
10761 const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
10762 static_cast<T>(v3_), static_cast<T>(v4_)};
10763 return ValuesIn(array);
10767 // No implementation - assignment is unsupported.
10768 void operator=(const ValueArray4& other);
10776 template <typename T1, typename T2, typename T3, typename T4, typename T5>
10777 class ValueArray5 {
10779 ValueArray5(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5) : v1_(v1), v2_(v2), v3_(v3),
10780 v4_(v4), v5_(v5) {}
10782 template <typename T>
10783 operator ParamGenerator<T>() const {
10784 const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
10785 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_)};
10786 return ValuesIn(array);
10790 // No implementation - assignment is unsupported.
10791 void operator=(const ValueArray5& other);
10800 template <typename T1, typename T2, typename T3, typename T4, typename T5,
10802 class ValueArray6 {
10804 ValueArray6(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6) : v1_(v1), v2_(v2),
10805 v3_(v3), v4_(v4), v5_(v5), v6_(v6) {}
10807 template <typename T>
10808 operator ParamGenerator<T>() const {
10809 const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
10810 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
10811 static_cast<T>(v6_)};
10812 return ValuesIn(array);
10816 // No implementation - assignment is unsupported.
10817 void operator=(const ValueArray6& other);
10827 template <typename T1, typename T2, typename T3, typename T4, typename T5,
10828 typename T6, typename T7>
10829 class ValueArray7 {
10831 ValueArray7(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7) : v1_(v1),
10832 v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7) {}
10834 template <typename T>
10835 operator ParamGenerator<T>() const {
10836 const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
10837 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
10838 static_cast<T>(v6_), static_cast<T>(v7_)};
10839 return ValuesIn(array);
10843 // No implementation - assignment is unsupported.
10844 void operator=(const ValueArray7& other);
10855 template <typename T1, typename T2, typename T3, typename T4, typename T5,
10856 typename T6, typename T7, typename T8>
10857 class ValueArray8 {
10859 ValueArray8(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7,
10860 T8 v8) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),
10863 template <typename T>
10864 operator ParamGenerator<T>() const {
10865 const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
10866 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
10867 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_)};
10868 return ValuesIn(array);
10872 // No implementation - assignment is unsupported.
10873 void operator=(const ValueArray8& other);
10885 template <typename T1, typename T2, typename T3, typename T4, typename T5,
10886 typename T6, typename T7, typename T8, typename T9>
10887 class ValueArray9 {
10889 ValueArray9(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8,
10890 T9 v9) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),
10891 v8_(v8), v9_(v9) {}
10893 template <typename T>
10894 operator ParamGenerator<T>() const {
10895 const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
10896 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
10897 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
10898 static_cast<T>(v9_)};
10899 return ValuesIn(array);
10903 // No implementation - assignment is unsupported.
10904 void operator=(const ValueArray9& other);
10917 template <typename T1, typename T2, typename T3, typename T4, typename T5,
10918 typename T6, typename T7, typename T8, typename T9, typename T10>
10919 class ValueArray10 {
10921 ValueArray10(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
10922 T10 v10) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),
10923 v8_(v8), v9_(v9), v10_(v10) {}
10925 template <typename T>
10926 operator ParamGenerator<T>() const {
10927 const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
10928 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
10929 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
10930 static_cast<T>(v9_), static_cast<T>(v10_)};
10931 return ValuesIn(array);
10935 // No implementation - assignment is unsupported.
10936 void operator=(const ValueArray10& other);
10950 template <typename T1, typename T2, typename T3, typename T4, typename T5,
10951 typename T6, typename T7, typename T8, typename T9, typename T10,
10953 class ValueArray11 {
10955 ValueArray11(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
10956 T10 v10, T11 v11) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6),
10957 v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11) {}
10959 template <typename T>
10960 operator ParamGenerator<T>() const {
10961 const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
10962 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
10963 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
10964 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_)};
10965 return ValuesIn(array);
10969 // No implementation - assignment is unsupported.
10970 void operator=(const ValueArray11& other);
10985 template <typename T1, typename T2, typename T3, typename T4, typename T5,
10986 typename T6, typename T7, typename T8, typename T9, typename T10,
10987 typename T11, typename T12>
10988 class ValueArray12 {
10990 ValueArray12(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
10991 T10 v10, T11 v11, T12 v12) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5),
10992 v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12) {}
10994 template <typename T>
10995 operator ParamGenerator<T>() const {
10996 const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
10997 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
10998 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
10999 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
11000 static_cast<T>(v12_)};
11001 return ValuesIn(array);
11005 // No implementation - assignment is unsupported.
11006 void operator=(const ValueArray12& other);
11022 template <typename T1, typename T2, typename T3, typename T4, typename T5,
11023 typename T6, typename T7, typename T8, typename T9, typename T10,
11024 typename T11, typename T12, typename T13>
11025 class ValueArray13 {
11027 ValueArray13(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
11028 T10 v10, T11 v11, T12 v12, T13 v13) : v1_(v1), v2_(v2), v3_(v3), v4_(v4),
11029 v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11),
11030 v12_(v12), v13_(v13) {}
11032 template <typename T>
11033 operator ParamGenerator<T>() const {
11034 const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
11035 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
11036 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
11037 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
11038 static_cast<T>(v12_), static_cast<T>(v13_)};
11039 return ValuesIn(array);
11043 // No implementation - assignment is unsupported.
11044 void operator=(const ValueArray13& other);
11061 template <typename T1, typename T2, typename T3, typename T4, typename T5,
11062 typename T6, typename T7, typename T8, typename T9, typename T10,
11063 typename T11, typename T12, typename T13, typename T14>
11064 class ValueArray14 {
11066 ValueArray14(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
11067 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14) : v1_(v1), v2_(v2), v3_(v3),
11068 v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10),
11069 v11_(v11), v12_(v12), v13_(v13), v14_(v14) {}
11071 template <typename T>
11072 operator ParamGenerator<T>() const {
11073 const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
11074 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
11075 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
11076 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
11077 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_)};
11078 return ValuesIn(array);
11082 // No implementation - assignment is unsupported.
11083 void operator=(const ValueArray14& other);
11101 template <typename T1, typename T2, typename T3, typename T4, typename T5,
11102 typename T6, typename T7, typename T8, typename T9, typename T10,
11103 typename T11, typename T12, typename T13, typename T14, typename T15>
11104 class ValueArray15 {
11106 ValueArray15(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
11107 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15) : v1_(v1), v2_(v2),
11108 v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10),
11109 v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15) {}
11111 template <typename T>
11112 operator ParamGenerator<T>() const {
11113 const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
11114 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
11115 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
11116 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
11117 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
11118 static_cast<T>(v15_)};
11119 return ValuesIn(array);
11123 // No implementation - assignment is unsupported.
11124 void operator=(const ValueArray15& other);
11143 template <typename T1, typename T2, typename T3, typename T4, typename T5,
11144 typename T6, typename T7, typename T8, typename T9, typename T10,
11145 typename T11, typename T12, typename T13, typename T14, typename T15,
11147 class ValueArray16 {
11149 ValueArray16(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
11150 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16) : v1_(v1),
11151 v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9),
11152 v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15),
11155 template <typename T>
11156 operator ParamGenerator<T>() const {
11157 const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
11158 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
11159 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
11160 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
11161 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
11162 static_cast<T>(v15_), static_cast<T>(v16_)};
11163 return ValuesIn(array);
11167 // No implementation - assignment is unsupported.
11168 void operator=(const ValueArray16& other);
11188 template <typename T1, typename T2, typename T3, typename T4, typename T5,
11189 typename T6, typename T7, typename T8, typename T9, typename T10,
11190 typename T11, typename T12, typename T13, typename T14, typename T15,
11191 typename T16, typename T17>
11192 class ValueArray17 {
11194 ValueArray17(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
11195 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16,
11196 T17 v17) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),
11197 v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14),
11198 v15_(v15), v16_(v16), v17_(v17) {}
11200 template <typename T>
11201 operator ParamGenerator<T>() const {
11202 const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
11203 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
11204 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
11205 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
11206 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
11207 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_)};
11208 return ValuesIn(array);
11212 // No implementation - assignment is unsupported.
11213 void operator=(const ValueArray17& other);
11234 template <typename T1, typename T2, typename T3, typename T4, typename T5,
11235 typename T6, typename T7, typename T8, typename T9, typename T10,
11236 typename T11, typename T12, typename T13, typename T14, typename T15,
11237 typename T16, typename T17, typename T18>
11238 class ValueArray18 {
11240 ValueArray18(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
11241 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
11242 T18 v18) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),
11243 v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14),
11244 v15_(v15), v16_(v16), v17_(v17), v18_(v18) {}
11246 template <typename T>
11247 operator ParamGenerator<T>() const {
11248 const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
11249 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
11250 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
11251 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
11252 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
11253 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),
11254 static_cast<T>(v18_)};
11255 return ValuesIn(array);
11259 // No implementation - assignment is unsupported.
11260 void operator=(const ValueArray18& other);
11282 template <typename T1, typename T2, typename T3, typename T4, typename T5,
11283 typename T6, typename T7, typename T8, typename T9, typename T10,
11284 typename T11, typename T12, typename T13, typename T14, typename T15,
11285 typename T16, typename T17, typename T18, typename T19>
11286 class ValueArray19 {
11288 ValueArray19(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
11289 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
11290 T18 v18, T19 v19) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6),
11291 v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13),
11292 v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19) {}
11294 template <typename T>
11295 operator ParamGenerator<T>() const {
11296 const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
11297 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
11298 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
11299 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
11300 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
11301 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),
11302 static_cast<T>(v18_), static_cast<T>(v19_)};
11303 return ValuesIn(array);
11307 // No implementation - assignment is unsupported.
11308 void operator=(const ValueArray19& other);
11331 template <typename T1, typename T2, typename T3, typename T4, typename T5,
11332 typename T6, typename T7, typename T8, typename T9, typename T10,
11333 typename T11, typename T12, typename T13, typename T14, typename T15,
11334 typename T16, typename T17, typename T18, typename T19, typename T20>
11335 class ValueArray20 {
11337 ValueArray20(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
11338 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
11339 T18 v18, T19 v19, T20 v20) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5),
11340 v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12),
11341 v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18),
11342 v19_(v19), v20_(v20) {}
11344 template <typename T>
11345 operator ParamGenerator<T>() const {
11346 const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
11347 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
11348 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
11349 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
11350 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
11351 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),
11352 static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_)};
11353 return ValuesIn(array);
11357 // No implementation - assignment is unsupported.
11358 void operator=(const ValueArray20& other);
11382 template <typename T1, typename T2, typename T3, typename T4, typename T5,
11383 typename T6, typename T7, typename T8, typename T9, typename T10,
11384 typename T11, typename T12, typename T13, typename T14, typename T15,
11385 typename T16, typename T17, typename T18, typename T19, typename T20,
11387 class ValueArray21 {
11389 ValueArray21(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
11390 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
11391 T18 v18, T19 v19, T20 v20, T21 v21) : v1_(v1), v2_(v2), v3_(v3), v4_(v4),
11392 v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11),
11393 v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17),
11394 v18_(v18), v19_(v19), v20_(v20), v21_(v21) {}
11396 template <typename T>
11397 operator ParamGenerator<T>() const {
11398 const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
11399 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
11400 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
11401 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
11402 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
11403 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),
11404 static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),
11405 static_cast<T>(v21_)};
11406 return ValuesIn(array);
11410 // No implementation - assignment is unsupported.
11411 void operator=(const ValueArray21& other);
11436 template <typename T1, typename T2, typename T3, typename T4, typename T5,
11437 typename T6, typename T7, typename T8, typename T9, typename T10,
11438 typename T11, typename T12, typename T13, typename T14, typename T15,
11439 typename T16, typename T17, typename T18, typename T19, typename T20,
11440 typename T21, typename T22>
11441 class ValueArray22 {
11443 ValueArray22(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
11444 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
11445 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22) : v1_(v1), v2_(v2), v3_(v3),
11446 v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10),
11447 v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16),
11448 v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22) {}
11450 template <typename T>
11451 operator ParamGenerator<T>() const {
11452 const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
11453 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
11454 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
11455 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
11456 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
11457 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),
11458 static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),
11459 static_cast<T>(v21_), static_cast<T>(v22_)};
11460 return ValuesIn(array);
11464 // No implementation - assignment is unsupported.
11465 void operator=(const ValueArray22& other);
11491 template <typename T1, typename T2, typename T3, typename T4, typename T5,
11492 typename T6, typename T7, typename T8, typename T9, typename T10,
11493 typename T11, typename T12, typename T13, typename T14, typename T15,
11494 typename T16, typename T17, typename T18, typename T19, typename T20,
11495 typename T21, typename T22, typename T23>
11496 class ValueArray23 {
11498 ValueArray23(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
11499 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
11500 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23) : v1_(v1), v2_(v2),
11501 v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10),
11502 v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16),
11503 v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22),
11506 template <typename T>
11507 operator ParamGenerator<T>() const {
11508 const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
11509 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
11510 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
11511 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
11512 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
11513 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),
11514 static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),
11515 static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_)};
11516 return ValuesIn(array);
11520 // No implementation - assignment is unsupported.
11521 void operator=(const ValueArray23& other);
11548 template <typename T1, typename T2, typename T3, typename T4, typename T5,
11549 typename T6, typename T7, typename T8, typename T9, typename T10,
11550 typename T11, typename T12, typename T13, typename T14, typename T15,
11551 typename T16, typename T17, typename T18, typename T19, typename T20,
11552 typename T21, typename T22, typename T23, typename T24>
11553 class ValueArray24 {
11555 ValueArray24(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
11556 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
11557 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24) : v1_(v1),
11558 v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9),
11559 v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15),
11560 v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21),
11561 v22_(v22), v23_(v23), v24_(v24) {}
11563 template <typename T>
11564 operator ParamGenerator<T>() const {
11565 const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
11566 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
11567 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
11568 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
11569 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
11570 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),
11571 static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),
11572 static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),
11573 static_cast<T>(v24_)};
11574 return ValuesIn(array);
11578 // No implementation - assignment is unsupported.
11579 void operator=(const ValueArray24& other);
11607 template <typename T1, typename T2, typename T3, typename T4, typename T5,
11608 typename T6, typename T7, typename T8, typename T9, typename T10,
11609 typename T11, typename T12, typename T13, typename T14, typename T15,
11610 typename T16, typename T17, typename T18, typename T19, typename T20,
11611 typename T21, typename T22, typename T23, typename T24, typename T25>
11612 class ValueArray25 {
11614 ValueArray25(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
11615 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
11616 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24,
11617 T25 v25) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),
11618 v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14),
11619 v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20),
11620 v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25) {}
11622 template <typename T>
11623 operator ParamGenerator<T>() const {
11624 const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
11625 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
11626 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
11627 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
11628 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
11629 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),
11630 static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),
11631 static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),
11632 static_cast<T>(v24_), static_cast<T>(v25_)};
11633 return ValuesIn(array);
11637 // No implementation - assignment is unsupported.
11638 void operator=(const ValueArray25& other);
11667 template <typename T1, typename T2, typename T3, typename T4, typename T5,
11668 typename T6, typename T7, typename T8, typename T9, typename T10,
11669 typename T11, typename T12, typename T13, typename T14, typename T15,
11670 typename T16, typename T17, typename T18, typename T19, typename T20,
11671 typename T21, typename T22, typename T23, typename T24, typename T25,
11673 class ValueArray26 {
11675 ValueArray26(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
11676 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
11677 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
11678 T26 v26) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),
11679 v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14),
11680 v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20),
11681 v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26) {}
11683 template <typename T>
11684 operator ParamGenerator<T>() const {
11685 const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
11686 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
11687 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
11688 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
11689 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
11690 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),
11691 static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),
11692 static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),
11693 static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_)};
11694 return ValuesIn(array);
11698 // No implementation - assignment is unsupported.
11699 void operator=(const ValueArray26& other);
11729 template <typename T1, typename T2, typename T3, typename T4, typename T5,
11730 typename T6, typename T7, typename T8, typename T9, typename T10,
11731 typename T11, typename T12, typename T13, typename T14, typename T15,
11732 typename T16, typename T17, typename T18, typename T19, typename T20,
11733 typename T21, typename T22, typename T23, typename T24, typename T25,
11734 typename T26, typename T27>
11735 class ValueArray27 {
11737 ValueArray27(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
11738 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
11739 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
11740 T26 v26, T27 v27) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6),
11741 v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13),
11742 v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19),
11743 v20_(v20), v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25),
11744 v26_(v26), v27_(v27) {}
11746 template <typename T>
11747 operator ParamGenerator<T>() const {
11748 const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
11749 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
11750 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
11751 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
11752 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
11753 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),
11754 static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),
11755 static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),
11756 static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),
11757 static_cast<T>(v27_)};
11758 return ValuesIn(array);
11762 // No implementation - assignment is unsupported.
11763 void operator=(const ValueArray27& other);
11794 template <typename T1, typename T2, typename T3, typename T4, typename T5,
11795 typename T6, typename T7, typename T8, typename T9, typename T10,
11796 typename T11, typename T12, typename T13, typename T14, typename T15,
11797 typename T16, typename T17, typename T18, typename T19, typename T20,
11798 typename T21, typename T22, typename T23, typename T24, typename T25,
11799 typename T26, typename T27, typename T28>
11800 class ValueArray28 {
11802 ValueArray28(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
11803 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
11804 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
11805 T26 v26, T27 v27, T28 v28) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5),
11806 v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12),
11807 v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18),
11808 v19_(v19), v20_(v20), v21_(v21), v22_(v22), v23_(v23), v24_(v24),
11809 v25_(v25), v26_(v26), v27_(v27), v28_(v28) {}
11811 template <typename T>
11812 operator ParamGenerator<T>() const {
11813 const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
11814 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
11815 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
11816 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
11817 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
11818 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),
11819 static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),
11820 static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),
11821 static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),
11822 static_cast<T>(v27_), static_cast<T>(v28_)};
11823 return ValuesIn(array);
11827 // No implementation - assignment is unsupported.
11828 void operator=(const ValueArray28& other);
11860 template <typename T1, typename T2, typename T3, typename T4, typename T5,
11861 typename T6, typename T7, typename T8, typename T9, typename T10,
11862 typename T11, typename T12, typename T13, typename T14, typename T15,
11863 typename T16, typename T17, typename T18, typename T19, typename T20,
11864 typename T21, typename T22, typename T23, typename T24, typename T25,
11865 typename T26, typename T27, typename T28, typename T29>
11866 class ValueArray29 {
11868 ValueArray29(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
11869 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
11870 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
11871 T26 v26, T27 v27, T28 v28, T29 v29) : v1_(v1), v2_(v2), v3_(v3), v4_(v4),
11872 v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11),
11873 v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17),
11874 v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22), v23_(v23),
11875 v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28), v29_(v29) {}
11877 template <typename T>
11878 operator ParamGenerator<T>() const {
11879 const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
11880 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
11881 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
11882 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
11883 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
11884 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),
11885 static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),
11886 static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),
11887 static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),
11888 static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_)};
11889 return ValuesIn(array);
11893 // No implementation - assignment is unsupported.
11894 void operator=(const ValueArray29& other);
11927 template <typename T1, typename T2, typename T3, typename T4, typename T5,
11928 typename T6, typename T7, typename T8, typename T9, typename T10,
11929 typename T11, typename T12, typename T13, typename T14, typename T15,
11930 typename T16, typename T17, typename T18, typename T19, typename T20,
11931 typename T21, typename T22, typename T23, typename T24, typename T25,
11932 typename T26, typename T27, typename T28, typename T29, typename T30>
11933 class ValueArray30 {
11935 ValueArray30(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
11936 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
11937 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
11938 T26 v26, T27 v27, T28 v28, T29 v29, T30 v30) : v1_(v1), v2_(v2), v3_(v3),
11939 v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10),
11940 v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16),
11941 v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22),
11942 v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28),
11943 v29_(v29), v30_(v30) {}
11945 template <typename T>
11946 operator ParamGenerator<T>() const {
11947 const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
11948 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
11949 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
11950 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
11951 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
11952 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),
11953 static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),
11954 static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),
11955 static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),
11956 static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_),
11957 static_cast<T>(v30_)};
11958 return ValuesIn(array);
11962 // No implementation - assignment is unsupported.
11963 void operator=(const ValueArray30& other);
11997 template <typename T1, typename T2, typename T3, typename T4, typename T5,
11998 typename T6, typename T7, typename T8, typename T9, typename T10,
11999 typename T11, typename T12, typename T13, typename T14, typename T15,
12000 typename T16, typename T17, typename T18, typename T19, typename T20,
12001 typename T21, typename T22, typename T23, typename T24, typename T25,
12002 typename T26, typename T27, typename T28, typename T29, typename T30,
12004 class ValueArray31 {
12006 ValueArray31(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
12007 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
12008 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
12009 T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31) : v1_(v1), v2_(v2),
12010 v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10),
12011 v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16),
12012 v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22),
12013 v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28),
12014 v29_(v29), v30_(v30), v31_(v31) {}
12016 template <typename T>
12017 operator ParamGenerator<T>() const {
12018 const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
12019 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
12020 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
12021 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
12022 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
12023 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),
12024 static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),
12025 static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),
12026 static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),
12027 static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_),
12028 static_cast<T>(v30_), static_cast<T>(v31_)};
12029 return ValuesIn(array);
12033 // No implementation - assignment is unsupported.
12034 void operator=(const ValueArray31& other);
12069 template <typename T1, typename T2, typename T3, typename T4, typename T5,
12070 typename T6, typename T7, typename T8, typename T9, typename T10,
12071 typename T11, typename T12, typename T13, typename T14, typename T15,
12072 typename T16, typename T17, typename T18, typename T19, typename T20,
12073 typename T21, typename T22, typename T23, typename T24, typename T25,
12074 typename T26, typename T27, typename T28, typename T29, typename T30,
12075 typename T31, typename T32>
12076 class ValueArray32 {
12078 ValueArray32(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
12079 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
12080 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
12081 T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32) : v1_(v1),
12082 v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9),
12083 v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15),
12084 v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21),
12085 v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27),
12086 v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32) {}
12088 template <typename T>
12089 operator ParamGenerator<T>() const {
12090 const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
12091 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
12092 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
12093 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
12094 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
12095 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),
12096 static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),
12097 static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),
12098 static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),
12099 static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_),
12100 static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_)};
12101 return ValuesIn(array);
12105 // No implementation - assignment is unsupported.
12106 void operator=(const ValueArray32& other);
12142 template <typename T1, typename T2, typename T3, typename T4, typename T5,
12143 typename T6, typename T7, typename T8, typename T9, typename T10,
12144 typename T11, typename T12, typename T13, typename T14, typename T15,
12145 typename T16, typename T17, typename T18, typename T19, typename T20,
12146 typename T21, typename T22, typename T23, typename T24, typename T25,
12147 typename T26, typename T27, typename T28, typename T29, typename T30,
12148 typename T31, typename T32, typename T33>
12149 class ValueArray33 {
12151 ValueArray33(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
12152 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
12153 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
12154 T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32,
12155 T33 v33) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),
12156 v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14),
12157 v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20),
12158 v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26),
12159 v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32),
12162 template <typename T>
12163 operator ParamGenerator<T>() const {
12164 const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
12165 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
12166 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
12167 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
12168 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
12169 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),
12170 static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),
12171 static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),
12172 static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),
12173 static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_),
12174 static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_),
12175 static_cast<T>(v33_)};
12176 return ValuesIn(array);
12180 // No implementation - assignment is unsupported.
12181 void operator=(const ValueArray33& other);
12218 template <typename T1, typename T2, typename T3, typename T4, typename T5,
12219 typename T6, typename T7, typename T8, typename T9, typename T10,
12220 typename T11, typename T12, typename T13, typename T14, typename T15,
12221 typename T16, typename T17, typename T18, typename T19, typename T20,
12222 typename T21, typename T22, typename T23, typename T24, typename T25,
12223 typename T26, typename T27, typename T28, typename T29, typename T30,
12224 typename T31, typename T32, typename T33, typename T34>
12225 class ValueArray34 {
12227 ValueArray34(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
12228 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
12229 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
12230 T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
12231 T34 v34) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),
12232 v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14),
12233 v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20),
12234 v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26),
12235 v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32),
12236 v33_(v33), v34_(v34) {}
12238 template <typename T>
12239 operator ParamGenerator<T>() const {
12240 const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
12241 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
12242 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
12243 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
12244 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
12245 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),
12246 static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),
12247 static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),
12248 static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),
12249 static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_),
12250 static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_),
12251 static_cast<T>(v33_), static_cast<T>(v34_)};
12252 return ValuesIn(array);
12256 // No implementation - assignment is unsupported.
12257 void operator=(const ValueArray34& other);
12295 template <typename T1, typename T2, typename T3, typename T4, typename T5,
12296 typename T6, typename T7, typename T8, typename T9, typename T10,
12297 typename T11, typename T12, typename T13, typename T14, typename T15,
12298 typename T16, typename T17, typename T18, typename T19, typename T20,
12299 typename T21, typename T22, typename T23, typename T24, typename T25,
12300 typename T26, typename T27, typename T28, typename T29, typename T30,
12301 typename T31, typename T32, typename T33, typename T34, typename T35>
12302 class ValueArray35 {
12304 ValueArray35(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
12305 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
12306 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
12307 T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
12308 T34 v34, T35 v35) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6),
12309 v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13),
12310 v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19),
12311 v20_(v20), v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25),
12312 v26_(v26), v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31),
12313 v32_(v32), v33_(v33), v34_(v34), v35_(v35) {}
12315 template <typename T>
12316 operator ParamGenerator<T>() const {
12317 const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
12318 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
12319 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
12320 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
12321 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
12322 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),
12323 static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),
12324 static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),
12325 static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),
12326 static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_),
12327 static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_),
12328 static_cast<T>(v33_), static_cast<T>(v34_), static_cast<T>(v35_)};
12329 return ValuesIn(array);
12333 // No implementation - assignment is unsupported.
12334 void operator=(const ValueArray35& other);
12373 template <typename T1, typename T2, typename T3, typename T4, typename T5,
12374 typename T6, typename T7, typename T8, typename T9, typename T10,
12375 typename T11, typename T12, typename T13, typename T14, typename T15,
12376 typename T16, typename T17, typename T18, typename T19, typename T20,
12377 typename T21, typename T22, typename T23, typename T24, typename T25,
12378 typename T26, typename T27, typename T28, typename T29, typename T30,
12379 typename T31, typename T32, typename T33, typename T34, typename T35,
12381 class ValueArray36 {
12383 ValueArray36(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
12384 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
12385 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
12386 T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
12387 T34 v34, T35 v35, T36 v36) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5),
12388 v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12),
12389 v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18),
12390 v19_(v19), v20_(v20), v21_(v21), v22_(v22), v23_(v23), v24_(v24),
12391 v25_(v25), v26_(v26), v27_(v27), v28_(v28), v29_(v29), v30_(v30),
12392 v31_(v31), v32_(v32), v33_(v33), v34_(v34), v35_(v35), v36_(v36) {}
12394 template <typename T>
12395 operator ParamGenerator<T>() const {
12396 const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
12397 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
12398 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
12399 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
12400 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
12401 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),
12402 static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),
12403 static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),
12404 static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),
12405 static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_),
12406 static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_),
12407 static_cast<T>(v33_), static_cast<T>(v34_), static_cast<T>(v35_),
12408 static_cast<T>(v36_)};
12409 return ValuesIn(array);
12413 // No implementation - assignment is unsupported.
12414 void operator=(const ValueArray36& other);
12454 template <typename T1, typename T2, typename T3, typename T4, typename T5,
12455 typename T6, typename T7, typename T8, typename T9, typename T10,
12456 typename T11, typename T12, typename T13, typename T14, typename T15,
12457 typename T16, typename T17, typename T18, typename T19, typename T20,
12458 typename T21, typename T22, typename T23, typename T24, typename T25,
12459 typename T26, typename T27, typename T28, typename T29, typename T30,
12460 typename T31, typename T32, typename T33, typename T34, typename T35,
12461 typename T36, typename T37>
12462 class ValueArray37 {
12464 ValueArray37(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
12465 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
12466 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
12467 T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
12468 T34 v34, T35 v35, T36 v36, T37 v37) : v1_(v1), v2_(v2), v3_(v3), v4_(v4),
12469 v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11),
12470 v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17),
12471 v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22), v23_(v23),
12472 v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28), v29_(v29),
12473 v30_(v30), v31_(v31), v32_(v32), v33_(v33), v34_(v34), v35_(v35),
12474 v36_(v36), v37_(v37) {}
12476 template <typename T>
12477 operator ParamGenerator<T>() const {
12478 const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
12479 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
12480 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
12481 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
12482 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
12483 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),
12484 static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),
12485 static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),
12486 static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),
12487 static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_),
12488 static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_),
12489 static_cast<T>(v33_), static_cast<T>(v34_), static_cast<T>(v35_),
12490 static_cast<T>(v36_), static_cast<T>(v37_)};
12491 return ValuesIn(array);
12495 // No implementation - assignment is unsupported.
12496 void operator=(const ValueArray37& other);
12537 template <typename T1, typename T2, typename T3, typename T4, typename T5,
12538 typename T6, typename T7, typename T8, typename T9, typename T10,
12539 typename T11, typename T12, typename T13, typename T14, typename T15,
12540 typename T16, typename T17, typename T18, typename T19, typename T20,
12541 typename T21, typename T22, typename T23, typename T24, typename T25,
12542 typename T26, typename T27, typename T28, typename T29, typename T30,
12543 typename T31, typename T32, typename T33, typename T34, typename T35,
12544 typename T36, typename T37, typename T38>
12545 class ValueArray38 {
12547 ValueArray38(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
12548 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
12549 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
12550 T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
12551 T34 v34, T35 v35, T36 v36, T37 v37, T38 v38) : v1_(v1), v2_(v2), v3_(v3),
12552 v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10),
12553 v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16),
12554 v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22),
12555 v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28),
12556 v29_(v29), v30_(v30), v31_(v31), v32_(v32), v33_(v33), v34_(v34),
12557 v35_(v35), v36_(v36), v37_(v37), v38_(v38) {}
12559 template <typename T>
12560 operator ParamGenerator<T>() const {
12561 const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
12562 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
12563 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
12564 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
12565 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
12566 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),
12567 static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),
12568 static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),
12569 static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),
12570 static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_),
12571 static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_),
12572 static_cast<T>(v33_), static_cast<T>(v34_), static_cast<T>(v35_),
12573 static_cast<T>(v36_), static_cast<T>(v37_), static_cast<T>(v38_)};
12574 return ValuesIn(array);
12578 // No implementation - assignment is unsupported.
12579 void operator=(const ValueArray38& other);
12621 template <typename T1, typename T2, typename T3, typename T4, typename T5,
12622 typename T6, typename T7, typename T8, typename T9, typename T10,
12623 typename T11, typename T12, typename T13, typename T14, typename T15,
12624 typename T16, typename T17, typename T18, typename T19, typename T20,
12625 typename T21, typename T22, typename T23, typename T24, typename T25,
12626 typename T26, typename T27, typename T28, typename T29, typename T30,
12627 typename T31, typename T32, typename T33, typename T34, typename T35,
12628 typename T36, typename T37, typename T38, typename T39>
12629 class ValueArray39 {
12631 ValueArray39(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
12632 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
12633 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
12634 T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
12635 T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39) : v1_(v1), v2_(v2),
12636 v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10),
12637 v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16),
12638 v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22),
12639 v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28),
12640 v29_(v29), v30_(v30), v31_(v31), v32_(v32), v33_(v33), v34_(v34),
12641 v35_(v35), v36_(v36), v37_(v37), v38_(v38), v39_(v39) {}
12643 template <typename T>
12644 operator ParamGenerator<T>() const {
12645 const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
12646 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
12647 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
12648 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
12649 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
12650 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),
12651 static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),
12652 static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),
12653 static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),
12654 static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_),
12655 static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_),
12656 static_cast<T>(v33_), static_cast<T>(v34_), static_cast<T>(v35_),
12657 static_cast<T>(v36_), static_cast<T>(v37_), static_cast<T>(v38_),
12658 static_cast<T>(v39_)};
12659 return ValuesIn(array);
12663 // No implementation - assignment is unsupported.
12664 void operator=(const ValueArray39& other);
12707 template <typename T1, typename T2, typename T3, typename T4, typename T5,
12708 typename T6, typename T7, typename T8, typename T9, typename T10,
12709 typename T11, typename T12, typename T13, typename T14, typename T15,
12710 typename T16, typename T17, typename T18, typename T19, typename T20,
12711 typename T21, typename T22, typename T23, typename T24, typename T25,
12712 typename T26, typename T27, typename T28, typename T29, typename T30,
12713 typename T31, typename T32, typename T33, typename T34, typename T35,
12714 typename T36, typename T37, typename T38, typename T39, typename T40>
12715 class ValueArray40 {
12717 ValueArray40(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
12718 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
12719 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
12720 T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
12721 T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40) : v1_(v1),
12722 v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9),
12723 v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15),
12724 v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21),
12725 v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27),
12726 v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32), v33_(v33),
12727 v34_(v34), v35_(v35), v36_(v36), v37_(v37), v38_(v38), v39_(v39),
12730 template <typename T>
12731 operator ParamGenerator<T>() const {
12732 const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
12733 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
12734 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
12735 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
12736 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
12737 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),
12738 static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),
12739 static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),
12740 static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),
12741 static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_),
12742 static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_),
12743 static_cast<T>(v33_), static_cast<T>(v34_), static_cast<T>(v35_),
12744 static_cast<T>(v36_), static_cast<T>(v37_), static_cast<T>(v38_),
12745 static_cast<T>(v39_), static_cast<T>(v40_)};
12746 return ValuesIn(array);
12750 // No implementation - assignment is unsupported.
12751 void operator=(const ValueArray40& other);
12795 template <typename T1, typename T2, typename T3, typename T4, typename T5,
12796 typename T6, typename T7, typename T8, typename T9, typename T10,
12797 typename T11, typename T12, typename T13, typename T14, typename T15,
12798 typename T16, typename T17, typename T18, typename T19, typename T20,
12799 typename T21, typename T22, typename T23, typename T24, typename T25,
12800 typename T26, typename T27, typename T28, typename T29, typename T30,
12801 typename T31, typename T32, typename T33, typename T34, typename T35,
12802 typename T36, typename T37, typename T38, typename T39, typename T40,
12804 class ValueArray41 {
12806 ValueArray41(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
12807 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
12808 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
12809 T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
12810 T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40,
12811 T41 v41) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),
12812 v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14),
12813 v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20),
12814 v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26),
12815 v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32),
12816 v33_(v33), v34_(v34), v35_(v35), v36_(v36), v37_(v37), v38_(v38),
12817 v39_(v39), v40_(v40), v41_(v41) {}
12819 template <typename T>
12820 operator ParamGenerator<T>() const {
12821 const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
12822 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
12823 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
12824 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
12825 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
12826 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),
12827 static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),
12828 static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),
12829 static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),
12830 static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_),
12831 static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_),
12832 static_cast<T>(v33_), static_cast<T>(v34_), static_cast<T>(v35_),
12833 static_cast<T>(v36_), static_cast<T>(v37_), static_cast<T>(v38_),
12834 static_cast<T>(v39_), static_cast<T>(v40_), static_cast<T>(v41_)};
12835 return ValuesIn(array);
12839 // No implementation - assignment is unsupported.
12840 void operator=(const ValueArray41& other);
12885 template <typename T1, typename T2, typename T3, typename T4, typename T5,
12886 typename T6, typename T7, typename T8, typename T9, typename T10,
12887 typename T11, typename T12, typename T13, typename T14, typename T15,
12888 typename T16, typename T17, typename T18, typename T19, typename T20,
12889 typename T21, typename T22, typename T23, typename T24, typename T25,
12890 typename T26, typename T27, typename T28, typename T29, typename T30,
12891 typename T31, typename T32, typename T33, typename T34, typename T35,
12892 typename T36, typename T37, typename T38, typename T39, typename T40,
12893 typename T41, typename T42>
12894 class ValueArray42 {
12896 ValueArray42(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
12897 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
12898 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
12899 T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
12900 T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
12901 T42 v42) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),
12902 v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14),
12903 v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20),
12904 v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26),
12905 v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32),
12906 v33_(v33), v34_(v34), v35_(v35), v36_(v36), v37_(v37), v38_(v38),
12907 v39_(v39), v40_(v40), v41_(v41), v42_(v42) {}
12909 template <typename T>
12910 operator ParamGenerator<T>() const {
12911 const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
12912 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
12913 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
12914 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
12915 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
12916 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),
12917 static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),
12918 static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),
12919 static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),
12920 static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_),
12921 static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_),
12922 static_cast<T>(v33_), static_cast<T>(v34_), static_cast<T>(v35_),
12923 static_cast<T>(v36_), static_cast<T>(v37_), static_cast<T>(v38_),
12924 static_cast<T>(v39_), static_cast<T>(v40_), static_cast<T>(v41_),
12925 static_cast<T>(v42_)};
12926 return ValuesIn(array);
12930 // No implementation - assignment is unsupported.
12931 void operator=(const ValueArray42& other);
12977 template <typename T1, typename T2, typename T3, typename T4, typename T5,
12978 typename T6, typename T7, typename T8, typename T9, typename T10,
12979 typename T11, typename T12, typename T13, typename T14, typename T15,
12980 typename T16, typename T17, typename T18, typename T19, typename T20,
12981 typename T21, typename T22, typename T23, typename T24, typename T25,
12982 typename T26, typename T27, typename T28, typename T29, typename T30,
12983 typename T31, typename T32, typename T33, typename T34, typename T35,
12984 typename T36, typename T37, typename T38, typename T39, typename T40,
12985 typename T41, typename T42, typename T43>
12986 class ValueArray43 {
12988 ValueArray43(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
12989 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
12990 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
12991 T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
12992 T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
12993 T42 v42, T43 v43) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6),
12994 v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13),
12995 v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19),
12996 v20_(v20), v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25),
12997 v26_(v26), v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31),
12998 v32_(v32), v33_(v33), v34_(v34), v35_(v35), v36_(v36), v37_(v37),
12999 v38_(v38), v39_(v39), v40_(v40), v41_(v41), v42_(v42), v43_(v43) {}
13001 template <typename T>
13002 operator ParamGenerator<T>() const {
13003 const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
13004 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
13005 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
13006 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
13007 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
13008 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),
13009 static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),
13010 static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),
13011 static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),
13012 static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_),
13013 static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_),
13014 static_cast<T>(v33_), static_cast<T>(v34_), static_cast<T>(v35_),
13015 static_cast<T>(v36_), static_cast<T>(v37_), static_cast<T>(v38_),
13016 static_cast<T>(v39_), static_cast<T>(v40_), static_cast<T>(v41_),
13017 static_cast<T>(v42_), static_cast<T>(v43_)};
13018 return ValuesIn(array);
13022 // No implementation - assignment is unsupported.
13023 void operator=(const ValueArray43& other);
13070 template <typename T1, typename T2, typename T3, typename T4, typename T5,
13071 typename T6, typename T7, typename T8, typename T9, typename T10,
13072 typename T11, typename T12, typename T13, typename T14, typename T15,
13073 typename T16, typename T17, typename T18, typename T19, typename T20,
13074 typename T21, typename T22, typename T23, typename T24, typename T25,
13075 typename T26, typename T27, typename T28, typename T29, typename T30,
13076 typename T31, typename T32, typename T33, typename T34, typename T35,
13077 typename T36, typename T37, typename T38, typename T39, typename T40,
13078 typename T41, typename T42, typename T43, typename T44>
13079 class ValueArray44 {
13081 ValueArray44(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
13082 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
13083 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
13084 T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
13085 T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
13086 T42 v42, T43 v43, T44 v44) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5),
13087 v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12),
13088 v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18),
13089 v19_(v19), v20_(v20), v21_(v21), v22_(v22), v23_(v23), v24_(v24),
13090 v25_(v25), v26_(v26), v27_(v27), v28_(v28), v29_(v29), v30_(v30),
13091 v31_(v31), v32_(v32), v33_(v33), v34_(v34), v35_(v35), v36_(v36),
13092 v37_(v37), v38_(v38), v39_(v39), v40_(v40), v41_(v41), v42_(v42),
13093 v43_(v43), v44_(v44) {}
13095 template <typename T>
13096 operator ParamGenerator<T>() const {
13097 const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
13098 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
13099 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
13100 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
13101 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
13102 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),
13103 static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),
13104 static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),
13105 static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),
13106 static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_),
13107 static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_),
13108 static_cast<T>(v33_), static_cast<T>(v34_), static_cast<T>(v35_),
13109 static_cast<T>(v36_), static_cast<T>(v37_), static_cast<T>(v38_),
13110 static_cast<T>(v39_), static_cast<T>(v40_), static_cast<T>(v41_),
13111 static_cast<T>(v42_), static_cast<T>(v43_), static_cast<T>(v44_)};
13112 return ValuesIn(array);
13116 // No implementation - assignment is unsupported.
13117 void operator=(const ValueArray44& other);
13165 template <typename T1, typename T2, typename T3, typename T4, typename T5,
13166 typename T6, typename T7, typename T8, typename T9, typename T10,
13167 typename T11, typename T12, typename T13, typename T14, typename T15,
13168 typename T16, typename T17, typename T18, typename T19, typename T20,
13169 typename T21, typename T22, typename T23, typename T24, typename T25,
13170 typename T26, typename T27, typename T28, typename T29, typename T30,
13171 typename T31, typename T32, typename T33, typename T34, typename T35,
13172 typename T36, typename T37, typename T38, typename T39, typename T40,
13173 typename T41, typename T42, typename T43, typename T44, typename T45>
13174 class ValueArray45 {
13176 ValueArray45(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
13177 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
13178 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
13179 T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
13180 T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
13181 T42 v42, T43 v43, T44 v44, T45 v45) : v1_(v1), v2_(v2), v3_(v3), v4_(v4),
13182 v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11),
13183 v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17),
13184 v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22), v23_(v23),
13185 v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28), v29_(v29),
13186 v30_(v30), v31_(v31), v32_(v32), v33_(v33), v34_(v34), v35_(v35),
13187 v36_(v36), v37_(v37), v38_(v38), v39_(v39), v40_(v40), v41_(v41),
13188 v42_(v42), v43_(v43), v44_(v44), v45_(v45) {}
13190 template <typename T>
13191 operator ParamGenerator<T>() const {
13192 const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
13193 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
13194 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
13195 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
13196 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
13197 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),
13198 static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),
13199 static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),
13200 static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),
13201 static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_),
13202 static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_),
13203 static_cast<T>(v33_), static_cast<T>(v34_), static_cast<T>(v35_),
13204 static_cast<T>(v36_), static_cast<T>(v37_), static_cast<T>(v38_),
13205 static_cast<T>(v39_), static_cast<T>(v40_), static_cast<T>(v41_),
13206 static_cast<T>(v42_), static_cast<T>(v43_), static_cast<T>(v44_),
13207 static_cast<T>(v45_)};
13208 return ValuesIn(array);
13212 // No implementation - assignment is unsupported.
13213 void operator=(const ValueArray45& other);
13262 template <typename T1, typename T2, typename T3, typename T4, typename T5,
13263 typename T6, typename T7, typename T8, typename T9, typename T10,
13264 typename T11, typename T12, typename T13, typename T14, typename T15,
13265 typename T16, typename T17, typename T18, typename T19, typename T20,
13266 typename T21, typename T22, typename T23, typename T24, typename T25,
13267 typename T26, typename T27, typename T28, typename T29, typename T30,
13268 typename T31, typename T32, typename T33, typename T34, typename T35,
13269 typename T36, typename T37, typename T38, typename T39, typename T40,
13270 typename T41, typename T42, typename T43, typename T44, typename T45,
13272 class ValueArray46 {
13274 ValueArray46(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
13275 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
13276 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
13277 T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
13278 T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
13279 T42 v42, T43 v43, T44 v44, T45 v45, T46 v46) : v1_(v1), v2_(v2), v3_(v3),
13280 v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10),
13281 v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16),
13282 v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22),
13283 v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28),
13284 v29_(v29), v30_(v30), v31_(v31), v32_(v32), v33_(v33), v34_(v34),
13285 v35_(v35), v36_(v36), v37_(v37), v38_(v38), v39_(v39), v40_(v40),
13286 v41_(v41), v42_(v42), v43_(v43), v44_(v44), v45_(v45), v46_(v46) {}
13288 template <typename T>
13289 operator ParamGenerator<T>() const {
13290 const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
13291 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
13292 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
13293 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
13294 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
13295 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),
13296 static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),
13297 static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),
13298 static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),
13299 static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_),
13300 static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_),
13301 static_cast<T>(v33_), static_cast<T>(v34_), static_cast<T>(v35_),
13302 static_cast<T>(v36_), static_cast<T>(v37_), static_cast<T>(v38_),
13303 static_cast<T>(v39_), static_cast<T>(v40_), static_cast<T>(v41_),
13304 static_cast<T>(v42_), static_cast<T>(v43_), static_cast<T>(v44_),
13305 static_cast<T>(v45_), static_cast<T>(v46_)};
13306 return ValuesIn(array);
13310 // No implementation - assignment is unsupported.
13311 void operator=(const ValueArray46& other);
13361 template <typename T1, typename T2, typename T3, typename T4, typename T5,
13362 typename T6, typename T7, typename T8, typename T9, typename T10,
13363 typename T11, typename T12, typename T13, typename T14, typename T15,
13364 typename T16, typename T17, typename T18, typename T19, typename T20,
13365 typename T21, typename T22, typename T23, typename T24, typename T25,
13366 typename T26, typename T27, typename T28, typename T29, typename T30,
13367 typename T31, typename T32, typename T33, typename T34, typename T35,
13368 typename T36, typename T37, typename T38, typename T39, typename T40,
13369 typename T41, typename T42, typename T43, typename T44, typename T45,
13370 typename T46, typename T47>
13371 class ValueArray47 {
13373 ValueArray47(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
13374 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
13375 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
13376 T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
13377 T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
13378 T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47) : v1_(v1), v2_(v2),
13379 v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10),
13380 v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16),
13381 v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22),
13382 v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28),
13383 v29_(v29), v30_(v30), v31_(v31), v32_(v32), v33_(v33), v34_(v34),
13384 v35_(v35), v36_(v36), v37_(v37), v38_(v38), v39_(v39), v40_(v40),
13385 v41_(v41), v42_(v42), v43_(v43), v44_(v44), v45_(v45), v46_(v46),
13388 template <typename T>
13389 operator ParamGenerator<T>() const {
13390 const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
13391 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
13392 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
13393 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
13394 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
13395 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),
13396 static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),
13397 static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),
13398 static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),
13399 static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_),
13400 static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_),
13401 static_cast<T>(v33_), static_cast<T>(v34_), static_cast<T>(v35_),
13402 static_cast<T>(v36_), static_cast<T>(v37_), static_cast<T>(v38_),
13403 static_cast<T>(v39_), static_cast<T>(v40_), static_cast<T>(v41_),
13404 static_cast<T>(v42_), static_cast<T>(v43_), static_cast<T>(v44_),
13405 static_cast<T>(v45_), static_cast<T>(v46_), static_cast<T>(v47_)};
13406 return ValuesIn(array);
13410 // No implementation - assignment is unsupported.
13411 void operator=(const ValueArray47& other);
13462 template <typename T1, typename T2, typename T3, typename T4, typename T5,
13463 typename T6, typename T7, typename T8, typename T9, typename T10,
13464 typename T11, typename T12, typename T13, typename T14, typename T15,
13465 typename T16, typename T17, typename T18, typename T19, typename T20,
13466 typename T21, typename T22, typename T23, typename T24, typename T25,
13467 typename T26, typename T27, typename T28, typename T29, typename T30,
13468 typename T31, typename T32, typename T33, typename T34, typename T35,
13469 typename T36, typename T37, typename T38, typename T39, typename T40,
13470 typename T41, typename T42, typename T43, typename T44, typename T45,
13471 typename T46, typename T47, typename T48>
13472 class ValueArray48 {
13474 ValueArray48(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
13475 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
13476 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
13477 T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
13478 T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
13479 T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47, T48 v48) : v1_(v1),
13480 v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9),
13481 v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15),
13482 v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21),
13483 v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27),
13484 v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32), v33_(v33),
13485 v34_(v34), v35_(v35), v36_(v36), v37_(v37), v38_(v38), v39_(v39),
13486 v40_(v40), v41_(v41), v42_(v42), v43_(v43), v44_(v44), v45_(v45),
13487 v46_(v46), v47_(v47), v48_(v48) {}
13489 template <typename T>
13490 operator ParamGenerator<T>() const {
13491 const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
13492 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
13493 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
13494 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
13495 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
13496 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),
13497 static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),
13498 static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),
13499 static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),
13500 static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_),
13501 static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_),
13502 static_cast<T>(v33_), static_cast<T>(v34_), static_cast<T>(v35_),
13503 static_cast<T>(v36_), static_cast<T>(v37_), static_cast<T>(v38_),
13504 static_cast<T>(v39_), static_cast<T>(v40_), static_cast<T>(v41_),
13505 static_cast<T>(v42_), static_cast<T>(v43_), static_cast<T>(v44_),
13506 static_cast<T>(v45_), static_cast<T>(v46_), static_cast<T>(v47_),
13507 static_cast<T>(v48_)};
13508 return ValuesIn(array);
13512 // No implementation - assignment is unsupported.
13513 void operator=(const ValueArray48& other);
13565 template <typename T1, typename T2, typename T3, typename T4, typename T5,
13566 typename T6, typename T7, typename T8, typename T9, typename T10,
13567 typename T11, typename T12, typename T13, typename T14, typename T15,
13568 typename T16, typename T17, typename T18, typename T19, typename T20,
13569 typename T21, typename T22, typename T23, typename T24, typename T25,
13570 typename T26, typename T27, typename T28, typename T29, typename T30,
13571 typename T31, typename T32, typename T33, typename T34, typename T35,
13572 typename T36, typename T37, typename T38, typename T39, typename T40,
13573 typename T41, typename T42, typename T43, typename T44, typename T45,
13574 typename T46, typename T47, typename T48, typename T49>
13575 class ValueArray49 {
13577 ValueArray49(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
13578 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
13579 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
13580 T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
13581 T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
13582 T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47, T48 v48,
13583 T49 v49) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),
13584 v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14),
13585 v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20),
13586 v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26),
13587 v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32),
13588 v33_(v33), v34_(v34), v35_(v35), v36_(v36), v37_(v37), v38_(v38),
13589 v39_(v39), v40_(v40), v41_(v41), v42_(v42), v43_(v43), v44_(v44),
13590 v45_(v45), v46_(v46), v47_(v47), v48_(v48), v49_(v49) {}
13592 template <typename T>
13593 operator ParamGenerator<T>() const {
13594 const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
13595 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
13596 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
13597 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
13598 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
13599 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),
13600 static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),
13601 static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),
13602 static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),
13603 static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_),
13604 static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_),
13605 static_cast<T>(v33_), static_cast<T>(v34_), static_cast<T>(v35_),
13606 static_cast<T>(v36_), static_cast<T>(v37_), static_cast<T>(v38_),
13607 static_cast<T>(v39_), static_cast<T>(v40_), static_cast<T>(v41_),
13608 static_cast<T>(v42_), static_cast<T>(v43_), static_cast<T>(v44_),
13609 static_cast<T>(v45_), static_cast<T>(v46_), static_cast<T>(v47_),
13610 static_cast<T>(v48_), static_cast<T>(v49_)};
13611 return ValuesIn(array);
13615 // No implementation - assignment is unsupported.
13616 void operator=(const ValueArray49& other);
13669 template <typename T1, typename T2, typename T3, typename T4, typename T5,
13670 typename T6, typename T7, typename T8, typename T9, typename T10,
13671 typename T11, typename T12, typename T13, typename T14, typename T15,
13672 typename T16, typename T17, typename T18, typename T19, typename T20,
13673 typename T21, typename T22, typename T23, typename T24, typename T25,
13674 typename T26, typename T27, typename T28, typename T29, typename T30,
13675 typename T31, typename T32, typename T33, typename T34, typename T35,
13676 typename T36, typename T37, typename T38, typename T39, typename T40,
13677 typename T41, typename T42, typename T43, typename T44, typename T45,
13678 typename T46, typename T47, typename T48, typename T49, typename T50>
13679 class ValueArray50 {
13681 ValueArray50(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
13682 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
13683 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
13684 T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
13685 T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
13686 T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47, T48 v48, T49 v49,
13687 T50 v50) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7),
13688 v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14),
13689 v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20),
13690 v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26),
13691 v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32),
13692 v33_(v33), v34_(v34), v35_(v35), v36_(v36), v37_(v37), v38_(v38),
13693 v39_(v39), v40_(v40), v41_(v41), v42_(v42), v43_(v43), v44_(v44),
13694 v45_(v45), v46_(v46), v47_(v47), v48_(v48), v49_(v49), v50_(v50) {}
13696 template <typename T>
13697 operator ParamGenerator<T>() const {
13698 const T array[] = {static_cast<T>(v1_), static_cast<T>(v2_),
13699 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_),
13700 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_),
13701 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_),
13702 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_),
13703 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_),
13704 static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_),
13705 static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_),
13706 static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_),
13707 static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_),
13708 static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_),
13709 static_cast<T>(v33_), static_cast<T>(v34_), static_cast<T>(v35_),
13710 static_cast<T>(v36_), static_cast<T>(v37_), static_cast<T>(v38_),
13711 static_cast<T>(v39_), static_cast<T>(v40_), static_cast<T>(v41_),
13712 static_cast<T>(v42_), static_cast<T>(v43_), static_cast<T>(v44_),
13713 static_cast<T>(v45_), static_cast<T>(v46_), static_cast<T>(v47_),
13714 static_cast<T>(v48_), static_cast<T>(v49_), static_cast<T>(v50_)};
13715 return ValuesIn(array);
13719 // No implementation - assignment is unsupported.
13720 void operator=(const ValueArray50& other);
13774 # if GTEST_HAS_COMBINE
13775 // INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
13777 // Generates values from the Cartesian product of values produced
13778 // by the argument generators.
13780 template <typename T1, typename T2>
13781 class CartesianProductGenerator2
13782 : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2> > {
13784 typedef ::std::tr1::tuple<T1, T2> ParamType;
13786 CartesianProductGenerator2(const ParamGenerator<T1>& g1,
13787 const ParamGenerator<T2>& g2)
13788 : g1_(g1), g2_(g2) {}
13789 virtual ~CartesianProductGenerator2() {}
13791 virtual ParamIteratorInterface<ParamType>* Begin() const {
13792 return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin());
13794 virtual ParamIteratorInterface<ParamType>* End() const {
13795 return new Iterator(this, g1_, g1_.end(), g2_, g2_.end());
13799 class Iterator : public ParamIteratorInterface<ParamType> {
13801 Iterator(const ParamGeneratorInterface<ParamType>* base,
13802 const ParamGenerator<T1>& g1,
13803 const typename ParamGenerator<T1>::iterator& current1,
13804 const ParamGenerator<T2>& g2,
13805 const typename ParamGenerator<T2>::iterator& current2)
13807 begin1_(g1.begin()), end1_(g1.end()), current1_(current1),
13808 begin2_(g2.begin()), end2_(g2.end()), current2_(current2) {
13809 ComputeCurrentValue();
13811 virtual ~Iterator() {}
13813 virtual const ParamGeneratorInterface<ParamType>* BaseGenerator() const {
13816 // Advance should not be called on beyond-of-range iterators
13817 // so no component iterators must be beyond end of range, either.
13818 virtual void Advance() {
13821 if (current2_ == end2_) {
13822 current2_ = begin2_;
13825 ComputeCurrentValue();
13827 virtual ParamIteratorInterface<ParamType>* Clone() const {
13828 return new Iterator(*this);
13830 virtual const ParamType* Current() const { return ¤t_value_; }
13831 virtual bool Equals(const ParamIteratorInterface<ParamType>& other) const {
13832 // Having the same base generator guarantees that the other
13833 // iterator is of the same type and we can downcast.
13834 GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
13835 << "The program attempted to compare iterators "
13836 << "from different generators." << std::endl;
13837 const Iterator* typed_other =
13838 CheckedDowncastToActualType<const Iterator>(&other);
13839 // We must report iterators equal if they both point beyond their
13840 // respective ranges. That can happen in a variety of fashions,
13841 // so we have to consult AtEnd().
13842 return (AtEnd() && typed_other->AtEnd()) ||
13844 current1_ == typed_other->current1_ &&
13845 current2_ == typed_other->current2_);
13849 Iterator(const Iterator& other)
13850 : base_(other.base_),
13851 begin1_(other.begin1_),
13852 end1_(other.end1_),
13853 current1_(other.current1_),
13854 begin2_(other.begin2_),
13855 end2_(other.end2_),
13856 current2_(other.current2_) {
13857 ComputeCurrentValue();
13860 void ComputeCurrentValue() {
13862 current_value_ = ParamType(*current1_, *current2_);
13864 bool AtEnd() const {
13865 // We must report iterator past the end of the range when either of the
13866 // component iterators has reached the end of its range.
13868 current1_ == end1_ ||
13869 current2_ == end2_;
13872 // No implementation - assignment is unsupported.
13873 void operator=(const Iterator& other);
13875 const ParamGeneratorInterface<ParamType>* const base_;
13876 // begin[i]_ and end[i]_ define the i-th range that Iterator traverses.
13877 // current[i]_ is the actual traversing iterator.
13878 const typename ParamGenerator<T1>::iterator begin1_;
13879 const typename ParamGenerator<T1>::iterator end1_;
13880 typename ParamGenerator<T1>::iterator current1_;
13881 const typename ParamGenerator<T2>::iterator begin2_;
13882 const typename ParamGenerator<T2>::iterator end2_;
13883 typename ParamGenerator<T2>::iterator current2_;
13884 ParamType current_value_;
13885 }; // class CartesianProductGenerator2::Iterator
13887 // No implementation - assignment is unsupported.
13888 void operator=(const CartesianProductGenerator2& other);
13890 const ParamGenerator<T1> g1_;
13891 const ParamGenerator<T2> g2_;
13892 }; // class CartesianProductGenerator2
13895 template <typename T1, typename T2, typename T3>
13896 class CartesianProductGenerator3
13897 : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3> > {
13899 typedef ::std::tr1::tuple<T1, T2, T3> ParamType;
13901 CartesianProductGenerator3(const ParamGenerator<T1>& g1,
13902 const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3)
13903 : g1_(g1), g2_(g2), g3_(g3) {}
13904 virtual ~CartesianProductGenerator3() {}
13906 virtual ParamIteratorInterface<ParamType>* Begin() const {
13907 return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_,
13910 virtual ParamIteratorInterface<ParamType>* End() const {
13911 return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end());
13915 class Iterator : public ParamIteratorInterface<ParamType> {
13917 Iterator(const ParamGeneratorInterface<ParamType>* base,
13918 const ParamGenerator<T1>& g1,
13919 const typename ParamGenerator<T1>::iterator& current1,
13920 const ParamGenerator<T2>& g2,
13921 const typename ParamGenerator<T2>::iterator& current2,
13922 const ParamGenerator<T3>& g3,
13923 const typename ParamGenerator<T3>::iterator& current3)
13925 begin1_(g1.begin()), end1_(g1.end()), current1_(current1),
13926 begin2_(g2.begin()), end2_(g2.end()), current2_(current2),
13927 begin3_(g3.begin()), end3_(g3.end()), current3_(current3) {
13928 ComputeCurrentValue();
13930 virtual ~Iterator() {}
13932 virtual const ParamGeneratorInterface<ParamType>* BaseGenerator() const {
13935 // Advance should not be called on beyond-of-range iterators
13936 // so no component iterators must be beyond end of range, either.
13937 virtual void Advance() {
13940 if (current3_ == end3_) {
13941 current3_ = begin3_;
13944 if (current2_ == end2_) {
13945 current2_ = begin2_;
13948 ComputeCurrentValue();
13950 virtual ParamIteratorInterface<ParamType>* Clone() const {
13951 return new Iterator(*this);
13953 virtual const ParamType* Current() const { return ¤t_value_; }
13954 virtual bool Equals(const ParamIteratorInterface<ParamType>& other) const {
13955 // Having the same base generator guarantees that the other
13956 // iterator is of the same type and we can downcast.
13957 GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
13958 << "The program attempted to compare iterators "
13959 << "from different generators." << std::endl;
13960 const Iterator* typed_other =
13961 CheckedDowncastToActualType<const Iterator>(&other);
13962 // We must report iterators equal if they both point beyond their
13963 // respective ranges. That can happen in a variety of fashions,
13964 // so we have to consult AtEnd().
13965 return (AtEnd() && typed_other->AtEnd()) ||
13967 current1_ == typed_other->current1_ &&
13968 current2_ == typed_other->current2_ &&
13969 current3_ == typed_other->current3_);
13973 Iterator(const Iterator& other)
13974 : base_(other.base_),
13975 begin1_(other.begin1_),
13976 end1_(other.end1_),
13977 current1_(other.current1_),
13978 begin2_(other.begin2_),
13979 end2_(other.end2_),
13980 current2_(other.current2_),
13981 begin3_(other.begin3_),
13982 end3_(other.end3_),
13983 current3_(other.current3_) {
13984 ComputeCurrentValue();
13987 void ComputeCurrentValue() {
13989 current_value_ = ParamType(*current1_, *current2_, *current3_);
13991 bool AtEnd() const {
13992 // We must report iterator past the end of the range when either of the
13993 // component iterators has reached the end of its range.
13995 current1_ == end1_ ||
13996 current2_ == end2_ ||
13997 current3_ == end3_;
14000 // No implementation - assignment is unsupported.
14001 void operator=(const Iterator& other);
14003 const ParamGeneratorInterface<ParamType>* const base_;
14004 // begin[i]_ and end[i]_ define the i-th range that Iterator traverses.
14005 // current[i]_ is the actual traversing iterator.
14006 const typename ParamGenerator<T1>::iterator begin1_;
14007 const typename ParamGenerator<T1>::iterator end1_;
14008 typename ParamGenerator<T1>::iterator current1_;
14009 const typename ParamGenerator<T2>::iterator begin2_;
14010 const typename ParamGenerator<T2>::iterator end2_;
14011 typename ParamGenerator<T2>::iterator current2_;
14012 const typename ParamGenerator<T3>::iterator begin3_;
14013 const typename ParamGenerator<T3>::iterator end3_;
14014 typename ParamGenerator<T3>::iterator current3_;
14015 ParamType current_value_;
14016 }; // class CartesianProductGenerator3::Iterator
14018 // No implementation - assignment is unsupported.
14019 void operator=(const CartesianProductGenerator3& other);
14021 const ParamGenerator<T1> g1_;
14022 const ParamGenerator<T2> g2_;
14023 const ParamGenerator<T3> g3_;
14024 }; // class CartesianProductGenerator3
14027 template <typename T1, typename T2, typename T3, typename T4>
14028 class CartesianProductGenerator4
14029 : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4> > {
14031 typedef ::std::tr1::tuple<T1, T2, T3, T4> ParamType;
14033 CartesianProductGenerator4(const ParamGenerator<T1>& g1,
14034 const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3,
14035 const ParamGenerator<T4>& g4)
14036 : g1_(g1), g2_(g2), g3_(g3), g4_(g4) {}
14037 virtual ~CartesianProductGenerator4() {}
14039 virtual ParamIteratorInterface<ParamType>* Begin() const {
14040 return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_,
14041 g3_.begin(), g4_, g4_.begin());
14043 virtual ParamIteratorInterface<ParamType>* End() const {
14044 return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(),
14049 class Iterator : public ParamIteratorInterface<ParamType> {
14051 Iterator(const ParamGeneratorInterface<ParamType>* base,
14052 const ParamGenerator<T1>& g1,
14053 const typename ParamGenerator<T1>::iterator& current1,
14054 const ParamGenerator<T2>& g2,
14055 const typename ParamGenerator<T2>::iterator& current2,
14056 const ParamGenerator<T3>& g3,
14057 const typename ParamGenerator<T3>::iterator& current3,
14058 const ParamGenerator<T4>& g4,
14059 const typename ParamGenerator<T4>::iterator& current4)
14061 begin1_(g1.begin()), end1_(g1.end()), current1_(current1),
14062 begin2_(g2.begin()), end2_(g2.end()), current2_(current2),
14063 begin3_(g3.begin()), end3_(g3.end()), current3_(current3),
14064 begin4_(g4.begin()), end4_(g4.end()), current4_(current4) {
14065 ComputeCurrentValue();
14067 virtual ~Iterator() {}
14069 virtual const ParamGeneratorInterface<ParamType>* BaseGenerator() const {
14072 // Advance should not be called on beyond-of-range iterators
14073 // so no component iterators must be beyond end of range, either.
14074 virtual void Advance() {
14077 if (current4_ == end4_) {
14078 current4_ = begin4_;
14081 if (current3_ == end3_) {
14082 current3_ = begin3_;
14085 if (current2_ == end2_) {
14086 current2_ = begin2_;
14089 ComputeCurrentValue();
14091 virtual ParamIteratorInterface<ParamType>* Clone() const {
14092 return new Iterator(*this);
14094 virtual const ParamType* Current() const { return ¤t_value_; }
14095 virtual bool Equals(const ParamIteratorInterface<ParamType>& other) const {
14096 // Having the same base generator guarantees that the other
14097 // iterator is of the same type and we can downcast.
14098 GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
14099 << "The program attempted to compare iterators "
14100 << "from different generators." << std::endl;
14101 const Iterator* typed_other =
14102 CheckedDowncastToActualType<const Iterator>(&other);
14103 // We must report iterators equal if they both point beyond their
14104 // respective ranges. That can happen in a variety of fashions,
14105 // so we have to consult AtEnd().
14106 return (AtEnd() && typed_other->AtEnd()) ||
14108 current1_ == typed_other->current1_ &&
14109 current2_ == typed_other->current2_ &&
14110 current3_ == typed_other->current3_ &&
14111 current4_ == typed_other->current4_);
14115 Iterator(const Iterator& other)
14116 : base_(other.base_),
14117 begin1_(other.begin1_),
14118 end1_(other.end1_),
14119 current1_(other.current1_),
14120 begin2_(other.begin2_),
14121 end2_(other.end2_),
14122 current2_(other.current2_),
14123 begin3_(other.begin3_),
14124 end3_(other.end3_),
14125 current3_(other.current3_),
14126 begin4_(other.begin4_),
14127 end4_(other.end4_),
14128 current4_(other.current4_) {
14129 ComputeCurrentValue();
14132 void ComputeCurrentValue() {
14134 current_value_ = ParamType(*current1_, *current2_, *current3_,
14137 bool AtEnd() const {
14138 // We must report iterator past the end of the range when either of the
14139 // component iterators has reached the end of its range.
14141 current1_ == end1_ ||
14142 current2_ == end2_ ||
14143 current3_ == end3_ ||
14144 current4_ == end4_;
14147 // No implementation - assignment is unsupported.
14148 void operator=(const Iterator& other);
14150 const ParamGeneratorInterface<ParamType>* const base_;
14151 // begin[i]_ and end[i]_ define the i-th range that Iterator traverses.
14152 // current[i]_ is the actual traversing iterator.
14153 const typename ParamGenerator<T1>::iterator begin1_;
14154 const typename ParamGenerator<T1>::iterator end1_;
14155 typename ParamGenerator<T1>::iterator current1_;
14156 const typename ParamGenerator<T2>::iterator begin2_;
14157 const typename ParamGenerator<T2>::iterator end2_;
14158 typename ParamGenerator<T2>::iterator current2_;
14159 const typename ParamGenerator<T3>::iterator begin3_;
14160 const typename ParamGenerator<T3>::iterator end3_;
14161 typename ParamGenerator<T3>::iterator current3_;
14162 const typename ParamGenerator<T4>::iterator begin4_;
14163 const typename ParamGenerator<T4>::iterator end4_;
14164 typename ParamGenerator<T4>::iterator current4_;
14165 ParamType current_value_;
14166 }; // class CartesianProductGenerator4::Iterator
14168 // No implementation - assignment is unsupported.
14169 void operator=(const CartesianProductGenerator4& other);
14171 const ParamGenerator<T1> g1_;
14172 const ParamGenerator<T2> g2_;
14173 const ParamGenerator<T3> g3_;
14174 const ParamGenerator<T4> g4_;
14175 }; // class CartesianProductGenerator4
14178 template <typename T1, typename T2, typename T3, typename T4, typename T5>
14179 class CartesianProductGenerator5
14180 : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4, T5> > {
14182 typedef ::std::tr1::tuple<T1, T2, T3, T4, T5> ParamType;
14184 CartesianProductGenerator5(const ParamGenerator<T1>& g1,
14185 const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3,
14186 const ParamGenerator<T4>& g4, const ParamGenerator<T5>& g5)
14187 : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5) {}
14188 virtual ~CartesianProductGenerator5() {}
14190 virtual ParamIteratorInterface<ParamType>* Begin() const {
14191 return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_,
14192 g3_.begin(), g4_, g4_.begin(), g5_, g5_.begin());
14194 virtual ParamIteratorInterface<ParamType>* End() const {
14195 return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(),
14196 g4_, g4_.end(), g5_, g5_.end());
14200 class Iterator : public ParamIteratorInterface<ParamType> {
14202 Iterator(const ParamGeneratorInterface<ParamType>* base,
14203 const ParamGenerator<T1>& g1,
14204 const typename ParamGenerator<T1>::iterator& current1,
14205 const ParamGenerator<T2>& g2,
14206 const typename ParamGenerator<T2>::iterator& current2,
14207 const ParamGenerator<T3>& g3,
14208 const typename ParamGenerator<T3>::iterator& current3,
14209 const ParamGenerator<T4>& g4,
14210 const typename ParamGenerator<T4>::iterator& current4,
14211 const ParamGenerator<T5>& g5,
14212 const typename ParamGenerator<T5>::iterator& current5)
14214 begin1_(g1.begin()), end1_(g1.end()), current1_(current1),
14215 begin2_(g2.begin()), end2_(g2.end()), current2_(current2),
14216 begin3_(g3.begin()), end3_(g3.end()), current3_(current3),
14217 begin4_(g4.begin()), end4_(g4.end()), current4_(current4),
14218 begin5_(g5.begin()), end5_(g5.end()), current5_(current5) {
14219 ComputeCurrentValue();
14221 virtual ~Iterator() {}
14223 virtual const ParamGeneratorInterface<ParamType>* BaseGenerator() const {
14226 // Advance should not be called on beyond-of-range iterators
14227 // so no component iterators must be beyond end of range, either.
14228 virtual void Advance() {
14231 if (current5_ == end5_) {
14232 current5_ = begin5_;
14235 if (current4_ == end4_) {
14236 current4_ = begin4_;
14239 if (current3_ == end3_) {
14240 current3_ = begin3_;
14243 if (current2_ == end2_) {
14244 current2_ = begin2_;
14247 ComputeCurrentValue();
14249 virtual ParamIteratorInterface<ParamType>* Clone() const {
14250 return new Iterator(*this);
14252 virtual const ParamType* Current() const { return ¤t_value_; }
14253 virtual bool Equals(const ParamIteratorInterface<ParamType>& other) const {
14254 // Having the same base generator guarantees that the other
14255 // iterator is of the same type and we can downcast.
14256 GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
14257 << "The program attempted to compare iterators "
14258 << "from different generators." << std::endl;
14259 const Iterator* typed_other =
14260 CheckedDowncastToActualType<const Iterator>(&other);
14261 // We must report iterators equal if they both point beyond their
14262 // respective ranges. That can happen in a variety of fashions,
14263 // so we have to consult AtEnd().
14264 return (AtEnd() && typed_other->AtEnd()) ||
14266 current1_ == typed_other->current1_ &&
14267 current2_ == typed_other->current2_ &&
14268 current3_ == typed_other->current3_ &&
14269 current4_ == typed_other->current4_ &&
14270 current5_ == typed_other->current5_);
14274 Iterator(const Iterator& other)
14275 : base_(other.base_),
14276 begin1_(other.begin1_),
14277 end1_(other.end1_),
14278 current1_(other.current1_),
14279 begin2_(other.begin2_),
14280 end2_(other.end2_),
14281 current2_(other.current2_),
14282 begin3_(other.begin3_),
14283 end3_(other.end3_),
14284 current3_(other.current3_),
14285 begin4_(other.begin4_),
14286 end4_(other.end4_),
14287 current4_(other.current4_),
14288 begin5_(other.begin5_),
14289 end5_(other.end5_),
14290 current5_(other.current5_) {
14291 ComputeCurrentValue();
14294 void ComputeCurrentValue() {
14296 current_value_ = ParamType(*current1_, *current2_, *current3_,
14297 *current4_, *current5_);
14299 bool AtEnd() const {
14300 // We must report iterator past the end of the range when either of the
14301 // component iterators has reached the end of its range.
14303 current1_ == end1_ ||
14304 current2_ == end2_ ||
14305 current3_ == end3_ ||
14306 current4_ == end4_ ||
14307 current5_ == end5_;
14310 // No implementation - assignment is unsupported.
14311 void operator=(const Iterator& other);
14313 const ParamGeneratorInterface<ParamType>* const base_;
14314 // begin[i]_ and end[i]_ define the i-th range that Iterator traverses.
14315 // current[i]_ is the actual traversing iterator.
14316 const typename ParamGenerator<T1>::iterator begin1_;
14317 const typename ParamGenerator<T1>::iterator end1_;
14318 typename ParamGenerator<T1>::iterator current1_;
14319 const typename ParamGenerator<T2>::iterator begin2_;
14320 const typename ParamGenerator<T2>::iterator end2_;
14321 typename ParamGenerator<T2>::iterator current2_;
14322 const typename ParamGenerator<T3>::iterator begin3_;
14323 const typename ParamGenerator<T3>::iterator end3_;
14324 typename ParamGenerator<T3>::iterator current3_;
14325 const typename ParamGenerator<T4>::iterator begin4_;
14326 const typename ParamGenerator<T4>::iterator end4_;
14327 typename ParamGenerator<T4>::iterator current4_;
14328 const typename ParamGenerator<T5>::iterator begin5_;
14329 const typename ParamGenerator<T5>::iterator end5_;
14330 typename ParamGenerator<T5>::iterator current5_;
14331 ParamType current_value_;
14332 }; // class CartesianProductGenerator5::Iterator
14334 // No implementation - assignment is unsupported.
14335 void operator=(const CartesianProductGenerator5& other);
14337 const ParamGenerator<T1> g1_;
14338 const ParamGenerator<T2> g2_;
14339 const ParamGenerator<T3> g3_;
14340 const ParamGenerator<T4> g4_;
14341 const ParamGenerator<T5> g5_;
14342 }; // class CartesianProductGenerator5
14345 template <typename T1, typename T2, typename T3, typename T4, typename T5,
14347 class CartesianProductGenerator6
14348 : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4, T5,
14351 typedef ::std::tr1::tuple<T1, T2, T3, T4, T5, T6> ParamType;
14353 CartesianProductGenerator6(const ParamGenerator<T1>& g1,
14354 const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3,
14355 const ParamGenerator<T4>& g4, const ParamGenerator<T5>& g5,
14356 const ParamGenerator<T6>& g6)
14357 : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6) {}
14358 virtual ~CartesianProductGenerator6() {}
14360 virtual ParamIteratorInterface<ParamType>* Begin() const {
14361 return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_,
14362 g3_.begin(), g4_, g4_.begin(), g5_, g5_.begin(), g6_, g6_.begin());
14364 virtual ParamIteratorInterface<ParamType>* End() const {
14365 return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(),
14366 g4_, g4_.end(), g5_, g5_.end(), g6_, g6_.end());
14370 class Iterator : public ParamIteratorInterface<ParamType> {
14372 Iterator(const ParamGeneratorInterface<ParamType>* base,
14373 const ParamGenerator<T1>& g1,
14374 const typename ParamGenerator<T1>::iterator& current1,
14375 const ParamGenerator<T2>& g2,
14376 const typename ParamGenerator<T2>::iterator& current2,
14377 const ParamGenerator<T3>& g3,
14378 const typename ParamGenerator<T3>::iterator& current3,
14379 const ParamGenerator<T4>& g4,
14380 const typename ParamGenerator<T4>::iterator& current4,
14381 const ParamGenerator<T5>& g5,
14382 const typename ParamGenerator<T5>::iterator& current5,
14383 const ParamGenerator<T6>& g6,
14384 const typename ParamGenerator<T6>::iterator& current6)
14386 begin1_(g1.begin()), end1_(g1.end()), current1_(current1),
14387 begin2_(g2.begin()), end2_(g2.end()), current2_(current2),
14388 begin3_(g3.begin()), end3_(g3.end()), current3_(current3),
14389 begin4_(g4.begin()), end4_(g4.end()), current4_(current4),
14390 begin5_(g5.begin()), end5_(g5.end()), current5_(current5),
14391 begin6_(g6.begin()), end6_(g6.end()), current6_(current6) {
14392 ComputeCurrentValue();
14394 virtual ~Iterator() {}
14396 virtual const ParamGeneratorInterface<ParamType>* BaseGenerator() const {
14399 // Advance should not be called on beyond-of-range iterators
14400 // so no component iterators must be beyond end of range, either.
14401 virtual void Advance() {
14404 if (current6_ == end6_) {
14405 current6_ = begin6_;
14408 if (current5_ == end5_) {
14409 current5_ = begin5_;
14412 if (current4_ == end4_) {
14413 current4_ = begin4_;
14416 if (current3_ == end3_) {
14417 current3_ = begin3_;
14420 if (current2_ == end2_) {
14421 current2_ = begin2_;
14424 ComputeCurrentValue();
14426 virtual ParamIteratorInterface<ParamType>* Clone() const {
14427 return new Iterator(*this);
14429 virtual const ParamType* Current() const { return ¤t_value_; }
14430 virtual bool Equals(const ParamIteratorInterface<ParamType>& other) const {
14431 // Having the same base generator guarantees that the other
14432 // iterator is of the same type and we can downcast.
14433 GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
14434 << "The program attempted to compare iterators "
14435 << "from different generators." << std::endl;
14436 const Iterator* typed_other =
14437 CheckedDowncastToActualType<const Iterator>(&other);
14438 // We must report iterators equal if they both point beyond their
14439 // respective ranges. That can happen in a variety of fashions,
14440 // so we have to consult AtEnd().
14441 return (AtEnd() && typed_other->AtEnd()) ||
14443 current1_ == typed_other->current1_ &&
14444 current2_ == typed_other->current2_ &&
14445 current3_ == typed_other->current3_ &&
14446 current4_ == typed_other->current4_ &&
14447 current5_ == typed_other->current5_ &&
14448 current6_ == typed_other->current6_);
14452 Iterator(const Iterator& other)
14453 : base_(other.base_),
14454 begin1_(other.begin1_),
14455 end1_(other.end1_),
14456 current1_(other.current1_),
14457 begin2_(other.begin2_),
14458 end2_(other.end2_),
14459 current2_(other.current2_),
14460 begin3_(other.begin3_),
14461 end3_(other.end3_),
14462 current3_(other.current3_),
14463 begin4_(other.begin4_),
14464 end4_(other.end4_),
14465 current4_(other.current4_),
14466 begin5_(other.begin5_),
14467 end5_(other.end5_),
14468 current5_(other.current5_),
14469 begin6_(other.begin6_),
14470 end6_(other.end6_),
14471 current6_(other.current6_) {
14472 ComputeCurrentValue();
14475 void ComputeCurrentValue() {
14477 current_value_ = ParamType(*current1_, *current2_, *current3_,
14478 *current4_, *current5_, *current6_);
14480 bool AtEnd() const {
14481 // We must report iterator past the end of the range when either of the
14482 // component iterators has reached the end of its range.
14484 current1_ == end1_ ||
14485 current2_ == end2_ ||
14486 current3_ == end3_ ||
14487 current4_ == end4_ ||
14488 current5_ == end5_ ||
14489 current6_ == end6_;
14492 // No implementation - assignment is unsupported.
14493 void operator=(const Iterator& other);
14495 const ParamGeneratorInterface<ParamType>* const base_;
14496 // begin[i]_ and end[i]_ define the i-th range that Iterator traverses.
14497 // current[i]_ is the actual traversing iterator.
14498 const typename ParamGenerator<T1>::iterator begin1_;
14499 const typename ParamGenerator<T1>::iterator end1_;
14500 typename ParamGenerator<T1>::iterator current1_;
14501 const typename ParamGenerator<T2>::iterator begin2_;
14502 const typename ParamGenerator<T2>::iterator end2_;
14503 typename ParamGenerator<T2>::iterator current2_;
14504 const typename ParamGenerator<T3>::iterator begin3_;
14505 const typename ParamGenerator<T3>::iterator end3_;
14506 typename ParamGenerator<T3>::iterator current3_;
14507 const typename ParamGenerator<T4>::iterator begin4_;
14508 const typename ParamGenerator<T4>::iterator end4_;
14509 typename ParamGenerator<T4>::iterator current4_;
14510 const typename ParamGenerator<T5>::iterator begin5_;
14511 const typename ParamGenerator<T5>::iterator end5_;
14512 typename ParamGenerator<T5>::iterator current5_;
14513 const typename ParamGenerator<T6>::iterator begin6_;
14514 const typename ParamGenerator<T6>::iterator end6_;
14515 typename ParamGenerator<T6>::iterator current6_;
14516 ParamType current_value_;
14517 }; // class CartesianProductGenerator6::Iterator
14519 // No implementation - assignment is unsupported.
14520 void operator=(const CartesianProductGenerator6& other);
14522 const ParamGenerator<T1> g1_;
14523 const ParamGenerator<T2> g2_;
14524 const ParamGenerator<T3> g3_;
14525 const ParamGenerator<T4> g4_;
14526 const ParamGenerator<T5> g5_;
14527 const ParamGenerator<T6> g6_;
14528 }; // class CartesianProductGenerator6
14531 template <typename T1, typename T2, typename T3, typename T4, typename T5,
14532 typename T6, typename T7>
14533 class CartesianProductGenerator7
14534 : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6,
14537 typedef ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7> ParamType;
14539 CartesianProductGenerator7(const ParamGenerator<T1>& g1,
14540 const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3,
14541 const ParamGenerator<T4>& g4, const ParamGenerator<T5>& g5,
14542 const ParamGenerator<T6>& g6, const ParamGenerator<T7>& g7)
14543 : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7) {}
14544 virtual ~CartesianProductGenerator7() {}
14546 virtual ParamIteratorInterface<ParamType>* Begin() const {
14547 return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_,
14548 g3_.begin(), g4_, g4_.begin(), g5_, g5_.begin(), g6_, g6_.begin(), g7_,
14551 virtual ParamIteratorInterface<ParamType>* End() const {
14552 return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(),
14553 g4_, g4_.end(), g5_, g5_.end(), g6_, g6_.end(), g7_, g7_.end());
14557 class Iterator : public ParamIteratorInterface<ParamType> {
14559 Iterator(const ParamGeneratorInterface<ParamType>* base,
14560 const ParamGenerator<T1>& g1,
14561 const typename ParamGenerator<T1>::iterator& current1,
14562 const ParamGenerator<T2>& g2,
14563 const typename ParamGenerator<T2>::iterator& current2,
14564 const ParamGenerator<T3>& g3,
14565 const typename ParamGenerator<T3>::iterator& current3,
14566 const ParamGenerator<T4>& g4,
14567 const typename ParamGenerator<T4>::iterator& current4,
14568 const ParamGenerator<T5>& g5,
14569 const typename ParamGenerator<T5>::iterator& current5,
14570 const ParamGenerator<T6>& g6,
14571 const typename ParamGenerator<T6>::iterator& current6,
14572 const ParamGenerator<T7>& g7,
14573 const typename ParamGenerator<T7>::iterator& current7)
14575 begin1_(g1.begin()), end1_(g1.end()), current1_(current1),
14576 begin2_(g2.begin()), end2_(g2.end()), current2_(current2),
14577 begin3_(g3.begin()), end3_(g3.end()), current3_(current3),
14578 begin4_(g4.begin()), end4_(g4.end()), current4_(current4),
14579 begin5_(g5.begin()), end5_(g5.end()), current5_(current5),
14580 begin6_(g6.begin()), end6_(g6.end()), current6_(current6),
14581 begin7_(g7.begin()), end7_(g7.end()), current7_(current7) {
14582 ComputeCurrentValue();
14584 virtual ~Iterator() {}
14586 virtual const ParamGeneratorInterface<ParamType>* BaseGenerator() const {
14589 // Advance should not be called on beyond-of-range iterators
14590 // so no component iterators must be beyond end of range, either.
14591 virtual void Advance() {
14594 if (current7_ == end7_) {
14595 current7_ = begin7_;
14598 if (current6_ == end6_) {
14599 current6_ = begin6_;
14602 if (current5_ == end5_) {
14603 current5_ = begin5_;
14606 if (current4_ == end4_) {
14607 current4_ = begin4_;
14610 if (current3_ == end3_) {
14611 current3_ = begin3_;
14614 if (current2_ == end2_) {
14615 current2_ = begin2_;
14618 ComputeCurrentValue();
14620 virtual ParamIteratorInterface<ParamType>* Clone() const {
14621 return new Iterator(*this);
14623 virtual const ParamType* Current() const { return ¤t_value_; }
14624 virtual bool Equals(const ParamIteratorInterface<ParamType>& other) const {
14625 // Having the same base generator guarantees that the other
14626 // iterator is of the same type and we can downcast.
14627 GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
14628 << "The program attempted to compare iterators "
14629 << "from different generators." << std::endl;
14630 const Iterator* typed_other =
14631 CheckedDowncastToActualType<const Iterator>(&other);
14632 // We must report iterators equal if they both point beyond their
14633 // respective ranges. That can happen in a variety of fashions,
14634 // so we have to consult AtEnd().
14635 return (AtEnd() && typed_other->AtEnd()) ||
14637 current1_ == typed_other->current1_ &&
14638 current2_ == typed_other->current2_ &&
14639 current3_ == typed_other->current3_ &&
14640 current4_ == typed_other->current4_ &&
14641 current5_ == typed_other->current5_ &&
14642 current6_ == typed_other->current6_ &&
14643 current7_ == typed_other->current7_);
14647 Iterator(const Iterator& other)
14648 : base_(other.base_),
14649 begin1_(other.begin1_),
14650 end1_(other.end1_),
14651 current1_(other.current1_),
14652 begin2_(other.begin2_),
14653 end2_(other.end2_),
14654 current2_(other.current2_),
14655 begin3_(other.begin3_),
14656 end3_(other.end3_),
14657 current3_(other.current3_),
14658 begin4_(other.begin4_),
14659 end4_(other.end4_),
14660 current4_(other.current4_),
14661 begin5_(other.begin5_),
14662 end5_(other.end5_),
14663 current5_(other.current5_),
14664 begin6_(other.begin6_),
14665 end6_(other.end6_),
14666 current6_(other.current6_),
14667 begin7_(other.begin7_),
14668 end7_(other.end7_),
14669 current7_(other.current7_) {
14670 ComputeCurrentValue();
14673 void ComputeCurrentValue() {
14675 current_value_ = ParamType(*current1_, *current2_, *current3_,
14676 *current4_, *current5_, *current6_, *current7_);
14678 bool AtEnd() const {
14679 // We must report iterator past the end of the range when either of the
14680 // component iterators has reached the end of its range.
14682 current1_ == end1_ ||
14683 current2_ == end2_ ||
14684 current3_ == end3_ ||
14685 current4_ == end4_ ||
14686 current5_ == end5_ ||
14687 current6_ == end6_ ||
14688 current7_ == end7_;
14691 // No implementation - assignment is unsupported.
14692 void operator=(const Iterator& other);
14694 const ParamGeneratorInterface<ParamType>* const base_;
14695 // begin[i]_ and end[i]_ define the i-th range that Iterator traverses.
14696 // current[i]_ is the actual traversing iterator.
14697 const typename ParamGenerator<T1>::iterator begin1_;
14698 const typename ParamGenerator<T1>::iterator end1_;
14699 typename ParamGenerator<T1>::iterator current1_;
14700 const typename ParamGenerator<T2>::iterator begin2_;
14701 const typename ParamGenerator<T2>::iterator end2_;
14702 typename ParamGenerator<T2>::iterator current2_;
14703 const typename ParamGenerator<T3>::iterator begin3_;
14704 const typename ParamGenerator<T3>::iterator end3_;
14705 typename ParamGenerator<T3>::iterator current3_;
14706 const typename ParamGenerator<T4>::iterator begin4_;
14707 const typename ParamGenerator<T4>::iterator end4_;
14708 typename ParamGenerator<T4>::iterator current4_;
14709 const typename ParamGenerator<T5>::iterator begin5_;
14710 const typename ParamGenerator<T5>::iterator end5_;
14711 typename ParamGenerator<T5>::iterator current5_;
14712 const typename ParamGenerator<T6>::iterator begin6_;
14713 const typename ParamGenerator<T6>::iterator end6_;
14714 typename ParamGenerator<T6>::iterator current6_;
14715 const typename ParamGenerator<T7>::iterator begin7_;
14716 const typename ParamGenerator<T7>::iterator end7_;
14717 typename ParamGenerator<T7>::iterator current7_;
14718 ParamType current_value_;
14719 }; // class CartesianProductGenerator7::Iterator
14721 // No implementation - assignment is unsupported.
14722 void operator=(const CartesianProductGenerator7& other);
14724 const ParamGenerator<T1> g1_;
14725 const ParamGenerator<T2> g2_;
14726 const ParamGenerator<T3> g3_;
14727 const ParamGenerator<T4> g4_;
14728 const ParamGenerator<T5> g5_;
14729 const ParamGenerator<T6> g6_;
14730 const ParamGenerator<T7> g7_;
14731 }; // class CartesianProductGenerator7
14734 template <typename T1, typename T2, typename T3, typename T4, typename T5,
14735 typename T6, typename T7, typename T8>
14736 class CartesianProductGenerator8
14737 : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6,
14740 typedef ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8> ParamType;
14742 CartesianProductGenerator8(const ParamGenerator<T1>& g1,
14743 const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3,
14744 const ParamGenerator<T4>& g4, const ParamGenerator<T5>& g5,
14745 const ParamGenerator<T6>& g6, const ParamGenerator<T7>& g7,
14746 const ParamGenerator<T8>& g8)
14747 : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7),
14749 virtual ~CartesianProductGenerator8() {}
14751 virtual ParamIteratorInterface<ParamType>* Begin() const {
14752 return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_,
14753 g3_.begin(), g4_, g4_.begin(), g5_, g5_.begin(), g6_, g6_.begin(), g7_,
14754 g7_.begin(), g8_, g8_.begin());
14756 virtual ParamIteratorInterface<ParamType>* End() const {
14757 return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(),
14758 g4_, g4_.end(), g5_, g5_.end(), g6_, g6_.end(), g7_, g7_.end(), g8_,
14763 class Iterator : public ParamIteratorInterface<ParamType> {
14765 Iterator(const ParamGeneratorInterface<ParamType>* base,
14766 const ParamGenerator<T1>& g1,
14767 const typename ParamGenerator<T1>::iterator& current1,
14768 const ParamGenerator<T2>& g2,
14769 const typename ParamGenerator<T2>::iterator& current2,
14770 const ParamGenerator<T3>& g3,
14771 const typename ParamGenerator<T3>::iterator& current3,
14772 const ParamGenerator<T4>& g4,
14773 const typename ParamGenerator<T4>::iterator& current4,
14774 const ParamGenerator<T5>& g5,
14775 const typename ParamGenerator<T5>::iterator& current5,
14776 const ParamGenerator<T6>& g6,
14777 const typename ParamGenerator<T6>::iterator& current6,
14778 const ParamGenerator<T7>& g7,
14779 const typename ParamGenerator<T7>::iterator& current7,
14780 const ParamGenerator<T8>& g8,
14781 const typename ParamGenerator<T8>::iterator& current8)
14783 begin1_(g1.begin()), end1_(g1.end()), current1_(current1),
14784 begin2_(g2.begin()), end2_(g2.end()), current2_(current2),
14785 begin3_(g3.begin()), end3_(g3.end()), current3_(current3),
14786 begin4_(g4.begin()), end4_(g4.end()), current4_(current4),
14787 begin5_(g5.begin()), end5_(g5.end()), current5_(current5),
14788 begin6_(g6.begin()), end6_(g6.end()), current6_(current6),
14789 begin7_(g7.begin()), end7_(g7.end()), current7_(current7),
14790 begin8_(g8.begin()), end8_(g8.end()), current8_(current8) {
14791 ComputeCurrentValue();
14793 virtual ~Iterator() {}
14795 virtual const ParamGeneratorInterface<ParamType>* BaseGenerator() const {
14798 // Advance should not be called on beyond-of-range iterators
14799 // so no component iterators must be beyond end of range, either.
14800 virtual void Advance() {
14803 if (current8_ == end8_) {
14804 current8_ = begin8_;
14807 if (current7_ == end7_) {
14808 current7_ = begin7_;
14811 if (current6_ == end6_) {
14812 current6_ = begin6_;
14815 if (current5_ == end5_) {
14816 current5_ = begin5_;
14819 if (current4_ == end4_) {
14820 current4_ = begin4_;
14823 if (current3_ == end3_) {
14824 current3_ = begin3_;
14827 if (current2_ == end2_) {
14828 current2_ = begin2_;
14831 ComputeCurrentValue();
14833 virtual ParamIteratorInterface<ParamType>* Clone() const {
14834 return new Iterator(*this);
14836 virtual const ParamType* Current() const { return ¤t_value_; }
14837 virtual bool Equals(const ParamIteratorInterface<ParamType>& other) const {
14838 // Having the same base generator guarantees that the other
14839 // iterator is of the same type and we can downcast.
14840 GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
14841 << "The program attempted to compare iterators "
14842 << "from different generators." << std::endl;
14843 const Iterator* typed_other =
14844 CheckedDowncastToActualType<const Iterator>(&other);
14845 // We must report iterators equal if they both point beyond their
14846 // respective ranges. That can happen in a variety of fashions,
14847 // so we have to consult AtEnd().
14848 return (AtEnd() && typed_other->AtEnd()) ||
14850 current1_ == typed_other->current1_ &&
14851 current2_ == typed_other->current2_ &&
14852 current3_ == typed_other->current3_ &&
14853 current4_ == typed_other->current4_ &&
14854 current5_ == typed_other->current5_ &&
14855 current6_ == typed_other->current6_ &&
14856 current7_ == typed_other->current7_ &&
14857 current8_ == typed_other->current8_);
14861 Iterator(const Iterator& other)
14862 : base_(other.base_),
14863 begin1_(other.begin1_),
14864 end1_(other.end1_),
14865 current1_(other.current1_),
14866 begin2_(other.begin2_),
14867 end2_(other.end2_),
14868 current2_(other.current2_),
14869 begin3_(other.begin3_),
14870 end3_(other.end3_),
14871 current3_(other.current3_),
14872 begin4_(other.begin4_),
14873 end4_(other.end4_),
14874 current4_(other.current4_),
14875 begin5_(other.begin5_),
14876 end5_(other.end5_),
14877 current5_(other.current5_),
14878 begin6_(other.begin6_),
14879 end6_(other.end6_),
14880 current6_(other.current6_),
14881 begin7_(other.begin7_),
14882 end7_(other.end7_),
14883 current7_(other.current7_),
14884 begin8_(other.begin8_),
14885 end8_(other.end8_),
14886 current8_(other.current8_) {
14887 ComputeCurrentValue();
14890 void ComputeCurrentValue() {
14892 current_value_ = ParamType(*current1_, *current2_, *current3_,
14893 *current4_, *current5_, *current6_, *current7_, *current8_);
14895 bool AtEnd() const {
14896 // We must report iterator past the end of the range when either of the
14897 // component iterators has reached the end of its range.
14899 current1_ == end1_ ||
14900 current2_ == end2_ ||
14901 current3_ == end3_ ||
14902 current4_ == end4_ ||
14903 current5_ == end5_ ||
14904 current6_ == end6_ ||
14905 current7_ == end7_ ||
14906 current8_ == end8_;
14909 // No implementation - assignment is unsupported.
14910 void operator=(const Iterator& other);
14912 const ParamGeneratorInterface<ParamType>* const base_;
14913 // begin[i]_ and end[i]_ define the i-th range that Iterator traverses.
14914 // current[i]_ is the actual traversing iterator.
14915 const typename ParamGenerator<T1>::iterator begin1_;
14916 const typename ParamGenerator<T1>::iterator end1_;
14917 typename ParamGenerator<T1>::iterator current1_;
14918 const typename ParamGenerator<T2>::iterator begin2_;
14919 const typename ParamGenerator<T2>::iterator end2_;
14920 typename ParamGenerator<T2>::iterator current2_;
14921 const typename ParamGenerator<T3>::iterator begin3_;
14922 const typename ParamGenerator<T3>::iterator end3_;
14923 typename ParamGenerator<T3>::iterator current3_;
14924 const typename ParamGenerator<T4>::iterator begin4_;
14925 const typename ParamGenerator<T4>::iterator end4_;
14926 typename ParamGenerator<T4>::iterator current4_;
14927 const typename ParamGenerator<T5>::iterator begin5_;
14928 const typename ParamGenerator<T5>::iterator end5_;
14929 typename ParamGenerator<T5>::iterator current5_;
14930 const typename ParamGenerator<T6>::iterator begin6_;
14931 const typename ParamGenerator<T6>::iterator end6_;
14932 typename ParamGenerator<T6>::iterator current6_;
14933 const typename ParamGenerator<T7>::iterator begin7_;
14934 const typename ParamGenerator<T7>::iterator end7_;
14935 typename ParamGenerator<T7>::iterator current7_;
14936 const typename ParamGenerator<T8>::iterator begin8_;
14937 const typename ParamGenerator<T8>::iterator end8_;
14938 typename ParamGenerator<T8>::iterator current8_;
14939 ParamType current_value_;
14940 }; // class CartesianProductGenerator8::Iterator
14942 // No implementation - assignment is unsupported.
14943 void operator=(const CartesianProductGenerator8& other);
14945 const ParamGenerator<T1> g1_;
14946 const ParamGenerator<T2> g2_;
14947 const ParamGenerator<T3> g3_;
14948 const ParamGenerator<T4> g4_;
14949 const ParamGenerator<T5> g5_;
14950 const ParamGenerator<T6> g6_;
14951 const ParamGenerator<T7> g7_;
14952 const ParamGenerator<T8> g8_;
14953 }; // class CartesianProductGenerator8
14956 template <typename T1, typename T2, typename T3, typename T4, typename T5,
14957 typename T6, typename T7, typename T8, typename T9>
14958 class CartesianProductGenerator9
14959 : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6,
14962 typedef ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9> ParamType;
14964 CartesianProductGenerator9(const ParamGenerator<T1>& g1,
14965 const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3,
14966 const ParamGenerator<T4>& g4, const ParamGenerator<T5>& g5,
14967 const ParamGenerator<T6>& g6, const ParamGenerator<T7>& g7,
14968 const ParamGenerator<T8>& g8, const ParamGenerator<T9>& g9)
14969 : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7), g8_(g8),
14971 virtual ~CartesianProductGenerator9() {}
14973 virtual ParamIteratorInterface<ParamType>* Begin() const {
14974 return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_,
14975 g3_.begin(), g4_, g4_.begin(), g5_, g5_.begin(), g6_, g6_.begin(), g7_,
14976 g7_.begin(), g8_, g8_.begin(), g9_, g9_.begin());
14978 virtual ParamIteratorInterface<ParamType>* End() const {
14979 return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(),
14980 g4_, g4_.end(), g5_, g5_.end(), g6_, g6_.end(), g7_, g7_.end(), g8_,
14981 g8_.end(), g9_, g9_.end());
14985 class Iterator : public ParamIteratorInterface<ParamType> {
14987 Iterator(const ParamGeneratorInterface<ParamType>* base,
14988 const ParamGenerator<T1>& g1,
14989 const typename ParamGenerator<T1>::iterator& current1,
14990 const ParamGenerator<T2>& g2,
14991 const typename ParamGenerator<T2>::iterator& current2,
14992 const ParamGenerator<T3>& g3,
14993 const typename ParamGenerator<T3>::iterator& current3,
14994 const ParamGenerator<T4>& g4,
14995 const typename ParamGenerator<T4>::iterator& current4,
14996 const ParamGenerator<T5>& g5,
14997 const typename ParamGenerator<T5>::iterator& current5,
14998 const ParamGenerator<T6>& g6,
14999 const typename ParamGenerator<T6>::iterator& current6,
15000 const ParamGenerator<T7>& g7,
15001 const typename ParamGenerator<T7>::iterator& current7,
15002 const ParamGenerator<T8>& g8,
15003 const typename ParamGenerator<T8>::iterator& current8,
15004 const ParamGenerator<T9>& g9,
15005 const typename ParamGenerator<T9>::iterator& current9)
15007 begin1_(g1.begin()), end1_(g1.end()), current1_(current1),
15008 begin2_(g2.begin()), end2_(g2.end()), current2_(current2),
15009 begin3_(g3.begin()), end3_(g3.end()), current3_(current3),
15010 begin4_(g4.begin()), end4_(g4.end()), current4_(current4),
15011 begin5_(g5.begin()), end5_(g5.end()), current5_(current5),
15012 begin6_(g6.begin()), end6_(g6.end()), current6_(current6),
15013 begin7_(g7.begin()), end7_(g7.end()), current7_(current7),
15014 begin8_(g8.begin()), end8_(g8.end()), current8_(current8),
15015 begin9_(g9.begin()), end9_(g9.end()), current9_(current9) {
15016 ComputeCurrentValue();
15018 virtual ~Iterator() {}
15020 virtual const ParamGeneratorInterface<ParamType>* BaseGenerator() const {
15023 // Advance should not be called on beyond-of-range iterators
15024 // so no component iterators must be beyond end of range, either.
15025 virtual void Advance() {
15028 if (current9_ == end9_) {
15029 current9_ = begin9_;
15032 if (current8_ == end8_) {
15033 current8_ = begin8_;
15036 if (current7_ == end7_) {
15037 current7_ = begin7_;
15040 if (current6_ == end6_) {
15041 current6_ = begin6_;
15044 if (current5_ == end5_) {
15045 current5_ = begin5_;
15048 if (current4_ == end4_) {
15049 current4_ = begin4_;
15052 if (current3_ == end3_) {
15053 current3_ = begin3_;
15056 if (current2_ == end2_) {
15057 current2_ = begin2_;
15060 ComputeCurrentValue();
15062 virtual ParamIteratorInterface<ParamType>* Clone() const {
15063 return new Iterator(*this);
15065 virtual const ParamType* Current() const { return ¤t_value_; }
15066 virtual bool Equals(const ParamIteratorInterface<ParamType>& other) const {
15067 // Having the same base generator guarantees that the other
15068 // iterator is of the same type and we can downcast.
15069 GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
15070 << "The program attempted to compare iterators "
15071 << "from different generators." << std::endl;
15072 const Iterator* typed_other =
15073 CheckedDowncastToActualType<const Iterator>(&other);
15074 // We must report iterators equal if they both point beyond their
15075 // respective ranges. That can happen in a variety of fashions,
15076 // so we have to consult AtEnd().
15077 return (AtEnd() && typed_other->AtEnd()) ||
15079 current1_ == typed_other->current1_ &&
15080 current2_ == typed_other->current2_ &&
15081 current3_ == typed_other->current3_ &&
15082 current4_ == typed_other->current4_ &&
15083 current5_ == typed_other->current5_ &&
15084 current6_ == typed_other->current6_ &&
15085 current7_ == typed_other->current7_ &&
15086 current8_ == typed_other->current8_ &&
15087 current9_ == typed_other->current9_);
15091 Iterator(const Iterator& other)
15092 : base_(other.base_),
15093 begin1_(other.begin1_),
15094 end1_(other.end1_),
15095 current1_(other.current1_),
15096 begin2_(other.begin2_),
15097 end2_(other.end2_),
15098 current2_(other.current2_),
15099 begin3_(other.begin3_),
15100 end3_(other.end3_),
15101 current3_(other.current3_),
15102 begin4_(other.begin4_),
15103 end4_(other.end4_),
15104 current4_(other.current4_),
15105 begin5_(other.begin5_),
15106 end5_(other.end5_),
15107 current5_(other.current5_),
15108 begin6_(other.begin6_),
15109 end6_(other.end6_),
15110 current6_(other.current6_),
15111 begin7_(other.begin7_),
15112 end7_(other.end7_),
15113 current7_(other.current7_),
15114 begin8_(other.begin8_),
15115 end8_(other.end8_),
15116 current8_(other.current8_),
15117 begin9_(other.begin9_),
15118 end9_(other.end9_),
15119 current9_(other.current9_) {
15120 ComputeCurrentValue();
15123 void ComputeCurrentValue() {
15125 current_value_ = ParamType(*current1_, *current2_, *current3_,
15126 *current4_, *current5_, *current6_, *current7_, *current8_,
15129 bool AtEnd() const {
15130 // We must report iterator past the end of the range when either of the
15131 // component iterators has reached the end of its range.
15133 current1_ == end1_ ||
15134 current2_ == end2_ ||
15135 current3_ == end3_ ||
15136 current4_ == end4_ ||
15137 current5_ == end5_ ||
15138 current6_ == end6_ ||
15139 current7_ == end7_ ||
15140 current8_ == end8_ ||
15141 current9_ == end9_;
15144 // No implementation - assignment is unsupported.
15145 void operator=(const Iterator& other);
15147 const ParamGeneratorInterface<ParamType>* const base_;
15148 // begin[i]_ and end[i]_ define the i-th range that Iterator traverses.
15149 // current[i]_ is the actual traversing iterator.
15150 const typename ParamGenerator<T1>::iterator begin1_;
15151 const typename ParamGenerator<T1>::iterator end1_;
15152 typename ParamGenerator<T1>::iterator current1_;
15153 const typename ParamGenerator<T2>::iterator begin2_;
15154 const typename ParamGenerator<T2>::iterator end2_;
15155 typename ParamGenerator<T2>::iterator current2_;
15156 const typename ParamGenerator<T3>::iterator begin3_;
15157 const typename ParamGenerator<T3>::iterator end3_;
15158 typename ParamGenerator<T3>::iterator current3_;
15159 const typename ParamGenerator<T4>::iterator begin4_;
15160 const typename ParamGenerator<T4>::iterator end4_;
15161 typename ParamGenerator<T4>::iterator current4_;
15162 const typename ParamGenerator<T5>::iterator begin5_;
15163 const typename ParamGenerator<T5>::iterator end5_;
15164 typename ParamGenerator<T5>::iterator current5_;
15165 const typename ParamGenerator<T6>::iterator begin6_;
15166 const typename ParamGenerator<T6>::iterator end6_;
15167 typename ParamGenerator<T6>::iterator current6_;
15168 const typename ParamGenerator<T7>::iterator begin7_;
15169 const typename ParamGenerator<T7>::iterator end7_;
15170 typename ParamGenerator<T7>::iterator current7_;
15171 const typename ParamGenerator<T8>::iterator begin8_;
15172 const typename ParamGenerator<T8>::iterator end8_;
15173 typename ParamGenerator<T8>::iterator current8_;
15174 const typename ParamGenerator<T9>::iterator begin9_;
15175 const typename ParamGenerator<T9>::iterator end9_;
15176 typename ParamGenerator<T9>::iterator current9_;
15177 ParamType current_value_;
15178 }; // class CartesianProductGenerator9::Iterator
15180 // No implementation - assignment is unsupported.
15181 void operator=(const CartesianProductGenerator9& other);
15183 const ParamGenerator<T1> g1_;
15184 const ParamGenerator<T2> g2_;
15185 const ParamGenerator<T3> g3_;
15186 const ParamGenerator<T4> g4_;
15187 const ParamGenerator<T5> g5_;
15188 const ParamGenerator<T6> g6_;
15189 const ParamGenerator<T7> g7_;
15190 const ParamGenerator<T8> g8_;
15191 const ParamGenerator<T9> g9_;
15192 }; // class CartesianProductGenerator9
15195 template <typename T1, typename T2, typename T3, typename T4, typename T5,
15196 typename T6, typename T7, typename T8, typename T9, typename T10>
15197 class CartesianProductGenerator10
15198 : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6,
15199 T7, T8, T9, T10> > {
15201 typedef ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> ParamType;
15203 CartesianProductGenerator10(const ParamGenerator<T1>& g1,
15204 const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3,
15205 const ParamGenerator<T4>& g4, const ParamGenerator<T5>& g5,
15206 const ParamGenerator<T6>& g6, const ParamGenerator<T7>& g7,
15207 const ParamGenerator<T8>& g8, const ParamGenerator<T9>& g9,
15208 const ParamGenerator<T10>& g10)
15209 : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7), g8_(g8),
15210 g9_(g9), g10_(g10) {}
15211 virtual ~CartesianProductGenerator10() {}
15213 virtual ParamIteratorInterface<ParamType>* Begin() const {
15214 return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_,
15215 g3_.begin(), g4_, g4_.begin(), g5_, g5_.begin(), g6_, g6_.begin(), g7_,
15216 g7_.begin(), g8_, g8_.begin(), g9_, g9_.begin(), g10_, g10_.begin());
15218 virtual ParamIteratorInterface<ParamType>* End() const {
15219 return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(),
15220 g4_, g4_.end(), g5_, g5_.end(), g6_, g6_.end(), g7_, g7_.end(), g8_,
15221 g8_.end(), g9_, g9_.end(), g10_, g10_.end());
15225 class Iterator : public ParamIteratorInterface<ParamType> {
15227 Iterator(const ParamGeneratorInterface<ParamType>* base,
15228 const ParamGenerator<T1>& g1,
15229 const typename ParamGenerator<T1>::iterator& current1,
15230 const ParamGenerator<T2>& g2,
15231 const typename ParamGenerator<T2>::iterator& current2,
15232 const ParamGenerator<T3>& g3,
15233 const typename ParamGenerator<T3>::iterator& current3,
15234 const ParamGenerator<T4>& g4,
15235 const typename ParamGenerator<T4>::iterator& current4,
15236 const ParamGenerator<T5>& g5,
15237 const typename ParamGenerator<T5>::iterator& current5,
15238 const ParamGenerator<T6>& g6,
15239 const typename ParamGenerator<T6>::iterator& current6,
15240 const ParamGenerator<T7>& g7,
15241 const typename ParamGenerator<T7>::iterator& current7,
15242 const ParamGenerator<T8>& g8,
15243 const typename ParamGenerator<T8>::iterator& current8,
15244 const ParamGenerator<T9>& g9,
15245 const typename ParamGenerator<T9>::iterator& current9,
15246 const ParamGenerator<T10>& g10,
15247 const typename ParamGenerator<T10>::iterator& current10)
15249 begin1_(g1.begin()), end1_(g1.end()), current1_(current1),
15250 begin2_(g2.begin()), end2_(g2.end()), current2_(current2),
15251 begin3_(g3.begin()), end3_(g3.end()), current3_(current3),
15252 begin4_(g4.begin()), end4_(g4.end()), current4_(current4),
15253 begin5_(g5.begin()), end5_(g5.end()), current5_(current5),
15254 begin6_(g6.begin()), end6_(g6.end()), current6_(current6),
15255 begin7_(g7.begin()), end7_(g7.end()), current7_(current7),
15256 begin8_(g8.begin()), end8_(g8.end()), current8_(current8),
15257 begin9_(g9.begin()), end9_(g9.end()), current9_(current9),
15258 begin10_(g10.begin()), end10_(g10.end()), current10_(current10) {
15259 ComputeCurrentValue();
15261 virtual ~Iterator() {}
15263 virtual const ParamGeneratorInterface<ParamType>* BaseGenerator() const {
15266 // Advance should not be called on beyond-of-range iterators
15267 // so no component iterators must be beyond end of range, either.
15268 virtual void Advance() {
15271 if (current10_ == end10_) {
15272 current10_ = begin10_;
15275 if (current9_ == end9_) {
15276 current9_ = begin9_;
15279 if (current8_ == end8_) {
15280 current8_ = begin8_;
15283 if (current7_ == end7_) {
15284 current7_ = begin7_;
15287 if (current6_ == end6_) {
15288 current6_ = begin6_;
15291 if (current5_ == end5_) {
15292 current5_ = begin5_;
15295 if (current4_ == end4_) {
15296 current4_ = begin4_;
15299 if (current3_ == end3_) {
15300 current3_ = begin3_;
15303 if (current2_ == end2_) {
15304 current2_ = begin2_;
15307 ComputeCurrentValue();
15309 virtual ParamIteratorInterface<ParamType>* Clone() const {
15310 return new Iterator(*this);
15312 virtual const ParamType* Current() const { return ¤t_value_; }
15313 virtual bool Equals(const ParamIteratorInterface<ParamType>& other) const {
15314 // Having the same base generator guarantees that the other
15315 // iterator is of the same type and we can downcast.
15316 GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
15317 << "The program attempted to compare iterators "
15318 << "from different generators." << std::endl;
15319 const Iterator* typed_other =
15320 CheckedDowncastToActualType<const Iterator>(&other);
15321 // We must report iterators equal if they both point beyond their
15322 // respective ranges. That can happen in a variety of fashions,
15323 // so we have to consult AtEnd().
15324 return (AtEnd() && typed_other->AtEnd()) ||
15326 current1_ == typed_other->current1_ &&
15327 current2_ == typed_other->current2_ &&
15328 current3_ == typed_other->current3_ &&
15329 current4_ == typed_other->current4_ &&
15330 current5_ == typed_other->current5_ &&
15331 current6_ == typed_other->current6_ &&
15332 current7_ == typed_other->current7_ &&
15333 current8_ == typed_other->current8_ &&
15334 current9_ == typed_other->current9_ &&
15335 current10_ == typed_other->current10_);
15339 Iterator(const Iterator& other)
15340 : base_(other.base_),
15341 begin1_(other.begin1_),
15342 end1_(other.end1_),
15343 current1_(other.current1_),
15344 begin2_(other.begin2_),
15345 end2_(other.end2_),
15346 current2_(other.current2_),
15347 begin3_(other.begin3_),
15348 end3_(other.end3_),
15349 current3_(other.current3_),
15350 begin4_(other.begin4_),
15351 end4_(other.end4_),
15352 current4_(other.current4_),
15353 begin5_(other.begin5_),
15354 end5_(other.end5_),
15355 current5_(other.current5_),
15356 begin6_(other.begin6_),
15357 end6_(other.end6_),
15358 current6_(other.current6_),
15359 begin7_(other.begin7_),
15360 end7_(other.end7_),
15361 current7_(other.current7_),
15362 begin8_(other.begin8_),
15363 end8_(other.end8_),
15364 current8_(other.current8_),
15365 begin9_(other.begin9_),
15366 end9_(other.end9_),
15367 current9_(other.current9_),
15368 begin10_(other.begin10_),
15369 end10_(other.end10_),
15370 current10_(other.current10_) {
15371 ComputeCurrentValue();
15374 void ComputeCurrentValue() {
15376 current_value_ = ParamType(*current1_, *current2_, *current3_,
15377 *current4_, *current5_, *current6_, *current7_, *current8_,
15378 *current9_, *current10_);
15380 bool AtEnd() const {
15381 // We must report iterator past the end of the range when either of the
15382 // component iterators has reached the end of its range.
15384 current1_ == end1_ ||
15385 current2_ == end2_ ||
15386 current3_ == end3_ ||
15387 current4_ == end4_ ||
15388 current5_ == end5_ ||
15389 current6_ == end6_ ||
15390 current7_ == end7_ ||
15391 current8_ == end8_ ||
15392 current9_ == end9_ ||
15393 current10_ == end10_;
15396 // No implementation - assignment is unsupported.
15397 void operator=(const Iterator& other);
15399 const ParamGeneratorInterface<ParamType>* const base_;
15400 // begin[i]_ and end[i]_ define the i-th range that Iterator traverses.
15401 // current[i]_ is the actual traversing iterator.
15402 const typename ParamGenerator<T1>::iterator begin1_;
15403 const typename ParamGenerator<T1>::iterator end1_;
15404 typename ParamGenerator<T1>::iterator current1_;
15405 const typename ParamGenerator<T2>::iterator begin2_;
15406 const typename ParamGenerator<T2>::iterator end2_;
15407 typename ParamGenerator<T2>::iterator current2_;
15408 const typename ParamGenerator<T3>::iterator begin3_;
15409 const typename ParamGenerator<T3>::iterator end3_;
15410 typename ParamGenerator<T3>::iterator current3_;
15411 const typename ParamGenerator<T4>::iterator begin4_;
15412 const typename ParamGenerator<T4>::iterator end4_;
15413 typename ParamGenerator<T4>::iterator current4_;
15414 const typename ParamGenerator<T5>::iterator begin5_;
15415 const typename ParamGenerator<T5>::iterator end5_;
15416 typename ParamGenerator<T5>::iterator current5_;
15417 const typename ParamGenerator<T6>::iterator begin6_;
15418 const typename ParamGenerator<T6>::iterator end6_;
15419 typename ParamGenerator<T6>::iterator current6_;
15420 const typename ParamGenerator<T7>::iterator begin7_;
15421 const typename ParamGenerator<T7>::iterator end7_;
15422 typename ParamGenerator<T7>::iterator current7_;
15423 const typename ParamGenerator<T8>::iterator begin8_;
15424 const typename ParamGenerator<T8>::iterator end8_;
15425 typename ParamGenerator<T8>::iterator current8_;
15426 const typename ParamGenerator<T9>::iterator begin9_;
15427 const typename ParamGenerator<T9>::iterator end9_;
15428 typename ParamGenerator<T9>::iterator current9_;
15429 const typename ParamGenerator<T10>::iterator begin10_;
15430 const typename ParamGenerator<T10>::iterator end10_;
15431 typename ParamGenerator<T10>::iterator current10_;
15432 ParamType current_value_;
15433 }; // class CartesianProductGenerator10::Iterator
15435 // No implementation - assignment is unsupported.
15436 void operator=(const CartesianProductGenerator10& other);
15438 const ParamGenerator<T1> g1_;
15439 const ParamGenerator<T2> g2_;
15440 const ParamGenerator<T3> g3_;
15441 const ParamGenerator<T4> g4_;
15442 const ParamGenerator<T5> g5_;
15443 const ParamGenerator<T6> g6_;
15444 const ParamGenerator<T7> g7_;
15445 const ParamGenerator<T8> g8_;
15446 const ParamGenerator<T9> g9_;
15447 const ParamGenerator<T10> g10_;
15448 }; // class CartesianProductGenerator10
15451 // INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
15453 // Helper classes providing Combine() with polymorphic features. They allow
15454 // casting CartesianProductGeneratorN<T> to ParamGenerator<U> if T is
15455 // convertible to U.
15457 template <class Generator1, class Generator2>
15458 class CartesianProductHolder2 {
15460 CartesianProductHolder2(const Generator1& g1, const Generator2& g2)
15461 : g1_(g1), g2_(g2) {}
15462 template <typename T1, typename T2>
15463 operator ParamGenerator< ::std::tr1::tuple<T1, T2> >() const {
15464 return ParamGenerator< ::std::tr1::tuple<T1, T2> >(
15465 new CartesianProductGenerator2<T1, T2>(
15466 static_cast<ParamGenerator<T1> >(g1_),
15467 static_cast<ParamGenerator<T2> >(g2_)));
15471 // No implementation - assignment is unsupported.
15472 void operator=(const CartesianProductHolder2& other);
15474 const Generator1 g1_;
15475 const Generator2 g2_;
15476 }; // class CartesianProductHolder2
15478 template <class Generator1, class Generator2, class Generator3>
15479 class CartesianProductHolder3 {
15481 CartesianProductHolder3(const Generator1& g1, const Generator2& g2,
15482 const Generator3& g3)
15483 : g1_(g1), g2_(g2), g3_(g3) {}
15484 template <typename T1, typename T2, typename T3>
15485 operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3> >() const {
15486 return ParamGenerator< ::std::tr1::tuple<T1, T2, T3> >(
15487 new CartesianProductGenerator3<T1, T2, T3>(
15488 static_cast<ParamGenerator<T1> >(g1_),
15489 static_cast<ParamGenerator<T2> >(g2_),
15490 static_cast<ParamGenerator<T3> >(g3_)));
15494 // No implementation - assignment is unsupported.
15495 void operator=(const CartesianProductHolder3& other);
15497 const Generator1 g1_;
15498 const Generator2 g2_;
15499 const Generator3 g3_;
15500 }; // class CartesianProductHolder3
15502 template <class Generator1, class Generator2, class Generator3,
15504 class CartesianProductHolder4 {
15506 CartesianProductHolder4(const Generator1& g1, const Generator2& g2,
15507 const Generator3& g3, const Generator4& g4)
15508 : g1_(g1), g2_(g2), g3_(g3), g4_(g4) {}
15509 template <typename T1, typename T2, typename T3, typename T4>
15510 operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4> >() const {
15511 return ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4> >(
15512 new CartesianProductGenerator4<T1, T2, T3, T4>(
15513 static_cast<ParamGenerator<T1> >(g1_),
15514 static_cast<ParamGenerator<T2> >(g2_),
15515 static_cast<ParamGenerator<T3> >(g3_),
15516 static_cast<ParamGenerator<T4> >(g4_)));
15520 // No implementation - assignment is unsupported.
15521 void operator=(const CartesianProductHolder4& other);
15523 const Generator1 g1_;
15524 const Generator2 g2_;
15525 const Generator3 g3_;
15526 const Generator4 g4_;
15527 }; // class CartesianProductHolder4
15529 template <class Generator1, class Generator2, class Generator3,
15530 class Generator4, class Generator5>
15531 class CartesianProductHolder5 {
15533 CartesianProductHolder5(const Generator1& g1, const Generator2& g2,
15534 const Generator3& g3, const Generator4& g4, const Generator5& g5)
15535 : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5) {}
15536 template <typename T1, typename T2, typename T3, typename T4, typename T5>
15537 operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5> >() const {
15538 return ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5> >(
15539 new CartesianProductGenerator5<T1, T2, T3, T4, T5>(
15540 static_cast<ParamGenerator<T1> >(g1_),
15541 static_cast<ParamGenerator<T2> >(g2_),
15542 static_cast<ParamGenerator<T3> >(g3_),
15543 static_cast<ParamGenerator<T4> >(g4_),
15544 static_cast<ParamGenerator<T5> >(g5_)));
15548 // No implementation - assignment is unsupported.
15549 void operator=(const CartesianProductHolder5& other);
15551 const Generator1 g1_;
15552 const Generator2 g2_;
15553 const Generator3 g3_;
15554 const Generator4 g4_;
15555 const Generator5 g5_;
15556 }; // class CartesianProductHolder5
15558 template <class Generator1, class Generator2, class Generator3,
15559 class Generator4, class Generator5, class Generator6>
15560 class CartesianProductHolder6 {
15562 CartesianProductHolder6(const Generator1& g1, const Generator2& g2,
15563 const Generator3& g3, const Generator4& g4, const Generator5& g5,
15564 const Generator6& g6)
15565 : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6) {}
15566 template <typename T1, typename T2, typename T3, typename T4, typename T5,
15568 operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6> >() const {
15569 return ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6> >(
15570 new CartesianProductGenerator6<T1, T2, T3, T4, T5, T6>(
15571 static_cast<ParamGenerator<T1> >(g1_),
15572 static_cast<ParamGenerator<T2> >(g2_),
15573 static_cast<ParamGenerator<T3> >(g3_),
15574 static_cast<ParamGenerator<T4> >(g4_),
15575 static_cast<ParamGenerator<T5> >(g5_),
15576 static_cast<ParamGenerator<T6> >(g6_)));
15580 // No implementation - assignment is unsupported.
15581 void operator=(const CartesianProductHolder6& other);
15583 const Generator1 g1_;
15584 const Generator2 g2_;
15585 const Generator3 g3_;
15586 const Generator4 g4_;
15587 const Generator5 g5_;
15588 const Generator6 g6_;
15589 }; // class CartesianProductHolder6
15591 template <class Generator1, class Generator2, class Generator3,
15592 class Generator4, class Generator5, class Generator6, class Generator7>
15593 class CartesianProductHolder7 {
15595 CartesianProductHolder7(const Generator1& g1, const Generator2& g2,
15596 const Generator3& g3, const Generator4& g4, const Generator5& g5,
15597 const Generator6& g6, const Generator7& g7)
15598 : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7) {}
15599 template <typename T1, typename T2, typename T3, typename T4, typename T5,
15600 typename T6, typename T7>
15601 operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6,
15603 return ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7> >(
15604 new CartesianProductGenerator7<T1, T2, T3, T4, T5, T6, T7>(
15605 static_cast<ParamGenerator<T1> >(g1_),
15606 static_cast<ParamGenerator<T2> >(g2_),
15607 static_cast<ParamGenerator<T3> >(g3_),
15608 static_cast<ParamGenerator<T4> >(g4_),
15609 static_cast<ParamGenerator<T5> >(g5_),
15610 static_cast<ParamGenerator<T6> >(g6_),
15611 static_cast<ParamGenerator<T7> >(g7_)));
15615 // No implementation - assignment is unsupported.
15616 void operator=(const CartesianProductHolder7& other);
15618 const Generator1 g1_;
15619 const Generator2 g2_;
15620 const Generator3 g3_;
15621 const Generator4 g4_;
15622 const Generator5 g5_;
15623 const Generator6 g6_;
15624 const Generator7 g7_;
15625 }; // class CartesianProductHolder7
15627 template <class Generator1, class Generator2, class Generator3,
15628 class Generator4, class Generator5, class Generator6, class Generator7,
15630 class CartesianProductHolder8 {
15632 CartesianProductHolder8(const Generator1& g1, const Generator2& g2,
15633 const Generator3& g3, const Generator4& g4, const Generator5& g5,
15634 const Generator6& g6, const Generator7& g7, const Generator8& g8)
15635 : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7),
15637 template <typename T1, typename T2, typename T3, typename T4, typename T5,
15638 typename T6, typename T7, typename T8>
15639 operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7,
15641 return ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8> >(
15642 new CartesianProductGenerator8<T1, T2, T3, T4, T5, T6, T7, T8>(
15643 static_cast<ParamGenerator<T1> >(g1_),
15644 static_cast<ParamGenerator<T2> >(g2_),
15645 static_cast<ParamGenerator<T3> >(g3_),
15646 static_cast<ParamGenerator<T4> >(g4_),
15647 static_cast<ParamGenerator<T5> >(g5_),
15648 static_cast<ParamGenerator<T6> >(g6_),
15649 static_cast<ParamGenerator<T7> >(g7_),
15650 static_cast<ParamGenerator<T8> >(g8_)));
15654 // No implementation - assignment is unsupported.
15655 void operator=(const CartesianProductHolder8& other);
15657 const Generator1 g1_;
15658 const Generator2 g2_;
15659 const Generator3 g3_;
15660 const Generator4 g4_;
15661 const Generator5 g5_;
15662 const Generator6 g6_;
15663 const Generator7 g7_;
15664 const Generator8 g8_;
15665 }; // class CartesianProductHolder8
15667 template <class Generator1, class Generator2, class Generator3,
15668 class Generator4, class Generator5, class Generator6, class Generator7,
15669 class Generator8, class Generator9>
15670 class CartesianProductHolder9 {
15672 CartesianProductHolder9(const Generator1& g1, const Generator2& g2,
15673 const Generator3& g3, const Generator4& g4, const Generator5& g5,
15674 const Generator6& g6, const Generator7& g7, const Generator8& g8,
15675 const Generator9& g9)
15676 : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7), g8_(g8),
15678 template <typename T1, typename T2, typename T3, typename T4, typename T5,
15679 typename T6, typename T7, typename T8, typename T9>
15680 operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8,
15682 return ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8,
15684 new CartesianProductGenerator9<T1, T2, T3, T4, T5, T6, T7, T8, T9>(
15685 static_cast<ParamGenerator<T1> >(g1_),
15686 static_cast<ParamGenerator<T2> >(g2_),
15687 static_cast<ParamGenerator<T3> >(g3_),
15688 static_cast<ParamGenerator<T4> >(g4_),
15689 static_cast<ParamGenerator<T5> >(g5_),
15690 static_cast<ParamGenerator<T6> >(g6_),
15691 static_cast<ParamGenerator<T7> >(g7_),
15692 static_cast<ParamGenerator<T8> >(g8_),
15693 static_cast<ParamGenerator<T9> >(g9_)));
15697 // No implementation - assignment is unsupported.
15698 void operator=(const CartesianProductHolder9& other);
15700 const Generator1 g1_;
15701 const Generator2 g2_;
15702 const Generator3 g3_;
15703 const Generator4 g4_;
15704 const Generator5 g5_;
15705 const Generator6 g6_;
15706 const Generator7 g7_;
15707 const Generator8 g8_;
15708 const Generator9 g9_;
15709 }; // class CartesianProductHolder9
15711 template <class Generator1, class Generator2, class Generator3,
15712 class Generator4, class Generator5, class Generator6, class Generator7,
15713 class Generator8, class Generator9, class Generator10>
15714 class CartesianProductHolder10 {
15716 CartesianProductHolder10(const Generator1& g1, const Generator2& g2,
15717 const Generator3& g3, const Generator4& g4, const Generator5& g5,
15718 const Generator6& g6, const Generator7& g7, const Generator8& g8,
15719 const Generator9& g9, const Generator10& g10)
15720 : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7), g8_(g8),
15721 g9_(g9), g10_(g10) {}
15722 template <typename T1, typename T2, typename T3, typename T4, typename T5,
15723 typename T6, typename T7, typename T8, typename T9, typename T10>
15724 operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8,
15725 T9, T10> >() const {
15726 return ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8,
15728 new CartesianProductGenerator10<T1, T2, T3, T4, T5, T6, T7, T8, T9,
15730 static_cast<ParamGenerator<T1> >(g1_),
15731 static_cast<ParamGenerator<T2> >(g2_),
15732 static_cast<ParamGenerator<T3> >(g3_),
15733 static_cast<ParamGenerator<T4> >(g4_),
15734 static_cast<ParamGenerator<T5> >(g5_),
15735 static_cast<ParamGenerator<T6> >(g6_),
15736 static_cast<ParamGenerator<T7> >(g7_),
15737 static_cast<ParamGenerator<T8> >(g8_),
15738 static_cast<ParamGenerator<T9> >(g9_),
15739 static_cast<ParamGenerator<T10> >(g10_)));
15743 // No implementation - assignment is unsupported.
15744 void operator=(const CartesianProductHolder10& other);
15746 const Generator1 g1_;
15747 const Generator2 g2_;
15748 const Generator3 g3_;
15749 const Generator4 g4_;
15750 const Generator5 g5_;
15751 const Generator6 g6_;
15752 const Generator7 g7_;
15753 const Generator8 g8_;
15754 const Generator9 g9_;
15755 const Generator10 g10_;
15756 }; // class CartesianProductHolder10
15758 # endif // GTEST_HAS_COMBINE
15760 } // namespace internal
15761 } // namespace testing
15763 #endif // GTEST_HAS_PARAM_TEST
15765 #endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_GENERATED_H_
15767 #if GTEST_HAS_PARAM_TEST
15769 namespace testing {
15771 // Functions producing parameter generators.
15773 // Google Test uses these generators to produce parameters for value-
15774 // parameterized tests. When a parameterized test case is instantiated
15775 // with a particular generator, Google Test creates and runs tests
15776 // for each element in the sequence produced by the generator.
15778 // In the following sample, tests from test case FooTest are instantiated
15779 // each three times with parameter values 3, 5, and 8:
15781 // class FooTest : public TestWithParam<int> { ... };
15783 // TEST_P(FooTest, TestThis) {
15785 // TEST_P(FooTest, TestThat) {
15787 // INSTANTIATE_TEST_CASE_P(TestSequence, FooTest, Values(3, 5, 8));
15790 // Range() returns generators providing sequences of values in a range.
15793 // Range(start, end)
15794 // - returns a generator producing a sequence of values {start, start+1,
15795 // start+2, ..., }.
15796 // Range(start, end, step)
15797 // - returns a generator producing a sequence of values {start, start+step,
15798 // start+step+step, ..., }.
15800 // * The generated sequences never include end. For example, Range(1, 5)
15801 // returns a generator producing a sequence {1, 2, 3, 4}. Range(1, 9, 2)
15802 // returns a generator producing {1, 3, 5, 7}.
15803 // * start and end must have the same type. That type may be any integral or
15804 // floating-point type or a user defined type satisfying these conditions:
15805 // * It must be assignable (have operator=() defined).
15806 // * It must have operator+() (operator+(int-compatible type) for
15807 // two-operand version).
15808 // * It must have operator<() defined.
15809 // Elements in the resulting sequences will also have that type.
15810 // * Condition start < end must be satisfied in order for resulting sequences
15811 // to contain any elements.
15813 template <typename T, typename IncrementT>
15814 internal::ParamGenerator<T> Range(T start, T end, IncrementT step) {
15815 return internal::ParamGenerator<T>(
15816 new internal::RangeGenerator<T, IncrementT>(start, end, step));
15819 template <typename T>
15820 internal::ParamGenerator<T> Range(T start, T end) {
15821 return Range(start, end, 1);
15824 // ValuesIn() function allows generation of tests with parameters coming from
15828 // ValuesIn(const T (&array)[N])
15829 // - returns a generator producing sequences with elements from
15830 // a C-style array.
15831 // ValuesIn(const Container& container)
15832 // - returns a generator producing sequences with elements from
15833 // an STL-style container.
15834 // ValuesIn(Iterator begin, Iterator end)
15835 // - returns a generator producing sequences with elements from
15836 // a range [begin, end) defined by a pair of STL-style iterators. These
15837 // iterators can also be plain C pointers.
15839 // Please note that ValuesIn copies the values from the containers
15840 // passed in and keeps them to generate tests in RUN_ALL_TESTS().
15844 // This instantiates tests from test case StringTest
15845 // each with C-string values of "foo", "bar", and "baz":
15847 // const char* strings[] = {"foo", "bar", "baz"};
15848 // INSTANTIATE_TEST_CASE_P(StringSequence, SrtingTest, ValuesIn(strings));
15850 // This instantiates tests from test case StlStringTest
15851 // each with STL strings with values "a" and "b":
15853 // ::std::vector< ::std::string> GetParameterStrings() {
15854 // ::std::vector< ::std::string> v;
15855 // v.push_back("a");
15856 // v.push_back("b");
15860 // INSTANTIATE_TEST_CASE_P(CharSequence,
15862 // ValuesIn(GetParameterStrings()));
15865 // This will also instantiate tests from CharTest
15866 // each with parameter values 'a' and 'b':
15868 // ::std::list<char> GetParameterChars() {
15869 // ::std::list<char> list;
15870 // list.push_back('a');
15871 // list.push_back('b');
15874 // ::std::list<char> l = GetParameterChars();
15875 // INSTANTIATE_TEST_CASE_P(CharSequence2,
15877 // ValuesIn(l.begin(), l.end()));
15879 template <typename ForwardIterator>
15880 internal::ParamGenerator<
15881 typename ::testing::internal::IteratorTraits<ForwardIterator>::value_type>
15882 ValuesIn(ForwardIterator begin, ForwardIterator end) {
15883 typedef typename ::testing::internal::IteratorTraits<ForwardIterator>
15884 ::value_type ParamType;
15885 return internal::ParamGenerator<ParamType>(
15886 new internal::ValuesInIteratorRangeGenerator<ParamType>(begin, end));
15889 template <typename T, size_t N>
15890 internal::ParamGenerator<T> ValuesIn(const T (&array)[N]) {
15891 return ValuesIn(array, array + N);
15894 template <class Container>
15895 internal::ParamGenerator<typename Container::value_type> ValuesIn(
15896 const Container& container) {
15897 return ValuesIn(container.begin(), container.end());
15900 // Values() allows generating tests from explicitly specified list of
15904 // Values(T v1, T v2, ..., T vN)
15905 // - returns a generator producing sequences with elements v1, v2, ..., vN.
15907 // For example, this instantiates tests from test case BarTest each
15908 // with values "one", "two", and "three":
15910 // INSTANTIATE_TEST_CASE_P(NumSequence, BarTest, Values("one", "two", "three"));
15912 // This instantiates tests from test case BazTest each with values 1, 2, 3.5.
15913 // The exact type of values will depend on the type of parameter in BazTest.
15915 // INSTANTIATE_TEST_CASE_P(FloatingNumbers, BazTest, Values(1, 2, 3.5));
15917 // Currently, Values() supports from 1 to 50 parameters.
15919 template <typename T1>
15920 internal::ValueArray1<T1> Values(T1 v1) {
15921 return internal::ValueArray1<T1>(v1);
15924 template <typename T1, typename T2>
15925 internal::ValueArray2<T1, T2> Values(T1 v1, T2 v2) {
15926 return internal::ValueArray2<T1, T2>(v1, v2);
15929 template <typename T1, typename T2, typename T3>
15930 internal::ValueArray3<T1, T2, T3> Values(T1 v1, T2 v2, T3 v3) {
15931 return internal::ValueArray3<T1, T2, T3>(v1, v2, v3);
15934 template <typename T1, typename T2, typename T3, typename T4>
15935 internal::ValueArray4<T1, T2, T3, T4> Values(T1 v1, T2 v2, T3 v3, T4 v4) {
15936 return internal::ValueArray4<T1, T2, T3, T4>(v1, v2, v3, v4);
15939 template <typename T1, typename T2, typename T3, typename T4, typename T5>
15940 internal::ValueArray5<T1, T2, T3, T4, T5> Values(T1 v1, T2 v2, T3 v3, T4 v4,
15942 return internal::ValueArray5<T1, T2, T3, T4, T5>(v1, v2, v3, v4, v5);
15945 template <typename T1, typename T2, typename T3, typename T4, typename T5,
15947 internal::ValueArray6<T1, T2, T3, T4, T5, T6> Values(T1 v1, T2 v2, T3 v3,
15948 T4 v4, T5 v5, T6 v6) {
15949 return internal::ValueArray6<T1, T2, T3, T4, T5, T6>(v1, v2, v3, v4, v5, v6);
15952 template <typename T1, typename T2, typename T3, typename T4, typename T5,
15953 typename T6, typename T7>
15954 internal::ValueArray7<T1, T2, T3, T4, T5, T6, T7> Values(T1 v1, T2 v2, T3 v3,
15955 T4 v4, T5 v5, T6 v6, T7 v7) {
15956 return internal::ValueArray7<T1, T2, T3, T4, T5, T6, T7>(v1, v2, v3, v4, v5,
15960 template <typename T1, typename T2, typename T3, typename T4, typename T5,
15961 typename T6, typename T7, typename T8>
15962 internal::ValueArray8<T1, T2, T3, T4, T5, T6, T7, T8> Values(T1 v1, T2 v2,
15963 T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8) {
15964 return internal::ValueArray8<T1, T2, T3, T4, T5, T6, T7, T8>(v1, v2, v3, v4,
15968 template <typename T1, typename T2, typename T3, typename T4, typename T5,
15969 typename T6, typename T7, typename T8, typename T9>
15970 internal::ValueArray9<T1, T2, T3, T4, T5, T6, T7, T8, T9> Values(T1 v1, T2 v2,
15971 T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9) {
15972 return internal::ValueArray9<T1, T2, T3, T4, T5, T6, T7, T8, T9>(v1, v2, v3,
15973 v4, v5, v6, v7, v8, v9);
15976 template <typename T1, typename T2, typename T3, typename T4, typename T5,
15977 typename T6, typename T7, typename T8, typename T9, typename T10>
15978 internal::ValueArray10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> Values(T1 v1,
15979 T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10) {
15980 return internal::ValueArray10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(v1,
15981 v2, v3, v4, v5, v6, v7, v8, v9, v10);
15984 template <typename T1, typename T2, typename T3, typename T4, typename T5,
15985 typename T6, typename T7, typename T8, typename T9, typename T10,
15987 internal::ValueArray11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10,
15988 T11> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
15989 T10 v10, T11 v11) {
15990 return internal::ValueArray11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10,
15991 T11>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11);
15994 template <typename T1, typename T2, typename T3, typename T4, typename T5,
15995 typename T6, typename T7, typename T8, typename T9, typename T10,
15996 typename T11, typename T12>
15997 internal::ValueArray12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
15998 T12> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
15999 T10 v10, T11 v11, T12 v12) {
16000 return internal::ValueArray12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
16001 T12>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12);
16004 template <typename T1, typename T2, typename T3, typename T4, typename T5,
16005 typename T6, typename T7, typename T8, typename T9, typename T10,
16006 typename T11, typename T12, typename T13>
16007 internal::ValueArray13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12,
16008 T13> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
16009 T10 v10, T11 v11, T12 v12, T13 v13) {
16010 return internal::ValueArray13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
16011 T12, T13>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13);
16014 template <typename T1, typename T2, typename T3, typename T4, typename T5,
16015 typename T6, typename T7, typename T8, typename T9, typename T10,
16016 typename T11, typename T12, typename T13, typename T14>
16017 internal::ValueArray14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
16018 T14> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
16019 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14) {
16020 return internal::ValueArray14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
16021 T12, T13, T14>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13,
16025 template <typename T1, typename T2, typename T3, typename T4, typename T5,
16026 typename T6, typename T7, typename T8, typename T9, typename T10,
16027 typename T11, typename T12, typename T13, typename T14, typename T15>
16028 internal::ValueArray15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
16029 T14, T15> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8,
16030 T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15) {
16031 return internal::ValueArray15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
16032 T12, T13, T14, T15>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12,
16036 template <typename T1, typename T2, typename T3, typename T4, typename T5,
16037 typename T6, typename T7, typename T8, typename T9, typename T10,
16038 typename T11, typename T12, typename T13, typename T14, typename T15,
16040 internal::ValueArray16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
16041 T14, T15, T16> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7,
16042 T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
16044 return internal::ValueArray16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
16045 T12, T13, T14, T15, T16>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11,
16046 v12, v13, v14, v15, v16);
16049 template <typename T1, typename T2, typename T3, typename T4, typename T5,
16050 typename T6, typename T7, typename T8, typename T9, typename T10,
16051 typename T11, typename T12, typename T13, typename T14, typename T15,
16052 typename T16, typename T17>
16053 internal::ValueArray17<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
16054 T14, T15, T16, T17> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7,
16055 T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
16056 T16 v16, T17 v17) {
16057 return internal::ValueArray17<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
16058 T12, T13, T14, T15, T16, T17>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10,
16059 v11, v12, v13, v14, v15, v16, v17);
16062 template <typename T1, typename T2, typename T3, typename T4, typename T5,
16063 typename T6, typename T7, typename T8, typename T9, typename T10,
16064 typename T11, typename T12, typename T13, typename T14, typename T15,
16065 typename T16, typename T17, typename T18>
16066 internal::ValueArray18<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
16067 T14, T15, T16, T17, T18> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6,
16068 T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
16069 T16 v16, T17 v17, T18 v18) {
16070 return internal::ValueArray18<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
16071 T12, T13, T14, T15, T16, T17, T18>(v1, v2, v3, v4, v5, v6, v7, v8, v9,
16072 v10, v11, v12, v13, v14, v15, v16, v17, v18);
16075 template <typename T1, typename T2, typename T3, typename T4, typename T5,
16076 typename T6, typename T7, typename T8, typename T9, typename T10,
16077 typename T11, typename T12, typename T13, typename T14, typename T15,
16078 typename T16, typename T17, typename T18, typename T19>
16079 internal::ValueArray19<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
16080 T14, T15, T16, T17, T18, T19> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5,
16081 T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14,
16082 T15 v15, T16 v16, T17 v17, T18 v18, T19 v19) {
16083 return internal::ValueArray19<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
16084 T12, T13, T14, T15, T16, T17, T18, T19>(v1, v2, v3, v4, v5, v6, v7, v8,
16085 v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19);
16088 template <typename T1, typename T2, typename T3, typename T4, typename T5,
16089 typename T6, typename T7, typename T8, typename T9, typename T10,
16090 typename T11, typename T12, typename T13, typename T14, typename T15,
16091 typename T16, typename T17, typename T18, typename T19, typename T20>
16092 internal::ValueArray20<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
16093 T14, T15, T16, T17, T18, T19, T20> Values(T1 v1, T2 v2, T3 v3, T4 v4,
16094 T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13,
16095 T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20) {
16096 return internal::ValueArray20<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
16097 T12, T13, T14, T15, T16, T17, T18, T19, T20>(v1, v2, v3, v4, v5, v6, v7,
16098 v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20);
16101 template <typename T1, typename T2, typename T3, typename T4, typename T5,
16102 typename T6, typename T7, typename T8, typename T9, typename T10,
16103 typename T11, typename T12, typename T13, typename T14, typename T15,
16104 typename T16, typename T17, typename T18, typename T19, typename T20,
16106 internal::ValueArray21<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
16107 T14, T15, T16, T17, T18, T19, T20, T21> Values(T1 v1, T2 v2, T3 v3, T4 v4,
16108 T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13,
16109 T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21) {
16110 return internal::ValueArray21<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
16111 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21>(v1, v2, v3, v4, v5, v6,
16112 v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21);
16115 template <typename T1, typename T2, typename T3, typename T4, typename T5,
16116 typename T6, typename T7, typename T8, typename T9, typename T10,
16117 typename T11, typename T12, typename T13, typename T14, typename T15,
16118 typename T16, typename T17, typename T18, typename T19, typename T20,
16119 typename T21, typename T22>
16120 internal::ValueArray22<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
16121 T14, T15, T16, T17, T18, T19, T20, T21, T22> Values(T1 v1, T2 v2, T3 v3,
16122 T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12,
16123 T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20,
16124 T21 v21, T22 v22) {
16125 return internal::ValueArray22<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
16126 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22>(v1, v2, v3, v4,
16127 v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19,
16131 template <typename T1, typename T2, typename T3, typename T4, typename T5,
16132 typename T6, typename T7, typename T8, typename T9, typename T10,
16133 typename T11, typename T12, typename T13, typename T14, typename T15,
16134 typename T16, typename T17, typename T18, typename T19, typename T20,
16135 typename T21, typename T22, typename T23>
16136 internal::ValueArray23<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
16137 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23> Values(T1 v1, T2 v2,
16138 T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12,
16139 T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20,
16140 T21 v21, T22 v22, T23 v23) {
16141 return internal::ValueArray23<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
16142 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23>(v1, v2, v3,
16143 v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19,
16144 v20, v21, v22, v23);
16147 template <typename T1, typename T2, typename T3, typename T4, typename T5,
16148 typename T6, typename T7, typename T8, typename T9, typename T10,
16149 typename T11, typename T12, typename T13, typename T14, typename T15,
16150 typename T16, typename T17, typename T18, typename T19, typename T20,
16151 typename T21, typename T22, typename T23, typename T24>
16152 internal::ValueArray24<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
16153 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24> Values(T1 v1, T2 v2,
16154 T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12,
16155 T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20,
16156 T21 v21, T22 v22, T23 v23, T24 v24) {
16157 return internal::ValueArray24<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
16158 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24>(v1, v2,
16159 v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18,
16160 v19, v20, v21, v22, v23, v24);
16163 template <typename T1, typename T2, typename T3, typename T4, typename T5,
16164 typename T6, typename T7, typename T8, typename T9, typename T10,
16165 typename T11, typename T12, typename T13, typename T14, typename T15,
16166 typename T16, typename T17, typename T18, typename T19, typename T20,
16167 typename T21, typename T22, typename T23, typename T24, typename T25>
16168 internal::ValueArray25<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
16169 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25> Values(T1 v1,
16170 T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11,
16171 T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19,
16172 T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25) {
16173 return internal::ValueArray25<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
16174 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25>(v1,
16175 v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17,
16176 v18, v19, v20, v21, v22, v23, v24, v25);
16179 template <typename T1, typename T2, typename T3, typename T4, typename T5,
16180 typename T6, typename T7, typename T8, typename T9, typename T10,
16181 typename T11, typename T12, typename T13, typename T14, typename T15,
16182 typename T16, typename T17, typename T18, typename T19, typename T20,
16183 typename T21, typename T22, typename T23, typename T24, typename T25,
16185 internal::ValueArray26<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
16186 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
16187 T26> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
16188 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
16189 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
16191 return internal::ValueArray26<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
16192 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
16193 T26>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15,
16194 v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26);
16197 template <typename T1, typename T2, typename T3, typename T4, typename T5,
16198 typename T6, typename T7, typename T8, typename T9, typename T10,
16199 typename T11, typename T12, typename T13, typename T14, typename T15,
16200 typename T16, typename T17, typename T18, typename T19, typename T20,
16201 typename T21, typename T22, typename T23, typename T24, typename T25,
16202 typename T26, typename T27>
16203 internal::ValueArray27<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
16204 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26,
16205 T27> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
16206 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
16207 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
16208 T26 v26, T27 v27) {
16209 return internal::ValueArray27<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
16210 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
16211 T26, T27>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14,
16212 v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27);
16215 template <typename T1, typename T2, typename T3, typename T4, typename T5,
16216 typename T6, typename T7, typename T8, typename T9, typename T10,
16217 typename T11, typename T12, typename T13, typename T14, typename T15,
16218 typename T16, typename T17, typename T18, typename T19, typename T20,
16219 typename T21, typename T22, typename T23, typename T24, typename T25,
16220 typename T26, typename T27, typename T28>
16221 internal::ValueArray28<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
16222 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27,
16223 T28> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
16224 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
16225 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
16226 T26 v26, T27 v27, T28 v28) {
16227 return internal::ValueArray28<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
16228 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
16229 T26, T27, T28>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13,
16230 v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27,
16234 template <typename T1, typename T2, typename T3, typename T4, typename T5,
16235 typename T6, typename T7, typename T8, typename T9, typename T10,
16236 typename T11, typename T12, typename T13, typename T14, typename T15,
16237 typename T16, typename T17, typename T18, typename T19, typename T20,
16238 typename T21, typename T22, typename T23, typename T24, typename T25,
16239 typename T26, typename T27, typename T28, typename T29>
16240 internal::ValueArray29<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
16241 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
16242 T29> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
16243 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
16244 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
16245 T26 v26, T27 v27, T28 v28, T29 v29) {
16246 return internal::ValueArray29<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
16247 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
16248 T26, T27, T28, T29>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12,
16249 v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26,
16253 template <typename T1, typename T2, typename T3, typename T4, typename T5,
16254 typename T6, typename T7, typename T8, typename T9, typename T10,
16255 typename T11, typename T12, typename T13, typename T14, typename T15,
16256 typename T16, typename T17, typename T18, typename T19, typename T20,
16257 typename T21, typename T22, typename T23, typename T24, typename T25,
16258 typename T26, typename T27, typename T28, typename T29, typename T30>
16259 internal::ValueArray30<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
16260 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
16261 T29, T30> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8,
16262 T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16,
16263 T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24,
16264 T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30) {
16265 return internal::ValueArray30<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
16266 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
16267 T26, T27, T28, T29, T30>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11,
16268 v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25,
16269 v26, v27, v28, v29, v30);
16272 template <typename T1, typename T2, typename T3, typename T4, typename T5,
16273 typename T6, typename T7, typename T8, typename T9, typename T10,
16274 typename T11, typename T12, typename T13, typename T14, typename T15,
16275 typename T16, typename T17, typename T18, typename T19, typename T20,
16276 typename T21, typename T22, typename T23, typename T24, typename T25,
16277 typename T26, typename T27, typename T28, typename T29, typename T30,
16279 internal::ValueArray31<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
16280 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
16281 T29, T30, T31> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7,
16282 T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
16283 T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23,
16284 T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31) {
16285 return internal::ValueArray31<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
16286 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
16287 T26, T27, T28, T29, T30, T31>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10,
16288 v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24,
16289 v25, v26, v27, v28, v29, v30, v31);
16292 template <typename T1, typename T2, typename T3, typename T4, typename T5,
16293 typename T6, typename T7, typename T8, typename T9, typename T10,
16294 typename T11, typename T12, typename T13, typename T14, typename T15,
16295 typename T16, typename T17, typename T18, typename T19, typename T20,
16296 typename T21, typename T22, typename T23, typename T24, typename T25,
16297 typename T26, typename T27, typename T28, typename T29, typename T30,
16298 typename T31, typename T32>
16299 internal::ValueArray32<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
16300 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
16301 T29, T30, T31, T32> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7,
16302 T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
16303 T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23,
16304 T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31,
16306 return internal::ValueArray32<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
16307 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
16308 T26, T27, T28, T29, T30, T31, T32>(v1, v2, v3, v4, v5, v6, v7, v8, v9,
16309 v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23,
16310 v24, v25, v26, v27, v28, v29, v30, v31, v32);
16313 template <typename T1, typename T2, typename T3, typename T4, typename T5,
16314 typename T6, typename T7, typename T8, typename T9, typename T10,
16315 typename T11, typename T12, typename T13, typename T14, typename T15,
16316 typename T16, typename T17, typename T18, typename T19, typename T20,
16317 typename T21, typename T22, typename T23, typename T24, typename T25,
16318 typename T26, typename T27, typename T28, typename T29, typename T30,
16319 typename T31, typename T32, typename T33>
16320 internal::ValueArray33<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
16321 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
16322 T29, T30, T31, T32, T33> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6,
16323 T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
16324 T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23,
16325 T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31,
16326 T32 v32, T33 v33) {
16327 return internal::ValueArray33<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
16328 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
16329 T26, T27, T28, T29, T30, T31, T32, T33>(v1, v2, v3, v4, v5, v6, v7, v8,
16330 v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23,
16331 v24, v25, v26, v27, v28, v29, v30, v31, v32, v33);
16334 template <typename T1, typename T2, typename T3, typename T4, typename T5,
16335 typename T6, typename T7, typename T8, typename T9, typename T10,
16336 typename T11, typename T12, typename T13, typename T14, typename T15,
16337 typename T16, typename T17, typename T18, typename T19, typename T20,
16338 typename T21, typename T22, typename T23, typename T24, typename T25,
16339 typename T26, typename T27, typename T28, typename T29, typename T30,
16340 typename T31, typename T32, typename T33, typename T34>
16341 internal::ValueArray34<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
16342 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
16343 T29, T30, T31, T32, T33, T34> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5,
16344 T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14,
16345 T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22,
16346 T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30,
16347 T31 v31, T32 v32, T33 v33, T34 v34) {
16348 return internal::ValueArray34<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
16349 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
16350 T26, T27, T28, T29, T30, T31, T32, T33, T34>(v1, v2, v3, v4, v5, v6, v7,
16351 v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22,
16352 v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34);
16355 template <typename T1, typename T2, typename T3, typename T4, typename T5,
16356 typename T6, typename T7, typename T8, typename T9, typename T10,
16357 typename T11, typename T12, typename T13, typename T14, typename T15,
16358 typename T16, typename T17, typename T18, typename T19, typename T20,
16359 typename T21, typename T22, typename T23, typename T24, typename T25,
16360 typename T26, typename T27, typename T28, typename T29, typename T30,
16361 typename T31, typename T32, typename T33, typename T34, typename T35>
16362 internal::ValueArray35<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
16363 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
16364 T29, T30, T31, T32, T33, T34, T35> Values(T1 v1, T2 v2, T3 v3, T4 v4,
16365 T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13,
16366 T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21,
16367 T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29,
16368 T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35) {
16369 return internal::ValueArray35<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
16370 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
16371 T26, T27, T28, T29, T30, T31, T32, T33, T34, T35>(v1, v2, v3, v4, v5, v6,
16372 v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21,
16373 v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35);
16376 template <typename T1, typename T2, typename T3, typename T4, typename T5,
16377 typename T6, typename T7, typename T8, typename T9, typename T10,
16378 typename T11, typename T12, typename T13, typename T14, typename T15,
16379 typename T16, typename T17, typename T18, typename T19, typename T20,
16380 typename T21, typename T22, typename T23, typename T24, typename T25,
16381 typename T26, typename T27, typename T28, typename T29, typename T30,
16382 typename T31, typename T32, typename T33, typename T34, typename T35,
16384 internal::ValueArray36<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
16385 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
16386 T29, T30, T31, T32, T33, T34, T35, T36> Values(T1 v1, T2 v2, T3 v3, T4 v4,
16387 T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13,
16388 T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21,
16389 T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29,
16390 T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36) {
16391 return internal::ValueArray36<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
16392 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
16393 T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36>(v1, v2, v3, v4,
16394 v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19,
16395 v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33,
16399 template <typename T1, typename T2, typename T3, typename T4, typename T5,
16400 typename T6, typename T7, typename T8, typename T9, typename T10,
16401 typename T11, typename T12, typename T13, typename T14, typename T15,
16402 typename T16, typename T17, typename T18, typename T19, typename T20,
16403 typename T21, typename T22, typename T23, typename T24, typename T25,
16404 typename T26, typename T27, typename T28, typename T29, typename T30,
16405 typename T31, typename T32, typename T33, typename T34, typename T35,
16406 typename T36, typename T37>
16407 internal::ValueArray37<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
16408 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
16409 T29, T30, T31, T32, T33, T34, T35, T36, T37> Values(T1 v1, T2 v2, T3 v3,
16410 T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12,
16411 T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20,
16412 T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28,
16413 T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36,
16415 return internal::ValueArray37<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
16416 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
16417 T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37>(v1, v2, v3,
16418 v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19,
16419 v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33,
16420 v34, v35, v36, v37);
16423 template <typename T1, typename T2, typename T3, typename T4, typename T5,
16424 typename T6, typename T7, typename T8, typename T9, typename T10,
16425 typename T11, typename T12, typename T13, typename T14, typename T15,
16426 typename T16, typename T17, typename T18, typename T19, typename T20,
16427 typename T21, typename T22, typename T23, typename T24, typename T25,
16428 typename T26, typename T27, typename T28, typename T29, typename T30,
16429 typename T31, typename T32, typename T33, typename T34, typename T35,
16430 typename T36, typename T37, typename T38>
16431 internal::ValueArray38<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
16432 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
16433 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38> Values(T1 v1, T2 v2,
16434 T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12,
16435 T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20,
16436 T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28,
16437 T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36,
16438 T37 v37, T38 v38) {
16439 return internal::ValueArray38<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
16440 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
16441 T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38>(v1, v2,
16442 v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18,
16443 v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32,
16444 v33, v34, v35, v36, v37, v38);
16447 template <typename T1, typename T2, typename T3, typename T4, typename T5,
16448 typename T6, typename T7, typename T8, typename T9, typename T10,
16449 typename T11, typename T12, typename T13, typename T14, typename T15,
16450 typename T16, typename T17, typename T18, typename T19, typename T20,
16451 typename T21, typename T22, typename T23, typename T24, typename T25,
16452 typename T26, typename T27, typename T28, typename T29, typename T30,
16453 typename T31, typename T32, typename T33, typename T34, typename T35,
16454 typename T36, typename T37, typename T38, typename T39>
16455 internal::ValueArray39<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
16456 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
16457 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39> Values(T1 v1, T2 v2,
16458 T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12,
16459 T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20,
16460 T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28,
16461 T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36,
16462 T37 v37, T38 v38, T39 v39) {
16463 return internal::ValueArray39<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
16464 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
16465 T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39>(v1,
16466 v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17,
16467 v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31,
16468 v32, v33, v34, v35, v36, v37, v38, v39);
16471 template <typename T1, typename T2, typename T3, typename T4, typename T5,
16472 typename T6, typename T7, typename T8, typename T9, typename T10,
16473 typename T11, typename T12, typename T13, typename T14, typename T15,
16474 typename T16, typename T17, typename T18, typename T19, typename T20,
16475 typename T21, typename T22, typename T23, typename T24, typename T25,
16476 typename T26, typename T27, typename T28, typename T29, typename T30,
16477 typename T31, typename T32, typename T33, typename T34, typename T35,
16478 typename T36, typename T37, typename T38, typename T39, typename T40>
16479 internal::ValueArray40<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
16480 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
16481 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40> Values(T1 v1,
16482 T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11,
16483 T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19,
16484 T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27,
16485 T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35,
16486 T36 v36, T37 v37, T38 v38, T39 v39, T40 v40) {
16487 return internal::ValueArray40<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
16488 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
16489 T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
16490 T40>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15,
16491 v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29,
16492 v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40);
16495 template <typename T1, typename T2, typename T3, typename T4, typename T5,
16496 typename T6, typename T7, typename T8, typename T9, typename T10,
16497 typename T11, typename T12, typename T13, typename T14, typename T15,
16498 typename T16, typename T17, typename T18, typename T19, typename T20,
16499 typename T21, typename T22, typename T23, typename T24, typename T25,
16500 typename T26, typename T27, typename T28, typename T29, typename T30,
16501 typename T31, typename T32, typename T33, typename T34, typename T35,
16502 typename T36, typename T37, typename T38, typename T39, typename T40,
16504 internal::ValueArray41<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
16505 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
16506 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40,
16507 T41> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
16508 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
16509 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
16510 T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
16511 T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41) {
16512 return internal::ValueArray41<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
16513 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
16514 T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
16515 T40, T41>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14,
16516 v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28,
16517 v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41);
16520 template <typename T1, typename T2, typename T3, typename T4, typename T5,
16521 typename T6, typename T7, typename T8, typename T9, typename T10,
16522 typename T11, typename T12, typename T13, typename T14, typename T15,
16523 typename T16, typename T17, typename T18, typename T19, typename T20,
16524 typename T21, typename T22, typename T23, typename T24, typename T25,
16525 typename T26, typename T27, typename T28, typename T29, typename T30,
16526 typename T31, typename T32, typename T33, typename T34, typename T35,
16527 typename T36, typename T37, typename T38, typename T39, typename T40,
16528 typename T41, typename T42>
16529 internal::ValueArray42<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
16530 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
16531 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41,
16532 T42> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
16533 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
16534 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
16535 T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
16536 T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
16538 return internal::ValueArray42<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
16539 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
16540 T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
16541 T40, T41, T42>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13,
16542 v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27,
16543 v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41,
16547 template <typename T1, typename T2, typename T3, typename T4, typename T5,
16548 typename T6, typename T7, typename T8, typename T9, typename T10,
16549 typename T11, typename T12, typename T13, typename T14, typename T15,
16550 typename T16, typename T17, typename T18, typename T19, typename T20,
16551 typename T21, typename T22, typename T23, typename T24, typename T25,
16552 typename T26, typename T27, typename T28, typename T29, typename T30,
16553 typename T31, typename T32, typename T33, typename T34, typename T35,
16554 typename T36, typename T37, typename T38, typename T39, typename T40,
16555 typename T41, typename T42, typename T43>
16556 internal::ValueArray43<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
16557 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
16558 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42,
16559 T43> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
16560 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
16561 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
16562 T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
16563 T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
16564 T42 v42, T43 v43) {
16565 return internal::ValueArray43<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
16566 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
16567 T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
16568 T40, T41, T42, T43>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12,
16569 v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26,
16570 v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40,
16574 template <typename T1, typename T2, typename T3, typename T4, typename T5,
16575 typename T6, typename T7, typename T8, typename T9, typename T10,
16576 typename T11, typename T12, typename T13, typename T14, typename T15,
16577 typename T16, typename T17, typename T18, typename T19, typename T20,
16578 typename T21, typename T22, typename T23, typename T24, typename T25,
16579 typename T26, typename T27, typename T28, typename T29, typename T30,
16580 typename T31, typename T32, typename T33, typename T34, typename T35,
16581 typename T36, typename T37, typename T38, typename T39, typename T40,
16582 typename T41, typename T42, typename T43, typename T44>
16583 internal::ValueArray44<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
16584 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
16585 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
16586 T44> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9,
16587 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17,
16588 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25,
16589 T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33,
16590 T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41,
16591 T42 v42, T43 v43, T44 v44) {
16592 return internal::ValueArray44<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
16593 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
16594 T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
16595 T40, T41, T42, T43, T44>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11,
16596 v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25,
16597 v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39,
16598 v40, v41, v42, v43, v44);
16601 template <typename T1, typename T2, typename T3, typename T4, typename T5,
16602 typename T6, typename T7, typename T8, typename T9, typename T10,
16603 typename T11, typename T12, typename T13, typename T14, typename T15,
16604 typename T16, typename T17, typename T18, typename T19, typename T20,
16605 typename T21, typename T22, typename T23, typename T24, typename T25,
16606 typename T26, typename T27, typename T28, typename T29, typename T30,
16607 typename T31, typename T32, typename T33, typename T34, typename T35,
16608 typename T36, typename T37, typename T38, typename T39, typename T40,
16609 typename T41, typename T42, typename T43, typename T44, typename T45>
16610 internal::ValueArray45<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
16611 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
16612 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
16613 T44, T45> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8,
16614 T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16,
16615 T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24,
16616 T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32,
16617 T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40,
16618 T41 v41, T42 v42, T43 v43, T44 v44, T45 v45) {
16619 return internal::ValueArray45<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
16620 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
16621 T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
16622 T40, T41, T42, T43, T44, T45>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10,
16623 v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24,
16624 v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38,
16625 v39, v40, v41, v42, v43, v44, v45);
16628 template <typename T1, typename T2, typename T3, typename T4, typename T5,
16629 typename T6, typename T7, typename T8, typename T9, typename T10,
16630 typename T11, typename T12, typename T13, typename T14, typename T15,
16631 typename T16, typename T17, typename T18, typename T19, typename T20,
16632 typename T21, typename T22, typename T23, typename T24, typename T25,
16633 typename T26, typename T27, typename T28, typename T29, typename T30,
16634 typename T31, typename T32, typename T33, typename T34, typename T35,
16635 typename T36, typename T37, typename T38, typename T39, typename T40,
16636 typename T41, typename T42, typename T43, typename T44, typename T45,
16638 internal::ValueArray46<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
16639 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
16640 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
16641 T44, T45, T46> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7,
16642 T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
16643 T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23,
16644 T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31,
16645 T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39,
16646 T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45, T46 v46) {
16647 return internal::ValueArray46<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
16648 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
16649 T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
16650 T40, T41, T42, T43, T44, T45, T46>(v1, v2, v3, v4, v5, v6, v7, v8, v9,
16651 v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23,
16652 v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37,
16653 v38, v39, v40, v41, v42, v43, v44, v45, v46);
16656 template <typename T1, typename T2, typename T3, typename T4, typename T5,
16657 typename T6, typename T7, typename T8, typename T9, typename T10,
16658 typename T11, typename T12, typename T13, typename T14, typename T15,
16659 typename T16, typename T17, typename T18, typename T19, typename T20,
16660 typename T21, typename T22, typename T23, typename T24, typename T25,
16661 typename T26, typename T27, typename T28, typename T29, typename T30,
16662 typename T31, typename T32, typename T33, typename T34, typename T35,
16663 typename T36, typename T37, typename T38, typename T39, typename T40,
16664 typename T41, typename T42, typename T43, typename T44, typename T45,
16665 typename T46, typename T47>
16666 internal::ValueArray47<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
16667 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
16668 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
16669 T44, T45, T46, T47> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7,
16670 T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
16671 T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23,
16672 T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31,
16673 T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39,
16674 T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47) {
16675 return internal::ValueArray47<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
16676 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
16677 T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
16678 T40, T41, T42, T43, T44, T45, T46, T47>(v1, v2, v3, v4, v5, v6, v7, v8,
16679 v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23,
16680 v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37,
16681 v38, v39, v40, v41, v42, v43, v44, v45, v46, v47);
16684 template <typename T1, typename T2, typename T3, typename T4, typename T5,
16685 typename T6, typename T7, typename T8, typename T9, typename T10,
16686 typename T11, typename T12, typename T13, typename T14, typename T15,
16687 typename T16, typename T17, typename T18, typename T19, typename T20,
16688 typename T21, typename T22, typename T23, typename T24, typename T25,
16689 typename T26, typename T27, typename T28, typename T29, typename T30,
16690 typename T31, typename T32, typename T33, typename T34, typename T35,
16691 typename T36, typename T37, typename T38, typename T39, typename T40,
16692 typename T41, typename T42, typename T43, typename T44, typename T45,
16693 typename T46, typename T47, typename T48>
16694 internal::ValueArray48<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
16695 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
16696 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
16697 T44, T45, T46, T47, T48> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6,
16698 T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15,
16699 T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23,
16700 T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31,
16701 T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39,
16702 T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47,
16704 return internal::ValueArray48<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
16705 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
16706 T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
16707 T40, T41, T42, T43, T44, T45, T46, T47, T48>(v1, v2, v3, v4, v5, v6, v7,
16708 v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22,
16709 v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36,
16710 v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48);
16713 template <typename T1, typename T2, typename T3, typename T4, typename T5,
16714 typename T6, typename T7, typename T8, typename T9, typename T10,
16715 typename T11, typename T12, typename T13, typename T14, typename T15,
16716 typename T16, typename T17, typename T18, typename T19, typename T20,
16717 typename T21, typename T22, typename T23, typename T24, typename T25,
16718 typename T26, typename T27, typename T28, typename T29, typename T30,
16719 typename T31, typename T32, typename T33, typename T34, typename T35,
16720 typename T36, typename T37, typename T38, typename T39, typename T40,
16721 typename T41, typename T42, typename T43, typename T44, typename T45,
16722 typename T46, typename T47, typename T48, typename T49>
16723 internal::ValueArray49<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
16724 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
16725 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
16726 T44, T45, T46, T47, T48, T49> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5,
16727 T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14,
16728 T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22,
16729 T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30,
16730 T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38,
16731 T39 v39, T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45, T46 v46,
16732 T47 v47, T48 v48, T49 v49) {
16733 return internal::ValueArray49<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
16734 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
16735 T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
16736 T40, T41, T42, T43, T44, T45, T46, T47, T48, T49>(v1, v2, v3, v4, v5, v6,
16737 v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21,
16738 v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35,
16739 v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49);
16742 template <typename T1, typename T2, typename T3, typename T4, typename T5,
16743 typename T6, typename T7, typename T8, typename T9, typename T10,
16744 typename T11, typename T12, typename T13, typename T14, typename T15,
16745 typename T16, typename T17, typename T18, typename T19, typename T20,
16746 typename T21, typename T22, typename T23, typename T24, typename T25,
16747 typename T26, typename T27, typename T28, typename T29, typename T30,
16748 typename T31, typename T32, typename T33, typename T34, typename T35,
16749 typename T36, typename T37, typename T38, typename T39, typename T40,
16750 typename T41, typename T42, typename T43, typename T44, typename T45,
16751 typename T46, typename T47, typename T48, typename T49, typename T50>
16752 internal::ValueArray50<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13,
16753 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28,
16754 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43,
16755 T44, T45, T46, T47, T48, T49, T50> Values(T1 v1, T2 v2, T3 v3, T4 v4,
16756 T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13,
16757 T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21,
16758 T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29,
16759 T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37,
16760 T38 v38, T39 v39, T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45,
16761 T46 v46, T47 v47, T48 v48, T49 v49, T50 v50) {
16762 return internal::ValueArray50<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
16763 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25,
16764 T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39,
16765 T40, T41, T42, T43, T44, T45, T46, T47, T48, T49, T50>(v1, v2, v3, v4,
16766 v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19,
16767 v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33,
16768 v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47,
16772 // Bool() allows generating tests with parameters in a set of (false, true).
16776 // - returns a generator producing sequences with elements {false, true}.
16778 // It is useful when testing code that depends on Boolean flags. Combinations
16779 // of multiple flags can be tested when several Bool()'s are combined using
16780 // Combine() function.
16782 // In the following example all tests in the test case FlagDependentTest
16783 // will be instantiated twice with parameters false and true.
16785 // class FlagDependentTest : public testing::TestWithParam<bool> {
16786 // virtual void SetUp() {
16787 // external_flag = GetParam();
16790 // INSTANTIATE_TEST_CASE_P(BoolSequence, FlagDependentTest, Bool());
16792 inline internal::ParamGenerator<bool> Bool() {
16793 return Values(false, true);
16796 # if GTEST_HAS_COMBINE
16797 // Combine() allows the user to combine two or more sequences to produce
16798 // values of a Cartesian product of those sequences' elements.
16801 // Combine(gen1, gen2, ..., genN)
16802 // - returns a generator producing sequences with elements coming from
16803 // the Cartesian product of elements from the sequences generated by
16804 // gen1, gen2, ..., genN. The sequence elements will have a type of
16805 // tuple<T1, T2, ..., TN> where T1, T2, ..., TN are the types
16806 // of elements from sequences produces by gen1, gen2, ..., genN.
16808 // Combine can have up to 10 arguments. This number is currently limited
16809 // by the maximum number of elements in the tuple implementation used by Google
16814 // This will instantiate tests in test case AnimalTest each one with
16815 // the parameter values tuple("cat", BLACK), tuple("cat", WHITE),
16816 // tuple("dog", BLACK), and tuple("dog", WHITE):
16818 // enum Color { BLACK, GRAY, WHITE };
16819 // class AnimalTest
16820 // : public testing::TestWithParam<tuple<const char*, Color> > {...};
16822 // TEST_P(AnimalTest, AnimalLooksNice) {...}
16824 // INSTANTIATE_TEST_CASE_P(AnimalVariations, AnimalTest,
16825 // Combine(Values("cat", "dog"),
16826 // Values(BLACK, WHITE)));
16828 // This will instantiate tests in FlagDependentTest with all variations of two
16831 // class FlagDependentTest
16832 // : public testing::TestWithParam<tuple<bool, bool> > {
16833 // virtual void SetUp() {
16834 // // Assigns external_flag_1 and external_flag_2 values from the tuple.
16835 // tie(external_flag_1, external_flag_2) = GetParam();
16839 // TEST_P(FlagDependentTest, TestFeature1) {
16840 // // Test your code using external_flag_1 and external_flag_2 here.
16842 // INSTANTIATE_TEST_CASE_P(TwoBoolSequence, FlagDependentTest,
16843 // Combine(Bool(), Bool()));
16845 template <typename Generator1, typename Generator2>
16846 internal::CartesianProductHolder2<Generator1, Generator2> Combine(
16847 const Generator1& g1, const Generator2& g2) {
16848 return internal::CartesianProductHolder2<Generator1, Generator2>(
16852 template <typename Generator1, typename Generator2, typename Generator3>
16853 internal::CartesianProductHolder3<Generator1, Generator2, Generator3> Combine(
16854 const Generator1& g1, const Generator2& g2, const Generator3& g3) {
16855 return internal::CartesianProductHolder3<Generator1, Generator2, Generator3>(
16859 template <typename Generator1, typename Generator2, typename Generator3,
16860 typename Generator4>
16861 internal::CartesianProductHolder4<Generator1, Generator2, Generator3,
16862 Generator4> Combine(
16863 const Generator1& g1, const Generator2& g2, const Generator3& g3,
16864 const Generator4& g4) {
16865 return internal::CartesianProductHolder4<Generator1, Generator2, Generator3,
16870 template <typename Generator1, typename Generator2, typename Generator3,
16871 typename Generator4, typename Generator5>
16872 internal::CartesianProductHolder5<Generator1, Generator2, Generator3,
16873 Generator4, Generator5> Combine(
16874 const Generator1& g1, const Generator2& g2, const Generator3& g3,
16875 const Generator4& g4, const Generator5& g5) {
16876 return internal::CartesianProductHolder5<Generator1, Generator2, Generator3,
16877 Generator4, Generator5>(
16878 g1, g2, g3, g4, g5);
16881 template <typename Generator1, typename Generator2, typename Generator3,
16882 typename Generator4, typename Generator5, typename Generator6>
16883 internal::CartesianProductHolder6<Generator1, Generator2, Generator3,
16884 Generator4, Generator5, Generator6> Combine(
16885 const Generator1& g1, const Generator2& g2, const Generator3& g3,
16886 const Generator4& g4, const Generator5& g5, const Generator6& g6) {
16887 return internal::CartesianProductHolder6<Generator1, Generator2, Generator3,
16888 Generator4, Generator5, Generator6>(
16889 g1, g2, g3, g4, g5, g6);
16892 template <typename Generator1, typename Generator2, typename Generator3,
16893 typename Generator4, typename Generator5, typename Generator6,
16894 typename Generator7>
16895 internal::CartesianProductHolder7<Generator1, Generator2, Generator3,
16896 Generator4, Generator5, Generator6, Generator7> Combine(
16897 const Generator1& g1, const Generator2& g2, const Generator3& g3,
16898 const Generator4& g4, const Generator5& g5, const Generator6& g6,
16899 const Generator7& g7) {
16900 return internal::CartesianProductHolder7<Generator1, Generator2, Generator3,
16901 Generator4, Generator5, Generator6, Generator7>(
16902 g1, g2, g3, g4, g5, g6, g7);
16905 template <typename Generator1, typename Generator2, typename Generator3,
16906 typename Generator4, typename Generator5, typename Generator6,
16907 typename Generator7, typename Generator8>
16908 internal::CartesianProductHolder8<Generator1, Generator2, Generator3,
16909 Generator4, Generator5, Generator6, Generator7, Generator8> Combine(
16910 const Generator1& g1, const Generator2& g2, const Generator3& g3,
16911 const Generator4& g4, const Generator5& g5, const Generator6& g6,
16912 const Generator7& g7, const Generator8& g8) {
16913 return internal::CartesianProductHolder8<Generator1, Generator2, Generator3,
16914 Generator4, Generator5, Generator6, Generator7, Generator8>(
16915 g1, g2, g3, g4, g5, g6, g7, g8);
16918 template <typename Generator1, typename Generator2, typename Generator3,
16919 typename Generator4, typename Generator5, typename Generator6,
16920 typename Generator7, typename Generator8, typename Generator9>
16921 internal::CartesianProductHolder9<Generator1, Generator2, Generator3,
16922 Generator4, Generator5, Generator6, Generator7, Generator8,
16923 Generator9> Combine(
16924 const Generator1& g1, const Generator2& g2, const Generator3& g3,
16925 const Generator4& g4, const Generator5& g5, const Generator6& g6,
16926 const Generator7& g7, const Generator8& g8, const Generator9& g9) {
16927 return internal::CartesianProductHolder9<Generator1, Generator2, Generator3,
16928 Generator4, Generator5, Generator6, Generator7, Generator8, Generator9>(
16929 g1, g2, g3, g4, g5, g6, g7, g8, g9);
16932 template <typename Generator1, typename Generator2, typename Generator3,
16933 typename Generator4, typename Generator5, typename Generator6,
16934 typename Generator7, typename Generator8, typename Generator9,
16935 typename Generator10>
16936 internal::CartesianProductHolder10<Generator1, Generator2, Generator3,
16937 Generator4, Generator5, Generator6, Generator7, Generator8, Generator9,
16938 Generator10> Combine(
16939 const Generator1& g1, const Generator2& g2, const Generator3& g3,
16940 const Generator4& g4, const Generator5& g5, const Generator6& g6,
16941 const Generator7& g7, const Generator8& g8, const Generator9& g9,
16942 const Generator10& g10) {
16943 return internal::CartesianProductHolder10<Generator1, Generator2, Generator3,
16944 Generator4, Generator5, Generator6, Generator7, Generator8, Generator9,
16946 g1, g2, g3, g4, g5, g6, g7, g8, g9, g10);
16948 # endif // GTEST_HAS_COMBINE
16952 # define TEST_P(test_case_name, test_name) \
16953 class GTEST_TEST_CLASS_NAME_(test_case_name, test_name) \
16954 : public test_case_name { \
16956 GTEST_TEST_CLASS_NAME_(test_case_name, test_name)() {} \
16957 virtual void TestBody(); \
16959 static int AddToRegistry() { \
16960 ::testing::UnitTest::GetInstance()->parameterized_test_registry(). \
16961 GetTestCasePatternHolder<test_case_name>(\
16962 #test_case_name, __FILE__, __LINE__)->AddTestPattern(\
16965 new ::testing::internal::TestMetaFactory< \
16966 GTEST_TEST_CLASS_NAME_(test_case_name, test_name)>()); \
16969 static int gtest_registering_dummy_; \
16970 GTEST_DISALLOW_COPY_AND_ASSIGN_(\
16971 GTEST_TEST_CLASS_NAME_(test_case_name, test_name)); \
16973 int GTEST_TEST_CLASS_NAME_(test_case_name, \
16974 test_name)::gtest_registering_dummy_ = \
16975 GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::AddToRegistry(); \
16976 void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::TestBody()
16978 # define INSTANTIATE_TEST_CASE_P(prefix, test_case_name, generator) \
16979 ::testing::internal::ParamGenerator<test_case_name::ParamType> \
16980 gtest_##prefix##test_case_name##_EvalGenerator_() { return generator; } \
16981 int gtest_##prefix##test_case_name##_dummy_ = \
16982 ::testing::UnitTest::GetInstance()->parameterized_test_registry(). \
16983 GetTestCasePatternHolder<test_case_name>(\
16984 #test_case_name, __FILE__, __LINE__)->AddTestCaseInstantiation(\
16986 >est_##prefix##test_case_name##_EvalGenerator_, \
16987 __FILE__, __LINE__)
16989 } // namespace testing
16991 #endif // GTEST_HAS_PARAM_TEST
16993 #endif // GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_
16994 // Copyright 2006, Google Inc.
16995 // All rights reserved.
16997 // Redistribution and use in source and binary forms, with or without
16998 // modification, are permitted provided that the following conditions are
17001 // * Redistributions of source code must retain the above copyright
17002 // notice, this list of conditions and the following disclaimer.
17003 // * Redistributions in binary form must reproduce the above
17004 // copyright notice, this list of conditions and the following disclaimer
17005 // in the documentation and/or other materials provided with the
17007 // * Neither the name of Google Inc. nor the names of its
17008 // contributors may be used to endorse or promote products derived from
17009 // this software without specific prior written permission.
17011 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17012 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17013 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
17014 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
17015 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
17016 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
17017 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
17018 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
17019 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
17020 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
17021 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
17023 // Author: wan@google.com (Zhanyong Wan)
17025 // Google C++ Testing Framework definitions useful in production code.
17027 #ifndef GTEST_INCLUDE_GTEST_GTEST_PROD_H_
17028 #define GTEST_INCLUDE_GTEST_GTEST_PROD_H_
17030 // When you need to test the private or protected members of a class,
17031 // use the FRIEND_TEST macro to declare your tests as friends of the
17032 // class. For example:
17036 // void MyMethod();
17037 // FRIEND_TEST(MyClassTest, MyMethod);
17040 // class MyClassTest : public testing::Test {
17044 // TEST_F(MyClassTest, MyMethod) {
17045 // // Can call MyClass::MyMethod() here.
17048 #define FRIEND_TEST(test_case_name, test_name)\
17049 friend class test_case_name##_##test_name##_Test
17051 #endif // GTEST_INCLUDE_GTEST_GTEST_PROD_H_
17052 // Copyright 2008, Google Inc.
17053 // All rights reserved.
17055 // Redistribution and use in source and binary forms, with or without
17056 // modification, are permitted provided that the following conditions are
17059 // * Redistributions of source code must retain the above copyright
17060 // notice, this list of conditions and the following disclaimer.
17061 // * Redistributions in binary form must reproduce the above
17062 // copyright notice, this list of conditions and the following disclaimer
17063 // in the documentation and/or other materials provided with the
17065 // * Neither the name of Google Inc. nor the names of its
17066 // contributors may be used to endorse or promote products derived from
17067 // this software without specific prior written permission.
17069 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17070 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17071 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
17072 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
17073 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
17074 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
17075 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
17076 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
17077 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
17078 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
17079 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
17081 // Author: mheule@google.com (Markus Heule)
17084 #ifndef GTEST_INCLUDE_GTEST_GTEST_TEST_PART_H_
17085 #define GTEST_INCLUDE_GTEST_GTEST_TEST_PART_H_
17090 namespace testing {
17092 // A copyable object representing the result of a test part (i.e. an
17093 // assertion or an explicit FAIL(), ADD_FAILURE(), or SUCCESS()).
17095 // Don't inherit from TestPartResult as its destructor is not virtual.
17096 class GTEST_API_ TestPartResult {
17098 // The possible outcomes of a test part (i.e. an assertion or an
17099 // explicit SUCCEED(), FAIL(), or ADD_FAILURE()).
17101 kSuccess, // Succeeded.
17102 kNonFatalFailure, // Failed but the test can continue.
17103 kFatalFailure // Failed and the test should be terminated.
17106 // C'tor. TestPartResult does NOT have a default constructor.
17107 // Always use this constructor (with parameters) to create a
17108 // TestPartResult object.
17109 TestPartResult(Type a_type,
17110 const char* a_file_name,
17112 const char* a_message)
17114 file_name_(a_file_name == NULL ? "" : a_file_name),
17115 line_number_(a_line_number),
17116 summary_(ExtractSummary(a_message)),
17117 message_(a_message) {
17120 // Gets the outcome of the test part.
17121 Type type() const { return type_; }
17123 // Gets the name of the source file where the test part took place, or
17124 // NULL if it's unknown.
17125 const char* file_name() const {
17126 return file_name_.empty() ? NULL : file_name_.c_str();
17129 // Gets the line in the source file where the test part took place,
17130 // or -1 if it's unknown.
17131 int line_number() const { return line_number_; }
17133 // Gets the summary of the failure message.
17134 const char* summary() const { return summary_.c_str(); }
17136 // Gets the message associated with the test part.
17137 const char* message() const { return message_.c_str(); }
17139 // Returns true iff the test part passed.
17140 bool passed() const { return type_ == kSuccess; }
17142 // Returns true iff the test part failed.
17143 bool failed() const { return type_ != kSuccess; }
17145 // Returns true iff the test part non-fatally failed.
17146 bool nonfatally_failed() const { return type_ == kNonFatalFailure; }
17148 // Returns true iff the test part fatally failed.
17149 bool fatally_failed() const { return type_ == kFatalFailure; }
17154 // Gets the summary of the failure message by omitting the stack
17156 static std::string ExtractSummary(const char* message);
17158 // The name of the source file where the test part took place, or
17159 // "" if the source file is unknown.
17160 std::string file_name_;
17161 // The line in the source file where the test part took place, or -1
17162 // if the line number is unknown.
17164 std::string summary_; // The test failure summary.
17165 std::string message_; // The test failure message.
17168 // Prints a TestPartResult object.
17169 std::ostream& operator<<(std::ostream& os, const TestPartResult& result);
17171 // An array of TestPartResult objects.
17173 // Don't inherit from TestPartResultArray as its destructor is not
17175 class GTEST_API_ TestPartResultArray {
17177 TestPartResultArray() {}
17179 // Appends the given TestPartResult to the array.
17180 void Append(const TestPartResult& result);
17182 // Returns the TestPartResult at the given index (0-based).
17183 const TestPartResult& GetTestPartResult(int index) const;
17185 // Returns the number of TestPartResult objects in the array.
17189 std::vector<TestPartResult> array_;
17191 GTEST_DISALLOW_COPY_AND_ASSIGN_(TestPartResultArray);
17194 // This interface knows how to report a test part result.
17195 class TestPartResultReporterInterface {
17197 virtual ~TestPartResultReporterInterface() {}
17199 virtual void ReportTestPartResult(const TestPartResult& result) = 0;
17202 namespace internal {
17204 // This helper class is used by {ASSERT|EXPECT}_NO_FATAL_FAILURE to check if a
17205 // statement generates new fatal failures. To do so it registers itself as the
17206 // current test part result reporter. Besides checking if fatal failures were
17207 // reported, it only delegates the reporting to the former result reporter.
17208 // The original result reporter is restored in the destructor.
17209 // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
17210 class GTEST_API_ HasNewFatalFailureHelper
17211 : public TestPartResultReporterInterface {
17213 HasNewFatalFailureHelper();
17214 virtual ~HasNewFatalFailureHelper();
17215 virtual void ReportTestPartResult(const TestPartResult& result);
17216 bool has_new_fatal_failure() const { return has_new_fatal_failure_; }
17218 bool has_new_fatal_failure_;
17219 TestPartResultReporterInterface* original_reporter_;
17221 GTEST_DISALLOW_COPY_AND_ASSIGN_(HasNewFatalFailureHelper);
17224 } // namespace internal
17226 } // namespace testing
17228 #endif // GTEST_INCLUDE_GTEST_GTEST_TEST_PART_H_
17229 // Copyright 2008 Google Inc.
17230 // All Rights Reserved.
17232 // Redistribution and use in source and binary forms, with or without
17233 // modification, are permitted provided that the following conditions are
17236 // * Redistributions of source code must retain the above copyright
17237 // notice, this list of conditions and the following disclaimer.
17238 // * Redistributions in binary form must reproduce the above
17239 // copyright notice, this list of conditions and the following disclaimer
17240 // in the documentation and/or other materials provided with the
17242 // * Neither the name of Google Inc. nor the names of its
17243 // contributors may be used to endorse or promote products derived from
17244 // this software without specific prior written permission.
17246 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17247 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17248 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
17249 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
17250 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
17251 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
17252 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
17253 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
17254 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
17255 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
17256 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
17258 // Author: wan@google.com (Zhanyong Wan)
17260 #ifndef GTEST_INCLUDE_GTEST_GTEST_TYPED_TEST_H_
17261 #define GTEST_INCLUDE_GTEST_GTEST_TYPED_TEST_H_
17263 // This header implements typed tests and type-parameterized tests.
17265 // Typed (aka type-driven) tests repeat the same test for types in a
17266 // list. You must know which types you want to test with when writing
17267 // typed tests. Here's how you do it:
17271 // First, define a fixture class template. It should be parameterized
17272 // by a type. Remember to derive it from testing::Test.
17273 template <typename T>
17274 class FooTest : public testing::Test {
17277 typedef std::list<T> List;
17282 // Next, associate a list of types with the test case, which will be
17283 // repeated for each type in the list. The typedef is necessary for
17284 // the macro to parse correctly.
17285 typedef testing::Types<char, int, unsigned int> MyTypes;
17286 TYPED_TEST_CASE(FooTest, MyTypes);
17288 // If the type list contains only one type, you can write that type
17289 // directly without Types<...>:
17290 // TYPED_TEST_CASE(FooTest, int);
17292 // Then, use TYPED_TEST() instead of TEST_F() to define as many typed
17293 // tests for this test case as you want.
17294 TYPED_TEST(FooTest, DoesBlah) {
17295 // Inside a test, refer to TypeParam to get the type parameter.
17296 // Since we are inside a derived class template, C++ requires use to
17297 // visit the members of FooTest via 'this'.
17298 TypeParam n = this->value_;
17300 // To visit static members of the fixture, add the TestFixture::
17302 n += TestFixture::shared_;
17304 // To refer to typedefs in the fixture, add the "typename
17305 // TestFixture::" prefix.
17306 typename TestFixture::List values;
17307 values.push_back(n);
17311 TYPED_TEST(FooTest, HasPropertyA) { ... }
17315 // Type-parameterized tests are abstract test patterns parameterized
17316 // by a type. Compared with typed tests, type-parameterized tests
17317 // allow you to define the test pattern without knowing what the type
17318 // parameters are. The defined pattern can be instantiated with
17319 // different types any number of times, in any number of translation
17322 // If you are designing an interface or concept, you can define a
17323 // suite of type-parameterized tests to verify properties that any
17324 // valid implementation of the interface/concept should have. Then,
17325 // each implementation can easily instantiate the test suite to verify
17326 // that it conforms to the requirements, without having to write
17327 // similar tests repeatedly. Here's an example:
17331 // First, define a fixture class template. It should be parameterized
17332 // by a type. Remember to derive it from testing::Test.
17333 template <typename T>
17334 class FooTest : public testing::Test {
17338 // Next, declare that you will define a type-parameterized test case
17339 // (the _P suffix is for "parameterized" or "pattern", whichever you
17341 TYPED_TEST_CASE_P(FooTest);
17343 // Then, use TYPED_TEST_P() to define as many type-parameterized tests
17344 // for this type-parameterized test case as you want.
17345 TYPED_TEST_P(FooTest, DoesBlah) {
17346 // Inside a test, refer to TypeParam to get the type parameter.
17351 TYPED_TEST_P(FooTest, HasPropertyA) { ... }
17353 // Now the tricky part: you need to register all test patterns before
17354 // you can instantiate them. The first argument of the macro is the
17355 // test case name; the rest are the names of the tests in this test
17357 REGISTER_TYPED_TEST_CASE_P(FooTest,
17358 DoesBlah, HasPropertyA);
17360 // Finally, you are free to instantiate the pattern with the types you
17361 // want. If you put the above code in a header file, you can #include
17362 // it in multiple C++ source files and instantiate it multiple times.
17364 // To distinguish different instances of the pattern, the first
17365 // argument to the INSTANTIATE_* macro is a prefix that will be added
17366 // to the actual test case name. Remember to pick unique prefixes for
17367 // different instances.
17368 typedef testing::Types<char, int, unsigned int> MyTypes;
17369 INSTANTIATE_TYPED_TEST_CASE_P(My, FooTest, MyTypes);
17371 // If the type list contains only one type, you can write that type
17372 // directly without Types<...>:
17373 // INSTANTIATE_TYPED_TEST_CASE_P(My, FooTest, int);
17378 // Implements typed tests.
17380 #if GTEST_HAS_TYPED_TEST
17382 // INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
17384 // Expands to the name of the typedef for the type parameters of the
17385 // given test case.
17386 # define GTEST_TYPE_PARAMS_(TestCaseName) gtest_type_params_##TestCaseName##_
17388 // The 'Types' template argument below must have spaces around it
17389 // since some compilers may choke on '>>' when passing a template
17390 // instance (e.g. Types<int>)
17391 # define TYPED_TEST_CASE(CaseName, Types) \
17392 typedef ::testing::internal::TypeList< Types >::type \
17393 GTEST_TYPE_PARAMS_(CaseName)
17395 # define TYPED_TEST(CaseName, TestName) \
17396 template <typename gtest_TypeParam_> \
17397 class GTEST_TEST_CLASS_NAME_(CaseName, TestName) \
17398 : public CaseName<gtest_TypeParam_> { \
17400 typedef CaseName<gtest_TypeParam_> TestFixture; \
17401 typedef gtest_TypeParam_ TypeParam; \
17402 virtual void TestBody(); \
17404 bool gtest_##CaseName##_##TestName##_registered_ GTEST_ATTRIBUTE_UNUSED_ = \
17405 ::testing::internal::TypeParameterizedTest< \
17407 ::testing::internal::TemplateSel< \
17408 GTEST_TEST_CLASS_NAME_(CaseName, TestName)>, \
17409 GTEST_TYPE_PARAMS_(CaseName)>::Register(\
17410 "", #CaseName, #TestName, 0); \
17411 template <typename gtest_TypeParam_> \
17412 void GTEST_TEST_CLASS_NAME_(CaseName, TestName)<gtest_TypeParam_>::TestBody()
17414 #endif // GTEST_HAS_TYPED_TEST
17416 // Implements type-parameterized tests.
17418 #if GTEST_HAS_TYPED_TEST_P
17420 // INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
17422 // Expands to the namespace name that the type-parameterized tests for
17423 // the given type-parameterized test case are defined in. The exact
17424 // name of the namespace is subject to change without notice.
17425 # define GTEST_CASE_NAMESPACE_(TestCaseName) \
17426 gtest_case_##TestCaseName##_
17428 // INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
17430 // Expands to the name of the variable used to remember the names of
17431 // the defined tests in the given test case.
17432 # define GTEST_TYPED_TEST_CASE_P_STATE_(TestCaseName) \
17433 gtest_typed_test_case_p_state_##TestCaseName##_
17435 // INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE DIRECTLY.
17437 // Expands to the name of the variable used to remember the names of
17438 // the registered tests in the given test case.
17439 # define GTEST_REGISTERED_TEST_NAMES_(TestCaseName) \
17440 gtest_registered_test_names_##TestCaseName##_
17442 // The variables defined in the type-parameterized test macros are
17443 // static as typically these macros are used in a .h file that can be
17444 // #included in multiple translation units linked together.
17445 # define TYPED_TEST_CASE_P(CaseName) \
17446 static ::testing::internal::TypedTestCasePState \
17447 GTEST_TYPED_TEST_CASE_P_STATE_(CaseName)
17449 # define TYPED_TEST_P(CaseName, TestName) \
17450 namespace GTEST_CASE_NAMESPACE_(CaseName) { \
17451 template <typename gtest_TypeParam_> \
17452 class TestName : public CaseName<gtest_TypeParam_> { \
17454 typedef CaseName<gtest_TypeParam_> TestFixture; \
17455 typedef gtest_TypeParam_ TypeParam; \
17456 virtual void TestBody(); \
17458 static bool gtest_##TestName##_defined_ GTEST_ATTRIBUTE_UNUSED_ = \
17459 GTEST_TYPED_TEST_CASE_P_STATE_(CaseName).AddTestName(\
17460 __FILE__, __LINE__, #CaseName, #TestName); \
17462 template <typename gtest_TypeParam_> \
17463 void GTEST_CASE_NAMESPACE_(CaseName)::TestName<gtest_TypeParam_>::TestBody()
17465 # define REGISTER_TYPED_TEST_CASE_P(CaseName, ...) \
17466 namespace GTEST_CASE_NAMESPACE_(CaseName) { \
17467 typedef ::testing::internal::Templates<__VA_ARGS__>::type gtest_AllTests_; \
17469 static const char* const GTEST_REGISTERED_TEST_NAMES_(CaseName) = \
17470 GTEST_TYPED_TEST_CASE_P_STATE_(CaseName).VerifyRegisteredTestNames(\
17471 __FILE__, __LINE__, #__VA_ARGS__)
17473 // The 'Types' template argument below must have spaces around it
17474 // since some compilers may choke on '>>' when passing a template
17475 // instance (e.g. Types<int>)
17476 # define INSTANTIATE_TYPED_TEST_CASE_P(Prefix, CaseName, Types) \
17477 bool gtest_##Prefix##_##CaseName GTEST_ATTRIBUTE_UNUSED_ = \
17478 ::testing::internal::TypeParameterizedTestCase<CaseName, \
17479 GTEST_CASE_NAMESPACE_(CaseName)::gtest_AllTests_, \
17480 ::testing::internal::TypeList< Types >::type>::Register(\
17481 #Prefix, #CaseName, GTEST_REGISTERED_TEST_NAMES_(CaseName))
17483 #endif // GTEST_HAS_TYPED_TEST_P
17485 #endif // GTEST_INCLUDE_GTEST_GTEST_TYPED_TEST_H_
17487 // Depending on the platform, different string classes are available.
17488 // On Linux, in addition to ::std::string, Google also makes use of
17489 // class ::string, which has the same interface as ::std::string, but
17490 // has a different implementation.
17492 // The user can define GTEST_HAS_GLOBAL_STRING to 1 to indicate that
17493 // ::string is available AND is a distinct type to ::std::string, or
17494 // define it to 0 to indicate otherwise.
17496 // If the user's ::std::string and ::string are the same class due to
17497 // aliasing, he should define GTEST_HAS_GLOBAL_STRING to 0.
17499 // If the user doesn't define GTEST_HAS_GLOBAL_STRING, it is defined
17502 namespace testing {
17504 // Declares the flags.
17506 // This flag temporary enables the disabled tests.
17507 GTEST_DECLARE_bool_(also_run_disabled_tests);
17509 // This flag brings the debugger on an assertion failure.
17510 GTEST_DECLARE_bool_(break_on_failure);
17512 // This flag controls whether Google Test catches all test-thrown exceptions
17513 // and logs them as failures.
17514 GTEST_DECLARE_bool_(catch_exceptions);
17516 // This flag enables using colors in terminal output. Available values are
17517 // "yes" to enable colors, "no" (disable colors), or "auto" (the default)
17518 // to let Google Test decide.
17519 GTEST_DECLARE_string_(color);
17521 // This flag sets up the filter to select by name using a glob pattern
17522 // the tests to run. If the filter is not given all tests are executed.
17523 GTEST_DECLARE_string_(filter);
17525 // This flag causes the Google Test to list tests. None of the tests listed
17526 // are actually run if the flag is provided.
17527 GTEST_DECLARE_bool_(list_tests);
17529 // This flag controls whether Google Test emits a detailed XML report to a file
17530 // in addition to its normal textual output.
17531 GTEST_DECLARE_string_(output);
17533 // This flags control whether Google Test prints the elapsed time for each
17535 GTEST_DECLARE_bool_(print_time);
17537 // This flag specifies the random number seed.
17538 GTEST_DECLARE_int32_(random_seed);
17540 // This flag sets how many times the tests are repeated. The default value
17541 // is 1. If the value is -1 the tests are repeating forever.
17542 GTEST_DECLARE_int32_(repeat);
17544 // This flag controls whether Google Test includes Google Test internal
17545 // stack frames in failure stack traces.
17546 GTEST_DECLARE_bool_(show_internal_stack_frames);
17548 // When this flag is specified, tests' order is randomized on every iteration.
17549 GTEST_DECLARE_bool_(shuffle);
17551 // This flag specifies the maximum number of stack frames to be
17552 // printed in a failure message.
17553 GTEST_DECLARE_int32_(stack_trace_depth);
17555 // When this flag is specified, a failed assertion will throw an
17556 // exception if exceptions are enabled, or exit the program with a
17557 // non-zero code otherwise.
17558 GTEST_DECLARE_bool_(throw_on_failure);
17560 // When this flag is set with a "host:port" string, on supported
17561 // platforms test results are streamed to the specified port on
17562 // the specified host machine.
17563 GTEST_DECLARE_string_(stream_result_to);
17565 // The upper limit for valid stack trace depths.
17566 const int kMaxStackTraceDepth = 100;
17568 namespace internal {
17570 class AssertHelper;
17571 class DefaultGlobalTestPartResultReporter;
17572 class ExecDeathTest;
17573 class NoExecDeathTest;
17574 class FinalSuccessChecker;
17575 class GTestFlagSaver;
17576 class TestResultAccessor;
17577 class TestEventListenersAccessor;
17578 class TestEventRepeater;
17579 class WindowsDeathTest;
17580 class UnitTestImpl* GetUnitTestImpl();
17581 void ReportFailureInUnknownLocation(TestPartResult::Type result_type,
17582 const std::string& message);
17584 // Converts a streamable value to an std::string. A NULL pointer is
17585 // converted to "(null)". When the input value is a ::string,
17586 // ::std::string, ::wstring, or ::std::wstring object, each NUL
17587 // character in it is replaced with "\\0".
17588 // Declared in gtest-internal.h but defined here, so that it has access
17589 // to the definition of the Message class, required by the ARM
17591 template <typename T>
17592 std::string StreamableToString(const T& streamable) {
17593 return (Message() << streamable).GetString();
17596 } // namespace internal
17598 // The friend relationship of some of these classes is cyclic.
17599 // If we don't forward declare them the compiler might confuse the classes
17600 // in friendship clauses with same named classes on the scope.
17606 // A class for indicating whether an assertion was successful. When
17607 // the assertion wasn't successful, the AssertionResult object
17608 // remembers a non-empty message that describes how it failed.
17610 // To create an instance of this class, use one of the factory functions
17611 // (AssertionSuccess() and AssertionFailure()).
17613 // This class is useful for two purposes:
17614 // 1. Defining predicate functions to be used with Boolean test assertions
17615 // EXPECT_TRUE/EXPECT_FALSE and their ASSERT_ counterparts
17616 // 2. Defining predicate-format functions to be
17617 // used with predicate assertions (ASSERT_PRED_FORMAT*, etc).
17619 // For example, if you define IsEven predicate:
17621 // testing::AssertionResult IsEven(int n) {
17622 // if ((n % 2) == 0)
17623 // return testing::AssertionSuccess();
17625 // return testing::AssertionFailure() << n << " is odd";
17628 // Then the failed expectation EXPECT_TRUE(IsEven(Fib(5)))
17629 // will print the message
17631 // Value of: IsEven(Fib(5))
17632 // Actual: false (5 is odd)
17635 // instead of a more opaque
17637 // Value of: IsEven(Fib(5))
17641 // in case IsEven is a simple Boolean predicate.
17643 // If you expect your predicate to be reused and want to support informative
17644 // messages in EXPECT_FALSE and ASSERT_FALSE (negative assertions show up
17645 // about half as often as positive ones in our tests), supply messages for
17646 // both success and failure cases:
17648 // testing::AssertionResult IsEven(int n) {
17649 // if ((n % 2) == 0)
17650 // return testing::AssertionSuccess() << n << " is even";
17652 // return testing::AssertionFailure() << n << " is odd";
17655 // Then a statement EXPECT_FALSE(IsEven(Fib(6))) will print
17657 // Value of: IsEven(Fib(6))
17658 // Actual: true (8 is even)
17661 // NB: Predicates that support negative Boolean assertions have reduced
17662 // performance in positive ones so be careful not to use them in tests
17663 // that have lots (tens of thousands) of positive Boolean assertions.
17665 // To use this class with EXPECT_PRED_FORMAT assertions such as:
17667 // // Verifies that Foo() returns an even number.
17668 // EXPECT_PRED_FORMAT1(IsEven, Foo());
17670 // you need to define:
17672 // testing::AssertionResult IsEven(const char* expr, int n) {
17673 // if ((n % 2) == 0)
17674 // return testing::AssertionSuccess();
17676 // return testing::AssertionFailure()
17677 // << "Expected: " << expr << " is even\n Actual: it's " << n;
17680 // If Foo() returns 5, you will see the following message:
17682 // Expected: Foo() is even
17685 class GTEST_API_ AssertionResult {
17687 // Copy constructor.
17688 // Used in EXPECT_TRUE/FALSE(assertion_result).
17689 AssertionResult(const AssertionResult& other);
17690 // Used in the EXPECT_TRUE/FALSE(bool_expression).
17691 explicit AssertionResult(bool success) : success_(success) {}
17693 // Returns true iff the assertion succeeded.
17694 operator bool() const { return success_; } // NOLINT
17696 // Returns the assertion's negation. Used with EXPECT/ASSERT_FALSE.
17697 AssertionResult operator!() const;
17699 // Returns the text streamed into this AssertionResult. Test assertions
17700 // use it when they fail (i.e., the predicate's outcome doesn't match the
17701 // assertion's expectation). When nothing has been streamed into the
17702 // object, returns an empty string.
17703 const char* message() const {
17704 return message_.get() != NULL ? message_->c_str() : "";
17706 // TODO(vladl@google.com): Remove this after making sure no clients use it.
17707 // Deprecated; please use message() instead.
17708 const char* failure_message() const { return message(); }
17710 // Streams a custom failure message into this object.
17711 template <typename T> AssertionResult& operator<<(const T& value) {
17712 AppendMessage(Message() << value);
17716 // Allows streaming basic output manipulators such as endl or flush into
17718 AssertionResult& operator<<(
17719 ::std::ostream& (*basic_manipulator)(::std::ostream& stream)) {
17720 AppendMessage(Message() << basic_manipulator);
17725 // Appends the contents of message to message_.
17726 void AppendMessage(const Message& a_message) {
17727 if (message_.get() == NULL)
17728 message_.reset(new ::std::string);
17729 message_->append(a_message.GetString().c_str());
17732 // Stores result of the assertion predicate.
17734 // Stores the message describing the condition in case the expectation
17735 // construct is not satisfied with the predicate's outcome.
17736 // Referenced via a pointer to avoid taking too much stack frame space
17737 // with test assertions.
17738 internal::scoped_ptr< ::std::string> message_;
17740 GTEST_DISALLOW_ASSIGN_(AssertionResult);
17743 // Makes a successful assertion result.
17744 GTEST_API_ AssertionResult AssertionSuccess();
17746 // Makes a failed assertion result.
17747 GTEST_API_ AssertionResult AssertionFailure();
17749 // Makes a failed assertion result with the given failure message.
17750 // Deprecated; use AssertionFailure() << msg.
17751 GTEST_API_ AssertionResult AssertionFailure(const Message& msg);
17753 // The abstract class that all tests inherit from.
17755 // In Google Test, a unit test program contains one or many TestCases, and
17756 // each TestCase contains one or many Tests.
17758 // When you define a test using the TEST macro, you don't need to
17759 // explicitly derive from Test - the TEST macro automatically does
17762 // The only time you derive from Test is when defining a test fixture
17763 // to be used a TEST_F. For example:
17765 // class FooTest : public testing::Test {
17767 // virtual void SetUp() { ... }
17768 // virtual void TearDown() { ... }
17772 // TEST_F(FooTest, Bar) { ... }
17773 // TEST_F(FooTest, Baz) { ... }
17775 // Test is not copyable.
17776 class GTEST_API_ Test {
17778 friend class TestInfo;
17780 // Defines types for pointers to functions that set up and tear down
17782 typedef internal::SetUpTestCaseFunc SetUpTestCaseFunc;
17783 typedef internal::TearDownTestCaseFunc TearDownTestCaseFunc;
17785 // The d'tor is virtual as we intend to inherit from Test.
17788 // Sets up the stuff shared by all tests in this test case.
17790 // Google Test will call Foo::SetUpTestCase() before running the first
17791 // test in test case Foo. Hence a sub-class can define its own
17792 // SetUpTestCase() method to shadow the one defined in the super
17794 static void SetUpTestCase() {}
17796 // Tears down the stuff shared by all tests in this test case.
17798 // Google Test will call Foo::TearDownTestCase() after running the last
17799 // test in test case Foo. Hence a sub-class can define its own
17800 // TearDownTestCase() method to shadow the one defined in the super
17802 static void TearDownTestCase() {}
17804 // Returns true iff the current test has a fatal failure.
17805 static bool HasFatalFailure();
17807 // Returns true iff the current test has a non-fatal failure.
17808 static bool HasNonfatalFailure();
17810 // Returns true iff the current test has a (either fatal or
17811 // non-fatal) failure.
17812 static bool HasFailure() { return HasFatalFailure() || HasNonfatalFailure(); }
17814 // Logs a property for the current test. Only the last value for a given
17815 // key is remembered.
17816 // These are public static so they can be called from utility functions
17817 // that are not members of the test fixture.
17818 // The arguments are const char* instead strings, as Google Test is used
17819 // on platforms where string doesn't compile.
17821 // Note that a driving consideration for these RecordProperty methods
17822 // was to produce xml output suited to the Greenspan charting utility,
17823 // which at present will only chart values that fit in a 32-bit int. It
17824 // is the user's responsibility to restrict their values to 32-bit ints
17825 // if they intend them to be used with Greenspan.
17826 static void RecordProperty(const char* key, const char* value);
17827 static void RecordProperty(const char* key, int value);
17830 // Creates a Test object.
17833 // Sets up the test fixture.
17834 virtual void SetUp();
17836 // Tears down the test fixture.
17837 virtual void TearDown();
17840 // Returns true iff the current test has the same fixture class as
17841 // the first test in the current test case.
17842 static bool HasSameFixtureClass();
17844 // Runs the test after the test fixture has been set up.
17846 // A sub-class must implement this to define the test logic.
17848 // DO NOT OVERRIDE THIS FUNCTION DIRECTLY IN A USER PROGRAM.
17849 // Instead, use the TEST or TEST_F macro.
17850 virtual void TestBody() = 0;
17852 // Sets up, executes, and tears down the test.
17855 // Deletes self. We deliberately pick an unusual name for this
17856 // internal method to avoid clashing with names used in user TESTs.
17857 void DeleteSelf_() { delete this; }
17859 // Uses a GTestFlagSaver to save and restore all Google Test flags.
17860 const internal::GTestFlagSaver* const gtest_flag_saver_;
17862 // Often a user mis-spells SetUp() as Setup() and spends a long time
17863 // wondering why it is never called by Google Test. The declaration of
17864 // the following method is solely for catching such an error at
17867 // - The return type is deliberately chosen to be not void, so it
17868 // will be a conflict if a user declares void Setup() in his test
17871 // - This method is private, so it will be another compiler error
17872 // if a user calls it from his test fixture.
17874 // DO NOT OVERRIDE THIS FUNCTION.
17876 // If you see an error about overriding the following function or
17877 // about it being private, you have mis-spelled SetUp() as Setup().
17878 struct Setup_should_be_spelled_SetUp {};
17879 virtual Setup_should_be_spelled_SetUp* Setup() { return NULL; }
17881 // We disallow copying Tests.
17882 GTEST_DISALLOW_COPY_AND_ASSIGN_(Test);
17885 typedef internal::TimeInMillis TimeInMillis;
17887 // A copyable object representing a user specified test property which can be
17888 // output as a key/value string pair.
17890 // Don't inherit from TestProperty as its destructor is not virtual.
17891 class TestProperty {
17893 // C'tor. TestProperty does NOT have a default constructor.
17894 // Always use this constructor (with parameters) to create a
17895 // TestProperty object.
17896 TestProperty(const char* a_key, const char* a_value) :
17897 key_(a_key), value_(a_value) {
17900 // Gets the user supplied key.
17901 const char* key() const {
17902 return key_.c_str();
17905 // Gets the user supplied value.
17906 const char* value() const {
17907 return value_.c_str();
17910 // Sets a new value, overriding the one supplied in the constructor.
17911 void SetValue(const char* new_value) {
17912 value_ = new_value;
17916 // The key supplied by the user.
17918 // The value supplied by the user.
17919 std::string value_;
17922 // The result of a single Test. This includes a list of
17923 // TestPartResults, a list of TestProperties, a count of how many
17924 // death tests there are in the Test, and how much time it took to run
17927 // TestResult is not copyable.
17928 class GTEST_API_ TestResult {
17930 // Creates an empty TestResult.
17933 // D'tor. Do not inherit from TestResult.
17936 // Gets the number of all test parts. This is the sum of the number
17937 // of successful test parts and the number of failed test parts.
17938 int total_part_count() const;
17940 // Returns the number of the test properties.
17941 int test_property_count() const;
17943 // Returns true iff the test passed (i.e. no test part failed).
17944 bool Passed() const { return !Failed(); }
17946 // Returns true iff the test failed.
17947 bool Failed() const;
17949 // Returns true iff the test fatally failed.
17950 bool HasFatalFailure() const;
17952 // Returns true iff the test has a non-fatal failure.
17953 bool HasNonfatalFailure() const;
17955 // Returns the elapsed time, in milliseconds.
17956 TimeInMillis elapsed_time() const { return elapsed_time_; }
17958 // Returns the i-th test part result among all the results. i can range
17959 // from 0 to test_property_count() - 1. If i is not in that range, aborts
17961 const TestPartResult& GetTestPartResult(int i) const;
17963 // Returns the i-th test property. i can range from 0 to
17964 // test_property_count() - 1. If i is not in that range, aborts the
17966 const TestProperty& GetTestProperty(int i) const;
17969 friend class TestInfo;
17970 friend class UnitTest;
17971 friend class internal::DefaultGlobalTestPartResultReporter;
17972 friend class internal::ExecDeathTest;
17973 friend class internal::TestResultAccessor;
17974 friend class internal::UnitTestImpl;
17975 friend class internal::WindowsDeathTest;
17977 // Gets the vector of TestPartResults.
17978 const std::vector<TestPartResult>& test_part_results() const {
17979 return test_part_results_;
17982 // Gets the vector of TestProperties.
17983 const std::vector<TestProperty>& test_properties() const {
17984 return test_properties_;
17987 // Sets the elapsed time.
17988 void set_elapsed_time(TimeInMillis elapsed) { elapsed_time_ = elapsed; }
17990 // Adds a test property to the list. The property is validated and may add
17991 // a non-fatal failure if invalid (e.g., if it conflicts with reserved
17992 // key names). If a property is already recorded for the same key, the
17993 // value will be updated, rather than storing multiple values for the same
17995 void RecordProperty(const TestProperty& test_property);
17997 // Adds a failure if the key is a reserved attribute of Google Test
17998 // testcase tags. Returns true if the property is valid.
17999 // TODO(russr): Validate attribute names are legal and human readable.
18000 static bool ValidateTestProperty(const TestProperty& test_property);
18002 // Adds a test part result to the list.
18003 void AddTestPartResult(const TestPartResult& test_part_result);
18005 // Returns the death test count.
18006 int death_test_count() const { return death_test_count_; }
18008 // Increments the death test count, returning the new count.
18009 int increment_death_test_count() { return ++death_test_count_; }
18011 // Clears the test part results.
18012 void ClearTestPartResults();
18014 // Clears the object.
18017 // Protects mutable state of the property vector and of owned
18018 // properties, whose values may be updated.
18019 internal::Mutex test_properites_mutex_;
18021 // The vector of TestPartResults
18022 std::vector<TestPartResult> test_part_results_;
18023 // The vector of TestProperties
18024 std::vector<TestProperty> test_properties_;
18025 // Running count of death tests.
18026 int death_test_count_;
18027 // The elapsed time, in milliseconds.
18028 TimeInMillis elapsed_time_;
18030 // We disallow copying TestResult.
18031 GTEST_DISALLOW_COPY_AND_ASSIGN_(TestResult);
18032 }; // class TestResult
18034 // A TestInfo object stores the following information about a test:
18038 // Whether the test should be run
18039 // A function pointer that creates the test object when invoked
18042 // The constructor of TestInfo registers itself with the UnitTest
18043 // singleton such that the RUN_ALL_TESTS() macro knows which tests to
18045 class GTEST_API_ TestInfo {
18047 // Destructs a TestInfo object. This function is not virtual, so
18048 // don't inherit from TestInfo.
18051 // Returns the test case name.
18052 const char* test_case_name() const { return test_case_name_.c_str(); }
18054 // Returns the test name.
18055 const char* name() const { return name_.c_str(); }
18057 // Returns the name of the parameter type, or NULL if this is not a typed
18058 // or a type-parameterized test.
18059 const char* type_param() const {
18060 if (type_param_.get() != NULL)
18061 return type_param_->c_str();
18065 // Returns the text representation of the value parameter, or NULL if this
18066 // is not a value-parameterized test.
18067 const char* value_param() const {
18068 if (value_param_.get() != NULL)
18069 return value_param_->c_str();
18073 // Returns true if this test should run, that is if the test is not disabled
18074 // (or it is disabled but the also_run_disabled_tests flag has been specified)
18075 // and its full name matches the user-specified filter.
18077 // Google Test allows the user to filter the tests by their full names.
18078 // The full name of a test Bar in test case Foo is defined as
18079 // "Foo.Bar". Only the tests that match the filter will run.
18081 // A filter is a colon-separated list of glob (not regex) patterns,
18082 // optionally followed by a '-' and a colon-separated list of
18083 // negative patterns (tests to exclude). A test is run if it
18084 // matches one of the positive patterns and does not match any of
18085 // the negative patterns.
18087 // For example, *A*:Foo.* is a filter that matches any string that
18088 // contains the character 'A' or starts with "Foo.".
18089 bool should_run() const { return should_run_; }
18091 // Returns the result of the test.
18092 const TestResult* result() const { return &result_; }
18095 #if GTEST_HAS_DEATH_TEST
18096 friend class internal::DefaultDeathTestFactory;
18097 #endif // GTEST_HAS_DEATH_TEST
18099 friend class TestCase;
18100 friend class internal::UnitTestImpl;
18101 friend TestInfo* internal::MakeAndRegisterTestInfo(
18102 const char* test_case_name, const char* name,
18103 const char* type_param,
18104 const char* value_param,
18105 internal::TypeId fixture_class_id,
18106 Test::SetUpTestCaseFunc set_up_tc,
18107 Test::TearDownTestCaseFunc tear_down_tc,
18108 internal::TestFactoryBase* factory);
18110 // Constructs a TestInfo object. The newly constructed instance assumes
18111 // ownership of the factory object.
18112 TestInfo(const char* test_case_name, const char* name,
18113 const char* a_type_param,
18114 const char* a_value_param,
18115 internal::TypeId fixture_class_id,
18116 internal::TestFactoryBase* factory);
18118 // Increments the number of death tests encountered in this test so
18120 int increment_death_test_count() {
18121 return result_.increment_death_test_count();
18124 // Creates the test object, runs it, records its result, and then
18128 static void ClearTestResult(TestInfo* test_info) {
18129 test_info->result_.Clear();
18132 // These fields are immutable properties of the test.
18133 const std::string test_case_name_; // Test case name
18134 const std::string name_; // Test name
18135 // Name of the parameter type, or NULL if this is not a typed or a
18136 // type-parameterized test.
18137 const internal::scoped_ptr<const ::std::string> type_param_;
18138 // Text representation of the value parameter, or NULL if this is not a
18139 // value-parameterized test.
18140 const internal::scoped_ptr<const ::std::string> value_param_;
18141 const internal::TypeId fixture_class_id_; // ID of the test fixture class
18142 bool should_run_; // True iff this test should run
18143 bool is_disabled_; // True iff this test is disabled
18144 bool matches_filter_; // True if this test matches the
18145 // user-specified filter.
18146 internal::TestFactoryBase* const factory_; // The factory that creates
18149 // This field is mutable and needs to be reset before running the
18150 // test for the second time.
18151 TestResult result_;
18153 GTEST_DISALLOW_COPY_AND_ASSIGN_(TestInfo);
18156 // A test case, which consists of a vector of TestInfos.
18158 // TestCase is not copyable.
18159 class GTEST_API_ TestCase {
18161 // Creates a TestCase with the given name.
18163 // TestCase does NOT have a default constructor. Always use this
18164 // constructor to create a TestCase object.
18168 // name: name of the test case
18169 // a_type_param: the name of the test's type parameter, or NULL if
18170 // this is not a type-parameterized test.
18171 // set_up_tc: pointer to the function that sets up the test case
18172 // tear_down_tc: pointer to the function that tears down the test case
18173 TestCase(const char* name, const char* a_type_param,
18174 Test::SetUpTestCaseFunc set_up_tc,
18175 Test::TearDownTestCaseFunc tear_down_tc);
18177 // Destructor of TestCase.
18178 virtual ~TestCase();
18180 // Gets the name of the TestCase.
18181 const char* name() const { return name_.c_str(); }
18183 // Returns the name of the parameter type, or NULL if this is not a
18184 // type-parameterized test case.
18185 const char* type_param() const {
18186 if (type_param_.get() != NULL)
18187 return type_param_->c_str();
18191 // Returns true if any test in this test case should run.
18192 bool should_run() const { return should_run_; }
18194 // Gets the number of successful tests in this test case.
18195 int successful_test_count() const;
18197 // Gets the number of failed tests in this test case.
18198 int failed_test_count() const;
18200 // Gets the number of disabled tests in this test case.
18201 int disabled_test_count() const;
18203 // Get the number of tests in this test case that should run.
18204 int test_to_run_count() const;
18206 // Gets the number of all tests in this test case.
18207 int total_test_count() const;
18209 // Returns true iff the test case passed.
18210 bool Passed() const { return !Failed(); }
18212 // Returns true iff the test case failed.
18213 bool Failed() const { return failed_test_count() > 0; }
18215 // Returns the elapsed time, in milliseconds.
18216 TimeInMillis elapsed_time() const { return elapsed_time_; }
18218 // Returns the i-th test among all the tests. i can range from 0 to
18219 // total_test_count() - 1. If i is not in that range, returns NULL.
18220 const TestInfo* GetTestInfo(int i) const;
18224 friend class internal::UnitTestImpl;
18226 // Gets the (mutable) vector of TestInfos in this TestCase.
18227 std::vector<TestInfo*>& test_info_list() { return test_info_list_; }
18229 // Gets the (immutable) vector of TestInfos in this TestCase.
18230 const std::vector<TestInfo*>& test_info_list() const {
18231 return test_info_list_;
18234 // Returns the i-th test among all the tests. i can range from 0 to
18235 // total_test_count() - 1. If i is not in that range, returns NULL.
18236 TestInfo* GetMutableTestInfo(int i);
18238 // Sets the should_run member.
18239 void set_should_run(bool should) { should_run_ = should; }
18241 // Adds a TestInfo to this test case. Will delete the TestInfo upon
18242 // destruction of the TestCase object.
18243 void AddTestInfo(TestInfo * test_info);
18245 // Clears the results of all tests in this test case.
18246 void ClearResult();
18248 // Clears the results of all tests in the given test case.
18249 static void ClearTestCaseResult(TestCase* test_case) {
18250 test_case->ClearResult();
18253 // Runs every test in this TestCase.
18256 // Runs SetUpTestCase() for this TestCase. This wrapper is needed
18257 // for catching exceptions thrown from SetUpTestCase().
18258 void RunSetUpTestCase() { (*set_up_tc_)(); }
18260 // Runs TearDownTestCase() for this TestCase. This wrapper is
18261 // needed for catching exceptions thrown from TearDownTestCase().
18262 void RunTearDownTestCase() { (*tear_down_tc_)(); }
18264 // Returns true iff test passed.
18265 static bool TestPassed(const TestInfo* test_info) {
18266 return test_info->should_run() && test_info->result()->Passed();
18269 // Returns true iff test failed.
18270 static bool TestFailed(const TestInfo* test_info) {
18271 return test_info->should_run() && test_info->result()->Failed();
18274 // Returns true iff test is disabled.
18275 static bool TestDisabled(const TestInfo* test_info) {
18276 return test_info->is_disabled_;
18279 // Returns true if the given test should run.
18280 static bool ShouldRunTest(const TestInfo* test_info) {
18281 return test_info->should_run();
18284 // Shuffles the tests in this test case.
18285 void ShuffleTests(internal::Random* random);
18287 // Restores the test order to before the first shuffle.
18288 void UnshuffleTests();
18290 // Name of the test case.
18292 // Name of the parameter type, or NULL if this is not a typed or a
18293 // type-parameterized test.
18294 const internal::scoped_ptr<const ::std::string> type_param_;
18295 // The vector of TestInfos in their original order. It owns the
18296 // elements in the vector.
18297 std::vector<TestInfo*> test_info_list_;
18298 // Provides a level of indirection for the test list to allow easy
18299 // shuffling and restoring the test order. The i-th element in this
18300 // vector is the index of the i-th test in the shuffled test list.
18301 std::vector<int> test_indices_;
18302 // Pointer to the function that sets up the test case.
18303 Test::SetUpTestCaseFunc set_up_tc_;
18304 // Pointer to the function that tears down the test case.
18305 Test::TearDownTestCaseFunc tear_down_tc_;
18306 // True iff any test in this test case should run.
18308 // Elapsed time, in milliseconds.
18309 TimeInMillis elapsed_time_;
18311 // We disallow copying TestCases.
18312 GTEST_DISALLOW_COPY_AND_ASSIGN_(TestCase);
18315 // An Environment object is capable of setting up and tearing down an
18316 // environment. The user should subclass this to define his own
18319 // An Environment object does the set-up and tear-down in virtual
18320 // methods SetUp() and TearDown() instead of the constructor and the
18323 // 1. You cannot safely throw from a destructor. This is a problem
18324 // as in some cases Google Test is used where exceptions are enabled, and
18325 // we may want to implement ASSERT_* using exceptions where they are
18327 // 2. You cannot use ASSERT_* directly in a constructor or
18329 class Environment {
18331 // The d'tor is virtual as we need to subclass Environment.
18332 virtual ~Environment() {}
18334 // Override this to define how to set up the environment.
18335 virtual void SetUp() {}
18337 // Override this to define how to tear down the environment.
18338 virtual void TearDown() {}
18340 // If you see an error about overriding the following function or
18341 // about it being private, you have mis-spelled SetUp() as Setup().
18342 struct Setup_should_be_spelled_SetUp {};
18343 virtual Setup_should_be_spelled_SetUp* Setup() { return NULL; }
18346 // The interface for tracing execution of tests. The methods are organized in
18347 // the order the corresponding events are fired.
18348 class TestEventListener {
18350 virtual ~TestEventListener() {}
18352 // Fired before any test activity starts.
18353 virtual void OnTestProgramStart(const UnitTest& unit_test) = 0;
18355 // Fired before each iteration of tests starts. There may be more than
18356 // one iteration if GTEST_FLAG(repeat) is set. iteration is the iteration
18357 // index, starting from 0.
18358 virtual void OnTestIterationStart(const UnitTest& unit_test,
18359 int iteration) = 0;
18361 // Fired before environment set-up for each iteration of tests starts.
18362 virtual void OnEnvironmentsSetUpStart(const UnitTest& unit_test) = 0;
18364 // Fired after environment set-up for each iteration of tests ends.
18365 virtual void OnEnvironmentsSetUpEnd(const UnitTest& unit_test) = 0;
18367 // Fired before the test case starts.
18368 virtual void OnTestCaseStart(const TestCase& test_case) = 0;
18370 // Fired before the test starts.
18371 virtual void OnTestStart(const TestInfo& test_info) = 0;
18373 // Fired after a failed assertion or a SUCCEED() invocation.
18374 virtual void OnTestPartResult(const TestPartResult& test_part_result) = 0;
18376 // Fired after the test ends.
18377 virtual void OnTestEnd(const TestInfo& test_info) = 0;
18379 // Fired after the test case ends.
18380 virtual void OnTestCaseEnd(const TestCase& test_case) = 0;
18382 // Fired before environment tear-down for each iteration of tests starts.
18383 virtual void OnEnvironmentsTearDownStart(const UnitTest& unit_test) = 0;
18385 // Fired after environment tear-down for each iteration of tests ends.
18386 virtual void OnEnvironmentsTearDownEnd(const UnitTest& unit_test) = 0;
18388 // Fired after each iteration of tests finishes.
18389 virtual void OnTestIterationEnd(const UnitTest& unit_test,
18390 int iteration) = 0;
18392 // Fired after all test activities have ended.
18393 virtual void OnTestProgramEnd(const UnitTest& unit_test) = 0;
18396 // The convenience class for users who need to override just one or two
18397 // methods and are not concerned that a possible change to a signature of
18398 // the methods they override will not be caught during the build. For
18399 // comments about each method please see the definition of TestEventListener
18401 class EmptyTestEventListener : public TestEventListener {
18403 virtual void OnTestProgramStart(const UnitTest& /*unit_test*/) {}
18404 virtual void OnTestIterationStart(const UnitTest& /*unit_test*/,
18405 int /*iteration*/) {}
18406 virtual void OnEnvironmentsSetUpStart(const UnitTest& /*unit_test*/) {}
18407 virtual void OnEnvironmentsSetUpEnd(const UnitTest& /*unit_test*/) {}
18408 virtual void OnTestCaseStart(const TestCase& /*test_case*/) {}
18409 virtual void OnTestStart(const TestInfo& /*test_info*/) {}
18410 virtual void OnTestPartResult(const TestPartResult& /*test_part_result*/) {}
18411 virtual void OnTestEnd(const TestInfo& /*test_info*/) {}
18412 virtual void OnTestCaseEnd(const TestCase& /*test_case*/) {}
18413 virtual void OnEnvironmentsTearDownStart(const UnitTest& /*unit_test*/) {}
18414 virtual void OnEnvironmentsTearDownEnd(const UnitTest& /*unit_test*/) {}
18415 virtual void OnTestIterationEnd(const UnitTest& /*unit_test*/,
18416 int /*iteration*/) {}
18417 virtual void OnTestProgramEnd(const UnitTest& /*unit_test*/) {}
18420 // TestEventListeners lets users add listeners to track events in Google Test.
18421 class GTEST_API_ TestEventListeners {
18423 TestEventListeners();
18424 ~TestEventListeners();
18426 // Appends an event listener to the end of the list. Google Test assumes
18427 // the ownership of the listener (i.e. it will delete the listener when
18428 // the test program finishes).
18429 void Append(TestEventListener* listener);
18431 // Removes the given event listener from the list and returns it. It then
18432 // becomes the caller's responsibility to delete the listener. Returns
18433 // NULL if the listener is not found in the list.
18434 TestEventListener* Release(TestEventListener* listener);
18436 // Returns the standard listener responsible for the default console
18437 // output. Can be removed from the listeners list to shut down default
18438 // console output. Note that removing this object from the listener list
18439 // with Release transfers its ownership to the caller and makes this
18440 // function return NULL the next time.
18441 TestEventListener* default_result_printer() const {
18442 return default_result_printer_;
18445 // Returns the standard listener responsible for the default XML output
18446 // controlled by the --gtest_output=xml flag. Can be removed from the
18447 // listeners list by users who want to shut down the default XML output
18448 // controlled by this flag and substitute it with custom one. Note that
18449 // removing this object from the listener list with Release transfers its
18450 // ownership to the caller and makes this function return NULL the next
18452 TestEventListener* default_xml_generator() const {
18453 return default_xml_generator_;
18457 friend class TestCase;
18458 friend class TestInfo;
18459 friend class internal::DefaultGlobalTestPartResultReporter;
18460 friend class internal::NoExecDeathTest;
18461 friend class internal::TestEventListenersAccessor;
18462 friend class internal::UnitTestImpl;
18464 // Returns repeater that broadcasts the TestEventListener events to all
18466 TestEventListener* repeater();
18468 // Sets the default_result_printer attribute to the provided listener.
18469 // The listener is also added to the listener list and previous
18470 // default_result_printer is removed from it and deleted. The listener can
18471 // also be NULL in which case it will not be added to the list. Does
18472 // nothing if the previous and the current listener objects are the same.
18473 void SetDefaultResultPrinter(TestEventListener* listener);
18475 // Sets the default_xml_generator attribute to the provided listener. The
18476 // listener is also added to the listener list and previous
18477 // default_xml_generator is removed from it and deleted. The listener can
18478 // also be NULL in which case it will not be added to the list. Does
18479 // nothing if the previous and the current listener objects are the same.
18480 void SetDefaultXmlGenerator(TestEventListener* listener);
18482 // Controls whether events will be forwarded by the repeater to the
18483 // listeners in the list.
18484 bool EventForwardingEnabled() const;
18485 void SuppressEventForwarding();
18487 // The actual list of listeners.
18488 internal::TestEventRepeater* repeater_;
18489 // Listener responsible for the standard result output.
18490 TestEventListener* default_result_printer_;
18491 // Listener responsible for the creation of the XML output file.
18492 TestEventListener* default_xml_generator_;
18494 // We disallow copying TestEventListeners.
18495 GTEST_DISALLOW_COPY_AND_ASSIGN_(TestEventListeners);
18498 // A UnitTest consists of a vector of TestCases.
18500 // This is a singleton class. The only instance of UnitTest is
18501 // created when UnitTest::GetInstance() is first called. This
18502 // instance is never deleted.
18504 // UnitTest is not copyable.
18506 // This class is thread-safe as long as the methods are called
18507 // according to their specification.
18508 class GTEST_API_ UnitTest {
18510 // Gets the singleton UnitTest object. The first time this method
18511 // is called, a UnitTest object is constructed and returned.
18512 // Consecutive calls will return the same object.
18513 static UnitTest* GetInstance();
18515 // Runs all tests in this UnitTest object and prints the result.
18516 // Returns 0 if successful, or 1 otherwise.
18518 // This method can only be called from the main thread.
18520 // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
18521 int Run() GTEST_MUST_USE_RESULT_;
18523 // Returns the working directory when the first TEST() or TEST_F()
18524 // was executed. The UnitTest object owns the string.
18525 const char* original_working_dir() const;
18527 // Returns the TestCase object for the test that's currently running,
18528 // or NULL if no test is running.
18529 const TestCase* current_test_case() const
18530 GTEST_LOCK_EXCLUDED_(mutex_);
18532 // Returns the TestInfo object for the test that's currently running,
18533 // or NULL if no test is running.
18534 const TestInfo* current_test_info() const
18535 GTEST_LOCK_EXCLUDED_(mutex_);
18537 // Returns the random seed used at the start of the current test run.
18538 int random_seed() const;
18540 #if GTEST_HAS_PARAM_TEST
18541 // Returns the ParameterizedTestCaseRegistry object used to keep track of
18542 // value-parameterized tests and instantiate and register them.
18544 // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
18545 internal::ParameterizedTestCaseRegistry& parameterized_test_registry()
18546 GTEST_LOCK_EXCLUDED_(mutex_);
18547 #endif // GTEST_HAS_PARAM_TEST
18549 // Gets the number of successful test cases.
18550 int successful_test_case_count() const;
18552 // Gets the number of failed test cases.
18553 int failed_test_case_count() const;
18555 // Gets the number of all test cases.
18556 int total_test_case_count() const;
18558 // Gets the number of all test cases that contain at least one test
18559 // that should run.
18560 int test_case_to_run_count() const;
18562 // Gets the number of successful tests.
18563 int successful_test_count() const;
18565 // Gets the number of failed tests.
18566 int failed_test_count() const;
18568 // Gets the number of disabled tests.
18569 int disabled_test_count() const;
18571 // Gets the number of all tests.
18572 int total_test_count() const;
18574 // Gets the number of tests that should run.
18575 int test_to_run_count() const;
18577 // Gets the time of the test program start, in ms from the start of the
18579 TimeInMillis start_timestamp() const;
18581 // Gets the elapsed time, in milliseconds.
18582 TimeInMillis elapsed_time() const;
18584 // Returns true iff the unit test passed (i.e. all test cases passed).
18585 bool Passed() const;
18587 // Returns true iff the unit test failed (i.e. some test case failed
18588 // or something outside of all tests failed).
18589 bool Failed() const;
18591 // Gets the i-th test case among all the test cases. i can range from 0 to
18592 // total_test_case_count() - 1. If i is not in that range, returns NULL.
18593 const TestCase* GetTestCase(int i) const;
18595 // Returns the list of event listeners that can be used to track events
18596 // inside Google Test.
18597 TestEventListeners& listeners();
18600 // Registers and returns a global test environment. When a test
18601 // program is run, all global test environments will be set-up in
18602 // the order they were registered. After all tests in the program
18603 // have finished, all global test environments will be torn-down in
18604 // the *reverse* order they were registered.
18606 // The UnitTest object takes ownership of the given environment.
18608 // This method can only be called from the main thread.
18609 Environment* AddEnvironment(Environment* env);
18611 // Adds a TestPartResult to the current TestResult object. All
18612 // Google Test assertion macros (e.g. ASSERT_TRUE, EXPECT_EQ, etc)
18613 // eventually call this to report their results. The user code
18614 // should use the assertion macros instead of calling this directly.
18615 void AddTestPartResult(TestPartResult::Type result_type,
18616 const char* file_name,
18618 const std::string& message,
18619 const std::string& os_stack_trace)
18620 GTEST_LOCK_EXCLUDED_(mutex_);
18622 // Adds a TestProperty to the current TestResult object. If the result already
18623 // contains a property with the same key, the value will be updated.
18624 void RecordPropertyForCurrentTest(const char* key, const char* value);
18626 // Gets the i-th test case among all the test cases. i can range from 0 to
18627 // total_test_case_count() - 1. If i is not in that range, returns NULL.
18628 TestCase* GetMutableTestCase(int i);
18630 // Accessors for the implementation object.
18631 internal::UnitTestImpl* impl() { return impl_; }
18632 const internal::UnitTestImpl* impl() const { return impl_; }
18634 // These classes and funcions are friends as they need to access private
18635 // members of UnitTest.
18637 friend class internal::AssertHelper;
18638 friend class internal::ScopedTrace;
18639 friend Environment* AddGlobalTestEnvironment(Environment* env);
18640 friend internal::UnitTestImpl* internal::GetUnitTestImpl();
18641 friend void internal::ReportFailureInUnknownLocation(
18642 TestPartResult::Type result_type,
18643 const std::string& message);
18645 // Creates an empty UnitTest.
18649 virtual ~UnitTest();
18651 // Pushes a trace defined by SCOPED_TRACE() on to the per-thread
18652 // Google Test trace stack.
18653 void PushGTestTrace(const internal::TraceInfo& trace)
18654 GTEST_LOCK_EXCLUDED_(mutex_);
18656 // Pops a trace from the per-thread Google Test trace stack.
18657 void PopGTestTrace()
18658 GTEST_LOCK_EXCLUDED_(mutex_);
18660 // Protects mutable state in *impl_. This is mutable as some const
18661 // methods need to lock it too.
18662 mutable internal::Mutex mutex_;
18664 // Opaque implementation object. This field is never changed once
18665 // the object is constructed. We don't mark it as const here, as
18666 // doing so will cause a warning in the constructor of UnitTest.
18667 // Mutable state in *impl_ is protected by mutex_.
18668 internal::UnitTestImpl* impl_;
18670 // We disallow copying UnitTest.
18671 GTEST_DISALLOW_COPY_AND_ASSIGN_(UnitTest);
18674 // A convenient wrapper for adding an environment for the test
18677 // You should call this before RUN_ALL_TESTS() is called, probably in
18678 // main(). If you use gtest_main, you need to call this before main()
18679 // starts for it to take effect. For example, you can define a global
18680 // variable like this:
18682 // testing::Environment* const foo_env =
18683 // testing::AddGlobalTestEnvironment(new FooEnvironment);
18685 // However, we strongly recommend you to write your own main() and
18686 // call AddGlobalTestEnvironment() there, as relying on initialization
18687 // of global variables makes the code harder to read and may cause
18688 // problems when you register multiple environments from different
18689 // translation units and the environments have dependencies among them
18690 // (remember that the compiler doesn't guarantee the order in which
18691 // global variables from different translation units are initialized).
18692 inline Environment* AddGlobalTestEnvironment(Environment* env) {
18693 return UnitTest::GetInstance()->AddEnvironment(env);
18696 // Initializes Google Test. This must be called before calling
18697 // RUN_ALL_TESTS(). In particular, it parses a command line for the
18698 // flags that Google Test recognizes. Whenever a Google Test flag is
18699 // seen, it is removed from argv, and *argc is decremented.
18701 // No value is returned. Instead, the Google Test flag variables are
18704 // Calling the function for the second time has no user-visible effect.
18705 GTEST_API_ void InitGoogleTest(int* argc, char** argv);
18707 // This overloaded version can be used in Windows programs compiled in
18709 GTEST_API_ void InitGoogleTest(int* argc, wchar_t** argv);
18711 namespace internal {
18713 // FormatForComparison<ToPrint, OtherOperand>::Format(value) formats a
18714 // value of type ToPrint that is an operand of a comparison assertion
18715 // (e.g. ASSERT_EQ). OtherOperand is the type of the other operand in
18716 // the comparison, and is used to help determine the best way to
18717 // format the value. In particular, when the value is a C string
18718 // (char pointer) and the other operand is an STL string object, we
18719 // want to format the C string as a string, since we know it is
18720 // compared by value with the string object. If the value is a char
18721 // pointer but the other operand is not an STL string object, we don't
18722 // know whether the pointer is supposed to point to a NUL-terminated
18723 // string, and thus want to print it as a pointer to be safe.
18725 // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
18727 // The default case.
18728 template <typename ToPrint, typename OtherOperand>
18729 class FormatForComparison {
18731 static ::std::string Format(const ToPrint& value) {
18732 return ::testing::PrintToString(value);
18737 template <typename ToPrint, size_t N, typename OtherOperand>
18738 class FormatForComparison<ToPrint[N], OtherOperand> {
18740 static ::std::string Format(const ToPrint* value) {
18741 return FormatForComparison<const ToPrint*, OtherOperand>::Format(value);
18745 // By default, print C string as pointers to be safe, as we don't know
18746 // whether they actually point to a NUL-terminated string.
18748 #define GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_(CharType) \
18749 template <typename OtherOperand> \
18750 class FormatForComparison<CharType*, OtherOperand> { \
18752 static ::std::string Format(CharType* value) { \
18753 return ::testing::PrintToString(static_cast<const void*>(value)); \
18757 GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_(char);
18758 GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_(const char);
18759 GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_(wchar_t);
18760 GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_(const wchar_t);
18762 #undef GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_
18764 // If a C string is compared with an STL string object, we know it's meant
18765 // to point to a NUL-terminated string, and thus can print it as a string.
18767 #define GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(CharType, OtherStringType) \
18769 class FormatForComparison<CharType*, OtherStringType> { \
18771 static ::std::string Format(CharType* value) { \
18772 return ::testing::PrintToString(value); \
18776 GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(char, ::std::string);
18777 GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(const char, ::std::string);
18779 #if GTEST_HAS_GLOBAL_STRING
18780 GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(char, ::string);
18781 GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(const char, ::string);
18784 #if GTEST_HAS_GLOBAL_WSTRING
18785 GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(wchar_t, ::wstring);
18786 GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(const wchar_t, ::wstring);
18789 #if GTEST_HAS_STD_WSTRING
18790 GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(wchar_t, ::std::wstring);
18791 GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(const wchar_t, ::std::wstring);
18794 #undef GTEST_IMPL_FORMAT_C_STRING_AS_STRING_
18796 // Formats a comparison assertion (e.g. ASSERT_EQ, EXPECT_LT, and etc)
18797 // operand to be used in a failure message. The type (but not value)
18798 // of the other operand may affect the format. This allows us to
18799 // print a char* as a raw pointer when it is compared against another
18800 // char* or void*, and print it as a C string when it is compared
18801 // against an std::string object, for example.
18803 // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
18804 template <typename T1, typename T2>
18805 std::string FormatForComparisonFailureMessage(
18806 const T1& value, const T2& /* other_operand */) {
18807 return FormatForComparison<T1, T2>::Format(value);
18810 // The helper function for {ASSERT|EXPECT}_EQ.
18811 template <typename T1, typename T2>
18812 AssertionResult CmpHelperEQ(const char* expected_expression,
18813 const char* actual_expression,
18814 const T1& expected,
18815 const T2& actual) {
18817 # pragma warning(push) // Saves the current warning state.
18818 # pragma warning(disable:4389) // Temporarily disables warning on
18819 // signed/unsigned mismatch.
18822 if (expected == actual) {
18823 return AssertionSuccess();
18827 # pragma warning(pop) // Restores the warning state.
18830 return EqFailure(expected_expression,
18832 FormatForComparisonFailureMessage(expected, actual),
18833 FormatForComparisonFailureMessage(actual, expected),
18837 // With this overloaded version, we allow anonymous enums to be used
18838 // in {ASSERT|EXPECT}_EQ when compiled with gcc 4, as anonymous enums
18839 // can be implicitly cast to BiggestInt.
18840 GTEST_API_ AssertionResult CmpHelperEQ(const char* expected_expression,
18841 const char* actual_expression,
18842 BiggestInt expected,
18843 BiggestInt actual);
18845 // The helper class for {ASSERT|EXPECT}_EQ. The template argument
18846 // lhs_is_null_literal is true iff the first argument to ASSERT_EQ()
18847 // is a null pointer literal. The following default implementation is
18848 // for lhs_is_null_literal being false.
18849 template <bool lhs_is_null_literal>
18852 // This templatized version is for the general case.
18853 template <typename T1, typename T2>
18854 static AssertionResult Compare(const char* expected_expression,
18855 const char* actual_expression,
18856 const T1& expected,
18857 const T2& actual) {
18858 return CmpHelperEQ(expected_expression, actual_expression, expected,
18862 // With this overloaded version, we allow anonymous enums to be used
18863 // in {ASSERT|EXPECT}_EQ when compiled with gcc 4, as anonymous
18864 // enums can be implicitly cast to BiggestInt.
18866 // Even though its body looks the same as the above version, we
18867 // cannot merge the two, as it will make anonymous enums unhappy.
18868 static AssertionResult Compare(const char* expected_expression,
18869 const char* actual_expression,
18870 BiggestInt expected,
18871 BiggestInt actual) {
18872 return CmpHelperEQ(expected_expression, actual_expression, expected,
18877 // This specialization is used when the first argument to ASSERT_EQ()
18878 // is a null pointer literal, like NULL, false, or 0.
18880 class EqHelper<true> {
18882 // We define two overloaded versions of Compare(). The first
18883 // version will be picked when the second argument to ASSERT_EQ() is
18884 // NOT a pointer, e.g. ASSERT_EQ(0, AnIntFunction()) or
18885 // EXPECT_EQ(false, a_bool).
18886 template <typename T1, typename T2>
18887 static AssertionResult Compare(
18888 const char* expected_expression,
18889 const char* actual_expression,
18890 const T1& expected,
18892 // The following line prevents this overload from being considered if T2
18893 // is not a pointer type. We need this because ASSERT_EQ(NULL, my_ptr)
18894 // expands to Compare("", "", NULL, my_ptr), which requires a conversion
18895 // to match the Secret* in the other overload, which would otherwise make
18896 // this template match better.
18897 typename EnableIf<!is_pointer<T2>::value>::type* = 0) {
18898 return CmpHelperEQ(expected_expression, actual_expression, expected,
18902 // This version will be picked when the second argument to ASSERT_EQ() is a
18903 // pointer, e.g. ASSERT_EQ(NULL, a_pointer).
18904 template <typename T>
18905 static AssertionResult Compare(
18906 const char* expected_expression,
18907 const char* actual_expression,
18908 // We used to have a second template parameter instead of Secret*. That
18909 // template parameter would deduce to 'long', making this a better match
18910 // than the first overload even without the first overload's EnableIf.
18911 // Unfortunately, gcc with -Wconversion-null warns when "passing NULL to
18912 // non-pointer argument" (even a deduced integral argument), so the old
18913 // implementation caused warnings in user code.
18914 Secret* /* expected (NULL) */,
18916 // We already know that 'expected' is a null pointer.
18917 return CmpHelperEQ(expected_expression, actual_expression,
18918 static_cast<T*>(NULL), actual);
18922 // A macro for implementing the helper functions needed to implement
18923 // ASSERT_?? and EXPECT_??. It is here just to avoid copy-and-paste
18924 // of similar code.
18926 // For each templatized helper function, we also define an overloaded
18927 // version for BiggestInt in order to reduce code bloat and allow
18928 // anonymous enums to be used with {ASSERT|EXPECT}_?? when compiled
18931 // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
18932 #define GTEST_IMPL_CMP_HELPER_(op_name, op)\
18933 template <typename T1, typename T2>\
18934 AssertionResult CmpHelper##op_name(const char* expr1, const char* expr2, \
18935 const T1& val1, const T2& val2) {\
18936 if (val1 op val2) {\
18937 return AssertionSuccess();\
18939 return AssertionFailure() \
18940 << "Expected: (" << expr1 << ") " #op " (" << expr2\
18941 << "), actual: " << FormatForComparisonFailureMessage(val1, val2)\
18942 << " vs " << FormatForComparisonFailureMessage(val2, val1);\
18945 GTEST_API_ AssertionResult CmpHelper##op_name(\
18946 const char* expr1, const char* expr2, BiggestInt val1, BiggestInt val2)
18948 // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
18950 // Implements the helper function for {ASSERT|EXPECT}_NE
18951 GTEST_IMPL_CMP_HELPER_(NE, !=);
18952 // Implements the helper function for {ASSERT|EXPECT}_LE
18953 GTEST_IMPL_CMP_HELPER_(LE, <=);
18954 // Implements the helper function for {ASSERT|EXPECT}_LT
18955 GTEST_IMPL_CMP_HELPER_(LT, <);
18956 // Implements the helper function for {ASSERT|EXPECT}_GE
18957 GTEST_IMPL_CMP_HELPER_(GE, >=);
18958 // Implements the helper function for {ASSERT|EXPECT}_GT
18959 GTEST_IMPL_CMP_HELPER_(GT, >);
18961 #undef GTEST_IMPL_CMP_HELPER_
18963 // The helper function for {ASSERT|EXPECT}_STREQ.
18965 // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
18966 GTEST_API_ AssertionResult CmpHelperSTREQ(const char* expected_expression,
18967 const char* actual_expression,
18968 const char* expected,
18969 const char* actual);
18971 // The helper function for {ASSERT|EXPECT}_STRCASEEQ.
18973 // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
18974 GTEST_API_ AssertionResult CmpHelperSTRCASEEQ(const char* expected_expression,
18975 const char* actual_expression,
18976 const char* expected,
18977 const char* actual);
18979 // The helper function for {ASSERT|EXPECT}_STRNE.
18981 // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
18982 GTEST_API_ AssertionResult CmpHelperSTRNE(const char* s1_expression,
18983 const char* s2_expression,
18987 // The helper function for {ASSERT|EXPECT}_STRCASENE.
18989 // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
18990 GTEST_API_ AssertionResult CmpHelperSTRCASENE(const char* s1_expression,
18991 const char* s2_expression,
18996 // Helper function for *_STREQ on wide strings.
18998 // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
18999 GTEST_API_ AssertionResult CmpHelperSTREQ(const char* expected_expression,
19000 const char* actual_expression,
19001 const wchar_t* expected,
19002 const wchar_t* actual);
19004 // Helper function for *_STRNE on wide strings.
19006 // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
19007 GTEST_API_ AssertionResult CmpHelperSTRNE(const char* s1_expression,
19008 const char* s2_expression,
19010 const wchar_t* s2);
19012 } // namespace internal
19014 // IsSubstring() and IsNotSubstring() are intended to be used as the
19015 // first argument to {EXPECT,ASSERT}_PRED_FORMAT2(), not by
19016 // themselves. They check whether needle is a substring of haystack
19017 // (NULL is considered a substring of itself only), and return an
19018 // appropriate error message when they fail.
19020 // The {needle,haystack}_expr arguments are the stringified
19021 // expressions that generated the two real arguments.
19022 GTEST_API_ AssertionResult IsSubstring(
19023 const char* needle_expr, const char* haystack_expr,
19024 const char* needle, const char* haystack);
19025 GTEST_API_ AssertionResult IsSubstring(
19026 const char* needle_expr, const char* haystack_expr,
19027 const wchar_t* needle, const wchar_t* haystack);
19028 GTEST_API_ AssertionResult IsNotSubstring(
19029 const char* needle_expr, const char* haystack_expr,
19030 const char* needle, const char* haystack);
19031 GTEST_API_ AssertionResult IsNotSubstring(
19032 const char* needle_expr, const char* haystack_expr,
19033 const wchar_t* needle, const wchar_t* haystack);
19034 GTEST_API_ AssertionResult IsSubstring(
19035 const char* needle_expr, const char* haystack_expr,
19036 const ::std::string& needle, const ::std::string& haystack);
19037 GTEST_API_ AssertionResult IsNotSubstring(
19038 const char* needle_expr, const char* haystack_expr,
19039 const ::std::string& needle, const ::std::string& haystack);
19041 #if GTEST_HAS_STD_WSTRING
19042 GTEST_API_ AssertionResult IsSubstring(
19043 const char* needle_expr, const char* haystack_expr,
19044 const ::std::wstring& needle, const ::std::wstring& haystack);
19045 GTEST_API_ AssertionResult IsNotSubstring(
19046 const char* needle_expr, const char* haystack_expr,
19047 const ::std::wstring& needle, const ::std::wstring& haystack);
19048 #endif // GTEST_HAS_STD_WSTRING
19050 namespace internal {
19052 // Helper template function for comparing floating-points.
19054 // Template parameter:
19056 // RawType: the raw floating-point type (either float or double)
19058 // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
19059 template <typename RawType>
19060 AssertionResult CmpHelperFloatingPointEQ(const char* expected_expression,
19061 const char* actual_expression,
19064 const FloatingPoint<RawType> lhs(expected), rhs(actual);
19066 if (lhs.AlmostEquals(rhs)) {
19067 return AssertionSuccess();
19070 ::std::stringstream expected_ss;
19071 expected_ss << std::setprecision(std::numeric_limits<RawType>::digits10 + 2)
19074 ::std::stringstream actual_ss;
19075 actual_ss << std::setprecision(std::numeric_limits<RawType>::digits10 + 2)
19078 return EqFailure(expected_expression,
19080 StringStreamToString(&expected_ss),
19081 StringStreamToString(&actual_ss),
19085 // Helper function for implementing ASSERT_NEAR.
19087 // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
19088 GTEST_API_ AssertionResult DoubleNearPredFormat(const char* expr1,
19090 const char* abs_error_expr,
19095 // INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
19096 // A class that enables one to stream messages to assertion macros
19097 class GTEST_API_ AssertHelper {
19100 AssertHelper(TestPartResult::Type type,
19103 const char* message);
19106 // Message assignment is a semantic trick to enable assertion
19107 // streaming; see the GTEST_MESSAGE_ macro below.
19108 void operator=(const Message& message) const;
19111 // We put our data in a struct so that the size of the AssertHelper class can
19112 // be as small as possible. This is important because gcc is incapable of
19113 // re-using stack space even for temporary variables, so every EXPECT_EQ
19114 // reserves stack space for another AssertHelper.
19115 struct AssertHelperData {
19116 AssertHelperData(TestPartResult::Type t,
19117 const char* srcfile,
19120 : type(t), file(srcfile), line(line_num), message(msg) { }
19122 TestPartResult::Type const type;
19123 const char* const file;
19125 std::string const message;
19128 GTEST_DISALLOW_COPY_AND_ASSIGN_(AssertHelperData);
19131 AssertHelperData* const data_;
19133 GTEST_DISALLOW_COPY_AND_ASSIGN_(AssertHelper);
19136 } // namespace internal
19138 #if GTEST_HAS_PARAM_TEST
19139 // The pure interface class that all value-parameterized tests inherit from.
19140 // A value-parameterized class must inherit from both ::testing::Test and
19141 // ::testing::WithParamInterface. In most cases that just means inheriting
19142 // from ::testing::TestWithParam, but more complicated test hierarchies
19143 // may need to inherit from Test and WithParamInterface at different levels.
19145 // This interface has support for accessing the test parameter value via
19146 // the GetParam() method.
19148 // Use it with one of the parameter generator defining functions, like Range(),
19149 // Values(), ValuesIn(), Bool(), and Combine().
19151 // class FooTest : public ::testing::TestWithParam<int> {
19154 // // Can use GetParam() here.
19156 // virtual ~FooTest() {
19157 // // Can use GetParam() here.
19159 // virtual void SetUp() {
19160 // // Can use GetParam() here.
19162 // virtual void TearDown {
19163 // // Can use GetParam() here.
19166 // TEST_P(FooTest, DoesBar) {
19167 // // Can use GetParam() method here.
19169 // ASSERT_TRUE(foo.DoesBar(GetParam()));
19171 // INSTANTIATE_TEST_CASE_P(OneToTenRange, FooTest, ::testing::Range(1, 10));
19173 template <typename T>
19174 class WithParamInterface {
19176 typedef T ParamType;
19177 virtual ~WithParamInterface() {}
19179 // The current parameter value. Is also available in the test fixture's
19180 // constructor. This member function is non-static, even though it only
19181 // references static data, to reduce the opportunity for incorrect uses
19182 // like writing 'WithParamInterface<bool>::GetParam()' for a test that
19183 // uses a fixture whose parameter type is int.
19184 const ParamType& GetParam() const { return *parameter_; }
19187 // Sets parameter value. The caller is responsible for making sure the value
19188 // remains alive and unchanged throughout the current test.
19189 static void SetParam(const ParamType* parameter) {
19190 parameter_ = parameter;
19193 // Static value used for accessing parameter during a test lifetime.
19194 static const ParamType* parameter_;
19196 // TestClass must be a subclass of WithParamInterface<T> and Test.
19197 template <class TestClass> friend class internal::ParameterizedTestFactory;
19200 template <typename T>
19201 const T* WithParamInterface<T>::parameter_ = NULL;
19203 // Most value-parameterized classes can ignore the existence of
19204 // WithParamInterface, and can just inherit from ::testing::TestWithParam.
19206 template <typename T>
19207 class TestWithParam : public Test, public WithParamInterface<T> {
19210 #endif // GTEST_HAS_PARAM_TEST
19212 // Macros for indicating success/failure in test code.
19214 // ADD_FAILURE unconditionally adds a failure to the current test.
19215 // SUCCEED generates a success - it doesn't automatically make the
19216 // current test successful, as a test is only successful when it has
19219 // EXPECT_* verifies that a certain condition is satisfied. If not,
19220 // it behaves like ADD_FAILURE. In particular:
19222 // EXPECT_TRUE verifies that a Boolean condition is true.
19223 // EXPECT_FALSE verifies that a Boolean condition is false.
19225 // FAIL and ASSERT_* are similar to ADD_FAILURE and EXPECT_*, except
19226 // that they will also abort the current function on failure. People
19227 // usually want the fail-fast behavior of FAIL and ASSERT_*, but those
19228 // writing data-driven tests often find themselves using ADD_FAILURE
19229 // and EXPECT_* more.
19231 // Generates a nonfatal failure with a generic message.
19232 #define ADD_FAILURE() GTEST_NONFATAL_FAILURE_("Failed")
19234 // Generates a nonfatal failure at the given source file location with
19235 // a generic message.
19236 #define ADD_FAILURE_AT(file, line) \
19237 GTEST_MESSAGE_AT_(file, line, "Failed", \
19238 ::testing::TestPartResult::kNonFatalFailure)
19240 // Generates a fatal failure with a generic message.
19241 #define GTEST_FAIL() GTEST_FATAL_FAILURE_("Failed")
19243 // Define this macro to 1 to omit the definition of FAIL(), which is a
19244 // generic name and clashes with some other libraries.
19245 #if !GTEST_DONT_DEFINE_FAIL
19246 # define FAIL() GTEST_FAIL()
19249 // Generates a success with a generic message.
19250 #define GTEST_SUCCEED() GTEST_SUCCESS_("Succeeded")
19252 // Define this macro to 1 to omit the definition of SUCCEED(), which
19253 // is a generic name and clashes with some other libraries.
19254 #if !GTEST_DONT_DEFINE_SUCCEED
19255 # define SUCCEED() GTEST_SUCCEED()
19258 // Macros for testing exceptions.
19260 // * {ASSERT|EXPECT}_THROW(statement, expected_exception):
19261 // Tests that the statement throws the expected exception.
19262 // * {ASSERT|EXPECT}_NO_THROW(statement):
19263 // Tests that the statement doesn't throw any exception.
19264 // * {ASSERT|EXPECT}_ANY_THROW(statement):
19265 // Tests that the statement throws an exception.
19267 #define EXPECT_THROW(statement, expected_exception) \
19268 GTEST_TEST_THROW_(statement, expected_exception, GTEST_NONFATAL_FAILURE_)
19269 #define EXPECT_NO_THROW(statement) \
19270 GTEST_TEST_NO_THROW_(statement, GTEST_NONFATAL_FAILURE_)
19271 #define EXPECT_ANY_THROW(statement) \
19272 GTEST_TEST_ANY_THROW_(statement, GTEST_NONFATAL_FAILURE_)
19273 #define ASSERT_THROW(statement, expected_exception) \
19274 GTEST_TEST_THROW_(statement, expected_exception, GTEST_FATAL_FAILURE_)
19275 #define ASSERT_NO_THROW(statement) \
19276 GTEST_TEST_NO_THROW_(statement, GTEST_FATAL_FAILURE_)
19277 #define ASSERT_ANY_THROW(statement) \
19278 GTEST_TEST_ANY_THROW_(statement, GTEST_FATAL_FAILURE_)
19280 // Boolean assertions. Condition can be either a Boolean expression or an
19281 // AssertionResult. For more information on how to use AssertionResult with
19282 // these macros see comments on that class.
19283 #define EXPECT_TRUE(condition) \
19284 GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
19285 GTEST_NONFATAL_FAILURE_)
19286 #define EXPECT_FALSE(condition) \
19287 GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
19288 GTEST_NONFATAL_FAILURE_)
19289 #define ASSERT_TRUE(condition) \
19290 GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
19291 GTEST_FATAL_FAILURE_)
19292 #define ASSERT_FALSE(condition) \
19293 GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
19294 GTEST_FATAL_FAILURE_)
19296 // Includes the auto-generated header that implements a family of
19297 // generic predicate assertion macros.
19298 // Copyright 2006, Google Inc.
19299 // All rights reserved.
19301 // Redistribution and use in source and binary forms, with or without
19302 // modification, are permitted provided that the following conditions are
19305 // * Redistributions of source code must retain the above copyright
19306 // notice, this list of conditions and the following disclaimer.
19307 // * Redistributions in binary form must reproduce the above
19308 // copyright notice, this list of conditions and the following disclaimer
19309 // in the documentation and/or other materials provided with the
19311 // * Neither the name of Google Inc. nor the names of its
19312 // contributors may be used to endorse or promote products derived from
19313 // this software without specific prior written permission.
19315 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19316 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19317 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19318 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
19319 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
19320 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
19321 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19322 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
19323 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
19324 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
19325 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
19327 // This file is AUTOMATICALLY GENERATED on 10/31/2011 by command
19328 // 'gen_gtest_pred_impl.py 5'. DO NOT EDIT BY HAND!
19330 // Implements a family of generic predicate assertion macros.
19332 #ifndef GTEST_INCLUDE_GTEST_GTEST_PRED_IMPL_H_
19333 #define GTEST_INCLUDE_GTEST_GTEST_PRED_IMPL_H_
19335 // Makes sure this header is not included before gtest.h.
19336 #ifndef GTEST_INCLUDE_GTEST_GTEST_H_
19337 # error Do not include gtest_pred_impl.h directly. Include gtest.h instead.
19338 #endif // GTEST_INCLUDE_GTEST_GTEST_H_
19340 // This header implements a family of generic predicate assertion
19343 // ASSERT_PRED_FORMAT1(pred_format, v1)
19344 // ASSERT_PRED_FORMAT2(pred_format, v1, v2)
19347 // where pred_format is a function or functor that takes n (in the
19348 // case of ASSERT_PRED_FORMATn) values and their source expression
19349 // text, and returns a testing::AssertionResult. See the definition
19350 // of ASSERT_EQ in gtest.h for an example.
19352 // If you don't care about formatting, you can use the more
19353 // restrictive version:
19355 // ASSERT_PRED1(pred, v1)
19356 // ASSERT_PRED2(pred, v1, v2)
19359 // where pred is an n-ary function or functor that returns bool,
19360 // and the values v1, v2, ..., must support the << operator for
19361 // streaming to std::ostream.
19363 // We also define the EXPECT_* variations.
19365 // For now we only support predicates whose arity is at most 5.
19366 // Please email googletestframework@googlegroups.com if you need
19367 // support for higher arities.
19369 // GTEST_ASSERT_ is the basic statement to which all of the assertions
19370 // in this file reduce. Don't use this in your code.
19372 #define GTEST_ASSERT_(expression, on_failure) \
19373 GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
19374 if (const ::testing::AssertionResult gtest_ar = (expression)) \
19377 on_failure(gtest_ar.failure_message())
19380 // Helper function for implementing {EXPECT|ASSERT}_PRED1. Don't use
19381 // this in your code.
19382 template <typename Pred,
19384 AssertionResult AssertPred1Helper(const char* pred_text,
19388 if (pred(v1)) return AssertionSuccess();
19390 return AssertionFailure() << pred_text << "("
19391 << e1 << ") evaluates to false, where"
19392 << "\n" << e1 << " evaluates to " << v1;
19395 // Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT1.
19396 // Don't use this in your code.
19397 #define GTEST_PRED_FORMAT1_(pred_format, v1, on_failure)\
19398 GTEST_ASSERT_(pred_format(#v1, v1), \
19401 // Internal macro for implementing {EXPECT|ASSERT}_PRED1. Don't use
19402 // this in your code.
19403 #define GTEST_PRED1_(pred, v1, on_failure)\
19404 GTEST_ASSERT_(::testing::AssertPred1Helper(#pred, \
19409 // Unary predicate assertion macros.
19410 #define EXPECT_PRED_FORMAT1(pred_format, v1) \
19411 GTEST_PRED_FORMAT1_(pred_format, v1, GTEST_NONFATAL_FAILURE_)
19412 #define EXPECT_PRED1(pred, v1) \
19413 GTEST_PRED1_(pred, v1, GTEST_NONFATAL_FAILURE_)
19414 #define ASSERT_PRED_FORMAT1(pred_format, v1) \
19415 GTEST_PRED_FORMAT1_(pred_format, v1, GTEST_FATAL_FAILURE_)
19416 #define ASSERT_PRED1(pred, v1) \
19417 GTEST_PRED1_(pred, v1, GTEST_FATAL_FAILURE_)
19421 // Helper function for implementing {EXPECT|ASSERT}_PRED2. Don't use
19422 // this in your code.
19423 template <typename Pred,
19426 AssertionResult AssertPred2Helper(const char* pred_text,
19432 if (pred(v1, v2)) return AssertionSuccess();
19434 return AssertionFailure() << pred_text << "("
19436 << e2 << ") evaluates to false, where"
19437 << "\n" << e1 << " evaluates to " << v1
19438 << "\n" << e2 << " evaluates to " << v2;
19441 // Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT2.
19442 // Don't use this in your code.
19443 #define GTEST_PRED_FORMAT2_(pred_format, v1, v2, on_failure)\
19444 GTEST_ASSERT_(pred_format(#v1, #v2, v1, v2), \
19447 // Internal macro for implementing {EXPECT|ASSERT}_PRED2. Don't use
19448 // this in your code.
19449 #define GTEST_PRED2_(pred, v1, v2, on_failure)\
19450 GTEST_ASSERT_(::testing::AssertPred2Helper(#pred, \
19457 // Binary predicate assertion macros.
19458 #define EXPECT_PRED_FORMAT2(pred_format, v1, v2) \
19459 GTEST_PRED_FORMAT2_(pred_format, v1, v2, GTEST_NONFATAL_FAILURE_)
19460 #define EXPECT_PRED2(pred, v1, v2) \
19461 GTEST_PRED2_(pred, v1, v2, GTEST_NONFATAL_FAILURE_)
19462 #define ASSERT_PRED_FORMAT2(pred_format, v1, v2) \
19463 GTEST_PRED_FORMAT2_(pred_format, v1, v2, GTEST_FATAL_FAILURE_)
19464 #define ASSERT_PRED2(pred, v1, v2) \
19465 GTEST_PRED2_(pred, v1, v2, GTEST_FATAL_FAILURE_)
19469 // Helper function for implementing {EXPECT|ASSERT}_PRED3. Don't use
19470 // this in your code.
19471 template <typename Pred,
19475 AssertionResult AssertPred3Helper(const char* pred_text,
19483 if (pred(v1, v2, v3)) return AssertionSuccess();
19485 return AssertionFailure() << pred_text << "("
19488 << e3 << ") evaluates to false, where"
19489 << "\n" << e1 << " evaluates to " << v1
19490 << "\n" << e2 << " evaluates to " << v2
19491 << "\n" << e3 << " evaluates to " << v3;
19494 // Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT3.
19495 // Don't use this in your code.
19496 #define GTEST_PRED_FORMAT3_(pred_format, v1, v2, v3, on_failure)\
19497 GTEST_ASSERT_(pred_format(#v1, #v2, #v3, v1, v2, v3), \
19500 // Internal macro for implementing {EXPECT|ASSERT}_PRED3. Don't use
19501 // this in your code.
19502 #define GTEST_PRED3_(pred, v1, v2, v3, on_failure)\
19503 GTEST_ASSERT_(::testing::AssertPred3Helper(#pred, \
19512 // Ternary predicate assertion macros.
19513 #define EXPECT_PRED_FORMAT3(pred_format, v1, v2, v3) \
19514 GTEST_PRED_FORMAT3_(pred_format, v1, v2, v3, GTEST_NONFATAL_FAILURE_)
19515 #define EXPECT_PRED3(pred, v1, v2, v3) \
19516 GTEST_PRED3_(pred, v1, v2, v3, GTEST_NONFATAL_FAILURE_)
19517 #define ASSERT_PRED_FORMAT3(pred_format, v1, v2, v3) \
19518 GTEST_PRED_FORMAT3_(pred_format, v1, v2, v3, GTEST_FATAL_FAILURE_)
19519 #define ASSERT_PRED3(pred, v1, v2, v3) \
19520 GTEST_PRED3_(pred, v1, v2, v3, GTEST_FATAL_FAILURE_)
19524 // Helper function for implementing {EXPECT|ASSERT}_PRED4. Don't use
19525 // this in your code.
19526 template <typename Pred,
19531 AssertionResult AssertPred4Helper(const char* pred_text,
19541 if (pred(v1, v2, v3, v4)) return AssertionSuccess();
19543 return AssertionFailure() << pred_text << "("
19547 << e4 << ") evaluates to false, where"
19548 << "\n" << e1 << " evaluates to " << v1
19549 << "\n" << e2 << " evaluates to " << v2
19550 << "\n" << e3 << " evaluates to " << v3
19551 << "\n" << e4 << " evaluates to " << v4;
19554 // Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT4.
19555 // Don't use this in your code.
19556 #define GTEST_PRED_FORMAT4_(pred_format, v1, v2, v3, v4, on_failure)\
19557 GTEST_ASSERT_(pred_format(#v1, #v2, #v3, #v4, v1, v2, v3, v4), \
19560 // Internal macro for implementing {EXPECT|ASSERT}_PRED4. Don't use
19561 // this in your code.
19562 #define GTEST_PRED4_(pred, v1, v2, v3, v4, on_failure)\
19563 GTEST_ASSERT_(::testing::AssertPred4Helper(#pred, \
19574 // 4-ary predicate assertion macros.
19575 #define EXPECT_PRED_FORMAT4(pred_format, v1, v2, v3, v4) \
19576 GTEST_PRED_FORMAT4_(pred_format, v1, v2, v3, v4, GTEST_NONFATAL_FAILURE_)
19577 #define EXPECT_PRED4(pred, v1, v2, v3, v4) \
19578 GTEST_PRED4_(pred, v1, v2, v3, v4, GTEST_NONFATAL_FAILURE_)
19579 #define ASSERT_PRED_FORMAT4(pred_format, v1, v2, v3, v4) \
19580 GTEST_PRED_FORMAT4_(pred_format, v1, v2, v3, v4, GTEST_FATAL_FAILURE_)
19581 #define ASSERT_PRED4(pred, v1, v2, v3, v4) \
19582 GTEST_PRED4_(pred, v1, v2, v3, v4, GTEST_FATAL_FAILURE_)
19586 // Helper function for implementing {EXPECT|ASSERT}_PRED5. Don't use
19587 // this in your code.
19588 template <typename Pred,
19594 AssertionResult AssertPred5Helper(const char* pred_text,
19606 if (pred(v1, v2, v3, v4, v5)) return AssertionSuccess();
19608 return AssertionFailure() << pred_text << "("
19613 << e5 << ") evaluates to false, where"
19614 << "\n" << e1 << " evaluates to " << v1
19615 << "\n" << e2 << " evaluates to " << v2
19616 << "\n" << e3 << " evaluates to " << v3
19617 << "\n" << e4 << " evaluates to " << v4
19618 << "\n" << e5 << " evaluates to " << v5;
19621 // Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT5.
19622 // Don't use this in your code.
19623 #define GTEST_PRED_FORMAT5_(pred_format, v1, v2, v3, v4, v5, on_failure)\
19624 GTEST_ASSERT_(pred_format(#v1, #v2, #v3, #v4, #v5, v1, v2, v3, v4, v5), \
19627 // Internal macro for implementing {EXPECT|ASSERT}_PRED5. Don't use
19628 // this in your code.
19629 #define GTEST_PRED5_(pred, v1, v2, v3, v4, v5, on_failure)\
19630 GTEST_ASSERT_(::testing::AssertPred5Helper(#pred, \
19643 // 5-ary predicate assertion macros.
19644 #define EXPECT_PRED_FORMAT5(pred_format, v1, v2, v3, v4, v5) \
19645 GTEST_PRED_FORMAT5_(pred_format, v1, v2, v3, v4, v5, GTEST_NONFATAL_FAILURE_)
19646 #define EXPECT_PRED5(pred, v1, v2, v3, v4, v5) \
19647 GTEST_PRED5_(pred, v1, v2, v3, v4, v5, GTEST_NONFATAL_FAILURE_)
19648 #define ASSERT_PRED_FORMAT5(pred_format, v1, v2, v3, v4, v5) \
19649 GTEST_PRED_FORMAT5_(pred_format, v1, v2, v3, v4, v5, GTEST_FATAL_FAILURE_)
19650 #define ASSERT_PRED5(pred, v1, v2, v3, v4, v5) \
19651 GTEST_PRED5_(pred, v1, v2, v3, v4, v5, GTEST_FATAL_FAILURE_)
19655 #endif // GTEST_INCLUDE_GTEST_GTEST_PRED_IMPL_H_
19657 // Macros for testing equalities and inequalities.
19659 // * {ASSERT|EXPECT}_EQ(expected, actual): Tests that expected == actual
19660 // * {ASSERT|EXPECT}_NE(v1, v2): Tests that v1 != v2
19661 // * {ASSERT|EXPECT}_LT(v1, v2): Tests that v1 < v2
19662 // * {ASSERT|EXPECT}_LE(v1, v2): Tests that v1 <= v2
19663 // * {ASSERT|EXPECT}_GT(v1, v2): Tests that v1 > v2
19664 // * {ASSERT|EXPECT}_GE(v1, v2): Tests that v1 >= v2
19666 // When they are not, Google Test prints both the tested expressions and
19667 // their actual values. The values must be compatible built-in types,
19668 // or you will get a compiler error. By "compatible" we mean that the
19669 // values can be compared by the respective operator.
19673 // 1. It is possible to make a user-defined type work with
19674 // {ASSERT|EXPECT}_??(), but that requires overloading the
19675 // comparison operators and is thus discouraged by the Google C++
19676 // Usage Guide. Therefore, you are advised to use the
19677 // {ASSERT|EXPECT}_TRUE() macro to assert that two objects are
19680 // 2. The {ASSERT|EXPECT}_??() macros do pointer comparisons on
19681 // pointers (in particular, C strings). Therefore, if you use it
19682 // with two C strings, you are testing how their locations in memory
19683 // are related, not how their content is related. To compare two C
19684 // strings by content, use {ASSERT|EXPECT}_STR*().
19686 // 3. {ASSERT|EXPECT}_EQ(expected, actual) is preferred to
19687 // {ASSERT|EXPECT}_TRUE(expected == actual), as the former tells you
19688 // what the actual value is when it fails, and similarly for the
19689 // other comparisons.
19691 // 4. Do not depend on the order in which {ASSERT|EXPECT}_??()
19692 // evaluate their arguments, which is undefined.
19694 // 5. These macros evaluate their arguments exactly once.
19698 // EXPECT_NE(5, Foo());
19699 // EXPECT_EQ(NULL, a_pointer);
19700 // ASSERT_LT(i, array_size);
19701 // ASSERT_GT(records.size(), 0) << "There is no record left.";
19703 #define EXPECT_EQ(expected, actual) \
19704 EXPECT_PRED_FORMAT2(::testing::internal:: \
19705 EqHelper<GTEST_IS_NULL_LITERAL_(expected)>::Compare, \
19707 #define EXPECT_NE(expected, actual) \
19708 EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperNE, expected, actual)
19709 #define EXPECT_LE(val1, val2) \
19710 EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperLE, val1, val2)
19711 #define EXPECT_LT(val1, val2) \
19712 EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperLT, val1, val2)
19713 #define EXPECT_GE(val1, val2) \
19714 EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperGE, val1, val2)
19715 #define EXPECT_GT(val1, val2) \
19716 EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperGT, val1, val2)
19718 #define GTEST_ASSERT_EQ(expected, actual) \
19719 ASSERT_PRED_FORMAT2(::testing::internal:: \
19720 EqHelper<GTEST_IS_NULL_LITERAL_(expected)>::Compare, \
19722 #define GTEST_ASSERT_NE(val1, val2) \
19723 ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperNE, val1, val2)
19724 #define GTEST_ASSERT_LE(val1, val2) \
19725 ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperLE, val1, val2)
19726 #define GTEST_ASSERT_LT(val1, val2) \
19727 ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperLT, val1, val2)
19728 #define GTEST_ASSERT_GE(val1, val2) \
19729 ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperGE, val1, val2)
19730 #define GTEST_ASSERT_GT(val1, val2) \
19731 ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperGT, val1, val2)
19733 // Define macro GTEST_DONT_DEFINE_ASSERT_XY to 1 to omit the definition of
19734 // ASSERT_XY(), which clashes with some users' own code.
19736 #if !GTEST_DONT_DEFINE_ASSERT_EQ
19737 # define ASSERT_EQ(val1, val2) GTEST_ASSERT_EQ(val1, val2)
19740 #if !GTEST_DONT_DEFINE_ASSERT_NE
19741 # define ASSERT_NE(val1, val2) GTEST_ASSERT_NE(val1, val2)
19744 #if !GTEST_DONT_DEFINE_ASSERT_LE
19745 # define ASSERT_LE(val1, val2) GTEST_ASSERT_LE(val1, val2)
19748 #if !GTEST_DONT_DEFINE_ASSERT_LT
19749 # define ASSERT_LT(val1, val2) GTEST_ASSERT_LT(val1, val2)
19752 #if !GTEST_DONT_DEFINE_ASSERT_GE
19753 # define ASSERT_GE(val1, val2) GTEST_ASSERT_GE(val1, val2)
19756 #if !GTEST_DONT_DEFINE_ASSERT_GT
19757 # define ASSERT_GT(val1, val2) GTEST_ASSERT_GT(val1, val2)
19760 // C-string Comparisons. All tests treat NULL and any non-NULL string
19761 // as different. Two NULLs are equal.
19763 // * {ASSERT|EXPECT}_STREQ(s1, s2): Tests that s1 == s2
19764 // * {ASSERT|EXPECT}_STRNE(s1, s2): Tests that s1 != s2
19765 // * {ASSERT|EXPECT}_STRCASEEQ(s1, s2): Tests that s1 == s2, ignoring case
19766 // * {ASSERT|EXPECT}_STRCASENE(s1, s2): Tests that s1 != s2, ignoring case
19768 // For wide or narrow string objects, you can use the
19769 // {ASSERT|EXPECT}_??() macros.
19771 // Don't depend on the order in which the arguments are evaluated,
19772 // which is undefined.
19774 // These macros evaluate their arguments exactly once.
19776 #define EXPECT_STREQ(expected, actual) \
19777 EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperSTREQ, expected, actual)
19778 #define EXPECT_STRNE(s1, s2) \
19779 EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperSTRNE, s1, s2)
19780 #define EXPECT_STRCASEEQ(expected, actual) \
19781 EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperSTRCASEEQ, expected, actual)
19782 #define EXPECT_STRCASENE(s1, s2)\
19783 EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperSTRCASENE, s1, s2)
19785 #define ASSERT_STREQ(expected, actual) \
19786 ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperSTREQ, expected, actual)
19787 #define ASSERT_STRNE(s1, s2) \
19788 ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperSTRNE, s1, s2)
19789 #define ASSERT_STRCASEEQ(expected, actual) \
19790 ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperSTRCASEEQ, expected, actual)
19791 #define ASSERT_STRCASENE(s1, s2)\
19792 ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperSTRCASENE, s1, s2)
19794 // Macros for comparing floating-point numbers.
19796 // * {ASSERT|EXPECT}_FLOAT_EQ(expected, actual):
19797 // Tests that two float values are almost equal.
19798 // * {ASSERT|EXPECT}_DOUBLE_EQ(expected, actual):
19799 // Tests that two double values are almost equal.
19800 // * {ASSERT|EXPECT}_NEAR(v1, v2, abs_error):
19801 // Tests that v1 and v2 are within the given distance to each other.
19803 // Google Test uses ULP-based comparison to automatically pick a default
19804 // error bound that is appropriate for the operands. See the
19805 // FloatingPoint template class in gtest-internal.h if you are
19806 // interested in the implementation details.
19808 #define EXPECT_FLOAT_EQ(expected, actual)\
19809 EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ<float>, \
19812 #define EXPECT_DOUBLE_EQ(expected, actual)\
19813 EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ<double>, \
19816 #define ASSERT_FLOAT_EQ(expected, actual)\
19817 ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ<float>, \
19820 #define ASSERT_DOUBLE_EQ(expected, actual)\
19821 ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ<double>, \
19824 #define EXPECT_NEAR(val1, val2, abs_error)\
19825 EXPECT_PRED_FORMAT3(::testing::internal::DoubleNearPredFormat, \
19826 val1, val2, abs_error)
19828 #define ASSERT_NEAR(val1, val2, abs_error)\
19829 ASSERT_PRED_FORMAT3(::testing::internal::DoubleNearPredFormat, \
19830 val1, val2, abs_error)
19832 // These predicate format functions work on floating-point values, and
19833 // can be used in {ASSERT|EXPECT}_PRED_FORMAT2*(), e.g.
19835 // EXPECT_PRED_FORMAT2(testing::DoubleLE, Foo(), 5.0);
19837 // Asserts that val1 is less than, or almost equal to, val2. Fails
19838 // otherwise. In particular, it fails if either val1 or val2 is NaN.
19839 GTEST_API_ AssertionResult FloatLE(const char* expr1, const char* expr2,
19840 float val1, float val2);
19841 GTEST_API_ AssertionResult DoubleLE(const char* expr1, const char* expr2,
19842 double val1, double val2);
19845 #if GTEST_OS_WINDOWS
19847 // Macros that test for HRESULT failure and success, these are only useful
19848 // on Windows, and rely on Windows SDK macros and APIs to compile.
19850 // * {ASSERT|EXPECT}_HRESULT_{SUCCEEDED|FAILED}(expr)
19852 // When expr unexpectedly fails or succeeds, Google Test prints the
19853 // expected result and the actual result with both a human-readable
19854 // string representation of the error, if available, as well as the
19855 // hex result code.
19856 # define EXPECT_HRESULT_SUCCEEDED(expr) \
19857 EXPECT_PRED_FORMAT1(::testing::internal::IsHRESULTSuccess, (expr))
19859 # define ASSERT_HRESULT_SUCCEEDED(expr) \
19860 ASSERT_PRED_FORMAT1(::testing::internal::IsHRESULTSuccess, (expr))
19862 # define EXPECT_HRESULT_FAILED(expr) \
19863 EXPECT_PRED_FORMAT1(::testing::internal::IsHRESULTFailure, (expr))
19865 # define ASSERT_HRESULT_FAILED(expr) \
19866 ASSERT_PRED_FORMAT1(::testing::internal::IsHRESULTFailure, (expr))
19868 #endif // GTEST_OS_WINDOWS
19870 // Macros that execute statement and check that it doesn't generate new fatal
19871 // failures in the current thread.
19873 // * {ASSERT|EXPECT}_NO_FATAL_FAILURE(statement);
19877 // EXPECT_NO_FATAL_FAILURE(Process());
19878 // ASSERT_NO_FATAL_FAILURE(Process()) << "Process() failed";
19880 #define ASSERT_NO_FATAL_FAILURE(statement) \
19881 GTEST_TEST_NO_FATAL_FAILURE_(statement, GTEST_FATAL_FAILURE_)
19882 #define EXPECT_NO_FATAL_FAILURE(statement) \
19883 GTEST_TEST_NO_FATAL_FAILURE_(statement, GTEST_NONFATAL_FAILURE_)
19885 // Causes a trace (including the source file path, the current line
19886 // number, and the given message) to be included in every test failure
19887 // message generated by code in the current scope. The effect is
19888 // undone when the control leaves the current scope.
19890 // The message argument can be anything streamable to std::ostream.
19892 // In the implementation, we include the current line number as part
19893 // of the dummy variable name, thus allowing multiple SCOPED_TRACE()s
19894 // to appear in the same block - as long as they are on different
19896 #define SCOPED_TRACE(message) \
19897 ::testing::internal::ScopedTrace GTEST_CONCAT_TOKEN_(gtest_trace_, __LINE__)(\
19898 __FILE__, __LINE__, ::testing::Message() << (message))
19900 // Compile-time assertion for type equality.
19901 // StaticAssertTypeEq<type1, type2>() compiles iff type1 and type2 are
19902 // the same type. The value it returns is not interesting.
19904 // Instead of making StaticAssertTypeEq a class template, we make it a
19905 // function template that invokes a helper class template. This
19906 // prevents a user from misusing StaticAssertTypeEq<T1, T2> by
19907 // defining objects of that type.
19911 // When used inside a method of a class template,
19912 // StaticAssertTypeEq<T1, T2>() is effective ONLY IF the method is
19913 // instantiated. For example, given:
19915 // template <typename T> class Foo {
19917 // void Bar() { testing::StaticAssertTypeEq<int, T>(); }
19922 // void Test1() { Foo<bool> foo; }
19924 // will NOT generate a compiler error, as Foo<bool>::Bar() is never
19925 // actually instantiated. Instead, you need:
19927 // void Test2() { Foo<bool> foo; foo.Bar(); }
19929 // to cause a compiler error.
19930 template <typename T1, typename T2>
19931 bool StaticAssertTypeEq() {
19932 (void)internal::StaticAssertTypeEqHelper<T1, T2>();
19938 // The first parameter is the name of the test case, and the second
19939 // parameter is the name of the test within the test case.
19941 // The convention is to end the test case name with "Test". For
19942 // example, a test case for the Foo class can be named FooTest.
19944 // The user should put his test code between braces after using this
19947 // TEST(FooTest, InitializesCorrectly) {
19949 // EXPECT_TRUE(foo.StatusIsOK());
19952 // Note that we call GetTestTypeId() instead of GetTypeId<
19953 // ::testing::Test>() here to get the type ID of testing::Test. This
19954 // is to work around a suspected linker bug when using Google Test as
19955 // a framework on Mac OS X. The bug causes GetTypeId<
19956 // ::testing::Test>() to return different values depending on whether
19957 // the call is from the Google Test framework itself or from user test
19958 // code. GetTestTypeId() is guaranteed to always return the same
19959 // value, as it always calls GetTypeId<>() from the Google Test
19961 #define GTEST_TEST(test_case_name, test_name)\
19962 GTEST_TEST_(test_case_name, test_name, \
19963 ::testing::Test, ::testing::internal::GetTestTypeId())
19965 // Define this macro to 1 to omit the definition of TEST(), which
19966 // is a generic name and clashes with some other libraries.
19967 #if !GTEST_DONT_DEFINE_TEST
19968 # define TEST(test_case_name, test_name) GTEST_TEST(test_case_name, test_name)
19971 // Defines a test that uses a test fixture.
19973 // The first parameter is the name of the test fixture class, which
19974 // also doubles as the test case name. The second parameter is the
19975 // name of the test within the test case.
19977 // A test fixture class must be declared earlier. The user should put
19978 // his test code between braces after using this macro. Example:
19980 // class FooTest : public testing::Test {
19982 // virtual void SetUp() { b_.AddElement(3); }
19988 // TEST_F(FooTest, InitializesCorrectly) {
19989 // EXPECT_TRUE(a_.StatusIsOK());
19992 // TEST_F(FooTest, ReturnsElementCountCorrectly) {
19993 // EXPECT_EQ(0, a_.size());
19994 // EXPECT_EQ(1, b_.size());
19997 #define TEST_F(test_fixture, test_name)\
19998 GTEST_TEST_(test_fixture, test_name, test_fixture, \
19999 ::testing::internal::GetTypeId<test_fixture>())
20001 // Use this macro in main() to run all tests. It returns 0 if all
20002 // tests are successful, or 1 otherwise.
20004 // RUN_ALL_TESTS() should be invoked after the command line has been
20005 // parsed by InitGoogleTest().
20007 #define RUN_ALL_TESTS()\
20008 (::testing::UnitTest::GetInstance()->Run())
20010 } // namespace testing
20012 #endif // GTEST_INCLUDE_GTEST_GTEST_H_