1 // Copyright 2005, Google Inc. 2 // All rights reserved. 3 // 4 // Redistribution and use in source and binary forms, with or without 5 // modification, are permitted provided that the following conditions are 6 // met: 7 // 8 // * Redistributions of source code must retain the above copyright 9 // notice, this list of conditions and the following disclaimer. 10 // * Redistributions in binary form must reproduce the above 11 // copyright notice, this list of conditions and the following disclaimer 12 // in the documentation and/or other materials provided with the 13 // distribution. 14 // * Neither the name of Google Inc. nor the names of its 15 // contributors may be used to endorse or promote products derived from 16 // this software without specific prior written permission. 17 // 18 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 // 30 // Author: [email protected] (Zhanyong Wan) 31 // 32 // The Google C++ Testing Framework (Google Test) 33 // 34 // This header file defines the public API for Google Test. It should be 35 // included by any test program that uses Google Test. 36 // 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: 40 // 41 // // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. 42 // 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 45 // program! 46 // 47 // Acknowledgment: Google Test borrowed the idea of automatic test 48 // registration from Barthelemy Dagenais' ([email protected]) 49 // easyUnit framework. 50 51 #ifndef GTEST_INCLUDE_GTEST_GTEST_H_ 52 #define GTEST_INCLUDE_GTEST_GTEST_H_ 53 54 #if !defined stdt 55 #define stdt std::tr1 56 #endif 57 58 #include <limits> 59 #include <ostream> 60 #include <vector> 61 62 // Copyright 2005, Google Inc. 63 // All rights reserved. 64 // 65 // Redistribution and use in source and binary forms, with or without 66 // modification, are permitted provided that the following conditions are 67 // met: 68 // 69 // * Redistributions of source code must retain the above copyright 70 // notice, this list of conditions and the following disclaimer. 71 // * Redistributions in binary form must reproduce the above 72 // copyright notice, this list of conditions and the following disclaimer 73 // in the documentation and/or other materials provided with the 74 // distribution. 75 // * Neither the name of Google Inc. nor the names of its 76 // contributors may be used to endorse or promote products derived from 77 // this software without specific prior written permission. 78 // 79 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 80 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 81 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 82 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 83 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 84 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 85 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 86 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 87 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 88 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 89 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 90 // 91 // Authors: [email protected] (Zhanyong Wan), [email protected] (Sean Mcafee) 92 // 93 // The Google C++ Testing Framework (Google Test) 94 // 95 // This header file declares functions and macros used internally by 96 // Google Test. They are subject to change without notice. 97 98 #ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_INTERNAL_H_ 99 #define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_INTERNAL_H_ 100 101 // Copyright 2005, Google Inc. 102 // All rights reserved. 103 // 104 // Redistribution and use in source and binary forms, with or without 105 // modification, are permitted provided that the following conditions are 106 // met: 107 // 108 // * Redistributions of source code must retain the above copyright 109 // notice, this list of conditions and the following disclaimer. 110 // * Redistributions in binary form must reproduce the above 111 // copyright notice, this list of conditions and the following disclaimer 112 // in the documentation and/or other materials provided with the 113 // distribution. 114 // * Neither the name of Google Inc. nor the names of its 115 // contributors may be used to endorse or promote products derived from 116 // this software without specific prior written permission. 117 // 118 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 119 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 120 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 121 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 122 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 123 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 124 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 125 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 126 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 127 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 128 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 129 // 130 // Authors: [email protected] (Zhanyong Wan) 131 // 132 // Low-level types and utilities for porting Google Test to various 133 // platforms. They are subject to change without notice. DO NOT USE 134 // THEM IN USER CODE. 135 // 136 // This file is fundamental to Google Test. All other Google Test source 137 // files are expected to #include this. Therefore, it cannot #include 138 // any other Google Test header. 139 140 #ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_H_ 141 #define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_H_ 142 143 // The user can define the following macros in the build script to 144 // control Google Test's behavior. If the user doesn't define a macro 145 // in this list, Google Test will define it. 146 // 147 // GTEST_HAS_CLONE - Define it to 1/0 to indicate that clone(2) 148 // is/isn't available. 149 // GTEST_HAS_EXCEPTIONS - Define it to 1/0 to indicate that exceptions 150 // are enabled. 151 // GTEST_HAS_GLOBAL_STRING - Define it to 1/0 to indicate that ::string 152 // is/isn't available (some systems define 153 // ::string, which is different to std::string). 154 // GTEST_HAS_GLOBAL_WSTRING - Define it to 1/0 to indicate that ::string 155 // is/isn't available (some systems define 156 // ::wstring, which is different to std::wstring). 157 // GTEST_HAS_POSIX_RE - Define it to 1/0 to indicate that POSIX regular 158 // expressions are/aren't available. 159 // GTEST_HAS_PTHREAD - Define it to 1/0 to indicate that <pthread.h> 160 // is/isn't available. 161 // GTEST_HAS_RTTI - Define it to 1/0 to indicate that RTTI is/isn't 162 // enabled. 163 // GTEST_HAS_STD_WSTRING - Define it to 1/0 to indicate that 164 // std::wstring does/doesn't work (Google Test can 165 // be used where std::wstring is unavailable). 166 // GTEST_HAS_TR1_TUPLE - Define it to 1/0 to indicate tr1::tuple 167 // is/isn't available. 168 // GTEST_HAS_SEH - Define it to 1/0 to indicate whether the 169 // compiler supports Microsoft's "Structured 170 // Exception Handling". 171 // GTEST_HAS_STREAM_REDIRECTION 172 // - Define it to 1/0 to indicate whether the 173 // platform supports I/O stream redirection using 174 // dup() and dup2(). 175 // GTEST_USE_OWN_TR1_TUPLE - Define it to 1/0 to indicate whether Google 176 // Test's own tr1 tuple implementation should be 177 // used. Unused when the user sets 178 // GTEST_HAS_TR1_TUPLE to 0. 179 // GTEST_LANG_CXX11 - Define it to 1/0 to indicate that Google Test 180 // is building in C++11/C++98 mode. 181 // GTEST_LINKED_AS_SHARED_LIBRARY 182 // - Define to 1 when compiling tests that use 183 // Google Test as a shared library (known as 184 // DLL on Windows). 185 // GTEST_CREATE_SHARED_LIBRARY 186 // - Define to 1 when compiling Google Test itself 187 // as a shared library. 188 189 // This header defines the following utilities: 190 // 191 // Macros indicating the current platform (defined to 1 if compiled on 192 // the given platform; otherwise undefined): 193 // GTEST_OS_AIX - IBM AIX 194 // GTEST_OS_CYGWIN - Cygwin 195 // GTEST_OS_HPUX - HP-UX 196 // GTEST_OS_LINUX - Linux 197 // GTEST_OS_LINUX_ANDROID - Google Android 198 // GTEST_OS_MAC - Mac OS X 199 // GTEST_OS_IOS - iOS 200 // GTEST_OS_IOS_SIMULATOR - iOS simulator 201 // GTEST_OS_NACL - Google Native Client (NaCl) 202 // GTEST_OS_OPENBSD - OpenBSD 203 // GTEST_OS_QNX - QNX 204 // GTEST_OS_SOLARIS - Sun Solaris 205 // GTEST_OS_SYMBIAN - Symbian 206 // GTEST_OS_WINDOWS - Windows (Desktop, MinGW, or Mobile) 207 // GTEST_OS_WINDOWS_DESKTOP - Windows Desktop 208 // GTEST_OS_WINDOWS_MINGW - MinGW 209 // GTEST_OS_WINDOWS_MOBILE - Windows Mobile 210 // GTEST_OS_ZOS - z/OS 211 // 212 // Among the platforms, Cygwin, Linux, Max OS X, and Windows have the 213 // most stable support. Since core members of the Google Test project 214 // don't have access to other platforms, support for them may be less 215 // stable. If you notice any problems on your platform, please notify 216 // [email protected] (patches for fixing them are 217 // even more welcome!). 218 // 219 // Note that it is possible that none of the GTEST_OS_* macros are defined. 220 // 221 // Macros indicating available Google Test features (defined to 1 if 222 // the corresponding feature is supported; otherwise undefined): 223 // GTEST_HAS_COMBINE - the Combine() function (for value-parameterized 224 // tests) 225 // GTEST_HAS_DEATH_TEST - death tests 226 // GTEST_HAS_PARAM_TEST - value-parameterized tests 227 // GTEST_HAS_TYPED_TEST - typed tests 228 // GTEST_HAS_TYPED_TEST_P - type-parameterized tests 229 // GTEST_USES_POSIX_RE - enhanced POSIX regex is used. Do not confuse with 230 // GTEST_HAS_POSIX_RE (see above) which users can 231 // define themselves. 232 // GTEST_USES_SIMPLE_RE - our own simple regex is used; 233 // the above two are mutually exclusive. 234 // GTEST_CAN_COMPARE_NULL - accepts untyped NULL in EXPECT_EQ(). 235 // 236 // Macros for basic C++ coding: 237 // GTEST_AMBIGUOUS_ELSE_BLOCKER_ - for disabling a gcc warning. 238 // GTEST_ATTRIBUTE_UNUSED_ - declares that a class' instances or a 239 // variable don't have to be used. 240 // GTEST_DISALLOW_ASSIGN_ - disables operator=. 241 // GTEST_DISALLOW_COPY_AND_ASSIGN_ - disables copy ctor and operator=. 242 // GTEST_MUST_USE_RESULT_ - declares that a function's result must be used. 243 // 244 // Synchronization: 245 // Mutex, MutexLock, ThreadLocal, GetThreadCount() 246 // - synchronization primitives. 247 // GTEST_IS_THREADSAFE - defined to 1 to indicate that the above 248 // synchronization primitives have real implementations 249 // and Google Test is thread-safe; or 0 otherwise. 250 // 251 // Template meta programming: 252 // is_pointer - as in TR1; needed on Symbian and IBM XL C/C++ only. 253 // IteratorTraits - partial implementation of std::iterator_traits, which 254 // is not available in libCstd when compiled with Sun C++. 255 // 256 // Smart pointers: 257 // scoped_ptr - as in TR2. 258 // 259 // Regular expressions: 260 // RE - a simple regular expression class using the POSIX 261 // Extended Regular Expression syntax on UNIX-like 262 // platforms, or a reduced regular exception syntax on 263 // other platforms, including Windows. 264 // 265 // Logging: 266 // GTEST_LOG_() - logs messages at the specified severity level. 267 // LogToStderr() - directs all log messages to stderr. 268 // FlushInfoLog() - flushes informational log messages. 269 // 270 // Stdout and stderr capturing: 271 // CaptureStdout() - starts capturing stdout. 272 // GetCapturedStdout() - stops capturing stdout and returns the captured 273 // string. 274 // CaptureStderr() - starts capturing stderr. 275 // GetCapturedStderr() - stops capturing stderr and returns the captured 276 // string. 277 // 278 // Integer types: 279 // TypeWithSize - maps an integer to a int type. 280 // Int32, UInt32, Int64, UInt64, TimeInMillis 281 // - integers of known sizes. 282 // BiggestInt - the biggest signed integer type. 283 // 284 // Command-line utilities: 285 // GTEST_FLAG() - references a flag. 286 // GTEST_DECLARE_*() - declares a flag. 287 // GTEST_DEFINE_*() - defines a flag. 288 // GetInjectableArgvs() - returns the command line as a vector of strings. 289 // 290 // Environment variable utilities: 291 // GetEnv() - gets the value of an environment variable. 292 // BoolFromGTestEnv() - parses a bool environment variable. 293 // Int32FromGTestEnv() - parses an Int32 environment variable. 294 // StringFromGTestEnv() - parses a string environment variable. 295 296 #include <ctype.h> // for isspace, etc 297 #include <stddef.h> // for ptrdiff_t 298 #include <stdlib.h> 299 #include <stdio.h> 300 #include <string.h> 301 #ifndef _WIN32_WCE 302 # include <sys/types.h> 303 # include <sys/stat.h> 304 #endif // !_WIN32_WCE 305 306 #if defined __APPLE__ 307 # include <AvailabilityMacros.h> 308 # include <TargetConditionals.h> 309 #endif 310 311 #include <iostream> // NOLINT 312 #include <sstream> // NOLINT 313 #include <string> // NOLINT 314 315 #define GTEST_DEV_EMAIL_ "googletestframework@@googlegroups.com" 316 #define GTEST_FLAG_PREFIX_ "gtest_" 317 #define GTEST_FLAG_PREFIX_DASH_ "gtest-" 318 #define GTEST_FLAG_PREFIX_UPPER_ "GTEST_" 319 #define GTEST_NAME_ "Google Test" 320 #define GTEST_PROJECT_URL_ "http://code.google.com/p/googletest/" 321 322 // Determines the version of gcc that is used to compile this. 323 #ifdef __GNUC__ 324 // 40302 means version 4.3.2. 325 # define GTEST_GCC_VER_ \ 326 (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) 327 #endif // __GNUC__ 328 329 // Determines the platform on which Google Test is compiled. 330 #ifdef __CYGWIN__ 331 # define GTEST_OS_CYGWIN 1 332 #elif defined __SYMBIAN32__ 333 # define GTEST_OS_SYMBIAN 1 334 #elif defined _WIN32 335 # define GTEST_OS_WINDOWS 1 336 # ifdef _WIN32_WCE 337 # define GTEST_OS_WINDOWS_MOBILE 1 338 # elif defined(__MINGW__) || defined(__MINGW32__) 339 # define GTEST_OS_WINDOWS_MINGW 1 340 # else 341 # define GTEST_OS_WINDOWS_DESKTOP 1 342 # endif // _WIN32_WCE 343 #elif defined __APPLE__ 344 # define GTEST_OS_MAC 1 345 # if TARGET_OS_IPHONE 346 # define GTEST_OS_IOS 1 347 # if TARGET_IPHONE_SIMULATOR 348 # define GTEST_OS_IOS_SIMULATOR 1 349 # endif 350 # endif 351 #elif defined __linux__ 352 # define GTEST_OS_LINUX 1 353 # if defined __ANDROID__ 354 # define GTEST_OS_LINUX_ANDROID 1 355 # endif 356 #elif defined __MVS__ 357 # define GTEST_OS_ZOS 1 358 #elif defined(__sun) && defined(__SVR4) 359 # define GTEST_OS_SOLARIS 1 360 #elif defined(_AIX) 361 # define GTEST_OS_AIX 1 362 #elif defined(__hpux) 363 # define GTEST_OS_HPUX 1 364 #elif defined __native_client__ 365 # define GTEST_OS_NACL 1 366 #elif defined __OpenBSD__ 367 # define GTEST_OS_OPENBSD 1 368 #elif defined __QNX__ 369 # define GTEST_OS_QNX 1 370 #endif // __CYGWIN__ 371 372 #ifndef GTEST_LANG_CXX11 373 // gcc and clang define __GXX_EXPERIMENTAL_CXX0X__ when 374 // -std={c,gnu}++{0x,11} is passed. The C++11 standard specifies a 375 // value for __cplusplus, and recent versions of clang, gcc, and 376 // probably other compilers set that too in C++11 mode. 377 # if __GXX_EXPERIMENTAL_CXX0X__ || __cplusplus >= 201103L 378 // Compiling in at least C++11 mode. 379 # define GTEST_LANG_CXX11 1 380 # else 381 # define GTEST_LANG_CXX11 0 382 # endif 383 #endif 384 385 // Brings in definitions for functions used in the testing::internal::posix 386 // namespace (read, write, close, chdir, isatty, stat). We do not currently 387 // use them on Windows Mobile. 388 #if !GTEST_OS_WINDOWS 389 // This assumes that non-Windows OSes provide unistd.h. For OSes where this 390 // is not the case, we need to include headers that provide the functions 391 // mentioned above. 392 # include <unistd.h> 393 # include <strings.h> 394 #elif !GTEST_OS_WINDOWS_MOBILE 395 # include <direct.h> 396 # include <io.h> 397 #endif 398 399 #if GTEST_OS_LINUX_ANDROID 400 // Used to define __ANDROID_API__ matching the target NDK API level. 401 # include <android/api-level.h> // NOLINT 402 #endif 403 404 // Defines this to true iff Google Test can use POSIX regular expressions. 405 #ifndef GTEST_HAS_POSIX_RE 406 # if GTEST_OS_LINUX_ANDROID 407 // On Android, <regex.h> is only available starting with Gingerbread. 408 # define GTEST_HAS_POSIX_RE (__ANDROID_API__ >= 9) 409 # else 410 # define GTEST_HAS_POSIX_RE (!GTEST_OS_WINDOWS) 411 # endif 412 #endif 413 414 #if GTEST_HAS_POSIX_RE 415 416 // On some platforms, <regex.h> needs someone to define size_t, and 417 // won't compile otherwise. We can #include it here as we already 418 // included <stdlib.h>, which is guaranteed to define size_t through 419 // <stddef.h>. 420 # include <regex.h> // NOLINT 421 422 # define GTEST_USES_POSIX_RE 1 423 424 #elif GTEST_OS_WINDOWS 425 426 // <regex.h> is not available on Windows. Use our own simple regex 427 // implementation instead. 428 # define GTEST_USES_SIMPLE_RE 1 429 430 #else 431 432 // <regex.h> may not be available on this platform. Use our own 433 // simple regex implementation instead. 434 # define GTEST_USES_SIMPLE_RE 1 435 436 #endif // GTEST_HAS_POSIX_RE 437 438 #ifndef GTEST_HAS_EXCEPTIONS 439 // The user didn't tell us whether exceptions are enabled, so we need 440 // to figure it out. 441 # if defined(_MSC_VER) || defined(__BORLANDC__) 442 // MSVC's and C++Builder's implementations of the STL use the _HAS_EXCEPTIONS 443 // macro to enable exceptions, so we'll do the same. 444 // Assumes that exceptions are enabled by default. 445 # ifndef _HAS_EXCEPTIONS 446 # define _HAS_EXCEPTIONS 1 447 # endif // _HAS_EXCEPTIONS 448 # define GTEST_HAS_EXCEPTIONS _HAS_EXCEPTIONS 449 # elif defined(__GNUC__) && __EXCEPTIONS 450 // gcc defines __EXCEPTIONS to 1 iff exceptions are enabled. 451 # define GTEST_HAS_EXCEPTIONS 1 452 # elif defined(__SUNPRO_CC) 453 // Sun Pro CC supports exceptions. However, there is no compile-time way of 454 // detecting whether they are enabled or not. Therefore, we assume that 455 // they are enabled unless the user tells us otherwise. 456 # define GTEST_HAS_EXCEPTIONS 1 457 # elif defined(__IBMCPP__) && __EXCEPTIONS 458 // xlC defines __EXCEPTIONS to 1 iff exceptions are enabled. 459 # define GTEST_HAS_EXCEPTIONS 1 460 # elif defined(__HP_aCC) 461 // Exception handling is in effect by default in HP aCC compiler. It has to 462 // be turned of by +noeh compiler option if desired. 463 # define GTEST_HAS_EXCEPTIONS 1 464 # else 465 // For other compilers, we assume exceptions are disabled to be 466 // conservative. 467 # define GTEST_HAS_EXCEPTIONS 0 468 # endif // defined(_MSC_VER) || defined(__BORLANDC__) 469 #endif // GTEST_HAS_EXCEPTIONS 470 471 #if !defined(GTEST_HAS_STD_STRING) 472 // Even though we don't use this macro any longer, we keep it in case 473 // some clients still depend on it. 474 # define GTEST_HAS_STD_STRING 1 475 #elif !GTEST_HAS_STD_STRING 476 // The user told us that ::std::string isn't available. 477 # error "Google Test cannot be used where ::std::string isn't available." 478 #endif // !defined(GTEST_HAS_STD_STRING) 479 480 #ifndef GTEST_HAS_GLOBAL_STRING 481 // The user didn't tell us whether ::string is available, so we need 482 // to figure it out. 483 484 # define GTEST_HAS_GLOBAL_STRING 0 485 486 #endif // GTEST_HAS_GLOBAL_STRING 487 488 #ifndef GTEST_HAS_STD_WSTRING 489 // The user didn't tell us whether ::std::wstring is available, so we need 490 // to figure it out. 491 // TODO([email protected]): uses autoconf to detect whether ::std::wstring 492 // is available. 493 494 // Cygwin 1.7 and below doesn't support ::std::wstring. 495 // Solaris' libc++ doesn't support it either. Android has 496 // no support for it at least as recent as Froyo (2.2). 497 # define GTEST_HAS_STD_WSTRING \ 498 (!(GTEST_OS_LINUX_ANDROID || GTEST_OS_CYGWIN || GTEST_OS_SOLARIS)) 499 500 #endif // GTEST_HAS_STD_WSTRING 501 502 #ifndef GTEST_HAS_GLOBAL_WSTRING 503 // The user didn't tell us whether ::wstring is available, so we need 504 // to figure it out. 505 # define GTEST_HAS_GLOBAL_WSTRING \ 506 (GTEST_HAS_STD_WSTRING && GTEST_HAS_GLOBAL_STRING) 507 #endif // GTEST_HAS_GLOBAL_WSTRING 508 509 // Determines whether RTTI is available. 510 #ifndef GTEST_HAS_RTTI 511 // The user didn't tell us whether RTTI is enabled, so we need to 512 // figure it out. 513 514 # ifdef _MSC_VER 515 516 # ifdef _CPPRTTI // MSVC defines this macro iff RTTI is enabled. 517 # define GTEST_HAS_RTTI 1 518 # else 519 # define GTEST_HAS_RTTI 0 520 # endif 521 522 // Starting with version 4.3.2, gcc defines __GXX_RTTI iff RTTI is enabled. 523 # elif defined(__GNUC__) && (GTEST_GCC_VER_ >= 40302) 524 525 # ifdef __GXX_RTTI 526 // When building against STLport with the Android NDK and with 527 // -frtti -fno-exceptions, the build fails at link time with undefined 528 // references to __cxa_bad_typeid. Note sure if STL or toolchain bug, 529 // so disable RTTI when detected. 530 # if GTEST_OS_LINUX_ANDROID && defined(_STLPORT_MAJOR) && \ 531 !defined(__EXCEPTIONS) 532 # define GTEST_HAS_RTTI 0 533 # else 534 # define GTEST_HAS_RTTI 1 535 # endif // GTEST_OS_LINUX_ANDROID && __STLPORT_MAJOR && !__EXCEPTIONS 536 # else 537 # define GTEST_HAS_RTTI 0 538 # endif // __GXX_RTTI 539 540 // Clang defines __GXX_RTTI starting with version 3.0, but its manual recommends 541 // using has_feature instead. has_feature(cxx_rtti) is supported since 2.7, the 542 // first version with C++ support. 543 # elif defined(__clang__) 544 545 # define GTEST_HAS_RTTI __has_feature(cxx_rtti) 546 547 // Starting with version 9.0 IBM Visual Age defines __RTTI_ALL__ to 1 if 548 // both the typeid and dynamic_cast features are present. 549 # elif defined(__IBMCPP__) && (__IBMCPP__ >= 900) 550 551 # ifdef __RTTI_ALL__ 552 # define GTEST_HAS_RTTI 1 553 # else 554 # define GTEST_HAS_RTTI 0 555 # endif 556 557 # else 558 559 // For all other compilers, we assume RTTI is enabled. 560 # define GTEST_HAS_RTTI 1 561 562 # endif // _MSC_VER 563 564 #endif // GTEST_HAS_RTTI 565 566 // It's this header's responsibility to #include <typeinfo> when RTTI 567 // is enabled. 568 #if GTEST_HAS_RTTI 569 # include <typeinfo> 570 #endif 571 572 // Determines whether Google Test can use the pthreads library. 573 #ifndef GTEST_HAS_PTHREAD 574 // The user didn't tell us explicitly, so we assume pthreads support is 575 // available on Linux and Mac. 576 // 577 // To disable threading support in Google Test, add -DGTEST_HAS_PTHREAD=0 578 // to your compiler flags. 579 # define GTEST_HAS_PTHREAD (GTEST_OS_LINUX || GTEST_OS_MAC || GTEST_OS_HPUX \ 580 || GTEST_OS_QNX) 581 #endif // GTEST_HAS_PTHREAD 582 583 #if GTEST_HAS_PTHREAD 584 // gtest-port.h guarantees to #include <pthread.h> when GTEST_HAS_PTHREAD is 585 // true. 586 # include <pthread.h> // NOLINT 587 588 // For timespec and nanosleep, used below. 589 # include <time.h> // NOLINT 590 #endif 591 592 // Determines whether Google Test can use tr1/tuple. You can define 593 // this macro to 0 to prevent Google Test from using tuple (any 594 // feature depending on tuple with be disabled in this mode). 595 #ifndef GTEST_HAS_TR1_TUPLE 596 # if GTEST_OS_LINUX_ANDROID && defined(_STLPORT_MAJOR) 597 // STLport, provided with the Android NDK, has neither <tr1/tuple> or <tuple>. 598 # define GTEST_HAS_TR1_TUPLE 0 599 # else 600 // The user didn't tell us not to do it, so we assume it's OK. 601 # define GTEST_HAS_TR1_TUPLE 1 602 # endif 603 #endif // GTEST_HAS_TR1_TUPLE 604 605 // Determines whether Google Test's own tr1 tuple implementation 606 // should be used. 607 #ifndef GTEST_USE_OWN_TR1_TUPLE 608 // The user didn't tell us, so we need to figure it out. 609 610 // We use our own TR1 tuple if we aren't sure the user has an 611 // implementation of it already. At this time, libstdc++ 4.0.0+ and 612 // MSVC 2010 are the only mainstream standard libraries that come 613 // with a TR1 tuple implementation. NVIDIA's CUDA NVCC compiler 614 // pretends to be GCC by defining __GNUC__ and friends, but cannot 615 // compile GCC's tuple implementation. MSVC 2008 (9.0) provides TR1 616 // tuple in a 323 MB Feature Pack download, which we cannot assume the 617 // user has. QNX's QCC compiler is a modified GCC but it doesn't 618 // support TR1 tuple. libc++ only provides std::tuple, in C++11 mode, 619 // and it can be used with some compilers that define __GNUC__. 620 # if (defined(__GNUC__) && !defined(__CUDACC__) && (GTEST_GCC_VER_ >= 40000) \ 621 && !GTEST_OS_QNX && !defined(_LIBCPP_VERSION)) || _MSC_VER >= 1600 622 # define GTEST_ENV_HAS_TR1_TUPLE_ 1 623 # endif 624 625 // C++11 specifies that <tuple> provides std::tuple. Use that if gtest is used 626 // in C++11 mode and libstdc++ isn't very old (binaries targeting OS X 10.6 627 // can build with clang but need to use gcc4.2's libstdc++). 628 # if GTEST_LANG_CXX11 && (!defined(__GLIBCXX__) || __GLIBCXX__ > 20110325) 629 # define GTEST_ENV_HAS_STD_TUPLE_ 1 630 # endif 631 632 # if GTEST_ENV_HAS_TR1_TUPLE_ || GTEST_ENV_HAS_STD_TUPLE_ 633 # define GTEST_USE_OWN_TR1_TUPLE 0 634 # else 635 # define GTEST_USE_OWN_TR1_TUPLE 1 636 # endif 637 638 #endif // GTEST_USE_OWN_TR1_TUPLE 639 640 // To avoid conditional compilation everywhere, we make it 641 // gtest-port.h's responsibility to #include the header implementing 642 // tr1/tuple. 643 #if GTEST_HAS_TR1_TUPLE 644 645 # if GTEST_USE_OWN_TR1_TUPLE 646 // This file was GENERATED by command: 647 // pump.py gtest-tuple.h.pump 648 // DO NOT EDIT BY HAND!!! 649 650 // Copyright 2009 Google Inc. 651 // All Rights Reserved. 652 // 653 // Redistribution and use in source and binary forms, with or without 654 // modification, are permitted provided that the following conditions are 655 // met: 656 // 657 // * Redistributions of source code must retain the above copyright 658 // notice, this list of conditions and the following disclaimer. 659 // * Redistributions in binary form must reproduce the above 660 // copyright notice, this list of conditions and the following disclaimer 661 // in the documentation and/or other materials provided with the 662 // distribution. 663 // * Neither the name of Google Inc. nor the names of its 664 // contributors may be used to endorse or promote products derived from 665 // this software without specific prior written permission. 666 // 667 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 668 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 669 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 670 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 671 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 672 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 673 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 674 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 675 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 676 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 677 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 678 // 679 // Author: [email protected] (Zhanyong Wan) 680 681 // Implements a subset of TR1 tuple needed by Google Test and Google Mock. 682 683 #ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TUPLE_H_ 684 #define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TUPLE_H_ 685 686 #include <utility> // For ::std::pair. 687 688 // The compiler used in Symbian has a bug that prevents us from declaring the 689 // tuple template as a friend (it complains that tuple is redefined). This 690 // hack bypasses the bug by declaring the members that should otherwise be 691 // private as public. 692 // Sun Studio versions < 12 also have the above bug. 693 #if defined(__SYMBIAN32__) || (defined(__SUNPRO_CC) && __SUNPRO_CC < 0x590) 694 # define GTEST_DECLARE_TUPLE_AS_FRIEND_ public: 695 #else 696 # define GTEST_DECLARE_TUPLE_AS_FRIEND_ \ 697 template <GTEST_10_TYPENAMES_(U)> friend class tuple; \ 698 private: 699 #endif 700 701 // GTEST_n_TUPLE_(T) is the type of an n-tuple. 702 #define GTEST_0_TUPLE_(T) tuple<> 703 #define GTEST_1_TUPLE_(T) tuple<T##0, void, void, void, void, void, void, \ 704 void, void, void> 705 #define GTEST_2_TUPLE_(T) tuple<T##0, T##1, void, void, void, void, void, \ 706 void, void, void> 707 #define GTEST_3_TUPLE_(T) tuple<T##0, T##1, T##2, void, void, void, void, \ 708 void, void, void> 709 #define GTEST_4_TUPLE_(T) tuple<T##0, T##1, T##2, T##3, void, void, void, \ 710 void, void, void> 711 #define GTEST_5_TUPLE_(T) tuple<T##0, T##1, T##2, T##3, T##4, void, void, \ 712 void, void, void> 713 #define GTEST_6_TUPLE_(T) tuple<T##0, T##1, T##2, T##3, T##4, T##5, void, \ 714 void, void, void> 715 #define GTEST_7_TUPLE_(T) tuple<T##0, T##1, T##2, T##3, T##4, T##5, T##6, \ 716 void, void, void> 717 #define GTEST_8_TUPLE_(T) tuple<T##0, T##1, T##2, T##3, T##4, T##5, T##6, \ 718 T##7, void, void> 719 #define GTEST_9_TUPLE_(T) tuple<T##0, T##1, T##2, T##3, T##4, T##5, T##6, \ 720 T##7, T##8, void> 721 #define GTEST_10_TUPLE_(T) tuple<T##0, T##1, T##2, T##3, T##4, T##5, T##6, \ 722 T##7, T##8, T##9> 723 724 // GTEST_n_TYPENAMES_(T) declares a list of n typenames. 725 #define GTEST_0_TYPENAMES_(T) 726 #define GTEST_1_TYPENAMES_(T) typename T##0 727 #define GTEST_2_TYPENAMES_(T) typename T##0, typename T##1 728 #define GTEST_3_TYPENAMES_(T) typename T##0, typename T##1, typename T##2 729 #define GTEST_4_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \ 730 typename T##3 731 #define GTEST_5_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \ 732 typename T##3, typename T##4 733 #define GTEST_6_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \ 734 typename T##3, typename T##4, typename T##5 735 #define GTEST_7_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \ 736 typename T##3, typename T##4, typename T##5, typename T##6 737 #define GTEST_8_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \ 738 typename T##3, typename T##4, typename T##5, typename T##6, typename T##7 739 #define GTEST_9_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \ 740 typename T##3, typename T##4, typename T##5, typename T##6, \ 741 typename T##7, typename T##8 742 #define GTEST_10_TYPENAMES_(T) typename T##0, typename T##1, typename T##2, \ 743 typename T##3, typename T##4, typename T##5, typename T##6, \ 744 typename T##7, typename T##8, typename T##9 745 746 // In theory, defining stuff in the ::std namespace is undefined 747 // behavior. We can do this as we are playing the role of a standard 748 // library vendor. 749 namespace std { 750 namespace tr1 { 751 752 template <typename T0 = void, typename T1 = void, typename T2 = void, 753 typename T3 = void, typename T4 = void, typename T5 = void, 754 typename T6 = void, typename T7 = void, typename T8 = void, 755 typename T9 = void> 756 class tuple; 757 758 // Anything in namespace gtest_internal is Google Test's INTERNAL 759 // IMPLEMENTATION DETAIL and MUST NOT BE USED DIRECTLY in user code. 760 namespace gtest_internal { 761 762 // ByRef<T>::type is T if T is a reference; otherwise it's const T&. 763 template <typename T> 764 struct ByRef { typedef const T& type; }; // NOLINT 765 template <typename T> 766 struct ByRef<T&> { typedef T& type; }; // NOLINT 767 768 // A handy wrapper for ByRef. 769 #define GTEST_BY_REF_(T) typename ::stdt::gtest_internal::ByRef<T>::type 770 771 // AddRef<T>::type is T if T is a reference; otherwise it's T&. This 772 // is the same as tr1::add_reference<T>::type. 773 template <typename T> 774 struct AddRef { typedef T& type; }; // NOLINT 775 template <typename T> 776 struct AddRef<T&> { typedef T& type; }; // NOLINT 777 778 // A handy wrapper for AddRef. 779 #define GTEST_ADD_REF_(T) typename ::stdt::gtest_internal::AddRef<T>::type 780 781 // A helper for implementing get<k>(). 782 template <int k> class Get; 783 784 // A helper for implementing tuple_element<k, T>. kIndexValid is true 785 // iff k < the number of fields in tuple type T. 786 template <bool kIndexValid, int kIndex, class Tuple> 787 struct TupleElement; 788 789 template <GTEST_10_TYPENAMES_(T)> 790 struct TupleElement<true, 0, GTEST_10_TUPLE_(T) > { 791 typedef T0 type; 792 }; 793 794 template <GTEST_10_TYPENAMES_(T)> 795 struct TupleElement<true, 1, GTEST_10_TUPLE_(T) > { 796 typedef T1 type; 797 }; 798 799 template <GTEST_10_TYPENAMES_(T)> 800 struct TupleElement<true, 2, GTEST_10_TUPLE_(T) > { 801 typedef T2 type; 802 }; 803 804 template <GTEST_10_TYPENAMES_(T)> 805 struct TupleElement<true, 3, GTEST_10_TUPLE_(T) > { 806 typedef T3 type; 807 }; 808 809 template <GTEST_10_TYPENAMES_(T)> 810 struct TupleElement<true, 4, GTEST_10_TUPLE_(T) > { 811 typedef T4 type; 812 }; 813 814 template <GTEST_10_TYPENAMES_(T)> 815 struct TupleElement<true, 5, GTEST_10_TUPLE_(T) > { 816 typedef T5 type; 817 }; 818 819 template <GTEST_10_TYPENAMES_(T)> 820 struct TupleElement<true, 6, GTEST_10_TUPLE_(T) > { 821 typedef T6 type; 822 }; 823 824 template <GTEST_10_TYPENAMES_(T)> 825 struct TupleElement<true, 7, GTEST_10_TUPLE_(T) > { 826 typedef T7 type; 827 }; 828 829 template <GTEST_10_TYPENAMES_(T)> 830 struct TupleElement<true, 8, GTEST_10_TUPLE_(T) > { 831 typedef T8 type; 832 }; 833 834 template <GTEST_10_TYPENAMES_(T)> 835 struct TupleElement<true, 9, GTEST_10_TUPLE_(T) > { 836 typedef T9 type; 837 }; 838 839 } // namespace gtest_internal 840 841 template <> 842 class tuple<> { 843 public: 844 tuple() {} 845 tuple(const tuple& /* t */) {} 846 tuple& operator=(const tuple& /* t */) { return *this; } 847 }; 848 849 template <GTEST_1_TYPENAMES_(T)> 850 class GTEST_1_TUPLE_(T) { 851 public: 852 template <int k> friend class gtest_internal::Get; 853 854 tuple() : f0_() {} 855 856 explicit tuple(GTEST_BY_REF_(T0) f0) : f0_(f0) {} 857 858 tuple(const tuple& t) : f0_(t.f0_) {} 859 860 template <GTEST_1_TYPENAMES_(U)> 861 tuple(const GTEST_1_TUPLE_(U)& t) : f0_(t.f0_) {} 862 863 tuple& operator=(const tuple& t) { return CopyFrom(t); } 864 865 template <GTEST_1_TYPENAMES_(U)> 866 tuple& operator=(const GTEST_1_TUPLE_(U)& t) { 867 return CopyFrom(t); 868 } 869 870 GTEST_DECLARE_TUPLE_AS_FRIEND_ 871 872 template <GTEST_1_TYPENAMES_(U)> 873 tuple& CopyFrom(const GTEST_1_TUPLE_(U)& t) { 874 f0_ = t.f0_; 875 return *this; 876 } 877 878 T0 f0_; 879 }; 880 881 template <GTEST_2_TYPENAMES_(T)> 882 class GTEST_2_TUPLE_(T) { 883 public: 884 template <int k> friend class gtest_internal::Get; 885 886 tuple() : f0_(), f1_() {} 887 888 explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1) : f0_(f0), 889 f1_(f1) {} 890 891 tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_) {} 892 893 template <GTEST_2_TYPENAMES_(U)> 894 tuple(const GTEST_2_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_) {} 895 template <typename U0, typename U1> 896 tuple(const ::std::pair<U0, U1>& p) : f0_(p.first), f1_(p.second) {} 897 898 tuple& operator=(const tuple& t) { return CopyFrom(t); } 899 900 template <GTEST_2_TYPENAMES_(U)> 901 tuple& operator=(const GTEST_2_TUPLE_(U)& t) { 902 return CopyFrom(t); 903 } 904 template <typename U0, typename U1> 905 tuple& operator=(const ::std::pair<U0, U1>& p) { 906 f0_ = p.first; 907 f1_ = p.second; 908 return *this; 909 } 910 911 GTEST_DECLARE_TUPLE_AS_FRIEND_ 912 913 template <GTEST_2_TYPENAMES_(U)> 914 tuple& CopyFrom(const GTEST_2_TUPLE_(U)& t) { 915 f0_ = t.f0_; 916 f1_ = t.f1_; 917 return *this; 918 } 919 920 T0 f0_; 921 T1 f1_; 922 }; 923 924 template <GTEST_3_TYPENAMES_(T)> 925 class GTEST_3_TUPLE_(T) { 926 public: 927 template <int k> friend class gtest_internal::Get; 928 929 tuple() : f0_(), f1_(), f2_() {} 930 931 explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1, 932 GTEST_BY_REF_(T2) f2) : f0_(f0), f1_(f1), f2_(f2) {} 933 934 tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_) {} 935 936 template <GTEST_3_TYPENAMES_(U)> 937 tuple(const GTEST_3_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_) {} 938 939 tuple& operator=(const tuple& t) { return CopyFrom(t); } 940 941 template <GTEST_3_TYPENAMES_(U)> 942 tuple& operator=(const GTEST_3_TUPLE_(U)& t) { 943 return CopyFrom(t); 944 } 945 946 GTEST_DECLARE_TUPLE_AS_FRIEND_ 947 948 template <GTEST_3_TYPENAMES_(U)> 949 tuple& CopyFrom(const GTEST_3_TUPLE_(U)& t) { 950 f0_ = t.f0_; 951 f1_ = t.f1_; 952 f2_ = t.f2_; 953 return *this; 954 } 955 956 T0 f0_; 957 T1 f1_; 958 T2 f2_; 959 }; 960 961 template <GTEST_4_TYPENAMES_(T)> 962 class GTEST_4_TUPLE_(T) { 963 public: 964 template <int k> friend class gtest_internal::Get; 965 966 tuple() : f0_(), f1_(), f2_(), f3_() {} 967 968 explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1, 969 GTEST_BY_REF_(T2) f2, GTEST_BY_REF_(T3) f3) : f0_(f0), f1_(f1), f2_(f2), 970 f3_(f3) {} 971 972 tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_) {} 973 974 template <GTEST_4_TYPENAMES_(U)> 975 tuple(const GTEST_4_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), 976 f3_(t.f3_) {} 977 978 tuple& operator=(const tuple& t) { return CopyFrom(t); } 979 980 template <GTEST_4_TYPENAMES_(U)> 981 tuple& operator=(const GTEST_4_TUPLE_(U)& t) { 982 return CopyFrom(t); 983 } 984 985 GTEST_DECLARE_TUPLE_AS_FRIEND_ 986 987 template <GTEST_4_TYPENAMES_(U)> 988 tuple& CopyFrom(const GTEST_4_TUPLE_(U)& t) { 989 f0_ = t.f0_; 990 f1_ = t.f1_; 991 f2_ = t.f2_; 992 f3_ = t.f3_; 993 return *this; 994 } 995 996 T0 f0_; 997 T1 f1_; 998 T2 f2_; 999 T3 f3_; 1000 }; 1001 1002 template <GTEST_5_TYPENAMES_(T)> 1003 class GTEST_5_TUPLE_(T) { 1004 public: 1005 template <int k> friend class gtest_internal::Get; 1006 1007 tuple() : f0_(), f1_(), f2_(), f3_(), f4_() {} 1008 1009 explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1, 1010 GTEST_BY_REF_(T2) f2, GTEST_BY_REF_(T3) f3, 1011 GTEST_BY_REF_(T4) f4) : f0_(f0), f1_(f1), f2_(f2), f3_(f3), f4_(f4) {} 1012 1013 tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_), 1014 f4_(t.f4_) {} 1015 1016 template <GTEST_5_TYPENAMES_(U)> 1017 tuple(const GTEST_5_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), 1018 f3_(t.f3_), f4_(t.f4_) {} 1019 1020 tuple& operator=(const tuple& t) { return CopyFrom(t); } 1021 1022 template <GTEST_5_TYPENAMES_(U)> 1023 tuple& operator=(const GTEST_5_TUPLE_(U)& t) { 1024 return CopyFrom(t); 1025 } 1026 1027 GTEST_DECLARE_TUPLE_AS_FRIEND_ 1028 1029 template <GTEST_5_TYPENAMES_(U)> 1030 tuple& CopyFrom(const GTEST_5_TUPLE_(U)& t) { 1031 f0_ = t.f0_; 1032 f1_ = t.f1_; 1033 f2_ = t.f2_; 1034 f3_ = t.f3_; 1035 f4_ = t.f4_; 1036 return *this; 1037 } 1038 1039 T0 f0_; 1040 T1 f1_; 1041 T2 f2_; 1042 T3 f3_; 1043 T4 f4_; 1044 }; 1045 1046 template <GTEST_6_TYPENAMES_(T)> 1047 class GTEST_6_TUPLE_(T) { 1048 public: 1049 template <int k> friend class gtest_internal::Get; 1050 1051 tuple() : f0_(), f1_(), f2_(), f3_(), f4_(), f5_() {} 1052 1053 explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1, 1054 GTEST_BY_REF_(T2) f2, GTEST_BY_REF_(T3) f3, GTEST_BY_REF_(T4) f4, 1055 GTEST_BY_REF_(T5) f5) : f0_(f0), f1_(f1), f2_(f2), f3_(f3), f4_(f4), 1056 f5_(f5) {} 1057 1058 tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_), 1059 f4_(t.f4_), f5_(t.f5_) {} 1060 1061 template <GTEST_6_TYPENAMES_(U)> 1062 tuple(const GTEST_6_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), 1063 f3_(t.f3_), f4_(t.f4_), f5_(t.f5_) {} 1064 1065 tuple& operator=(const tuple& t) { return CopyFrom(t); } 1066 1067 template <GTEST_6_TYPENAMES_(U)> 1068 tuple& operator=(const GTEST_6_TUPLE_(U)& t) { 1069 return CopyFrom(t); 1070 } 1071 1072 GTEST_DECLARE_TUPLE_AS_FRIEND_ 1073 1074 template <GTEST_6_TYPENAMES_(U)> 1075 tuple& CopyFrom(const GTEST_6_TUPLE_(U)& t) { 1076 f0_ = t.f0_; 1077 f1_ = t.f1_; 1078 f2_ = t.f2_; 1079 f3_ = t.f3_; 1080 f4_ = t.f4_; 1081 f5_ = t.f5_; 1082 return *this; 1083 } 1084 1085 T0 f0_; 1086 T1 f1_; 1087 T2 f2_; 1088 T3 f3_; 1089 T4 f4_; 1090 T5 f5_; 1091 }; 1092 1093 template <GTEST_7_TYPENAMES_(T)> 1094 class GTEST_7_TUPLE_(T) { 1095 public: 1096 template <int k> friend class gtest_internal::Get; 1097 1098 tuple() : f0_(), f1_(), f2_(), f3_(), f4_(), f5_(), f6_() {} 1099 1100 explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1, 1101 GTEST_BY_REF_(T2) f2, GTEST_BY_REF_(T3) f3, GTEST_BY_REF_(T4) f4, 1102 GTEST_BY_REF_(T5) f5, GTEST_BY_REF_(T6) f6) : f0_(f0), f1_(f1), f2_(f2), 1103 f3_(f3), f4_(f4), f5_(f5), f6_(f6) {} 1104 1105 tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_), 1106 f4_(t.f4_), f5_(t.f5_), f6_(t.f6_) {} 1107 1108 template <GTEST_7_TYPENAMES_(U)> 1109 tuple(const GTEST_7_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), 1110 f3_(t.f3_), f4_(t.f4_), f5_(t.f5_), f6_(t.f6_) {} 1111 1112 tuple& operator=(const tuple& t) { return CopyFrom(t); } 1113 1114 template <GTEST_7_TYPENAMES_(U)> 1115 tuple& operator=(const GTEST_7_TUPLE_(U)& t) { 1116 return CopyFrom(t); 1117 } 1118 1119 GTEST_DECLARE_TUPLE_AS_FRIEND_ 1120 1121 template <GTEST_7_TYPENAMES_(U)> 1122 tuple& CopyFrom(const GTEST_7_TUPLE_(U)& t) { 1123 f0_ = t.f0_; 1124 f1_ = t.f1_; 1125 f2_ = t.f2_; 1126 f3_ = t.f3_; 1127 f4_ = t.f4_; 1128 f5_ = t.f5_; 1129 f6_ = t.f6_; 1130 return *this; 1131 } 1132 1133 T0 f0_; 1134 T1 f1_; 1135 T2 f2_; 1136 T3 f3_; 1137 T4 f4_; 1138 T5 f5_; 1139 T6 f6_; 1140 }; 1141 1142 template <GTEST_8_TYPENAMES_(T)> 1143 class GTEST_8_TUPLE_(T) { 1144 public: 1145 template <int k> friend class gtest_internal::Get; 1146 1147 tuple() : f0_(), f1_(), f2_(), f3_(), f4_(), f5_(), f6_(), f7_() {} 1148 1149 explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1, 1150 GTEST_BY_REF_(T2) f2, GTEST_BY_REF_(T3) f3, GTEST_BY_REF_(T4) f4, 1151 GTEST_BY_REF_(T5) f5, GTEST_BY_REF_(T6) f6, 1152 GTEST_BY_REF_(T7) f7) : f0_(f0), f1_(f1), f2_(f2), f3_(f3), f4_(f4), 1153 f5_(f5), f6_(f6), f7_(f7) {} 1154 1155 tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_), 1156 f4_(t.f4_), f5_(t.f5_), f6_(t.f6_), f7_(t.f7_) {} 1157 1158 template <GTEST_8_TYPENAMES_(U)> 1159 tuple(const GTEST_8_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), 1160 f3_(t.f3_), f4_(t.f4_), f5_(t.f5_), f6_(t.f6_), f7_(t.f7_) {} 1161 1162 tuple& operator=(const tuple& t) { return CopyFrom(t); } 1163 1164 template <GTEST_8_TYPENAMES_(U)> 1165 tuple& operator=(const GTEST_8_TUPLE_(U)& t) { 1166 return CopyFrom(t); 1167 } 1168 1169 GTEST_DECLARE_TUPLE_AS_FRIEND_ 1170 1171 template <GTEST_8_TYPENAMES_(U)> 1172 tuple& CopyFrom(const GTEST_8_TUPLE_(U)& t) { 1173 f0_ = t.f0_; 1174 f1_ = t.f1_; 1175 f2_ = t.f2_; 1176 f3_ = t.f3_; 1177 f4_ = t.f4_; 1178 f5_ = t.f5_; 1179 f6_ = t.f6_; 1180 f7_ = t.f7_; 1181 return *this; 1182 } 1183 1184 T0 f0_; 1185 T1 f1_; 1186 T2 f2_; 1187 T3 f3_; 1188 T4 f4_; 1189 T5 f5_; 1190 T6 f6_; 1191 T7 f7_; 1192 }; 1193 1194 template <GTEST_9_TYPENAMES_(T)> 1195 class GTEST_9_TUPLE_(T) { 1196 public: 1197 template <int k> friend class gtest_internal::Get; 1198 1199 tuple() : f0_(), f1_(), f2_(), f3_(), f4_(), f5_(), f6_(), f7_(), f8_() {} 1200 1201 explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1, 1202 GTEST_BY_REF_(T2) f2, GTEST_BY_REF_(T3) f3, GTEST_BY_REF_(T4) f4, 1203 GTEST_BY_REF_(T5) f5, GTEST_BY_REF_(T6) f6, GTEST_BY_REF_(T7) f7, 1204 GTEST_BY_REF_(T8) f8) : f0_(f0), f1_(f1), f2_(f2), f3_(f3), f4_(f4), 1205 f5_(f5), f6_(f6), f7_(f7), f8_(f8) {} 1206 1207 tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_), 1208 f4_(t.f4_), f5_(t.f5_), f6_(t.f6_), f7_(t.f7_), f8_(t.f8_) {} 1209 1210 template <GTEST_9_TYPENAMES_(U)> 1211 tuple(const GTEST_9_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), 1212 f3_(t.f3_), f4_(t.f4_), f5_(t.f5_), f6_(t.f6_), f7_(t.f7_), f8_(t.f8_) {} 1213 1214 tuple& operator=(const tuple& t) { return CopyFrom(t); } 1215 1216 template <GTEST_9_TYPENAMES_(U)> 1217 tuple& operator=(const GTEST_9_TUPLE_(U)& t) { 1218 return CopyFrom(t); 1219 } 1220 1221 GTEST_DECLARE_TUPLE_AS_FRIEND_ 1222 1223 template <GTEST_9_TYPENAMES_(U)> 1224 tuple& CopyFrom(const GTEST_9_TUPLE_(U)& t) { 1225 f0_ = t.f0_; 1226 f1_ = t.f1_; 1227 f2_ = t.f2_; 1228 f3_ = t.f3_; 1229 f4_ = t.f4_; 1230 f5_ = t.f5_; 1231 f6_ = t.f6_; 1232 f7_ = t.f7_; 1233 f8_ = t.f8_; 1234 return *this; 1235 } 1236 1237 T0 f0_; 1238 T1 f1_; 1239 T2 f2_; 1240 T3 f3_; 1241 T4 f4_; 1242 T5 f5_; 1243 T6 f6_; 1244 T7 f7_; 1245 T8 f8_; 1246 }; 1247 1248 template <GTEST_10_TYPENAMES_(T)> 1249 class tuple { 1250 public: 1251 template <int k> friend class gtest_internal::Get; 1252 1253 tuple() : f0_(), f1_(), f2_(), f3_(), f4_(), f5_(), f6_(), f7_(), f8_(), 1254 f9_() {} 1255 1256 explicit tuple(GTEST_BY_REF_(T0) f0, GTEST_BY_REF_(T1) f1, 1257 GTEST_BY_REF_(T2) f2, GTEST_BY_REF_(T3) f3, GTEST_BY_REF_(T4) f4, 1258 GTEST_BY_REF_(T5) f5, GTEST_BY_REF_(T6) f6, GTEST_BY_REF_(T7) f7, 1259 GTEST_BY_REF_(T8) f8, GTEST_BY_REF_(T9) f9) : f0_(f0), f1_(f1), f2_(f2), 1260 f3_(f3), f4_(f4), f5_(f5), f6_(f6), f7_(f7), f8_(f8), f9_(f9) {} 1261 1262 tuple(const tuple& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), f3_(t.f3_), 1263 f4_(t.f4_), f5_(t.f5_), f6_(t.f6_), f7_(t.f7_), f8_(t.f8_), f9_(t.f9_) {} 1264 1265 template <GTEST_10_TYPENAMES_(U)> 1266 tuple(const GTEST_10_TUPLE_(U)& t) : f0_(t.f0_), f1_(t.f1_), f2_(t.f2_), 1267 f3_(t.f3_), f4_(t.f4_), f5_(t.f5_), f6_(t.f6_), f7_(t.f7_), f8_(t.f8_), 1268 f9_(t.f9_) {} 1269 1270 tuple& operator=(const tuple& t) { return CopyFrom(t); } 1271 1272 template <GTEST_10_TYPENAMES_(U)> 1273 tuple& operator=(const GTEST_10_TUPLE_(U)& t) { 1274 return CopyFrom(t); 1275 } 1276 1277 GTEST_DECLARE_TUPLE_AS_FRIEND_ 1278 1279 template <GTEST_10_TYPENAMES_(U)> 1280 tuple& CopyFrom(const GTEST_10_TUPLE_(U)& t) { 1281 f0_ = t.f0_; 1282 f1_ = t.f1_; 1283 f2_ = t.f2_; 1284 f3_ = t.f3_; 1285 f4_ = t.f4_; 1286 f5_ = t.f5_; 1287 f6_ = t.f6_; 1288 f7_ = t.f7_; 1289 f8_ = t.f8_; 1290 f9_ = t.f9_; 1291 return *this; 1292 } 1293 1294 T0 f0_; 1295 T1 f1_; 1296 T2 f2_; 1297 T3 f3_; 1298 T4 f4_; 1299 T5 f5_; 1300 T6 f6_; 1301 T7 f7_; 1302 T8 f8_; 1303 T9 f9_; 1304 }; 1305 1306 // 6.1.3.2 Tuple creation functions. 1307 1308 // Known limitations: we don't support passing an 1309 // stdt::reference_wrapper<T> to make_tuple(). And we don't 1310 // implement tie(). 1311 1312 inline tuple<> make_tuple() { return tuple<>(); } 1313 1314 template <GTEST_1_TYPENAMES_(T)> 1315 inline GTEST_1_TUPLE_(T) make_tuple(const T0& f0) { 1316 return GTEST_1_TUPLE_(T)(f0); 1317 } 1318 1319 template <GTEST_2_TYPENAMES_(T)> 1320 inline GTEST_2_TUPLE_(T) make_tuple(const T0& f0, const T1& f1) { 1321 return GTEST_2_TUPLE_(T)(f0, f1); 1322 } 1323 1324 template <GTEST_3_TYPENAMES_(T)> 1325 inline GTEST_3_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2) { 1326 return GTEST_3_TUPLE_(T)(f0, f1, f2); 1327 } 1328 1329 template <GTEST_4_TYPENAMES_(T)> 1330 inline GTEST_4_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2, 1331 const T3& f3) { 1332 return GTEST_4_TUPLE_(T)(f0, f1, f2, f3); 1333 } 1334 1335 template <GTEST_5_TYPENAMES_(T)> 1336 inline GTEST_5_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2, 1337 const T3& f3, const T4& f4) { 1338 return GTEST_5_TUPLE_(T)(f0, f1, f2, f3, f4); 1339 } 1340 1341 template <GTEST_6_TYPENAMES_(T)> 1342 inline GTEST_6_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2, 1343 const T3& f3, const T4& f4, const T5& f5) { 1344 return GTEST_6_TUPLE_(T)(f0, f1, f2, f3, f4, f5); 1345 } 1346 1347 template <GTEST_7_TYPENAMES_(T)> 1348 inline GTEST_7_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2, 1349 const T3& f3, const T4& f4, const T5& f5, const T6& f6) { 1350 return GTEST_7_TUPLE_(T)(f0, f1, f2, f3, f4, f5, f6); 1351 } 1352 1353 template <GTEST_8_TYPENAMES_(T)> 1354 inline GTEST_8_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2, 1355 const T3& f3, const T4& f4, const T5& f5, const T6& f6, const T7& f7) { 1356 return GTEST_8_TUPLE_(T)(f0, f1, f2, f3, f4, f5, f6, f7); 1357 } 1358 1359 template <GTEST_9_TYPENAMES_(T)> 1360 inline GTEST_9_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2, 1361 const T3& f3, const T4& f4, const T5& f5, const T6& f6, const T7& f7, 1362 const T8& f8) { 1363 return GTEST_9_TUPLE_(T)(f0, f1, f2, f3, f4, f5, f6, f7, f8); 1364 } 1365 1366 template <GTEST_10_TYPENAMES_(T)> 1367 inline GTEST_10_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2, 1368 const T3& f3, const T4& f4, const T5& f5, const T6& f6, const T7& f7, 1369 const T8& f8, const T9& f9) { 1370 return GTEST_10_TUPLE_(T)(f0, f1, f2, f3, f4, f5, f6, f7, f8, f9); 1371 } 1372 1373 // 6.1.3.3 Tuple helper classes. 1374 1375 template <typename Tuple> struct tuple_size; 1376 1377 template <GTEST_0_TYPENAMES_(T)> 1378 struct tuple_size<GTEST_0_TUPLE_(T) > { 1379 static const int value = 0; 1380 }; 1381 1382 template <GTEST_1_TYPENAMES_(T)> 1383 struct tuple_size<GTEST_1_TUPLE_(T) > { 1384 static const int value = 1; 1385 }; 1386 1387 template <GTEST_2_TYPENAMES_(T)> 1388 struct tuple_size<GTEST_2_TUPLE_(T) > { 1389 static const int value = 2; 1390 }; 1391 1392 template <GTEST_3_TYPENAMES_(T)> 1393 struct tuple_size<GTEST_3_TUPLE_(T) > { 1394 static const int value = 3; 1395 }; 1396 1397 template <GTEST_4_TYPENAMES_(T)> 1398 struct tuple_size<GTEST_4_TUPLE_(T) > { 1399 static const int value = 4; 1400 }; 1401 1402 template <GTEST_5_TYPENAMES_(T)> 1403 struct tuple_size<GTEST_5_TUPLE_(T) > { 1404 static const int value = 5; 1405 }; 1406 1407 template <GTEST_6_TYPENAMES_(T)> 1408 struct tuple_size<GTEST_6_TUPLE_(T) > { 1409 static const int value = 6; 1410 }; 1411 1412 template <GTEST_7_TYPENAMES_(T)> 1413 struct tuple_size<GTEST_7_TUPLE_(T) > { 1414 static const int value = 7; 1415 }; 1416 1417 template <GTEST_8_TYPENAMES_(T)> 1418 struct tuple_size<GTEST_8_TUPLE_(T) > { 1419 static const int value = 8; 1420 }; 1421 1422 template <GTEST_9_TYPENAMES_(T)> 1423 struct tuple_size<GTEST_9_TUPLE_(T) > { 1424 static const int value = 9; 1425 }; 1426 1427 template <GTEST_10_TYPENAMES_(T)> 1428 struct tuple_size<GTEST_10_TUPLE_(T) > { 1429 static const int value = 10; 1430 }; 1431 1432 template <int k, class Tuple> 1433 struct tuple_element { 1434 typedef typename gtest_internal::TupleElement< 1435 k < (tuple_size<Tuple>::value), k, Tuple>::type type; 1436 }; 1437 1438 #define GTEST_TUPLE_ELEMENT_(k, Tuple) typename tuple_element<k, Tuple >::type 1439 1440 // 6.1.3.4 Element access. 1441 1442 namespace gtest_internal { 1443 1444 template <> 1445 class Get<0> { 1446 public: 1447 template <class Tuple> 1448 static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(0, Tuple)) 1449 Field(Tuple& t) { return t.f0_; } // NOLINT 1450 1451 template <class Tuple> 1452 static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(0, Tuple)) 1453 ConstField(const Tuple& t) { return t.f0_; } 1454 }; 1455 1456 template <> 1457 class Get<1> { 1458 public: 1459 template <class Tuple> 1460 static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(1, Tuple)) 1461 Field(Tuple& t) { return t.f1_; } // NOLINT 1462 1463 template <class Tuple> 1464 static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(1, Tuple)) 1465 ConstField(const Tuple& t) { return t.f1_; } 1466 }; 1467 1468 template <> 1469 class Get<2> { 1470 public: 1471 template <class Tuple> 1472 static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(2, Tuple)) 1473 Field(Tuple& t) { return t.f2_; } // NOLINT 1474 1475 template <class Tuple> 1476 static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(2, Tuple)) 1477 ConstField(const Tuple& t) { return t.f2_; } 1478 }; 1479 1480 template <> 1481 class Get<3> { 1482 public: 1483 template <class Tuple> 1484 static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(3, Tuple)) 1485 Field(Tuple& t) { return t.f3_; } // NOLINT 1486 1487 template <class Tuple> 1488 static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(3, Tuple)) 1489 ConstField(const Tuple& t) { return t.f3_; } 1490 }; 1491 1492 template <> 1493 class Get<4> { 1494 public: 1495 template <class Tuple> 1496 static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(4, Tuple)) 1497 Field(Tuple& t) { return t.f4_; } // NOLINT 1498 1499 template <class Tuple> 1500 static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(4, Tuple)) 1501 ConstField(const Tuple& t) { return t.f4_; } 1502 }; 1503 1504 template <> 1505 class Get<5> { 1506 public: 1507 template <class Tuple> 1508 static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(5, Tuple)) 1509 Field(Tuple& t) { return t.f5_; } // NOLINT 1510 1511 template <class Tuple> 1512 static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(5, Tuple)) 1513 ConstField(const Tuple& t) { return t.f5_; } 1514 }; 1515 1516 template <> 1517 class Get<6> { 1518 public: 1519 template <class Tuple> 1520 static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(6, Tuple)) 1521 Field(Tuple& t) { return t.f6_; } // NOLINT 1522 1523 template <class Tuple> 1524 static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(6, Tuple)) 1525 ConstField(const Tuple& t) { return t.f6_; } 1526 }; 1527 1528 template <> 1529 class Get<7> { 1530 public: 1531 template <class Tuple> 1532 static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(7, Tuple)) 1533 Field(Tuple& t) { return t.f7_; } // NOLINT 1534 1535 template <class Tuple> 1536 static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(7, Tuple)) 1537 ConstField(const Tuple& t) { return t.f7_; } 1538 }; 1539 1540 template <> 1541 class Get<8> { 1542 public: 1543 template <class Tuple> 1544 static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(8, Tuple)) 1545 Field(Tuple& t) { return t.f8_; } // NOLINT 1546 1547 template <class Tuple> 1548 static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(8, Tuple)) 1549 ConstField(const Tuple& t) { return t.f8_; } 1550 }; 1551 1552 template <> 1553 class Get<9> { 1554 public: 1555 template <class Tuple> 1556 static GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(9, Tuple)) 1557 Field(Tuple& t) { return t.f9_; } // NOLINT 1558 1559 template <class Tuple> 1560 static GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(9, Tuple)) 1561 ConstField(const Tuple& t) { return t.f9_; } 1562 }; 1563 1564 } // namespace gtest_internal 1565 1566 template <int k, GTEST_10_TYPENAMES_(T)> 1567 GTEST_ADD_REF_(GTEST_TUPLE_ELEMENT_(k, GTEST_10_TUPLE_(T))) 1568 get(GTEST_10_TUPLE_(T)& t) { 1569 return gtest_internal::Get<k>::Field(t); 1570 } 1571 1572 template <int k, GTEST_10_TYPENAMES_(T)> 1573 GTEST_BY_REF_(GTEST_TUPLE_ELEMENT_(k, GTEST_10_TUPLE_(T))) 1574 get(const GTEST_10_TUPLE_(T)& t) { 1575 return gtest_internal::Get<k>::ConstField(t); 1576 } 1577 1578 // 6.1.3.5 Relational operators 1579 1580 // We only implement == and !=, as we don't have a need for the rest yet. 1581 1582 namespace gtest_internal { 1583 1584 // SameSizeTuplePrefixComparator<k, k>::Eq(t1, t2) returns true if the 1585 // first k fields of t1 equals the first k fields of t2. 1586 // SameSizeTuplePrefixComparator(k1, k2) would be a compiler error if 1587 // k1 != k2. 1588 template <int kSize1, int kSize2> 1589 struct SameSizeTuplePrefixComparator; 1590 1591 template <> 1592 struct SameSizeTuplePrefixComparator<0, 0> { 1593 template <class Tuple1, class Tuple2> 1594 static bool Eq(const Tuple1& /* t1 */, const Tuple2& /* t2 */) { 1595 return true; 1596 } 1597 }; 1598 1599 template <int k> 1600 struct SameSizeTuplePrefixComparator<k, k> { 1601 template <class Tuple1, class Tuple2> 1602 static bool Eq(const Tuple1& t1, const Tuple2& t2) { 1603 return SameSizeTuplePrefixComparator<k - 1, k - 1>::Eq(t1, t2) && 1604 ::stdt::get<k - 1>(t1) == ::stdt::get<k - 1>(t2); 1605 } 1606 }; 1607 1608 } // namespace gtest_internal 1609 1610 template <GTEST_10_TYPENAMES_(T), GTEST_10_TYPENAMES_(U)> 1611 inline bool operator==(const GTEST_10_TUPLE_(T)& t, 1612 const GTEST_10_TUPLE_(U)& u) { 1613 return gtest_internal::SameSizeTuplePrefixComparator< 1614 tuple_size<GTEST_10_TUPLE_(T) >::value, 1615 tuple_size<GTEST_10_TUPLE_(U) >::value>::Eq(t, u); 1616 } 1617 1618 template <GTEST_10_TYPENAMES_(T), GTEST_10_TYPENAMES_(U)> 1619 inline bool operator!=(const GTEST_10_TUPLE_(T)& t, 1620 const GTEST_10_TUPLE_(U)& u) { 1621 return !(t == u); 1622 } 1623 1624 // 6.1.4 Pairs. 1625 // Unimplemented. 1626 1627 } // namespace tr1 1628 } // namespace std 1629 1630 #undef GTEST_0_TUPLE_ 1631 #undef GTEST_1_TUPLE_ 1632 #undef GTEST_2_TUPLE_ 1633 #undef GTEST_3_TUPLE_ 1634 #undef GTEST_4_TUPLE_ 1635 #undef GTEST_5_TUPLE_ 1636 #undef GTEST_6_TUPLE_ 1637 #undef GTEST_7_TUPLE_ 1638 #undef GTEST_8_TUPLE_ 1639 #undef GTEST_9_TUPLE_ 1640 #undef GTEST_10_TUPLE_ 1641 1642 #undef GTEST_0_TYPENAMES_ 1643 #undef GTEST_1_TYPENAMES_ 1644 #undef GTEST_2_TYPENAMES_ 1645 #undef GTEST_3_TYPENAMES_ 1646 #undef GTEST_4_TYPENAMES_ 1647 #undef GTEST_5_TYPENAMES_ 1648 #undef GTEST_6_TYPENAMES_ 1649 #undef GTEST_7_TYPENAMES_ 1650 #undef GTEST_8_TYPENAMES_ 1651 #undef GTEST_9_TYPENAMES_ 1652 #undef GTEST_10_TYPENAMES_ 1653 1654 #undef GTEST_DECLARE_TUPLE_AS_FRIEND_ 1655 #undef GTEST_BY_REF_ 1656 #undef GTEST_ADD_REF_ 1657 #undef GTEST_TUPLE_ELEMENT_ 1658 1659 #endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TUPLE_H_ 1660 # elif GTEST_ENV_HAS_STD_TUPLE_ 1661 # include <tuple> 1662 // C++11 puts its tuple into the ::std namespace rather than 1663 // ::std::tr1. gtest expects tuple to live in ::std::tr1, so put it there. 1664 // This causes undefined behavior, but supported compilers react in 1665 // the way we intend. 1666 namespace std { 1667 namespace tr1 { 1668 using ::std::get; 1669 using ::std::make_tuple; 1670 using ::std::tuple; 1671 using ::std::tuple_element; 1672 using ::std::tuple_size; 1673 } 1674 } 1675 1676 # elif GTEST_OS_SYMBIAN 1677 1678 // On Symbian, BOOST_HAS_TR1_TUPLE causes Boost's TR1 tuple library to 1679 // use STLport's tuple implementation, which unfortunately doesn't 1680 // work as the copy of STLport distributed with Symbian is incomplete. 1681 // By making sure BOOST_HAS_TR1_TUPLE is undefined, we force Boost to 1682 // use its own tuple implementation. 1683 # ifdef BOOST_HAS_TR1_TUPLE 1684 # undef BOOST_HAS_TR1_TUPLE 1685 # endif // BOOST_HAS_TR1_TUPLE 1686 1687 // This prevents <boost/tr1/detail/config.hpp>, which defines 1688 // BOOST_HAS_TR1_TUPLE, from being #included by Boost's <tuple>. 1689 # define BOOST_TR1_DETAIL_CONFIG_HPP_INCLUDED 1690 # include <tuple> 1691 1692 # elif defined(__GNUC__) && (GTEST_GCC_VER_ >= 40000) 1693 // GCC 4.0+ implements tr1/tuple in the <tr1/tuple> header. This does 1694 // not conform to the TR1 spec, which requires the header to be <tuple>. 1695 1696 # if !GTEST_HAS_RTTI && GTEST_GCC_VER_ < 40302 1697 // Until version 4.3.2, gcc has a bug that causes <tr1/functional>, 1698 // which is #included by <tr1/tuple>, to not compile when RTTI is 1699 // disabled. _TR1_FUNCTIONAL is the header guard for 1700 // <tr1/functional>. Hence the following #define is a hack to prevent 1701 // <tr1/functional> from being included. 1702 # define _TR1_FUNCTIONAL 1 1703 # include <tr1/tuple> 1704 # undef _TR1_FUNCTIONAL // Allows the user to #include 1705 // <tr1/functional> if he chooses to. 1706 # else 1707 # include <tr1/tuple> // NOLINT 1708 # endif // !GTEST_HAS_RTTI && GTEST_GCC_VER_ < 40302 1709 1710 # else 1711 // If the compiler is not GCC 4.0+, we assume the user is using a 1712 // spec-conforming TR1 implementation. 1713 # include <tuple> // NOLINT 1714 # endif // GTEST_USE_OWN_TR1_TUPLE 1715 1716 #endif // GTEST_HAS_TR1_TUPLE 1717 1718 // Determines whether clone(2) is supported. 1719 // Usually it will only be available on Linux, excluding 1720 // Linux on the Itanium architecture. 1721 // Also see http://linux.die.net/man/2/clone. 1722 #ifndef GTEST_HAS_CLONE 1723 // The user didn't tell us, so we need to figure it out. 1724 1725 # if GTEST_OS_LINUX && !defined(__ia64__) 1726 # if GTEST_OS_LINUX_ANDROID 1727 // On Android, clone() is only available on ARM starting with Gingerbread. 1728 # if defined(__arm__) && __ANDROID_API__ >= 9 1729 # define GTEST_HAS_CLONE 1 1730 # else 1731 # define GTEST_HAS_CLONE 0 1732 # endif 1733 # else 1734 # define GTEST_HAS_CLONE 1 1735 # endif 1736 # else 1737 # define GTEST_HAS_CLONE 0 1738 # endif // GTEST_OS_LINUX && !defined(__ia64__) 1739 1740 #endif // GTEST_HAS_CLONE 1741 1742 // Determines whether to support stream redirection. This is used to test 1743 // output correctness and to implement death tests. 1744 #ifndef GTEST_HAS_STREAM_REDIRECTION 1745 // By default, we assume that stream redirection is supported on all 1746 // platforms except known mobile ones. 1747 # if GTEST_OS_WINDOWS_MOBILE || GTEST_OS_SYMBIAN 1748 # define GTEST_HAS_STREAM_REDIRECTION 0 1749 # else 1750 # define GTEST_HAS_STREAM_REDIRECTION 1 1751 # endif // !GTEST_OS_WINDOWS_MOBILE && !GTEST_OS_SYMBIAN 1752 #endif // GTEST_HAS_STREAM_REDIRECTION 1753 1754 // Determines whether to support death tests. 1755 // Google Test does not support death tests for VC 7.1 and earlier as 1756 // abort() in a VC 7.1 application compiled as GUI in debug config 1757 // pops up a dialog window that cannot be suppressed programmatically. 1758 #if (GTEST_OS_LINUX || GTEST_OS_CYGWIN || GTEST_OS_SOLARIS || \ 1759 (GTEST_OS_MAC && !GTEST_OS_IOS) || GTEST_OS_IOS_SIMULATOR || \ 1760 (GTEST_OS_WINDOWS_DESKTOP && _MSC_VER >= 1400) || \ 1761 GTEST_OS_WINDOWS_MINGW || GTEST_OS_AIX || GTEST_OS_HPUX || \ 1762 GTEST_OS_OPENBSD || GTEST_OS_QNX) 1763 # define GTEST_HAS_DEATH_TEST 1 1764 # include <vector> // NOLINT 1765 #endif 1766 1767 // We don't support MSVC 7.1 with exceptions disabled now. Therefore 1768 // all the compilers we care about are adequate for supporting 1769 // value-parameterized tests. 1770 #define GTEST_HAS_PARAM_TEST 1 1771 1772 // Determines whether to support type-driven tests. 1773 1774 // Typed tests need <typeinfo> and variadic macros, which GCC, VC++ 8.0, 1775 // Sun Pro CC, IBM Visual Age, and HP aCC support. 1776 #if defined(__GNUC__) || (_MSC_VER >= 1400) || defined(__SUNPRO_CC) || \ 1777 defined(__IBMCPP__) || defined(__HP_aCC) 1778 # define GTEST_HAS_TYPED_TEST 1 1779 # define GTEST_HAS_TYPED_TEST_P 1 1780 #endif 1781 1782 // Determines whether to support Combine(). This only makes sense when 1783 // value-parameterized tests are enabled. The implementation doesn't 1784 // work on Sun Studio since it doesn't understand templated conversion 1785 // operators. 1786 #if GTEST_HAS_PARAM_TEST && GTEST_HAS_TR1_TUPLE && !defined(__SUNPRO_CC) 1787 # define GTEST_HAS_COMBINE 1 1788 #endif 1789 1790 // Determines whether the system compiler uses UTF-16 for encoding wide strings. 1791 #define GTEST_WIDE_STRING_USES_UTF16_ \ 1792 (GTEST_OS_WINDOWS || GTEST_OS_CYGWIN || GTEST_OS_SYMBIAN || GTEST_OS_AIX) 1793 1794 // Determines whether test results can be streamed to a socket. 1795 #if GTEST_OS_LINUX 1796 # define GTEST_CAN_STREAM_RESULTS_ 1 1797 #endif 1798 1799 // Defines some utility macros. 1800 1801 // The GNU compiler emits a warning if nested "if" statements are followed by 1802 // an "else" statement and braces are not used to explicitly disambiguate the 1803 // "else" binding. This leads to problems with code like: 1804 // 1805 // if (gate) 1806 // ASSERT_*(condition) << "Some message"; 1807 // 1808 // The "switch (0) case 0:" idiom is used to suppress this. 1809 #ifdef __INTEL_COMPILER 1810 # define GTEST_AMBIGUOUS_ELSE_BLOCKER_ 1811 #else 1812 # define GTEST_AMBIGUOUS_ELSE_BLOCKER_ switch (0) case 0: default: // NOLINT 1813 #endif 1814 1815 // Use this annotation at the end of a struct/class definition to 1816 // prevent the compiler from optimizing away instances that are never 1817 // used. This is useful when all interesting logic happens inside the 1818 // c'tor and / or d'tor. Example: 1819 // 1820 // struct Foo { 1821 // Foo() { ... } 1822 // } GTEST_ATTRIBUTE_UNUSED_; 1823 // 1824 // Also use it after a variable or parameter declaration to tell the 1825 // compiler the variable/parameter does not have to be used. 1826 #if defined(__GNUC__) && !defined(COMPILER_ICC) 1827 # define GTEST_ATTRIBUTE_UNUSED_ __attribute__ ((unused)) 1828 #else 1829 # define GTEST_ATTRIBUTE_UNUSED_ 1830 #endif 1831 1832 // A macro to disallow operator= 1833 // This should be used in the private: declarations for a class. 1834 #define GTEST_DISALLOW_ASSIGN_(type)\ 1835 void operator=(type const &) 1836 1837 // A macro to disallow copy constructor and operator= 1838 // This should be used in the private: declarations for a class. 1839 #define GTEST_DISALLOW_COPY_AND_ASSIGN_(type)\ 1840 type(type const &); \ 1841 GTEST_DISALLOW_ASSIGN_(type) 1842 1843 // Tell the compiler to warn about unused return values for functions declared 1844 // with this macro. The macro should be used on function declarations 1845 // following the argument list: 1846 // 1847 // Sprocket* AllocateSprocket() GTEST_MUST_USE_RESULT_; 1848 #if defined(__GNUC__) && (GTEST_GCC_VER_ >= 30400) && !defined(COMPILER_ICC) 1849 # define GTEST_MUST_USE_RESULT_ __attribute__ ((warn_unused_result)) 1850 #else 1851 # define GTEST_MUST_USE_RESULT_ 1852 #endif // __GNUC__ && (GTEST_GCC_VER_ >= 30400) && !COMPILER_ICC 1853 1854 // Determine whether the compiler supports Microsoft's Structured Exception 1855 // Handling. This is supported by several Windows compilers but generally 1856 // does not exist on any other system. 1857 #ifndef GTEST_HAS_SEH 1858 // The user didn't tell us, so we need to figure it out. 1859 1860 # if defined(_MSC_VER) || defined(__BORLANDC__) 1861 // These two compilers are known to support SEH. 1862 # define GTEST_HAS_SEH 1 1863 # else 1864 // Assume no SEH. 1865 # define GTEST_HAS_SEH 0 1866 # endif 1867 1868 #endif // GTEST_HAS_SEH 1869 1870 #ifdef _MSC_VER 1871 1872 # if GTEST_LINKED_AS_SHARED_LIBRARY 1873 # define GTEST_API_ __declspec(dllimport) 1874 # elif GTEST_CREATE_SHARED_LIBRARY 1875 # define GTEST_API_ __declspec(dllexport) 1876 # endif 1877 1878 #endif // _MSC_VER 1879 1880 #ifndef GTEST_API_ 1881 # define GTEST_API_ 1882 #endif 1883 1884 #ifdef __GNUC__ 1885 // Ask the compiler to never inline a given function. 1886 # define GTEST_NO_INLINE_ __attribute__((noinline)) 1887 #else 1888 # define GTEST_NO_INLINE_ 1889 #endif 1890 1891 // _LIBCPP_VERSION is defined by the libc++ library from the LLVM project. 1892 #if defined(__GLIBCXX__) || defined(_LIBCPP_VERSION) 1893 # define GTEST_HAS_CXXABI_H_ 1 1894 #else 1895 # define GTEST_HAS_CXXABI_H_ 0 1896 #endif 1897 1898 namespace testing { 1899 1900 class Message; 1901 1902 namespace internal { 1903 1904 // A secret type that Google Test users don't know about. It has no 1905 // definition on purpose. Therefore it's impossible to create a 1906 // Secret object, which is what we want. 1907 class Secret; 1908 1909 // The GTEST_COMPILE_ASSERT_ macro can be used to verify that a compile time 1910 // expression is true. For example, you could use it to verify the 1911 // size of a static array: 1912 // 1913 // GTEST_COMPILE_ASSERT_(ARRAYSIZE(content_type_names) == CONTENT_NUM_TYPES, 1914 // content_type_names_incorrect_size); 1915 // 1916 // or to make sure a struct is smaller than a certain size: 1917 // 1918 // GTEST_COMPILE_ASSERT_(sizeof(foo) < 128, foo_too_large); 1919 // 1920 // The second argument to the macro is the name of the variable. If 1921 // the expression is false, most compilers will issue a warning/error 1922 // containing the name of the variable. 1923 1924 template <bool> 1925 struct CompileAssert { 1926 }; 1927 1928 #define GTEST_COMPILE_ASSERT_(expr, msg) \ 1929 typedef ::testing::internal::CompileAssert<(static_cast<bool>(expr))> \ 1930 msg[static_cast<bool>(expr) ? 1 : -1] GTEST_ATTRIBUTE_UNUSED_ 1931 1932 // Implementation details of GTEST_COMPILE_ASSERT_: 1933 // 1934 // - GTEST_COMPILE_ASSERT_ works by defining an array type that has -1 1935 // elements (and thus is invalid) when the expression is false. 1936 // 1937 // - The simpler definition 1938 // 1939 // #define GTEST_COMPILE_ASSERT_(expr, msg) typedef char msg[(expr) ? 1 : -1] 1940 // 1941 // does not work, as gcc supports variable-length arrays whose sizes 1942 // are determined at run-time (this is gcc's extension and not part 1943 // of the C++ standard). As a result, gcc fails to reject the 1944 // following code with the simple definition: 1945 // 1946 // int foo; 1947 // GTEST_COMPILE_ASSERT_(foo, msg); // not supposed to compile as foo is 1948 // // not a compile-time constant. 1949 // 1950 // - By using the type CompileAssert<(bool(expr))>, we ensures that 1951 // expr is a compile-time constant. (Template arguments must be 1952 // determined at compile-time.) 1953 // 1954 // - The outter parentheses in CompileAssert<(bool(expr))> are necessary 1955 // to work around a bug in gcc 3.4.4 and 4.0.1. If we had written 1956 // 1957 // CompileAssert<bool(expr)> 1958 // 1959 // instead, these compilers will refuse to compile 1960 // 1961 // GTEST_COMPILE_ASSERT_(5 > 0, some_message); 1962 // 1963 // (They seem to think the ">" in "5 > 0" marks the end of the 1964 // template argument list.) 1965 // 1966 // - The array size is (bool(expr) ? 1 : -1), instead of simply 1967 // 1968 // ((expr) ? 1 : -1). 1969 // 1970 // This is to avoid running into a bug in MS VC 7.1, which 1971 // causes ((0.0) ? 1 : -1) to incorrectly evaluate to 1. 1972 1973 // StaticAssertTypeEqHelper is used by StaticAssertTypeEq defined in gtest.h. 1974 // 1975 // This template is declared, but intentionally undefined. 1976 template <typename T1, typename T2> 1977 struct StaticAssertTypeEqHelper; 1978 1979 template <typename T> 1980 struct StaticAssertTypeEqHelper<T, T> {}; 1981 1982 #if GTEST_HAS_GLOBAL_STRING 1983 typedef ::string string; 1984 #else 1985 typedef ::std::string string; 1986 #endif // GTEST_HAS_GLOBAL_STRING 1987 1988 #if GTEST_HAS_GLOBAL_WSTRING 1989 typedef ::wstring wstring; 1990 #elif GTEST_HAS_STD_WSTRING 1991 typedef ::std::wstring wstring; 1992 #endif // GTEST_HAS_GLOBAL_WSTRING 1993 1994 // A helper for suppressing warnings on constant condition. It just 1995 // returns 'condition'. 1996 GTEST_API_ bool IsTrue(bool condition); 1997 1998 // Defines scoped_ptr. 1999 2000 // This implementation of scoped_ptr is PARTIAL - it only contains 2001 // enough stuff to satisfy Google Test's need. 2002 template <typename T> 2003 class scoped_ptr { 2004 public: 2005 typedef T element_type; 2006 2007 explicit scoped_ptr(T* p = NULL) : ptr_(p) {} 2008 ~scoped_ptr() { reset(); } 2009 2010 T& operator*() const { return *ptr_; } 2011 T* operator->() const { return ptr_; } 2012 T* get() const { return ptr_; } 2013 2014 T* release() { 2015 T* const ptr = ptr_; 2016 ptr_ = NULL; 2017 return ptr; 2018 } 2019 2020 void reset(T* p = NULL) { 2021 if (p != ptr_) { 2022 if (IsTrue(sizeof(T) > 0)) { // Makes sure T is a complete type. 2023 delete ptr_; 2024 } 2025 ptr_ = p; 2026 } 2027 } 2028 2029 private: 2030 T* ptr_; 2031 2032 GTEST_DISALLOW_COPY_AND_ASSIGN_(scoped_ptr); 2033 }; 2034 2035 // Defines RE. 2036 2037 // A simple C++ wrapper for <regex.h>. It uses the POSIX Extended 2038 // Regular Expression syntax. 2039 class GTEST_API_ RE { 2040 public: 2041 // A copy constructor is required by the Standard to initialize object 2042 // references from r-values. 2043 RE(const RE& other) { Init(other.pattern()); } 2044 2045 // Constructs an RE from a string. 2046 RE(const ::std::string& regex) { Init(regex.c_str()); } // NOLINT 2047 2048 #if GTEST_HAS_GLOBAL_STRING 2049 2050 RE(const ::string& regex) { Init(regex.c_str()); } // NOLINT 2051 2052 #endif // GTEST_HAS_GLOBAL_STRING 2053 2054 RE(const char* regex) { Init(regex); } // NOLINT 2055 ~RE(); 2056 2057 // Returns the string representation of the regex. 2058 const char* pattern() const { return pattern_; } 2059 2060 // FullMatch(str, re) returns true iff regular expression re matches 2061 // the entire str. 2062 // PartialMatch(str, re) returns true iff regular expression re 2063 // matches a substring of str (including str itself). 2064 // 2065 // TODO([email protected]): make FullMatch() and PartialMatch() work 2066 // when str contains NUL characters. 2067 static bool FullMatch(const ::std::string& str, const RE& re) { 2068 return FullMatch(str.c_str(), re); 2069 } 2070 static bool PartialMatch(const ::std::string& str, const RE& re) { 2071 return PartialMatch(str.c_str(), re); 2072 } 2073 2074 #if GTEST_HAS_GLOBAL_STRING 2075 2076 static bool FullMatch(const ::string& str, const RE& re) { 2077 return FullMatch(str.c_str(), re); 2078 } 2079 static bool PartialMatch(const ::string& str, const RE& re) { 2080 return PartialMatch(str.c_str(), re); 2081 } 2082 2083 #endif // GTEST_HAS_GLOBAL_STRING 2084 2085 static bool FullMatch(const char* str, const RE& re); 2086 static bool PartialMatch(const char* str, const RE& re); 2087 2088 private: 2089 void Init(const char* regex); 2090 2091 // We use a const char* instead of an std::string, as Google Test used to be 2092 // used where std::string is not available. TODO([email protected]): change to 2093 // std::string. 2094 const char* pattern_; 2095 bool is_valid_; 2096 2097 #if GTEST_USES_POSIX_RE 2098 2099 regex_t full_regex_; // For FullMatch(). 2100 regex_t partial_regex_; // For PartialMatch(). 2101 2102 #else // GTEST_USES_SIMPLE_RE 2103 2104 const char* full_pattern_; // For FullMatch(); 2105 2106 #endif 2107 2108 GTEST_DISALLOW_ASSIGN_(RE); 2109 }; 2110 2111 // Formats a source file path and a line number as they would appear 2112 // in an error message from the compiler used to compile this code. 2113 GTEST_API_::std::string FormatFileLocation(const char* file, int line); 2114 2115 // Formats a file location for compiler-independent XML output. 2116 // Although this function is not platform dependent, we put it next to 2117 // FormatFileLocation in order to contrast the two functions. 2118 GTEST_API_::std::string FormatCompilerIndependentFileLocation(const char* file, 2119 int line); 2120 2121 // Defines logging utilities: 2122 // GTEST_LOG_(severity) - logs messages at the specified severity level. The 2123 // message itself is streamed into the macro. 2124 // LogToStderr() - directs all log messages to stderr. 2125 // FlushInfoLog() - flushes informational log messages. 2126 2127 enum GTestLogSeverity { 2128 GTEST_INFO, 2129 GTEST_WARNING, 2130 GTEST_ERROR, 2131 GTEST_FATAL 2132 }; 2133 2134 // Formats log entry severity, provides a stream object for streaming the 2135 // log message, and terminates the message with a newline when going out of 2136 // scope. 2137 class GTEST_API_ GTestLog { 2138 public: 2139 GTestLog(GTestLogSeverity severity, const char* file, int line); 2140 2141 // Flushes the buffers and, if severity is GTEST_FATAL, aborts the program. 2142 ~GTestLog(); 2143 2144 ::std::ostream& GetStream() { return ::std::cerr; } 2145 2146 private: 2147 const GTestLogSeverity severity_; 2148 2149 GTEST_DISALLOW_COPY_AND_ASSIGN_(GTestLog); 2150 }; 2151 2152 #define GTEST_LOG_(severity) \ 2153 ::testing::internal::GTestLog(::testing::internal::GTEST_##severity, \ 2154 __FILE__, __LINE__).GetStream() 2155 2156 inline void LogToStderr() {} 2157 inline void FlushInfoLog() { fflush(NULL); } 2158 2159 // INTERNAL IMPLEMENTATION - DO NOT USE. 2160 // 2161 // GTEST_CHECK_ is an all-mode assert. It aborts the program if the condition 2162 // is not satisfied. 2163 // Synopsys: 2164 // GTEST_CHECK_(boolean_condition); 2165 // or 2166 // GTEST_CHECK_(boolean_condition) << "Additional message"; 2167 // 2168 // This checks the condition and if the condition is not satisfied 2169 // it prints message about the condition violation, including the 2170 // condition itself, plus additional message streamed into it, if any, 2171 // and then it aborts the program. It aborts the program irrespective of 2172 // whether it is built in the debug mode or not. 2173 #define GTEST_CHECK_(condition) \ 2174 GTEST_AMBIGUOUS_ELSE_BLOCKER_ \ 2175 if (::testing::internal::IsTrue(condition)) \ 2176 ; \ 2177 else \ 2178 GTEST_LOG_(FATAL) << "Condition " #condition " failed. " 2179 2180 // An all-mode assert to verify that the given POSIX-style function 2181 // call returns 0 (indicating success). Known limitation: this 2182 // doesn't expand to a balanced 'if' statement, so enclose the macro 2183 // in {} if you need to use it as the only statement in an 'if' 2184 // branch. 2185 #define GTEST_CHECK_POSIX_SUCCESS_(posix_call) \ 2186 if (const int gtest_error = (posix_call)) \ 2187 GTEST_LOG_(FATAL) << #posix_call << "failed with error " \ 2188 << gtest_error 2189 2190 // INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. 2191 // 2192 // Use ImplicitCast_ as a safe version of static_cast for upcasting in 2193 // the type hierarchy (e.g. casting a Foo* to a SuperclassOfFoo* or a 2194 // const Foo*). When you use ImplicitCast_, the compiler checks that 2195 // the cast is safe. Such explicit ImplicitCast_s are necessary in 2196 // surprisingly many situations where C++ demands an exact type match 2197 // instead of an argument type convertable to a target type. 2198 // 2199 // The syntax for using ImplicitCast_ is the same as for static_cast: 2200 // 2201 // ImplicitCast_<ToType>(expr) 2202 // 2203 // ImplicitCast_ would have been part of the C++ standard library, 2204 // but the proposal was submitted too late. It will probably make 2205 // its way into the language in the future. 2206 // 2207 // This relatively ugly name is intentional. It prevents clashes with 2208 // similar functions users may have (e.g., implicit_cast). The internal 2209 // namespace alone is not enough because the function can be found by ADL. 2210 template<typename To> 2211 inline To ImplicitCast_(To x) { return x; } 2212 2213 // When you upcast (that is, cast a pointer from type Foo to type 2214 // SuperclassOfFoo), it's fine to use ImplicitCast_<>, since upcasts 2215 // always succeed. When you downcast (that is, cast a pointer from 2216 // type Foo to type SubclassOfFoo), static_cast<> isn't safe, because 2217 // how do you know the pointer is really of type SubclassOfFoo? It 2218 // could be a bare Foo, or of type DifferentSubclassOfFoo. Thus, 2219 // when you downcast, you should use this macro. In debug mode, we 2220 // use dynamic_cast<> to double-check the downcast is legal (we die 2221 // if it's not). In normal mode, we do the efficient static_cast<> 2222 // instead. Thus, it's important to test in debug mode to make sure 2223 // the cast is legal! 2224 // This is the only place in the code we should use dynamic_cast<>. 2225 // In particular, you SHOULDN'T be using dynamic_cast<> in order to 2226 // do RTTI (eg code like this: 2227 // if (dynamic_cast<Subclass1>(foo)) HandleASubclass1Object(foo); 2228 // if (dynamic_cast<Subclass2>(foo)) HandleASubclass2Object(foo); 2229 // You should design the code some other way not to need this. 2230 // 2231 // This relatively ugly name is intentional. It prevents clashes with 2232 // similar functions users may have (e.g., down_cast). The internal 2233 // namespace alone is not enough because the function can be found by ADL. 2234 template<typename To, typename From> // use like this: DownCast_<T*>(foo); 2235 inline To DownCast_(From* f) { // so we only accept pointers 2236 // Ensures that To is a sub-type of From *. This test is here only 2237 // for compile-time type checking, and has no overhead in an 2238 // optimized build at run-time, as it will be optimized away 2239 // completely. 2240 if (false) { 2241 const To to = NULL; 2242 ::testing::internal::ImplicitCast_<From*>(to); 2243 } 2244 2245 #if GTEST_HAS_RTTI 2246 // RTTI: debug mode only! 2247 GTEST_CHECK_(f == NULL || dynamic_cast<To>(f) != NULL); 2248 #endif 2249 return static_cast<To>(f); 2250 } 2251 2252 // Downcasts the pointer of type Base to Derived. 2253 // Derived must be a subclass of Base. The parameter MUST 2254 // point to a class of type Derived, not any subclass of it. 2255 // When RTTI is available, the function performs a runtime 2256 // check to enforce this. 2257 template <class Derived, class Base> 2258 Derived* CheckedDowncastToActualType(Base* base) { 2259 #if GTEST_HAS_RTTI 2260 GTEST_CHECK_(typeid(*base) == typeid(Derived)); 2261 return dynamic_cast<Derived*>(base); // NOLINT 2262 #else 2263 return static_cast<Derived*>(base); // Poor man's downcast. 2264 #endif 2265 } 2266 2267 #if GTEST_HAS_STREAM_REDIRECTION 2268 2269 // Defines the stderr capturer: 2270 // CaptureStdout - starts capturing stdout. 2271 // GetCapturedStdout - stops capturing stdout and returns the captured string. 2272 // CaptureStderr - starts capturing stderr. 2273 // GetCapturedStderr - stops capturing stderr and returns the captured string. 2274 // 2275 GTEST_API_ void CaptureStdout(); 2276 GTEST_API_ std::string GetCapturedStdout(); 2277 GTEST_API_ void CaptureStderr(); 2278 GTEST_API_ std::string GetCapturedStderr(); 2279 2280 #endif // GTEST_HAS_STREAM_REDIRECTION 2281 2282 2283 #if GTEST_HAS_DEATH_TEST 2284 2285 const ::std::vector<testing::internal::string>& GetInjectableArgvs(); 2286 void SetInjectableArgvs(const ::std::vector<testing::internal::string>* 2287 new_argvs); 2288 2289 // A copy of all command line arguments. Set by InitGoogleTest(). 2290 extern ::std::vector<testing::internal::string> g_argvs; 2291 2292 #endif // GTEST_HAS_DEATH_TEST 2293 2294 // Defines synchronization primitives. 2295 2296 #if GTEST_HAS_PTHREAD 2297 2298 // Sleeps for (roughly) n milli-seconds. This function is only for 2299 // testing Google Test's own constructs. Don't use it in user tests, 2300 // either directly or indirectly. 2301 inline void SleepMilliseconds(int n) { 2302 const timespec time = { 2303 0, // 0 seconds. 2304 n * 1000L * 1000L, // And n ms. 2305 }; 2306 nanosleep(&time, NULL); 2307 } 2308 2309 // Allows a controller thread to pause execution of newly created 2310 // threads until notified. Instances of this class must be created 2311 // and destroyed in the controller thread. 2312 // 2313 // This class is only for testing Google Test's own constructs. Do not 2314 // use it in user tests, either directly or indirectly. 2315 class Notification { 2316 public: 2317 Notification() : notified_(false) { 2318 GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_init(&mutex_, NULL)); 2319 } 2320 ~Notification() { 2321 pthread_mutex_destroy(&mutex_); 2322 } 2323 2324 // Notifies all threads created with this notification to start. Must 2325 // be called from the controller thread. 2326 void Notify() { 2327 pthread_mutex_lock(&mutex_); 2328 notified_ = true; 2329 pthread_mutex_unlock(&mutex_); 2330 } 2331 2332 // Blocks until the controller thread notifies. Must be called from a test 2333 // thread. 2334 void WaitForNotification() { 2335 for (;;) { 2336 pthread_mutex_lock(&mutex_); 2337 const bool notified = notified_; 2338 pthread_mutex_unlock(&mutex_); 2339 if (notified) 2340 break; 2341 SleepMilliseconds(10); 2342 } 2343 } 2344 2345 private: 2346 pthread_mutex_t mutex_; 2347 bool notified_; 2348 2349 GTEST_DISALLOW_COPY_AND_ASSIGN_(Notification); 2350 }; 2351 2352 // As a C-function, ThreadFuncWithCLinkage cannot be templated itself. 2353 // Consequently, it cannot select a correct instantiation of ThreadWithParam 2354 // in order to call its Run(). Introducing ThreadWithParamBase as a 2355 // non-templated base class for ThreadWithParam allows us to bypass this 2356 // problem. 2357 class ThreadWithParamBase { 2358 public: 2359 virtual ~ThreadWithParamBase() {} 2360 virtual void Run() = 0; 2361 }; 2362 2363 // pthread_create() accepts a pointer to a function type with the C linkage. 2364 // According to the Standard (7.5/1), function types with different linkages 2365 // are different even if they are otherwise identical. Some compilers (for 2366 // example, SunStudio) treat them as different types. Since class methods 2367 // cannot be defined with C-linkage we need to define a free C-function to 2368 // pass into pthread_create(). 2369 extern "C" inline void* ThreadFuncWithCLinkage(void* thread) { 2370 static_cast<ThreadWithParamBase*>(thread)->Run(); 2371 return NULL; 2372 } 2373 2374 // Helper class for testing Google Test's multi-threading constructs. 2375 // To use it, write: 2376 // 2377 // void ThreadFunc(int param) { /* Do things with param */ } 2378 // Notification thread_can_start; 2379 // ... 2380 // // The thread_can_start parameter is optional; you can supply NULL. 2381 // ThreadWithParam<int> thread(&ThreadFunc, 5, &thread_can_start); 2382 // thread_can_start.Notify(); 2383 // 2384 // These classes are only for testing Google Test's own constructs. Do 2385 // not use them in user tests, either directly or indirectly. 2386 template <typename T> 2387 class ThreadWithParam : public ThreadWithParamBase { 2388 public: 2389 typedef void(*UserThreadFunc)(T); 2390 2391 ThreadWithParam( 2392 UserThreadFunc func, T param, Notification* thread_can_start) 2393 : func_(func), 2394 param_(param), 2395 thread_can_start_(thread_can_start), 2396 finished_(false) { 2397 ThreadWithParamBase* const base = this; 2398 // The thread can be created only after all fields except thread_ 2399 // have been initialized. 2400 GTEST_CHECK_POSIX_SUCCESS_( 2401 pthread_create(&thread_, 0, &ThreadFuncWithCLinkage, base)); 2402 } 2403 ~ThreadWithParam() { Join(); } 2404 2405 void Join() { 2406 if (!finished_) { 2407 GTEST_CHECK_POSIX_SUCCESS_(pthread_join(thread_, 0)); 2408 finished_ = true; 2409 } 2410 } 2411 2412 virtual void Run() { 2413 if (thread_can_start_ != NULL) 2414 thread_can_start_->WaitForNotification(); 2415 func_(param_); 2416 } 2417 2418 private: 2419 const UserThreadFunc func_; // User-supplied thread function. 2420 const T param_; // User-supplied parameter to the thread function. 2421 // When non-NULL, used to block execution until the controller thread 2422 // notifies. 2423 Notification* const thread_can_start_; 2424 bool finished_; // true iff we know that the thread function has finished. 2425 pthread_t thread_; // The native thread object. 2426 2427 GTEST_DISALLOW_COPY_AND_ASSIGN_(ThreadWithParam); 2428 }; 2429 2430 // MutexBase and Mutex implement mutex on pthreads-based platforms. They 2431 // are used in conjunction with class MutexLock: 2432 // 2433 // Mutex mutex; 2434 // ... 2435 // MutexLock lock(&mutex); // Acquires the mutex and releases it at the end 2436 // // of the current scope. 2437 // 2438 // MutexBase implements behavior for both statically and dynamically 2439 // allocated mutexes. Do not use MutexBase directly. Instead, write 2440 // the following to define a static mutex: 2441 // 2442 // GTEST_DEFINE_STATIC_MUTEX_(g_some_mutex); 2443 // 2444 // You can forward declare a static mutex like this: 2445 // 2446 // GTEST_DECLARE_STATIC_MUTEX_(g_some_mutex); 2447 // 2448 // To create a dynamic mutex, just define an object of type Mutex. 2449 class MutexBase { 2450 public: 2451 // Acquires this mutex. 2452 void Lock() { 2453 GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_lock(&mutex_)); 2454 owner_ = pthread_self(); 2455 has_owner_ = true; 2456 } 2457 2458 // Releases this mutex. 2459 void Unlock() { 2460 // Since the lock is being released the owner_ field should no longer be 2461 // considered valid. We don't protect writing to has_owner_ here, as it's 2462 // the caller's responsibility to ensure that the current thread holds the 2463 // mutex when this is called. 2464 has_owner_ = false; 2465 GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_unlock(&mutex_)); 2466 } 2467 2468 // Does nothing if the current thread holds the mutex. Otherwise, crashes 2469 // with high probability. 2470 void AssertHeld() const { 2471 GTEST_CHECK_(has_owner_ && pthread_equal(owner_, pthread_self())) 2472 << "The current thread is not holding the mutex @" << this; 2473 } 2474 2475 // A static mutex may be used before main() is entered. It may even 2476 // be used before the dynamic initialization stage. Therefore we 2477 // must be able to initialize a static mutex object at link time. 2478 // This means MutexBase has to be a POD and its member variables 2479 // have to be public. 2480 public: 2481 pthread_mutex_t mutex_; // The underlying pthread mutex. 2482 // has_owner_ indicates whether the owner_ field below contains a valid thread 2483 // ID and is therefore safe to inspect (e.g., to use in pthread_equal()). All 2484 // accesses to the owner_ field should be protected by a check of this field. 2485 // An alternative might be to memset() owner_ to all zeros, but there's no 2486 // guarantee that a zero'd pthread_t is necessarily invalid or even different 2487 // from pthread_self(). 2488 bool has_owner_; 2489 pthread_t owner_; // The thread holding the mutex. 2490 }; 2491 2492 // Forward-declares a static mutex. 2493 # define GTEST_DECLARE_STATIC_MUTEX_(mutex) \ 2494 extern ::testing::internal::MutexBase mutex 2495 2496 // Defines and statically (i.e. at link time) initializes a static mutex. 2497 // The initialization list here does not explicitly initialize each field, 2498 // instead relying on default initialization for the unspecified fields. In 2499 // particular, the owner_ field (a pthread_t) is not explicitly initialized. 2500 // This allows initialization to work whether pthread_t is a scalar or struct. 2501 // The flag -Wmissing-field-initializers must not be specified for this to work. 2502 # define GTEST_DEFINE_STATIC_MUTEX_(mutex) \ 2503 ::testing::internal::MutexBase mutex = { PTHREAD_MUTEX_INITIALIZER, false } 2504 2505 // The Mutex class can only be used for mutexes created at runtime. It 2506 // shares its API with MutexBase otherwise. 2507 class Mutex : public MutexBase { 2508 public: 2509 Mutex() { 2510 GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_init(&mutex_, NULL)); 2511 has_owner_ = false; 2512 } 2513 ~Mutex() { 2514 GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_destroy(&mutex_)); 2515 } 2516 2517 private: 2518 GTEST_DISALLOW_COPY_AND_ASSIGN_(Mutex); 2519 }; 2520 2521 // We cannot name this class MutexLock as the ctor declaration would 2522 // conflict with a macro named MutexLock, which is defined on some 2523 // platforms. Hence the typedef trick below. 2524 class GTestMutexLock { 2525 public: 2526 explicit GTestMutexLock(MutexBase* mutex) 2527 : mutex_(mutex) { 2528 mutex_->Lock(); 2529 } 2530 2531 ~GTestMutexLock() { mutex_->Unlock(); } 2532 2533 private: 2534 MutexBase* const mutex_; 2535 2536 GTEST_DISALLOW_COPY_AND_ASSIGN_(GTestMutexLock); 2537 }; 2538 2539 typedef GTestMutexLock MutexLock; 2540 2541 // Helpers for ThreadLocal. 2542 2543 // pthread_key_create() requires DeleteThreadLocalValue() to have 2544 // C-linkage. Therefore it cannot be templatized to access 2545 // ThreadLocal<T>. Hence the need for class 2546 // ThreadLocalValueHolderBase. 2547 class ThreadLocalValueHolderBase { 2548 public: 2549 virtual ~ThreadLocalValueHolderBase() {} 2550 }; 2551 2552 // Called by pthread to delete thread-local data stored by 2553 // pthread_setspecific(). 2554 extern "C" inline void DeleteThreadLocalValue(void* value_holder) { 2555 delete static_cast<ThreadLocalValueHolderBase*>(value_holder); 2556 } 2557 2558 // Implements thread-local storage on pthreads-based systems. 2559 // 2560 // // Thread 1 2561 // ThreadLocal<int> tl(100); // 100 is the default value for each thread. 2562 // 2563 // // Thread 2 2564 // tl.set(150); // Changes the value for thread 2 only. 2565 // EXPECT_EQ(150, tl.get()); 2566 // 2567 // // Thread 1 2568 // EXPECT_EQ(100, tl.get()); // In thread 1, tl has the original value. 2569 // tl.set(200); 2570 // EXPECT_EQ(200, tl.get()); 2571 // 2572 // The template type argument T must have a public copy constructor. 2573 // In addition, the default ThreadLocal constructor requires T to have 2574 // a public default constructor. 2575 // 2576 // An object managed for a thread by a ThreadLocal instance is deleted 2577 // when the thread exits. Or, if the ThreadLocal instance dies in 2578 // that thread, when the ThreadLocal dies. It's the user's 2579 // responsibility to ensure that all other threads using a ThreadLocal 2580 // have exited when it dies, or the per-thread objects for those 2581 // threads will not be deleted. 2582 // 2583 // Google Test only uses global ThreadLocal objects. That means they 2584 // will die after main() has returned. Therefore, no per-thread 2585 // object managed by Google Test will be leaked as long as all threads 2586 // using Google Test have exited when main() returns. 2587 template <typename T> 2588 class ThreadLocal { 2589 public: 2590 ThreadLocal() : key_(CreateKey()), 2591 default_() {} 2592 explicit ThreadLocal(const T& value) : key_(CreateKey()), 2593 default_(value) {} 2594 2595 ~ThreadLocal() { 2596 // Destroys the managed object for the current thread, if any. 2597 DeleteThreadLocalValue(pthread_getspecific(key_)); 2598 2599 // Releases resources associated with the key. This will *not* 2600 // delete managed objects for other threads. 2601 GTEST_CHECK_POSIX_SUCCESS_(pthread_key_delete(key_)); 2602 } 2603 2604 T* pointer() { return GetOrCreateValue(); } 2605 const T* pointer() const { return GetOrCreateValue(); } 2606 const T& get() const { return *pointer(); } 2607 void set(const T& value) { *pointer() = value; } 2608 2609 private: 2610 // Holds a value of type T. 2611 class ValueHolder : public ThreadLocalValueHolderBase { 2612 public: 2613 explicit ValueHolder(const T& value) : value_(value) {} 2614 2615 T* pointer() { return &value_; } 2616 2617 private: 2618 T value_; 2619 GTEST_DISALLOW_COPY_AND_ASSIGN_(ValueHolder); 2620 }; 2621 2622 static pthread_key_t CreateKey() { 2623 pthread_key_t key; 2624 // When a thread exits, DeleteThreadLocalValue() will be called on 2625 // the object managed for that thread. 2626 GTEST_CHECK_POSIX_SUCCESS_( 2627 pthread_key_create(&key, &DeleteThreadLocalValue)); 2628 return key; 2629 } 2630 2631 T* GetOrCreateValue() const { 2632 ThreadLocalValueHolderBase* const holder = 2633 static_cast<ThreadLocalValueHolderBase*>(pthread_getspecific(key_)); 2634 if (holder != NULL) { 2635 return CheckedDowncastToActualType<ValueHolder>(holder)->pointer(); 2636 } 2637 2638 ValueHolder* const new_holder = new ValueHolder(default_); 2639 ThreadLocalValueHolderBase* const holder_base = new_holder; 2640 GTEST_CHECK_POSIX_SUCCESS_(pthread_setspecific(key_, holder_base)); 2641 return new_holder->pointer(); 2642 } 2643 2644 // A key pthreads uses for looking up per-thread values. 2645 const pthread_key_t key_; 2646 const T default_; // The default value for each thread. 2647 2648 GTEST_DISALLOW_COPY_AND_ASSIGN_(ThreadLocal); 2649 }; 2650 2651 # define GTEST_IS_THREADSAFE 1 2652 2653 #else // GTEST_HAS_PTHREAD 2654 2655 // A dummy implementation of synchronization primitives (mutex, lock, 2656 // and thread-local variable). Necessary for compiling Google Test where 2657 // mutex is not supported - using Google Test in multiple threads is not 2658 // supported on such platforms. 2659 2660 class Mutex { 2661 public: 2662 Mutex() {} 2663 void Lock() {} 2664 void Unlock() {} 2665 void AssertHeld() const {} 2666 }; 2667 2668 # define GTEST_DECLARE_STATIC_MUTEX_(mutex) \ 2669 extern ::testing::internal::Mutex mutex 2670 2671 # define GTEST_DEFINE_STATIC_MUTEX_(mutex) ::testing::internal::Mutex mutex 2672 2673 class GTestMutexLock { 2674 public: 2675 explicit GTestMutexLock(Mutex*) {} // NOLINT 2676 }; 2677 2678 typedef GTestMutexLock MutexLock; 2679 2680 template <typename T> 2681 class ThreadLocal { 2682 public: 2683 ThreadLocal() : value_() {} 2684 explicit ThreadLocal(const T& value) : value_(value) {} 2685 T* pointer() { return &value_; } 2686 const T* pointer() const { return &value_; } 2687 const T& get() const { return value_; } 2688 void set(const T& value) { value_ = value; } 2689 private: 2690 T value_; 2691 }; 2692 2693 // The above synchronization primitives have dummy implementations. 2694 // Therefore Google Test is not thread-safe. 2695 # define GTEST_IS_THREADSAFE 0 2696 2697 #endif // GTEST_HAS_PTHREAD 2698 2699 // Returns the number of threads running in the process, or 0 to indicate that 2700 // we cannot detect it. 2701 GTEST_API_ size_t GetThreadCount(); 2702 2703 // Passing non-POD classes through ellipsis (...) crashes the ARM 2704 // compiler and generates a warning in Sun Studio. The Nokia Symbian 2705 // and the IBM XL C/C++ compiler try to instantiate a copy constructor 2706 // for objects passed through ellipsis (...), failing for uncopyable 2707 // objects. We define this to ensure that only POD is passed through 2708 // ellipsis on these systems. 2709 #if defined(__SYMBIAN32__) || defined(__IBMCPP__) || defined(__SUNPRO_CC) 2710 // We lose support for NULL detection where the compiler doesn't like 2711 // passing non-POD classes through ellipsis (...). 2712 # define GTEST_ELLIPSIS_NEEDS_POD_ 1 2713 #else 2714 # define GTEST_CAN_COMPARE_NULL 1 2715 #endif 2716 2717 // The Nokia Symbian and IBM XL C/C++ compilers cannot decide between 2718 // const T& and const T* in a function template. These compilers 2719 // _can_ decide between class template specializations for T and T*, 2720 // so a tr1::type_traits-like is_pointer works. 2721 #if defined(__SYMBIAN32__) || defined(__IBMCPP__) 2722 # define GTEST_NEEDS_IS_POINTER_ 1 2723 #endif 2724 2725 template <bool bool_value> 2726 struct bool_constant { 2727 typedef bool_constant<bool_value> type; 2728 static const bool value = bool_value; 2729 }; 2730 template <bool bool_value> const bool bool_constant<bool_value>::value; 2731 2732 typedef bool_constant<false> false_type; 2733 typedef bool_constant<true> true_type; 2734 2735 template <typename T> 2736 struct is_pointer : public false_type {}; 2737 2738 template <typename T> 2739 struct is_pointer<T*> : public true_type{}; 2740 2741 template <typename Iterator> 2742 struct IteratorTraits { 2743 typedef typename Iterator::value_type value_type; 2744 }; 2745 2746 template <typename T> 2747 struct IteratorTraits<T*> { 2748 typedef T value_type; 2749 }; 2750 2751 template <typename T> 2752 struct IteratorTraits<const T*> { 2753 typedef T value_type; 2754 }; 2755 2756 #if GTEST_OS_WINDOWS 2757 # define GTEST_PATH_SEP_ "\\" 2758 # define GTEST_HAS_ALT_PATH_SEP_ 1 2759 // The biggest signed integer type the compiler supports. 2760 typedef __int64 BiggestInt; 2761 #else 2762 # define GTEST_PATH_SEP_ "/" 2763 # define GTEST_HAS_ALT_PATH_SEP_ 0 2764 typedef long long BiggestInt; // NOLINT 2765 #endif // GTEST_OS_WINDOWS 2766 2767 // Utilities for char. 2768 2769 // isspace(int ch) and friends accept an unsigned char or EOF. char 2770 // may be signed, depending on the compiler (or compiler flags). 2771 // Therefore we need to cast a char to unsigned char before calling 2772 // isspace(), etc. 2773 2774 inline bool IsAlpha(char ch) { 2775 return isalpha(static_cast<unsigned char>(ch)) != 0; 2776 } 2777 inline bool IsAlNum(char ch) { 2778 return isalnum(static_cast<unsigned char>(ch)) != 0; 2779 } 2780 inline bool IsDigit(char ch) { 2781 return isdigit(static_cast<unsigned char>(ch)) != 0; 2782 } 2783 inline bool IsLower(char ch) { 2784 return islower(static_cast<unsigned char>(ch)) != 0; 2785 } 2786 inline bool IsSpace(char ch) { 2787 return isspace(static_cast<unsigned char>(ch)) != 0; 2788 } 2789 inline bool IsUpper(char ch) { 2790 return isupper(static_cast<unsigned char>(ch)) != 0; 2791 } 2792 inline bool IsXDigit(char ch) { 2793 return isxdigit(static_cast<unsigned char>(ch)) != 0; 2794 } 2795 inline bool IsXDigit(wchar_t ch) { 2796 const unsigned char low_byte = static_cast<unsigned char>(ch); 2797 return ch == low_byte && isxdigit(low_byte) != 0; 2798 } 2799 2800 inline char ToLower(char ch) { 2801 return static_cast<char>(tolower(static_cast<unsigned char>(ch))); 2802 } 2803 inline char ToUpper(char ch) { 2804 return static_cast<char>(toupper(static_cast<unsigned char>(ch))); 2805 } 2806 2807 // The testing::internal::posix namespace holds wrappers for common 2808 // POSIX functions. These wrappers hide the differences between 2809 // Windows/MSVC and POSIX systems. Since some compilers define these 2810 // standard functions as macros, the wrapper cannot have the same name 2811 // as the wrapped function. 2812 2813 namespace posix { 2814 2815 // Functions with a different name on Windows. 2816 2817 #if GTEST_OS_WINDOWS 2818 2819 typedef struct _stat StatStruct; 2820 2821 # ifdef __BORLANDC__ 2822 inline int IsATTY(int fd) { return isatty(fd); } 2823 inline int StrCaseCmp(const char* s1, const char* s2) { 2824 return stricmp(s1, s2); 2825 } 2826 inline char* StrDup(const char* src) { return strdup(src); } 2827 # else // !__BORLANDC__ 2828 # if GTEST_OS_WINDOWS_MOBILE 2829 inline int IsATTY(int /* fd */) { return 0; } 2830 # else 2831 inline int IsATTY(int fd) { return _isatty(fd); } 2832 # endif // GTEST_OS_WINDOWS_MOBILE 2833 inline int StrCaseCmp(const char* s1, const char* s2) { 2834 return _stricmp(s1, s2); 2835 } 2836 inline char* StrDup(const char* src) { return _strdup(src); } 2837 # endif // __BORLANDC__ 2838 2839 # if GTEST_OS_WINDOWS_MOBILE 2840 inline int FileNo(FILE* file) { return reinterpret_cast<int>(_fileno(file)); } 2841 // Stat(), RmDir(), and IsDir() are not needed on Windows CE at this 2842 // time and thus not defined there. 2843 # else 2844 inline int FileNo(FILE* file) { return _fileno(file); } 2845 inline int Stat(const char* path, StatStruct* buf) { return _stat(path, buf); } 2846 inline int RmDir(const char* dir) { return _rmdir(dir); } 2847 inline bool IsDir(const StatStruct& st) { 2848 return (_S_IFDIR & st.st_mode) != 0; 2849 } 2850 # endif // GTEST_OS_WINDOWS_MOBILE 2851 2852 #else 2853 2854 typedef struct stat StatStruct; 2855 2856 inline int FileNo(FILE* file) { return fileno(file); } 2857 inline int IsATTY(int fd) { return isatty(fd); } 2858 inline int Stat(const char* path, StatStruct* buf) { return stat(path, buf); } 2859 inline int StrCaseCmp(const char* s1, const char* s2) { 2860 return strcasecmp(s1, s2); 2861 } 2862 inline char* StrDup(const char* src) { return strdup(src); } 2863 inline int RmDir(const char* dir) { return rmdir(dir); } 2864 inline bool IsDir(const StatStruct& st) { return S_ISDIR(st.st_mode); } 2865 2866 #endif // GTEST_OS_WINDOWS 2867 2868 // Functions deprecated by MSVC 8.0. 2869 2870 #ifdef _MSC_VER 2871 // Temporarily disable warning 4996 (deprecated function). 2872 # pragma warning(push) 2873 # pragma warning(disable:4996) 2874 #endif 2875 2876 inline const char* StrNCpy(char* dest, const char* src, size_t n) { 2877 return strncpy(dest, src, n); 2878 } 2879 2880 // ChDir(), FReopen(), FDOpen(), Read(), Write(), Close(), and 2881 // StrError() aren't needed on Windows CE at this time and thus not 2882 // defined there. 2883 2884 #if !GTEST_OS_WINDOWS_MOBILE 2885 inline int ChDir(const char* dir) { return chdir(dir); } 2886 #endif 2887 inline FILE* FOpen(const char* path, const char* mode) { 2888 return fopen(path, mode); 2889 } 2890 #if !GTEST_OS_WINDOWS_MOBILE 2891 inline FILE *FReopen(const char* path, const char* mode, FILE* stream) { 2892 return freopen(path, mode, stream); 2893 } 2894 inline FILE* FDOpen(int fd, const char* mode) { return fdopen(fd, mode); } 2895 #endif 2896 inline int FClose(FILE* fp) { return fclose(fp); } 2897 #if !GTEST_OS_WINDOWS_MOBILE 2898 inline int Read(int fd, void* buf, unsigned int count) { 2899 return static_cast<int>(read(fd, buf, count)); 2900 } 2901 inline int Write(int fd, const void* buf, unsigned int count) { 2902 return static_cast<int>(write(fd, buf, count)); 2903 } 2904 inline int Close(int fd) { return close(fd); } 2905 inline const char* StrError(int errnum) { return strerror(errnum); } 2906 #endif 2907 inline const char* GetEnv(const char* name) { 2908 #if GTEST_OS_WINDOWS_MOBILE 2909 // We are on Windows CE, which has no environment variables. 2910 return NULL; 2911 #elif defined(__BORLANDC__) || defined(__SunOS_5_8) || defined(__SunOS_5_9) 2912 // Environment variables which we programmatically clear will be set to the 2913 // empty string rather than unset (NULL). Handle that case. 2914 const char* const env = getenv(name); 2915 return (env != NULL && env[0] != '\0') ? env : NULL; 2916 #else 2917 return getenv(name); 2918 #endif 2919 } 2920 2921 #ifdef _MSC_VER 2922 # pragma warning(pop) // Restores the warning state. 2923 #endif 2924 2925 #if GTEST_OS_WINDOWS_MOBILE 2926 // Windows CE has no C library. The abort() function is used in 2927 // several places in Google Test. This implementation provides a reasonable 2928 // imitation of standard behaviour. 2929 void Abort(); 2930 #else 2931 inline void Abort() { abort(); } 2932 #endif // GTEST_OS_WINDOWS_MOBILE 2933 2934 } // namespace posix 2935 2936 // MSVC "deprecates" snprintf and issues warnings wherever it is used. In 2937 // order to avoid these warnings, we need to use _snprintf or _snprintf_s on 2938 // MSVC-based platforms. We map the GTEST_SNPRINTF_ macro to the appropriate 2939 // function in order to achieve that. We use macro definition here because 2940 // snprintf is a variadic function. 2941 #if _MSC_VER >= 1400 && !GTEST_OS_WINDOWS_MOBILE 2942 // MSVC 2005 and above support variadic macros. 2943 # define GTEST_SNPRINTF_(buffer, size, format, ...) \ 2944 _snprintf_s(buffer, size, size, format, __VA_ARGS__) 2945 #elif defined(_MSC_VER) 2946 // Windows CE does not define _snprintf_s and MSVC prior to 2005 doesn't 2947 // complain about _snprintf. 2948 # define GTEST_SNPRINTF_ _snprintf 2949 #else 2950 # define GTEST_SNPRINTF_ snprintf 2951 #endif 2952 2953 // The maximum number a BiggestInt can represent. This definition 2954 // works no matter BiggestInt is represented in one's complement or 2955 // two's complement. 2956 // 2957 // We cannot rely on numeric_limits in STL, as __int64 and long long 2958 // are not part of standard C++ and numeric_limits doesn't need to be 2959 // defined for them. 2960 const BiggestInt kMaxBiggestInt = 2961 ~(static_cast<BiggestInt>(1) << (8 * sizeof(BiggestInt)-1)); 2962 2963 // This template class serves as a compile-time function from size to 2964 // type. It maps a size in bytes to a primitive type with that 2965 // size. e.g. 2966 // 2967 // TypeWithSize<4>::UInt 2968 // 2969 // is typedef-ed to be unsigned int (unsigned integer made up of 4 2970 // bytes). 2971 // 2972 // Such functionality should belong to STL, but I cannot find it 2973 // there. 2974 // 2975 // Google Test uses this class in the implementation of floating-point 2976 // comparison. 2977 // 2978 // For now it only handles UInt (unsigned int) as that's all Google Test 2979 // needs. Other types can be easily added in the future if need 2980 // arises. 2981 template <size_t size> 2982 class TypeWithSize { 2983 public: 2984 // This prevents the user from using TypeWithSize<N> with incorrect 2985 // values of N. 2986 typedef void UInt; 2987 }; 2988 2989 // The specialization for size 4. 2990 template <> 2991 class TypeWithSize<4> { 2992 public: 2993 // unsigned int has size 4 in both gcc and MSVC. 2994 // 2995 // As base/basictypes.h doesn't compile on Windows, we cannot use 2996 // uint32, uint64, and etc here. 2997 typedef int Int; 2998 typedef unsigned int UInt; 2999 }; 3000 3001 // The specialization for size 8. 3002 template <> 3003 class TypeWithSize<8> { 3004 public: 3005 #if GTEST_OS_WINDOWS 3006 typedef __int64 Int; 3007 typedef unsigned __int64 UInt; 3008 #else 3009 typedef long long Int; // NOLINT 3010 typedef unsigned long long UInt; // NOLINT 3011 #endif // GTEST_OS_WINDOWS 3012 }; 3013 3014 // Integer types of known sizes. 3015 typedef TypeWithSize<4>::Int Int32; 3016 typedef TypeWithSize<4>::UInt UInt32; 3017 typedef TypeWithSize<8>::Int Int64; 3018 typedef TypeWithSize<8>::UInt UInt64; 3019 typedef TypeWithSize<8>::Int TimeInMillis; // Represents time in milliseconds. 3020 3021 // Utilities for command line flags and environment variables. 3022 3023 // Macro for referencing flags. 3024 #define GTEST_FLAG(name) FLAGS_gtest_##name 3025 3026 // Macros for declaring flags. 3027 #define GTEST_DECLARE_bool_(name) GTEST_API_ extern bool GTEST_FLAG(name) 3028 #define GTEST_DECLARE_int32_(name) \ 3029 GTEST_API_ extern ::testing::internal::Int32 GTEST_FLAG(name) 3030 #define GTEST_DECLARE_string_(name) \ 3031 GTEST_API_ extern ::std::string GTEST_FLAG(name) 3032 3033 // Macros for defining flags. 3034 #define GTEST_DEFINE_bool_(name, default_val, doc) \ 3035 GTEST_API_ bool GTEST_FLAG(name) = (default_val) 3036 #define GTEST_DEFINE_int32_(name, default_val, doc) \ 3037 GTEST_API_::testing::internal::Int32 GTEST_FLAG(name) = (default_val) 3038 #define GTEST_DEFINE_string_(name, default_val, doc) \ 3039 GTEST_API_::std::string GTEST_FLAG(name) = (default_val) 3040 3041 // Thread annotations 3042 #define GTEST_EXCLUSIVE_LOCK_REQUIRED_(locks) 3043 #define GTEST_LOCK_EXCLUDED_(locks) 3044 3045 // Parses 'str' for a 32-bit signed integer. If successful, writes the result 3046 // to *value and returns true; otherwise leaves *value unchanged and returns 3047 // false. 3048 // TODO(chandlerc): Find a better way to refactor flag and environment parsing 3049 // out of both gtest-port.cc and gtest.cc to avoid exporting this utility 3050 // function. 3051 bool ParseInt32(const Message& src_text, const char* str, Int32* value); 3052 3053 // Parses a bool/Int32/string from the environment variable 3054 // corresponding to the given Google Test flag. 3055 bool BoolFromGTestEnv(const char* flag, bool default_val); 3056 GTEST_API_ Int32 Int32FromGTestEnv(const char* flag, Int32 default_val); 3057 const char* StringFromGTestEnv(const char* flag, const char* default_val); 3058 3059 } // namespace internal 3060 } // namespace testing 3061 3062 #endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_H_ 3063 3064 #if GTEST_OS_LINUX 3065 # include <stdlib.h> 3066 # include <sys/types.h> 3067 # include <sys/wait.h> 3068 # include <unistd.h> 3069 #endif // GTEST_OS_LINUX 3070 3071 #if GTEST_HAS_EXCEPTIONS 3072 # include <stdexcept> 3073 #endif 3074 3075 #include <ctype.h> 3076 #include <float.h> 3077 #include <string.h> 3078 #include <iomanip> 3079 #include <limits> 3080 #include <set> 3081 3082 // Copyright 2005, Google Inc. 3083 // All rights reserved. 3084 // 3085 // Redistribution and use in source and binary forms, with or without 3086 // modification, are permitted provided that the following conditions are 3087 // met: 3088 // 3089 // * Redistributions of source code must retain the above copyright 3090 // notice, this list of conditions and the following disclaimer. 3091 // * Redistributions in binary form must reproduce the above 3092 // copyright notice, this list of conditions and the following disclaimer 3093 // in the documentation and/or other materials provided with the 3094 // distribution. 3095 // * Neither the name of Google Inc. nor the names of its 3096 // contributors may be used to endorse or promote products derived from 3097 // this software without specific prior written permission. 3098 // 3099 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 3100 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 3101 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 3102 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 3103 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 3104 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 3105 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 3106 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 3107 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 3108 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 3109 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 3110 // 3111 // Author: [email protected] (Zhanyong Wan) 3112 // 3113 // The Google C++ Testing Framework (Google Test) 3114 // 3115 // This header file defines the Message class. 3116 // 3117 // IMPORTANT NOTE: Due to limitation of the C++ language, we have to 3118 // leave some internal implementation details in this header file. 3119 // They are clearly marked by comments like this: 3120 // 3121 // // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. 3122 // 3123 // Such code is NOT meant to be used by a user directly, and is subject 3124 // to CHANGE WITHOUT NOTICE. Therefore DO NOT DEPEND ON IT in a user 3125 // program! 3126 3127 #ifndef GTEST_INCLUDE_GTEST_GTEST_MESSAGE_H_ 3128 #define GTEST_INCLUDE_GTEST_GTEST_MESSAGE_H_ 3129 3130 #include <limits> 3131 3132 3133 // Ensures that there is at least one operator<< in the global namespace. 3134 // See Message& operator<<(...) below for why. 3135 void operator<<(const testing::internal::Secret&, int); 3136 3137 namespace testing { 3138 3139 // The Message class works like an ostream repeater. 3140 // 3141 // Typical usage: 3142 // 3143 // 1. You stream a bunch of values to a Message object. 3144 // It will remember the text in a stringstream. 3145 // 2. Then you stream the Message object to an ostream. 3146 // This causes the text in the Message to be streamed 3147 // to the ostream. 3148 // 3149 // For example; 3150 // 3151 // testing::Message foo; 3152 // foo << 1 << " != " << 2; 3153 // std::cout << foo; 3154 // 3155 // will print "1 != 2". 3156 // 3157 // Message is not intended to be inherited from. In particular, its 3158 // destructor is not virtual. 3159 // 3160 // Note that stringstream behaves differently in gcc and in MSVC. You 3161 // can stream a NULL char pointer to it in the former, but not in the 3162 // latter (it causes an access violation if you do). The Message 3163 // class hides this difference by treating a NULL char pointer as 3164 // "(null)". 3165 class GTEST_API_ Message { 3166 private: 3167 // The type of basic IO manipulators (endl, ends, and flush) for 3168 // narrow streams. 3169 typedef std::ostream& (*BasicNarrowIoManip)(std::ostream&); 3170 3171 public: 3172 // Constructs an empty Message. 3173 Message(); 3174 3175 // Copy constructor. 3176 Message(const Message& msg) : ss_(new ::std::stringstream) { // NOLINT 3177 *ss_ << msg.GetString(); 3178 } 3179 3180 // Constructs a Message from a C-string. 3181 explicit Message(const char* str) : ss_(new ::std::stringstream) { 3182 *ss_ << str; 3183 } 3184 3185 #if GTEST_OS_SYMBIAN 3186 // Streams a value (either a pointer or not) to this object. 3187 template <typename T> 3188 inline Message& operator <<(const T& value) { 3189 StreamHelper(typename internal::is_pointer<T>::type(), value); 3190 return *this; 3191 } 3192 #else 3193 // Streams a non-pointer value to this object. 3194 template <typename T> 3195 inline Message& operator <<(const T& val) { 3196 // Some libraries overload << for STL containers. These 3197 // overloads are defined in the global namespace instead of ::std. 3198 // 3199 // C++'s symbol lookup rule (i.e. Koenig lookup) says that these 3200 // overloads are visible in either the std namespace or the global 3201 // namespace, but not other namespaces, including the testing 3202 // namespace which Google Test's Message class is in. 3203 // 3204 // To allow STL containers (and other types that has a << operator 3205 // defined in the global namespace) to be used in Google Test 3206 // assertions, testing::Message must access the custom << operator 3207 // from the global namespace. With this using declaration, 3208 // overloads of << defined in the global namespace and those 3209 // visible via Koenig lookup are both exposed in this function. 3210 using ::operator <<; 3211 *ss_ << val; 3212 return *this; 3213 } 3214 3215 // Streams a pointer value to this object. 3216 // 3217 // This function is an overload of the previous one. When you 3218 // stream a pointer to a Message, this definition will be used as it 3219 // is more specialized. (The C++ Standard, section 3220 // [temp.func.order].) If you stream a non-pointer, then the 3221 // previous definition will be used. 3222 // 3223 // The reason for this overload is that streaming a NULL pointer to 3224 // ostream is undefined behavior. Depending on the compiler, you 3225 // may get "0", "(nil)", "(null)", or an access violation. To 3226 // ensure consistent result across compilers, we always treat NULL 3227 // as "(null)". 3228 template <typename T> 3229 inline Message& operator <<(T* const& pointer) { // NOLINT 3230 if (pointer == NULL) { 3231 *ss_ << "(null)"; 3232 } 3233 else { 3234 *ss_ << pointer; 3235 } 3236 return *this; 3237 } 3238 #endif // GTEST_OS_SYMBIAN 3239 3240 // Since the basic IO manipulators are overloaded for both narrow 3241 // and wide streams, we have to provide this specialized definition 3242 // of operator <<, even though its body is the same as the 3243 // templatized version above. Without this definition, streaming 3244 // endl or other basic IO manipulators to Message will confuse the 3245 // compiler. 3246 Message& operator <<(BasicNarrowIoManip val) { 3247 *ss_ << val; 3248 return *this; 3249 } 3250 3251 // Instead of 1/0, we want to see true/false for bool values. 3252 Message& operator <<(bool b) { 3253 return *this << (b ? "true" : "false"); 3254 } 3255 3256 // These two overloads allow streaming a wide C string to a Message 3257 // using the UTF-8 encoding. 3258 Message& operator <<(const wchar_t* wide_c_str); 3259 Message& operator <<(wchar_t* wide_c_str); 3260 3261 #if GTEST_HAS_STD_WSTRING 3262 // Converts the given wide string to a narrow string using the UTF-8 3263 // encoding, and streams the result to this Message object. 3264 Message& operator <<(const ::std::wstring& wstr); 3265 #endif // GTEST_HAS_STD_WSTRING 3266 3267 #if GTEST_HAS_GLOBAL_WSTRING 3268 // Converts the given wide string to a narrow string using the UTF-8 3269 // encoding, and streams the result to this Message object. 3270 Message& operator <<(const ::wstring& wstr); 3271 #endif // GTEST_HAS_GLOBAL_WSTRING 3272 3273 // Gets the text streamed to this object so far as an std::string. 3274 // Each '\0' character in the buffer is replaced with "\\0". 3275 // 3276 // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. 3277 std::string GetString() const; 3278 3279 private: 3280 3281 #if GTEST_OS_SYMBIAN 3282 // These are needed as the Nokia Symbian Compiler cannot decide between 3283 // const T& and const T* in a function template. The Nokia compiler _can_ 3284 // decide between class template specializations for T and T*, so a 3285 // tr1::type_traits-like is_pointer works, and we can overload on that. 3286 template <typename T> 3287 inline void StreamHelper(internal::true_type /*is_pointer*/, T* pointer) { 3288 if (pointer == NULL) { 3289 *ss_ << "(null)"; 3290 } 3291 else { 3292 *ss_ << pointer; 3293 } 3294 } 3295 template <typename T> 3296 inline void StreamHelper(internal::false_type /*is_pointer*/, 3297 const T& value) { 3298 // See the comments in Message& operator <<(const T&) above for why 3299 // we need this using statement. 3300 using ::operator <<; 3301 *ss_ << value; 3302 } 3303 #endif // GTEST_OS_SYMBIAN 3304 3305 // We'll hold the text streamed to this object here. 3306 const internal::scoped_ptr< ::std::stringstream> ss_; 3307 3308 // We declare (but don't implement) this to prevent the compiler 3309 // from implementing the assignment operator. 3310 void operator=(const Message&); 3311 }; 3312 3313 // Streams a Message to an ostream. 3314 inline std::ostream& operator <<(std::ostream& os, const Message& sb) { 3315 return os << sb.GetString(); 3316 } 3317 3318 namespace internal { 3319 3320 // Converts a streamable value to an std::string. A NULL pointer is 3321 // converted to "(null)". When the input value is a ::string, 3322 // ::std::string, ::wstring, or ::std::wstring object, each NUL 3323 // character in it is replaced with "\\0". 3324 template <typename T> 3325 std::string StreamableToString(const T& streamable) { 3326 return (Message() << streamable).GetString(); 3327 } 3328 3329 } // namespace internal 3330 } // namespace testing 3331 3332 #endif // GTEST_INCLUDE_GTEST_GTEST_MESSAGE_H_ 3333 // Copyright 2005, Google Inc. 3334 // All rights reserved. 3335 // 3336 // Redistribution and use in source and binary forms, with or without 3337 // modification, are permitted provided that the following conditions are 3338 // met: 3339 // 3340 // * Redistributions of source code must retain the above copyright 3341 // notice, this list of conditions and the following disclaimer. 3342 // * Redistributions in binary form must reproduce the above 3343 // copyright notice, this list of conditions and the following disclaimer 3344 // in the documentation and/or other materials provided with the 3345 // distribution. 3346 // * Neither the name of Google Inc. nor the names of its 3347 // contributors may be used to endorse or promote products derived from 3348 // this software without specific prior written permission. 3349 // 3350 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 3351 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 3352 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 3353 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 3354 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 3355 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 3356 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 3357 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 3358 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 3359 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 3360 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 3361 // 3362 // Authors: [email protected] (Zhanyong Wan), [email protected] (Sean Mcafee) 3363 // 3364 // The Google C++ Testing Framework (Google Test) 3365 // 3366 // This header file declares the String class and functions used internally by 3367 // Google Test. They are subject to change without notice. They should not used 3368 // by code external to Google Test. 3369 // 3370 // This header file is #included by <gtest/internal/gtest-internal.h>. 3371 // It should not be #included by other files. 3372 3373 #ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_STRING_H_ 3374 #define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_STRING_H_ 3375 3376 #ifdef __BORLANDC__ 3377 // string.h is not guaranteed to provide strcpy on C++ Builder. 3378 # include <mem.h> 3379 #endif 3380 3381 #include <string.h> 3382 #include <string> 3383 3384 3385 namespace testing { 3386 namespace internal { 3387 3388 // String - an abstract class holding static string utilities. 3389 class GTEST_API_ String { 3390 public: 3391 // Static utility methods 3392 3393 // Clones a 0-terminated C string, allocating memory using new. The 3394 // caller is responsible for deleting the return value using 3395 // delete[]. Returns the cloned string, or NULL if the input is 3396 // NULL. 3397 // 3398 // This is different from strdup() in string.h, which allocates 3399 // memory using malloc(). 3400 static const char* CloneCString(const char* c_str); 3401 3402 #if GTEST_OS_WINDOWS_MOBILE 3403 // Windows CE does not have the 'ANSI' versions of Win32 APIs. To be 3404 // able to pass strings to Win32 APIs on CE we need to convert them 3405 // to 'Unicode', UTF-16. 3406 3407 // Creates a UTF-16 wide string from the given ANSI string, allocating 3408 // memory using new. The caller is responsible for deleting the return 3409 // value using delete[]. Returns the wide string, or NULL if the 3410 // input is NULL. 3411 // 3412 // The wide string is created using the ANSI codepage (CP_ACP) to 3413 // match the behaviour of the ANSI versions of Win32 calls and the 3414 // C runtime. 3415 static LPCWSTR AnsiToUtf16(const char* c_str); 3416 3417 // Creates an ANSI string from the given wide string, allocating 3418 // memory using new. The caller is responsible for deleting the return 3419 // value using delete[]. Returns the ANSI string, or NULL if the 3420 // input is NULL. 3421 // 3422 // The returned string is created using the ANSI codepage (CP_ACP) to 3423 // match the behaviour of the ANSI versions of Win32 calls and the 3424 // C runtime. 3425 static const char* Utf16ToAnsi(LPCWSTR utf16_str); 3426 #endif 3427 3428 // Compares two C strings. Returns true iff they have the same content. 3429 // 3430 // Unlike strcmp(), this function can handle NULL argument(s). A 3431 // NULL C string is considered different to any non-NULL C string, 3432 // including the empty string. 3433 static bool CStringEquals(const char* lhs, const char* rhs); 3434 3435 // Converts a wide C string to a String using the UTF-8 encoding. 3436 // NULL will be converted to "(null)". If an error occurred during 3437 // the conversion, "(failed to convert from wide string)" is 3438 // returned. 3439 static std::string ShowWideCString(const wchar_t* wide_c_str); 3440 3441 // Compares two wide C strings. Returns true iff they have the same 3442 // content. 3443 // 3444 // Unlike wcscmp(), this function can handle NULL argument(s). A 3445 // NULL C string is considered different to any non-NULL C string, 3446 // including the empty string. 3447 static bool WideCStringEquals(const wchar_t* lhs, const wchar_t* rhs); 3448 3449 // Compares two C strings, ignoring case. Returns true iff they 3450 // have the same content. 3451 // 3452 // Unlike strcasecmp(), this function can handle NULL argument(s). 3453 // A NULL C string is considered different to any non-NULL C string, 3454 // including the empty string. 3455 static bool CaseInsensitiveCStringEquals(const char* lhs, 3456 const char* rhs); 3457 3458 // Compares two wide C strings, ignoring case. Returns true iff they 3459 // have the same content. 3460 // 3461 // Unlike wcscasecmp(), this function can handle NULL argument(s). 3462 // A NULL C string is considered different to any non-NULL wide C string, 3463 // including the empty string. 3464 // NB: The implementations on different platforms slightly differ. 3465 // On windows, this method uses _wcsicmp which compares according to LC_CTYPE 3466 // environment variable. On GNU platform this method uses wcscasecmp 3467 // which compares according to LC_CTYPE category of the current locale. 3468 // On MacOS X, it uses towlower, which also uses LC_CTYPE category of the 3469 // current locale. 3470 static bool CaseInsensitiveWideCStringEquals(const wchar_t* lhs, 3471 const wchar_t* rhs); 3472 3473 // Returns true iff the given string ends with the given suffix, ignoring 3474 // case. Any string is considered to end with an empty suffix. 3475 static bool EndsWithCaseInsensitive( 3476 const std::string& str, const std::string& suffix); 3477 3478 // Formats an int value as "%02d". 3479 static std::string FormatIntWidth2(int value); // "%02d" for width == 2 3480 3481 // Formats an int value as "%X". 3482 static std::string FormatHexInt(int value); 3483 3484 // Formats a byte as "%02X". 3485 static std::string FormatByte(unsigned char value); 3486 3487 private: 3488 String(); // Not meant to be instantiated. 3489 }; // class String 3490 3491 // Gets the content of the stringstream's buffer as an std::string. Each '\0' 3492 // character in the buffer is replaced with "\\0". 3493 GTEST_API_ std::string StringStreamToString(::std::stringstream* stream); 3494 3495 } // namespace internal 3496 } // namespace testing 3497 3498 #endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_STRING_H_ 3499 // Copyright 2008, Google Inc. 3500 // All rights reserved. 3501 // 3502 // Redistribution and use in source and binary forms, with or without 3503 // modification, are permitted provided that the following conditions are 3504 // met: 3505 // 3506 // * Redistributions of source code must retain the above copyright 3507 // notice, this list of conditions and the following disclaimer. 3508 // * Redistributions in binary form must reproduce the above 3509 // copyright notice, this list of conditions and the following disclaimer 3510 // in the documentation and/or other materials provided with the 3511 // distribution. 3512 // * Neither the name of Google Inc. nor the names of its 3513 // contributors may be used to endorse or promote products derived from 3514 // this software without specific prior written permission. 3515 // 3516 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 3517 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 3518 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 3519 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 3520 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 3521 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 3522 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 3523 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 3524 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 3525 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 3526 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 3527 // 3528 // Author: [email protected] (Keith Ray) 3529 // 3530 // Google Test filepath utilities 3531 // 3532 // This header file declares classes and functions used internally by 3533 // Google Test. They are subject to change without notice. 3534 // 3535 // This file is #included in <gtest/internal/gtest-internal.h>. 3536 // Do not include this header file separately! 3537 3538 #ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_FILEPATH_H_ 3539 #define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_FILEPATH_H_ 3540 3541 3542 namespace testing { 3543 namespace internal { 3544 3545 // FilePath - a class for file and directory pathname manipulation which 3546 // handles platform-specific conventions (like the pathname separator). 3547 // Used for helper functions for naming files in a directory for xml output. 3548 // Except for Set methods, all methods are const or static, which provides an 3549 // "immutable value object" -- useful for peace of mind. 3550 // A FilePath with a value ending in a path separator ("like/this/") represents 3551 // a directory, otherwise it is assumed to represent a file. In either case, 3552 // it may or may not represent an actual file or directory in the file system. 3553 // Names are NOT checked for syntax correctness -- no checking for illegal 3554 // characters, malformed paths, etc. 3555 3556 class GTEST_API_ FilePath { 3557 public: 3558 FilePath() : pathname_("") { } 3559 FilePath(const FilePath& rhs) : pathname_(rhs.pathname_) { } 3560 3561 explicit FilePath(const std::string& pathname) : pathname_(pathname) { 3562 Normalize(); 3563 } 3564 3565 FilePath& operator=(const FilePath& rhs) { 3566 Set(rhs); 3567 return *this; 3568 } 3569 3570 void Set(const FilePath& rhs) { 3571 pathname_ = rhs.pathname_; 3572 } 3573 3574 const std::string& string() const { return pathname_; } 3575 const char* c_str() const { return pathname_.c_str(); } 3576 3577 // Returns the current working directory, or "" if unsuccessful. 3578 static FilePath GetCurrentDir(); 3579 3580 // Given directory = "dir", base_name = "test", number = 0, 3581 // extension = "xml", returns "dir/test.xml". If number is greater 3582 // than zero (e.g., 12), returns "dir/test_12.xml". 3583 // On Windows platform, uses \ as the separator rather than /. 3584 static FilePath MakeFileName(const FilePath& directory, 3585 const FilePath& base_name, 3586 int number, 3587 const char* extension); 3588 3589 // Given directory = "dir", relative_path = "test.xml", 3590 // returns "dir/test.xml". 3591 // On Windows, uses \ as the separator rather than /. 3592 static FilePath ConcatPaths(const FilePath& directory, 3593 const FilePath& relative_path); 3594 3595 // Returns a pathname for a file that does not currently exist. The pathname 3596 // will be directory/base_name.extension or 3597 // directory/base_name_<number>.extension if directory/base_name.extension 3598 // already exists. The number will be incremented until a pathname is found 3599 // that does not already exist. 3600 // Examples: 'dir/foo_test.xml' or 'dir/foo_test_1.xml'. 3601 // There could be a race condition if two or more processes are calling this 3602 // function at the same time -- they could both pick the same filename. 3603 static FilePath GenerateUniqueFileName(const FilePath& directory, 3604 const FilePath& base_name, 3605 const char* extension); 3606 3607 // Returns true iff the path is "". 3608 bool IsEmpty() const { return pathname_.empty(); } 3609 3610 // If input name has a trailing separator character, removes it and returns 3611 // the name, otherwise return the name string unmodified. 3612 // On Windows platform, uses \ as the separator, other platforms use /. 3613 FilePath RemoveTrailingPathSeparator() const; 3614 3615 // Returns a copy of the FilePath with the directory part removed. 3616 // Example: FilePath("path/to/file").RemoveDirectoryName() returns 3617 // FilePath("file"). If there is no directory part ("just_a_file"), it returns 3618 // the FilePath unmodified. If there is no file part ("just_a_dir/") it 3619 // returns an empty FilePath (""). 3620 // On Windows platform, '\' is the path separator, otherwise it is '/'. 3621 FilePath RemoveDirectoryName() const; 3622 3623 // RemoveFileName returns the directory path with the filename removed. 3624 // Example: FilePath("path/to/file").RemoveFileName() returns "path/to/". 3625 // If the FilePath is "a_file" or "/a_file", RemoveFileName returns 3626 // FilePath("./") or, on Windows, FilePath(".\\"). If the filepath does 3627 // not have a file, like "just/a/dir/", it returns the FilePath unmodified. 3628 // On Windows platform, '\' is the path separator, otherwise it is '/'. 3629 FilePath RemoveFileName() const; 3630 3631 // Returns a copy of the FilePath with the case-insensitive extension removed. 3632 // Example: FilePath("dir/file.exe").RemoveExtension("EXE") returns 3633 // FilePath("dir/file"). If a case-insensitive extension is not 3634 // found, returns a copy of the original FilePath. 3635 FilePath RemoveExtension(const char* extension) const; 3636 3637 // Creates directories so that path exists. Returns true if successful or if 3638 // the directories already exist; returns false if unable to create 3639 // directories for any reason. Will also return false if the FilePath does 3640 // not represent a directory (that is, it doesn't end with a path separator). 3641 bool CreateDirectoriesRecursively() const; 3642 3643 // Create the directory so that path exists. Returns true if successful or 3644 // if the directory already exists; returns false if unable to create the 3645 // directory for any reason, including if the parent directory does not 3646 // exist. Not named "CreateDirectory" because that's a macro on Windows. 3647 bool CreateFolder() const; 3648 3649 // Returns true if FilePath describes something in the file-system, 3650 // either a file, directory, or whatever, and that something exists. 3651 bool FileOrDirectoryExists() const; 3652 3653 // Returns true if pathname describes a directory in the file-system 3654 // that exists. 3655 bool DirectoryExists() const; 3656 3657 // Returns true if FilePath ends with a path separator, which indicates that 3658 // it is intended to represent a directory. Returns false otherwise. 3659 // This does NOT check that a directory (or file) actually exists. 3660 bool IsDirectory() const; 3661 3662 // Returns true if pathname describes a root directory. (Windows has one 3663 // root directory per disk drive.) 3664 bool IsRootDirectory() const; 3665 3666 // Returns true if pathname describes an absolute path. 3667 bool IsAbsolutePath() const; 3668 3669 private: 3670 // Replaces multiple consecutive separators with a single separator. 3671 // For example, "bar///foo" becomes "bar/foo". Does not eliminate other 3672 // redundancies that might be in a pathname involving "." or "..". 3673 // 3674 // A pathname with multiple consecutive separators may occur either through 3675 // user error or as a result of some scripts or APIs that generate a pathname 3676 // with a trailing separator. On other platforms the same API or script 3677 // may NOT generate a pathname with a trailing "/". Then elsewhere that 3678 // pathname may have another "/" and pathname components added to it, 3679 // without checking for the separator already being there. 3680 // The script language and operating system may allow paths like "foo//bar" 3681 // but some of the functions in FilePath will not handle that correctly. In 3682 // particular, RemoveTrailingPathSeparator() only removes one separator, and 3683 // it is called in CreateDirectoriesRecursively() assuming that it will change 3684 // a pathname from directory syntax (trailing separator) to filename syntax. 3685 // 3686 // On Windows this method also replaces the alternate path separator '/' with 3687 // the primary path separator '\\', so that for example "bar\\/\\foo" becomes 3688 // "bar\\foo". 3689 3690 void Normalize(); 3691 3692 // Returns a pointer to the last occurence of a valid path separator in 3693 // the FilePath. On Windows, for example, both '/' and '\' are valid path 3694 // separators. Returns NULL if no path separator was found. 3695 const char* FindLastPathSeparator() const; 3696 3697 std::string pathname_; 3698 }; // class FilePath 3699 3700 } // namespace internal 3701 } // namespace testing 3702 3703 #endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_FILEPATH_H_ 3704 // This file was GENERATED by command: 3705 // pump.py gtest-type-util.h.pump 3706 // DO NOT EDIT BY HAND!!! 3707 3708 // Copyright 2008 Google Inc. 3709 // All Rights Reserved. 3710 // 3711 // Redistribution and use in source and binary forms, with or without 3712 // modification, are permitted provided that the following conditions are 3713 // met: 3714 // 3715 // * Redistributions of source code must retain the above copyright 3716 // notice, this list of conditions and the following disclaimer. 3717 // * Redistributions in binary form must reproduce the above 3718 // copyright notice, this list of conditions and the following disclaimer 3719 // in the documentation and/or other materials provided with the 3720 // distribution. 3721 // * Neither the name of Google Inc. nor the names of its 3722 // contributors may be used to endorse or promote products derived from 3723 // this software without specific prior written permission. 3724 // 3725 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 3726 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 3727 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 3728 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 3729 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 3730 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 3731 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 3732 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 3733 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 3734 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 3735 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 3736 // 3737 // Author: [email protected] (Zhanyong Wan) 3738 3739 // Type utilities needed for implementing typed and type-parameterized 3740 // tests. This file is generated by a SCRIPT. DO NOT EDIT BY HAND! 3741 // 3742 // Currently we support at most 50 types in a list, and at most 50 3743 // type-parameterized tests in one type-parameterized test case. 3744 // Please contact [email protected] if you need 3745 // more. 3746 3747 #ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_ 3748 #define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_ 3749 3750 3751 // #ifdef __GNUC__ is too general here. It is possible to use gcc without using 3752 // libstdc++ (which is where cxxabi.h comes from). 3753 # if GTEST_HAS_CXXABI_H_ 3754 # include <cxxabi.h> 3755 # elif defined(__HP_aCC) 3756 # include <acxx_demangle.h> 3757 # endif // GTEST_HASH_CXXABI_H_ 3758 3759 namespace testing { 3760 namespace internal { 3761 3762 // GetTypeName<T>() returns a human-readable name of type T. 3763 // NB: This function is also used in Google Mock, so don't move it inside of 3764 // the typed-test-only section below. 3765 template <typename T> 3766 std::string GetTypeName() { 3767 # if GTEST_HAS_RTTI 3768 3769 const char* const name = typeid(T).name(); 3770 # if GTEST_HAS_CXXABI_H_ || defined(__HP_aCC) 3771 int status = 0; 3772 // gcc's implementation of typeid(T).name() mangles the type name, 3773 // so we have to demangle it. 3774 # if GTEST_HAS_CXXABI_H_ 3775 using abi::__cxa_demangle; 3776 # endif // GTEST_HAS_CXXABI_H_ 3777 char* const readable_name = __cxa_demangle(name, 0, 0, &status); 3778 const std::string name_str(status == 0 ? readable_name : name); 3779 free(readable_name); 3780 return name_str; 3781 # else 3782 return name; 3783 # endif // GTEST_HAS_CXXABI_H_ || __HP_aCC 3784 3785 # else 3786 3787 return "<type>"; 3788 3789 # endif // GTEST_HAS_RTTI 3790 } 3791 3792 #if GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P 3793 3794 // AssertyTypeEq<T1, T2>::type is defined iff T1 and T2 are the same 3795 // type. This can be used as a compile-time assertion to ensure that 3796 // two types are equal. 3797 3798 template <typename T1, typename T2> 3799 struct AssertTypeEq; 3800 3801 template <typename T> 3802 struct AssertTypeEq<T, T> { 3803 typedef bool type; 3804 }; 3805 3806 // A unique type used as the default value for the arguments of class 3807 // template Types. This allows us to simulate variadic templates 3808 // (e.g. Types<int>, Type<int, double>, and etc), which C++ doesn't 3809 // support directly. 3810 struct None {}; 3811 3812 // The following family of struct and struct templates are used to 3813 // represent type lists. In particular, TypesN<T1, T2, ..., TN> 3814 // represents a type list with N types (T1, T2, ..., and TN) in it. 3815 // Except for Types0, every struct in the family has two member types: 3816 // Head for the first type in the list, and Tail for the rest of the 3817 // list. 3818 3819 // The empty type list. 3820 struct Types0 {}; 3821 3822 // Type lists of length 1, 2, 3, and so on. 3823 3824 template <typename T1> 3825 struct Types1 { 3826 typedef T1 Head; 3827 typedef Types0 Tail; 3828 }; 3829 template <typename T1, typename T2> 3830 struct Types2 { 3831 typedef T1 Head; 3832 typedef Types1<T2> Tail; 3833 }; 3834 3835 template <typename T1, typename T2, typename T3> 3836 struct Types3 { 3837 typedef T1 Head; 3838 typedef Types2<T2, T3> Tail; 3839 }; 3840 3841 template <typename T1, typename T2, typename T3, typename T4> 3842 struct Types4 { 3843 typedef T1 Head; 3844 typedef Types3<T2, T3, T4> Tail; 3845 }; 3846 3847 template <typename T1, typename T2, typename T3, typename T4, typename T5> 3848 struct Types5 { 3849 typedef T1 Head; 3850 typedef Types4<T2, T3, T4, T5> Tail; 3851 }; 3852 3853 template <typename T1, typename T2, typename T3, typename T4, typename T5, 3854 typename T6> 3855 struct Types6 { 3856 typedef T1 Head; 3857 typedef Types5<T2, T3, T4, T5, T6> Tail; 3858 }; 3859 3860 template <typename T1, typename T2, typename T3, typename T4, typename T5, 3861 typename T6, typename T7> 3862 struct Types7 { 3863 typedef T1 Head; 3864 typedef Types6<T2, T3, T4, T5, T6, T7> Tail; 3865 }; 3866 3867 template <typename T1, typename T2, typename T3, typename T4, typename T5, 3868 typename T6, typename T7, typename T8> 3869 struct Types8 { 3870 typedef T1 Head; 3871 typedef Types7<T2, T3, T4, T5, T6, T7, T8> Tail; 3872 }; 3873 3874 template <typename T1, typename T2, typename T3, typename T4, typename T5, 3875 typename T6, typename T7, typename T8, typename T9> 3876 struct Types9 { 3877 typedef T1 Head; 3878 typedef Types8<T2, T3, T4, T5, T6, T7, T8, T9> Tail; 3879 }; 3880 3881 template <typename T1, typename T2, typename T3, typename T4, typename T5, 3882 typename T6, typename T7, typename T8, typename T9, typename T10> 3883 struct Types10 { 3884 typedef T1 Head; 3885 typedef Types9<T2, T3, T4, T5, T6, T7, T8, T9, T10> Tail; 3886 }; 3887 3888 template <typename T1, typename T2, typename T3, typename T4, typename T5, 3889 typename T6, typename T7, typename T8, typename T9, typename T10, 3890 typename T11> 3891 struct Types11 { 3892 typedef T1 Head; 3893 typedef Types10<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> Tail; 3894 }; 3895 3896 template <typename T1, typename T2, typename T3, typename T4, typename T5, 3897 typename T6, typename T7, typename T8, typename T9, typename T10, 3898 typename T11, typename T12> 3899 struct Types12 { 3900 typedef T1 Head; 3901 typedef Types11<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> Tail; 3902 }; 3903 3904 template <typename T1, typename T2, typename T3, typename T4, typename T5, 3905 typename T6, typename T7, typename T8, typename T9, typename T10, 3906 typename T11, typename T12, typename T13> 3907 struct Types13 { 3908 typedef T1 Head; 3909 typedef Types12<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> Tail; 3910 }; 3911 3912 template <typename T1, typename T2, typename T3, typename T4, typename T5, 3913 typename T6, typename T7, typename T8, typename T9, typename T10, 3914 typename T11, typename T12, typename T13, typename T14> 3915 struct Types14 { 3916 typedef T1 Head; 3917 typedef Types13<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> Tail; 3918 }; 3919 3920 template <typename T1, typename T2, typename T3, typename T4, typename T5, 3921 typename T6, typename T7, typename T8, typename T9, typename T10, 3922 typename T11, typename T12, typename T13, typename T14, typename T15> 3923 struct Types15 { 3924 typedef T1 Head; 3925 typedef Types14<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 3926 T15> Tail; 3927 }; 3928 3929 template <typename T1, typename T2, typename T3, typename T4, typename T5, 3930 typename T6, typename T7, typename T8, typename T9, typename T10, 3931 typename T11, typename T12, typename T13, typename T14, typename T15, 3932 typename T16> 3933 struct Types16 { 3934 typedef T1 Head; 3935 typedef Types15<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 3936 T16> Tail; 3937 }; 3938 3939 template <typename T1, typename T2, typename T3, typename T4, typename T5, 3940 typename T6, typename T7, typename T8, typename T9, typename T10, 3941 typename T11, typename T12, typename T13, typename T14, typename T15, 3942 typename T16, typename T17> 3943 struct Types17 { 3944 typedef T1 Head; 3945 typedef Types16<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 3946 T16, T17> Tail; 3947 }; 3948 3949 template <typename T1, typename T2, typename T3, typename T4, typename T5, 3950 typename T6, typename T7, typename T8, typename T9, typename T10, 3951 typename T11, typename T12, typename T13, typename T14, typename T15, 3952 typename T16, typename T17, typename T18> 3953 struct Types18 { 3954 typedef T1 Head; 3955 typedef Types17<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 3956 T16, T17, T18> Tail; 3957 }; 3958 3959 template <typename T1, typename T2, typename T3, typename T4, typename T5, 3960 typename T6, typename T7, typename T8, typename T9, typename T10, 3961 typename T11, typename T12, typename T13, typename T14, typename T15, 3962 typename T16, typename T17, typename T18, typename T19> 3963 struct Types19 { 3964 typedef T1 Head; 3965 typedef Types18<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 3966 T16, T17, T18, T19> Tail; 3967 }; 3968 3969 template <typename T1, typename T2, typename T3, typename T4, typename T5, 3970 typename T6, typename T7, typename T8, typename T9, typename T10, 3971 typename T11, typename T12, typename T13, typename T14, typename T15, 3972 typename T16, typename T17, typename T18, typename T19, typename T20> 3973 struct Types20 { 3974 typedef T1 Head; 3975 typedef Types19<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 3976 T16, T17, T18, T19, T20> Tail; 3977 }; 3978 3979 template <typename T1, typename T2, typename T3, typename T4, typename T5, 3980 typename T6, typename T7, typename T8, typename T9, typename T10, 3981 typename T11, typename T12, typename T13, typename T14, typename T15, 3982 typename T16, typename T17, typename T18, typename T19, typename T20, 3983 typename T21> 3984 struct Types21 { 3985 typedef T1 Head; 3986 typedef Types20<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 3987 T16, T17, T18, T19, T20, T21> Tail; 3988 }; 3989 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> 3995 struct Types22 { 3996 typedef T1 Head; 3997 typedef Types21<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 3998 T16, T17, T18, T19, T20, T21, T22> Tail; 3999 }; 4000 4001 template <typename T1, typename T2, typename T3, typename T4, typename T5, 4002 typename T6, typename T7, typename T8, typename T9, typename T10, 4003 typename T11, typename T12, typename T13, typename T14, typename T15, 4004 typename T16, typename T17, typename T18, typename T19, typename T20, 4005 typename T21, typename T22, typename T23> 4006 struct Types23 { 4007 typedef T1 Head; 4008 typedef Types22<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 4009 T16, T17, T18, T19, T20, T21, T22, T23> Tail; 4010 }; 4011 4012 template <typename T1, typename T2, typename T3, typename T4, typename T5, 4013 typename T6, typename T7, typename T8, typename T9, typename T10, 4014 typename T11, typename T12, typename T13, typename T14, typename T15, 4015 typename T16, typename T17, typename T18, typename T19, typename T20, 4016 typename T21, typename T22, typename T23, typename T24> 4017 struct Types24 { 4018 typedef T1 Head; 4019 typedef Types23<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 4020 T16, T17, T18, T19, T20, T21, T22, T23, T24> Tail; 4021 }; 4022 4023 template <typename T1, typename T2, typename T3, typename T4, typename T5, 4024 typename T6, typename T7, typename T8, typename T9, typename T10, 4025 typename T11, typename T12, typename T13, typename T14, typename T15, 4026 typename T16, typename T17, typename T18, typename T19, typename T20, 4027 typename T21, typename T22, typename T23, typename T24, typename T25> 4028 struct Types25 { 4029 typedef T1 Head; 4030 typedef Types24<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 4031 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25> Tail; 4032 }; 4033 4034 template <typename T1, typename T2, typename T3, typename T4, typename T5, 4035 typename T6, typename T7, typename T8, typename T9, typename T10, 4036 typename T11, typename T12, typename T13, typename T14, typename T15, 4037 typename T16, typename T17, typename T18, typename T19, typename T20, 4038 typename T21, typename T22, typename T23, typename T24, typename T25, 4039 typename T26> 4040 struct Types26 { 4041 typedef T1 Head; 4042 typedef Types25<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 4043 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26> Tail; 4044 }; 4045 4046 template <typename T1, typename T2, typename T3, typename T4, typename T5, 4047 typename T6, typename T7, typename T8, typename T9, typename T10, 4048 typename T11, typename T12, typename T13, typename T14, typename T15, 4049 typename T16, typename T17, typename T18, typename T19, typename T20, 4050 typename T21, typename T22, typename T23, typename T24, typename T25, 4051 typename T26, typename T27> 4052 struct Types27 { 4053 typedef T1 Head; 4054 typedef Types26<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 4055 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27> Tail; 4056 }; 4057 4058 template <typename T1, typename T2, typename T3, typename T4, typename T5, 4059 typename T6, typename T7, typename T8, typename T9, typename T10, 4060 typename T11, typename T12, typename T13, typename T14, typename T15, 4061 typename T16, typename T17, typename T18, typename T19, typename T20, 4062 typename T21, typename T22, typename T23, typename T24, typename T25, 4063 typename T26, typename T27, typename T28> 4064 struct Types28 { 4065 typedef T1 Head; 4066 typedef Types27<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 4067 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28> Tail; 4068 }; 4069 4070 template <typename T1, typename T2, typename T3, typename T4, typename T5, 4071 typename T6, typename T7, typename T8, typename T9, typename T10, 4072 typename T11, typename T12, typename T13, typename T14, typename T15, 4073 typename T16, typename T17, typename T18, typename T19, typename T20, 4074 typename T21, typename T22, typename T23, typename T24, typename T25, 4075 typename T26, typename T27, typename T28, typename T29> 4076 struct Types29 { 4077 typedef T1 Head; 4078 typedef Types28<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 4079 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, 4080 T29> Tail; 4081 }; 4082 4083 template <typename T1, typename T2, typename T3, typename T4, typename T5, 4084 typename T6, typename T7, typename T8, typename T9, typename T10, 4085 typename T11, typename T12, typename T13, typename T14, typename T15, 4086 typename T16, typename T17, typename T18, typename T19, typename T20, 4087 typename T21, typename T22, typename T23, typename T24, typename T25, 4088 typename T26, typename T27, typename T28, typename T29, typename T30> 4089 struct Types30 { 4090 typedef T1 Head; 4091 typedef Types29<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 4092 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, 4093 T30> Tail; 4094 }; 4095 4096 template <typename T1, typename T2, typename T3, typename T4, typename T5, 4097 typename T6, typename T7, typename T8, typename T9, typename T10, 4098 typename T11, typename T12, typename T13, typename T14, typename T15, 4099 typename T16, typename T17, typename T18, typename T19, typename T20, 4100 typename T21, typename T22, typename T23, typename T24, typename T25, 4101 typename T26, typename T27, typename T28, typename T29, typename T30, 4102 typename T31> 4103 struct Types31 { 4104 typedef T1 Head; 4105 typedef Types30<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 4106 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, 4107 T30, T31> Tail; 4108 }; 4109 4110 template <typename T1, typename T2, typename T3, typename T4, typename T5, 4111 typename T6, typename T7, typename T8, typename T9, typename T10, 4112 typename T11, typename T12, typename T13, typename T14, typename T15, 4113 typename T16, typename T17, typename T18, typename T19, typename T20, 4114 typename T21, typename T22, typename T23, typename T24, typename T25, 4115 typename T26, typename T27, typename T28, typename T29, typename T30, 4116 typename T31, typename T32> 4117 struct Types32 { 4118 typedef T1 Head; 4119 typedef Types31<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 4120 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, 4121 T30, T31, T32> Tail; 4122 }; 4123 4124 template <typename T1, typename T2, typename T3, typename T4, typename T5, 4125 typename T6, typename T7, typename T8, typename T9, typename T10, 4126 typename T11, typename T12, typename T13, typename T14, typename T15, 4127 typename T16, typename T17, typename T18, typename T19, typename T20, 4128 typename T21, typename T22, typename T23, typename T24, typename T25, 4129 typename T26, typename T27, typename T28, typename T29, typename T30, 4130 typename T31, typename T32, typename T33> 4131 struct Types33 { 4132 typedef T1 Head; 4133 typedef Types32<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 4134 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, 4135 T30, T31, T32, T33> Tail; 4136 }; 4137 4138 template <typename T1, typename T2, typename T3, typename T4, typename T5, 4139 typename T6, typename T7, typename T8, typename T9, typename T10, 4140 typename T11, typename T12, typename T13, typename T14, typename T15, 4141 typename T16, typename T17, typename T18, typename T19, typename T20, 4142 typename T21, typename T22, typename T23, typename T24, typename T25, 4143 typename T26, typename T27, typename T28, typename T29, typename T30, 4144 typename T31, typename T32, typename T33, typename T34> 4145 struct Types34 { 4146 typedef T1 Head; 4147 typedef Types33<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 4148 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, 4149 T30, T31, T32, T33, T34> Tail; 4150 }; 4151 4152 template <typename T1, typename T2, typename T3, typename T4, typename T5, 4153 typename T6, typename T7, typename T8, typename T9, typename T10, 4154 typename T11, typename T12, typename T13, typename T14, typename T15, 4155 typename T16, typename T17, typename T18, typename T19, typename T20, 4156 typename T21, typename T22, typename T23, typename T24, typename T25, 4157 typename T26, typename T27, typename T28, typename T29, typename T30, 4158 typename T31, typename T32, typename T33, typename T34, typename T35> 4159 struct Types35 { 4160 typedef T1 Head; 4161 typedef Types34<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 4162 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, 4163 T30, T31, T32, T33, T34, T35> Tail; 4164 }; 4165 4166 template <typename T1, typename T2, typename T3, typename T4, typename T5, 4167 typename T6, typename T7, typename T8, typename T9, typename T10, 4168 typename T11, typename T12, typename T13, typename T14, typename T15, 4169 typename T16, typename T17, typename T18, typename T19, typename T20, 4170 typename T21, typename T22, typename T23, typename T24, typename T25, 4171 typename T26, typename T27, typename T28, typename T29, typename T30, 4172 typename T31, typename T32, typename T33, typename T34, typename T35, 4173 typename T36> 4174 struct Types36 { 4175 typedef T1 Head; 4176 typedef Types35<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 4177 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, 4178 T30, T31, T32, T33, T34, T35, T36> Tail; 4179 }; 4180 4181 template <typename T1, typename T2, typename T3, typename T4, typename T5, 4182 typename T6, typename T7, typename T8, typename T9, typename T10, 4183 typename T11, typename T12, typename T13, typename T14, typename T15, 4184 typename T16, typename T17, typename T18, typename T19, typename T20, 4185 typename T21, typename T22, typename T23, typename T24, typename T25, 4186 typename T26, typename T27, typename T28, typename T29, typename T30, 4187 typename T31, typename T32, typename T33, typename T34, typename T35, 4188 typename T36, typename T37> 4189 struct Types37 { 4190 typedef T1 Head; 4191 typedef Types36<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 4192 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, 4193 T30, T31, T32, T33, T34, T35, T36, T37> Tail; 4194 }; 4195 4196 template <typename T1, typename T2, typename T3, typename T4, typename T5, 4197 typename T6, typename T7, typename T8, typename T9, typename T10, 4198 typename T11, typename T12, typename T13, typename T14, typename T15, 4199 typename T16, typename T17, typename T18, typename T19, typename T20, 4200 typename T21, typename T22, typename T23, typename T24, typename T25, 4201 typename T26, typename T27, typename T28, typename T29, typename T30, 4202 typename T31, typename T32, typename T33, typename T34, typename T35, 4203 typename T36, typename T37, typename T38> 4204 struct Types38 { 4205 typedef T1 Head; 4206 typedef Types37<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 4207 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, 4208 T30, T31, T32, T33, T34, T35, T36, T37, T38> Tail; 4209 }; 4210 4211 template <typename T1, typename T2, typename T3, typename T4, typename T5, 4212 typename T6, typename T7, typename T8, typename T9, typename T10, 4213 typename T11, typename T12, typename T13, typename T14, typename T15, 4214 typename T16, typename T17, typename T18, typename T19, typename T20, 4215 typename T21, typename T22, typename T23, typename T24, typename T25, 4216 typename T26, typename T27, typename T28, typename T29, typename T30, 4217 typename T31, typename T32, typename T33, typename T34, typename T35, 4218 typename T36, typename T37, typename T38, typename T39> 4219 struct Types39 { 4220 typedef T1 Head; 4221 typedef Types38<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 4222 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, 4223 T30, T31, T32, T33, T34, T35, T36, T37, T38, T39> Tail; 4224 }; 4225 4226 template <typename T1, typename T2, typename T3, typename T4, typename T5, 4227 typename T6, typename T7, typename T8, typename T9, typename T10, 4228 typename T11, typename T12, typename T13, typename T14, typename T15, 4229 typename T16, typename T17, typename T18, typename T19, typename T20, 4230 typename T21, typename T22, typename T23, typename T24, typename T25, 4231 typename T26, typename T27, typename T28, typename T29, typename T30, 4232 typename T31, typename T32, typename T33, typename T34, typename T35, 4233 typename T36, typename T37, typename T38, typename T39, typename T40> 4234 struct Types40 { 4235 typedef T1 Head; 4236 typedef Types39<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 4237 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, 4238 T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40> Tail; 4239 }; 4240 4241 template <typename T1, typename T2, typename T3, typename T4, typename T5, 4242 typename T6, typename T7, typename T8, typename T9, typename T10, 4243 typename T11, typename T12, typename T13, typename T14, typename T15, 4244 typename T16, typename T17, typename T18, typename T19, typename T20, 4245 typename T21, typename T22, typename T23, typename T24, typename T25, 4246 typename T26, typename T27, typename T28, typename T29, typename T30, 4247 typename T31, typename T32, typename T33, typename T34, typename T35, 4248 typename T36, typename T37, typename T38, typename T39, typename T40, 4249 typename T41> 4250 struct Types41 { 4251 typedef T1 Head; 4252 typedef Types40<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 4253 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, 4254 T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41> Tail; 4255 }; 4256 4257 template <typename T1, typename T2, typename T3, typename T4, typename T5, 4258 typename T6, typename T7, typename T8, typename T9, typename T10, 4259 typename T11, typename T12, typename T13, typename T14, typename T15, 4260 typename T16, typename T17, typename T18, typename T19, typename T20, 4261 typename T21, typename T22, typename T23, typename T24, typename T25, 4262 typename T26, typename T27, typename T28, typename T29, typename T30, 4263 typename T31, typename T32, typename T33, typename T34, typename T35, 4264 typename T36, typename T37, typename T38, typename T39, typename T40, 4265 typename T41, typename T42> 4266 struct Types42 { 4267 typedef T1 Head; 4268 typedef Types41<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 4269 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, 4270 T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42> Tail; 4271 }; 4272 4273 template <typename T1, typename T2, typename T3, typename T4, typename T5, 4274 typename T6, typename T7, typename T8, typename T9, typename T10, 4275 typename T11, typename T12, typename T13, typename T14, typename T15, 4276 typename T16, typename T17, typename T18, typename T19, typename T20, 4277 typename T21, typename T22, typename T23, typename T24, typename T25, 4278 typename T26, typename T27, typename T28, typename T29, typename T30, 4279 typename T31, typename T32, typename T33, typename T34, typename T35, 4280 typename T36, typename T37, typename T38, typename T39, typename T40, 4281 typename T41, typename T42, typename T43> 4282 struct Types43 { 4283 typedef T1 Head; 4284 typedef Types42<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 4285 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, 4286 T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, 4287 T43> Tail; 4288 }; 4289 4290 template <typename T1, typename T2, typename T3, typename T4, typename T5, 4291 typename T6, typename T7, typename T8, typename T9, typename T10, 4292 typename T11, typename T12, typename T13, typename T14, typename T15, 4293 typename T16, typename T17, typename T18, typename T19, typename T20, 4294 typename T21, typename T22, typename T23, typename T24, typename T25, 4295 typename T26, typename T27, typename T28, typename T29, typename T30, 4296 typename T31, typename T32, typename T33, typename T34, typename T35, 4297 typename T36, typename T37, typename T38, typename T39, typename T40, 4298 typename T41, typename T42, typename T43, typename T44> 4299 struct Types44 { 4300 typedef T1 Head; 4301 typedef Types43<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 4302 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, 4303 T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, 4304 T44> Tail; 4305 }; 4306 4307 template <typename T1, typename T2, typename T3, typename T4, typename T5, 4308 typename T6, typename T7, typename T8, typename T9, typename T10, 4309 typename T11, typename T12, typename T13, typename T14, typename T15, 4310 typename T16, typename T17, typename T18, typename T19, typename T20, 4311 typename T21, typename T22, typename T23, typename T24, typename T25, 4312 typename T26, typename T27, typename T28, typename T29, typename T30, 4313 typename T31, typename T32, typename T33, typename T34, typename T35, 4314 typename T36, typename T37, typename T38, typename T39, typename T40, 4315 typename T41, typename T42, typename T43, typename T44, typename T45> 4316 struct Types45 { 4317 typedef T1 Head; 4318 typedef Types44<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 4319 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, 4320 T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, 4321 T44, T45> Tail; 4322 }; 4323 4324 template <typename T1, typename T2, typename T3, typename T4, typename T5, 4325 typename T6, typename T7, typename T8, typename T9, typename T10, 4326 typename T11, typename T12, typename T13, typename T14, typename T15, 4327 typename T16, typename T17, typename T18, typename T19, typename T20, 4328 typename T21, typename T22, typename T23, typename T24, typename T25, 4329 typename T26, typename T27, typename T28, typename T29, typename T30, 4330 typename T31, typename T32, typename T33, typename T34, typename T35, 4331 typename T36, typename T37, typename T38, typename T39, typename T40, 4332 typename T41, typename T42, typename T43, typename T44, typename T45, 4333 typename T46> 4334 struct Types46 { 4335 typedef T1 Head; 4336 typedef Types45<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 4337 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, 4338 T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, 4339 T44, T45, T46> Tail; 4340 }; 4341 4342 template <typename T1, typename T2, typename T3, typename T4, typename T5, 4343 typename T6, typename T7, typename T8, typename T9, typename T10, 4344 typename T11, typename T12, typename T13, typename T14, typename T15, 4345 typename T16, typename T17, typename T18, typename T19, typename T20, 4346 typename T21, typename T22, typename T23, typename T24, typename T25, 4347 typename T26, typename T27, typename T28, typename T29, typename T30, 4348 typename T31, typename T32, typename T33, typename T34, typename T35, 4349 typename T36, typename T37, typename T38, typename T39, typename T40, 4350 typename T41, typename T42, typename T43, typename T44, typename T45, 4351 typename T46, typename T47> 4352 struct Types47 { 4353 typedef T1 Head; 4354 typedef Types46<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 4355 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, 4356 T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, 4357 T44, T45, T46, T47> Tail; 4358 }; 4359 4360 template <typename T1, typename T2, typename T3, typename T4, typename T5, 4361 typename T6, typename T7, typename T8, typename T9, typename T10, 4362 typename T11, typename T12, typename T13, typename T14, typename T15, 4363 typename T16, typename T17, typename T18, typename T19, typename T20, 4364 typename T21, typename T22, typename T23, typename T24, typename T25, 4365 typename T26, typename T27, typename T28, typename T29, typename T30, 4366 typename T31, typename T32, typename T33, typename T34, typename T35, 4367 typename T36, typename T37, typename T38, typename T39, typename T40, 4368 typename T41, typename T42, typename T43, typename T44, typename T45, 4369 typename T46, typename T47, typename T48> 4370 struct Types48 { 4371 typedef T1 Head; 4372 typedef Types47<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 4373 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, 4374 T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, 4375 T44, T45, T46, T47, T48> Tail; 4376 }; 4377 4378 template <typename T1, typename T2, typename T3, typename T4, typename T5, 4379 typename T6, typename T7, typename T8, typename T9, typename T10, 4380 typename T11, typename T12, typename T13, typename T14, typename T15, 4381 typename T16, typename T17, typename T18, typename T19, typename T20, 4382 typename T21, typename T22, typename T23, typename T24, typename T25, 4383 typename T26, typename T27, typename T28, typename T29, typename T30, 4384 typename T31, typename T32, typename T33, typename T34, typename T35, 4385 typename T36, typename T37, typename T38, typename T39, typename T40, 4386 typename T41, typename T42, typename T43, typename T44, typename T45, 4387 typename T46, typename T47, typename T48, typename T49> 4388 struct Types49 { 4389 typedef T1 Head; 4390 typedef Types48<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 4391 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, 4392 T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, 4393 T44, T45, T46, T47, T48, T49> Tail; 4394 }; 4395 4396 template <typename T1, typename T2, typename T3, typename T4, typename T5, 4397 typename T6, typename T7, typename T8, typename T9, typename T10, 4398 typename T11, typename T12, typename T13, typename T14, typename T15, 4399 typename T16, typename T17, typename T18, typename T19, typename T20, 4400 typename T21, typename T22, typename T23, typename T24, typename T25, 4401 typename T26, typename T27, typename T28, typename T29, typename T30, 4402 typename T31, typename T32, typename T33, typename T34, typename T35, 4403 typename T36, typename T37, typename T38, typename T39, typename T40, 4404 typename T41, typename T42, typename T43, typename T44, typename T45, 4405 typename T46, typename T47, typename T48, typename T49, typename T50> 4406 struct Types50 { 4407 typedef T1 Head; 4408 typedef Types49<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 4409 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, 4410 T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, 4411 T44, T45, T46, T47, T48, T49, T50> Tail; 4412 }; 4413 4414 4415 } // namespace internal 4416 4417 // We don't want to require the users to write TypesN<...> directly, 4418 // as that would require them to count the length. Types<...> is much 4419 // easier to write, but generates horrible messages when there is a 4420 // compiler error, as gcc insists on printing out each template 4421 // argument, even if it has the default value (this means Types<int> 4422 // will appear as Types<int, None, None, ..., None> in the compiler 4423 // errors). 4424 // 4425 // Our solution is to combine the best part of the two approaches: a 4426 // user would write Types<T1, ..., TN>, and Google Test will translate 4427 // that to TypesN<T1, ..., TN> internally to make error messages 4428 // readable. The translation is done by the 'type' member of the 4429 // Types template. 4430 template <typename T1 = internal::None, typename T2 = internal::None, 4431 typename T3 = internal::None, typename T4 = internal::None, 4432 typename T5 = internal::None, typename T6 = internal::None, 4433 typename T7 = internal::None, typename T8 = internal::None, 4434 typename T9 = internal::None, typename T10 = internal::None, 4435 typename T11 = internal::None, typename T12 = internal::None, 4436 typename T13 = internal::None, typename T14 = internal::None, 4437 typename T15 = internal::None, typename T16 = internal::None, 4438 typename T17 = internal::None, typename T18 = internal::None, 4439 typename T19 = internal::None, typename T20 = internal::None, 4440 typename T21 = internal::None, typename T22 = internal::None, 4441 typename T23 = internal::None, typename T24 = internal::None, 4442 typename T25 = internal::None, typename T26 = internal::None, 4443 typename T27 = internal::None, typename T28 = internal::None, 4444 typename T29 = internal::None, typename T30 = internal::None, 4445 typename T31 = internal::None, typename T32 = internal::None, 4446 typename T33 = internal::None, typename T34 = internal::None, 4447 typename T35 = internal::None, typename T36 = internal::None, 4448 typename T37 = internal::None, typename T38 = internal::None, 4449 typename T39 = internal::None, typename T40 = internal::None, 4450 typename T41 = internal::None, typename T42 = internal::None, 4451 typename T43 = internal::None, typename T44 = internal::None, 4452 typename T45 = internal::None, typename T46 = internal::None, 4453 typename T47 = internal::None, typename T48 = internal::None, 4454 typename T49 = internal::None, typename T50 = internal::None> 4455 struct Types { 4456 typedef internal::Types50<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, 4457 T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, 4458 T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, 4459 T41, T42, T43, T44, T45, T46, T47, T48, T49, T50> type; 4460 }; 4461 4462 template <> 4463 struct Types<internal::None, internal::None, internal::None, internal::None, 4464 internal::None, internal::None, internal::None, internal::None, 4465 internal::None, internal::None, internal::None, internal::None, 4466 internal::None, internal::None, internal::None, internal::None, 4467 internal::None, internal::None, internal::None, internal::None, 4468 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> { 4476 typedef internal::Types0 type; 4477 }; 4478 template <typename T1> 4479 struct Types<T1, internal::None, internal::None, internal::None, 4480 internal::None, internal::None, internal::None, internal::None, 4481 internal::None, internal::None, internal::None, internal::None, 4482 internal::None, internal::None, internal::None, internal::None, 4483 internal::None, internal::None, internal::None, internal::None, 4484 internal::None, internal::None, internal::None, internal::None, 4485 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> { 4492 typedef internal::Types1<T1> type; 4493 }; 4494 template <typename T1, typename T2> 4495 struct Types<T1, T2, internal::None, internal::None, internal::None, 4496 internal::None, internal::None, internal::None, internal::None, 4497 internal::None, internal::None, internal::None, internal::None, 4498 internal::None, internal::None, internal::None, internal::None, 4499 internal::None, internal::None, internal::None, internal::None, 4500 internal::None, internal::None, internal::None, internal::None, 4501 internal::None, internal::None, internal::None, internal::None, 4502 internal::None, 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> { 4508 typedef internal::Types2<T1, T2> type; 4509 }; 4510 template <typename T1, typename T2, typename T3> 4511 struct Types<T1, T2, T3, internal::None, internal::None, internal::None, 4512 internal::None, internal::None, internal::None, internal::None, 4513 internal::None, internal::None, internal::None, internal::None, 4514 internal::None, internal::None, internal::None, internal::None, 4515 internal::None, internal::None, internal::None, internal::None, 4516 internal::None, internal::None, internal::None, internal::None, 4517 internal::None, internal::None, internal::None, internal::None, 4518 internal::None, internal::None, internal::None, internal::None, 4519 internal::None, 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 typedef internal::Types3<T1, T2, T3> type; 4524 }; 4525 template <typename T1, typename T2, typename T3, typename T4> 4526 struct Types<T1, T2, T3, T4, internal::None, internal::None, internal::None, 4527 internal::None, internal::None, internal::None, internal::None, 4528 internal::None, internal::None, internal::None, internal::None, 4529 internal::None, internal::None, internal::None, internal::None, 4530 internal::None, internal::None, internal::None, internal::None, 4531 internal::None, internal::None, internal::None, internal::None, 4532 internal::None, internal::None, internal::None, internal::None, 4533 internal::None, internal::None, internal::None, internal::None, 4534 internal::None, internal::None, internal::None, internal::None, 4535 internal::None, internal::None, internal::None, internal::None, 4536 internal::None, internal::None, internal::None, internal::None, 4537 internal::None, internal::None, internal::None> { 4538 typedef internal::Types4<T1, T2, T3, T4> type; 4539 }; 4540 template <typename T1, typename T2, typename T3, typename T4, typename T5> 4541 struct Types<T1, T2, T3, T4, T5, internal::None, internal::None, 4542 internal::None, internal::None, internal::None, internal::None, 4543 internal::None, internal::None, internal::None, internal::None, 4544 internal::None, internal::None, internal::None, internal::None, 4545 internal::None, internal::None, internal::None, internal::None, 4546 internal::None, internal::None, internal::None, internal::None, 4547 internal::None, internal::None, internal::None, internal::None, 4548 internal::None, internal::None, internal::None, internal::None, 4549 internal::None, internal::None, internal::None, internal::None, 4550 internal::None, internal::None, internal::None, internal::None, 4551 internal::None, internal::None, internal::None, internal::None, 4552 internal::None, internal::None, internal::None> { 4553 typedef internal::Types5<T1, T2, T3, T4, T5> type; 4554 }; 4555 template <typename T1, typename T2, typename T3, typename T4, typename T5, 4556 typename T6> 4557 struct Types<T1, T2, T3, T4, T5, T6, internal::None, internal::None, 4558 internal::None, internal::None, internal::None, internal::None, 4559 internal::None, internal::None, internal::None, internal::None, 4560 internal::None, internal::None, internal::None, internal::None, 4561 internal::None, internal::None, internal::None, internal::None, 4562 internal::None, internal::None, internal::None, internal::None, 4563 internal::None, internal::None, internal::None, internal::None, 4564 internal::None, internal::None, internal::None, internal::None, 4565 internal::None, internal::None, internal::None, internal::None, 4566 internal::None, internal::None, internal::None, internal::None, 4567 internal::None, internal::None, internal::None, internal::None, 4568 internal::None, internal::None> { 4569 typedef internal::Types6<T1, T2, T3, T4, T5, T6> type; 4570 }; 4571 template <typename T1, typename T2, typename T3, typename T4, typename T5, 4572 typename T6, typename T7> 4573 struct Types<T1, T2, T3, T4, T5, T6, T7, 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, internal::None, internal::None, 4577 internal::None, internal::None, internal::None, internal::None, 4578 internal::None, internal::None, internal::None, internal::None, 4579 internal::None, internal::None, internal::None, internal::None, 4580 internal::None, internal::None, internal::None, internal::None, 4581 internal::None, internal::None, internal::None, internal::None, 4582 internal::None, internal::None, internal::None, internal::None, 4583 internal::None, internal::None, internal::None, internal::None, 4584 internal::None> { 4585 typedef internal::Types7<T1, T2, T3, T4, T5, T6, T7> type; 4586 }; 4587 template <typename T1, typename T2, typename T3, typename T4, typename T5, 4588 typename T6, typename T7, typename T8> 4589 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, 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, 4593 internal::None, internal::None, internal::None, internal::None, 4594 internal::None, internal::None, internal::None, internal::None, 4595 internal::None, internal::None, internal::None, internal::None, 4596 internal::None, internal::None, internal::None, internal::None, 4597 internal::None, internal::None, internal::None, internal::None, 4598 internal::None, internal::None, internal::None, internal::None, 4599 internal::None, internal::None, internal::None, internal::None> { 4600 typedef internal::Types8<T1, T2, T3, T4, T5, T6, T7, T8> type; 4601 }; 4602 template <typename T1, typename T2, typename T3, typename T4, typename T5, 4603 typename T6, typename T7, typename T8, typename T9> 4604 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, 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, 4610 internal::None, internal::None, internal::None, internal::None, 4611 internal::None, internal::None, internal::None, internal::None, 4612 internal::None, internal::None, internal::None, internal::None, 4613 internal::None, internal::None, internal::None, internal::None, 4614 internal::None, internal::None, internal::None, internal::None> { 4615 typedef internal::Types9<T1, T2, T3, T4, T5, T6, T7, T8, T9> type; 4616 }; 4617 template <typename T1, typename T2, typename T3, typename T4, typename T5, 4618 typename T6, typename T7, typename T8, typename T9, typename T10> 4619 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, internal::None, 4620 internal::None, internal::None, internal::None, 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 internal::None, internal::None, internal::None, internal::None, 4628 internal::None, internal::None, internal::None, internal::None, 4629 internal::None, internal::None, internal::None> { 4630 typedef internal::Types10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> type; 4631 }; 4632 template <typename T1, typename T2, typename T3, typename T4, typename T5, 4633 typename T6, typename T7, typename T8, typename T9, typename T10, 4634 typename T11> 4635 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, internal::None, 4636 internal::None, internal::None, internal::None, internal::None, 4637 internal::None, internal::None, internal::None, 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, internal::None, 4644 internal::None, internal::None, internal::None, internal::None, 4645 internal::None, internal::None> { 4646 typedef internal::Types11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> type; 4647 }; 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> 4651 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, internal::None, 4652 internal::None, internal::None, internal::None, internal::None, 4653 internal::None, internal::None, internal::None, internal::None, 4654 internal::None, internal::None, internal::None, internal::None, 4655 internal::None, internal::None, internal::None, 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> { 4662 typedef internal::Types12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, 4663 T12> type; 4664 }; 4665 template <typename T1, typename T2, typename T3, typename T4, typename T5, 4666 typename T6, typename T7, typename T8, typename T9, typename T10, 4667 typename T11, typename T12, typename T13> 4668 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 4669 internal::None, internal::None, internal::None, internal::None, 4670 internal::None, internal::None, internal::None, internal::None, 4671 internal::None, internal::None, internal::None, internal::None, 4672 internal::None, internal::None, internal::None, internal::None, 4673 internal::None, internal::None, internal::None, internal::None, 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> { 4679 typedef internal::Types13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, 4680 T13> type; 4681 }; 4682 template <typename T1, typename T2, typename T3, typename T4, typename T5, 4683 typename T6, typename T7, typename T8, typename T9, typename T10, 4684 typename T11, typename T12, typename T13, typename T14> 4685 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 4686 internal::None, internal::None, internal::None, internal::None, 4687 internal::None, internal::None, internal::None, internal::None, 4688 internal::None, internal::None, internal::None, internal::None, 4689 internal::None, internal::None, internal::None, internal::None, 4690 internal::None, internal::None, internal::None, internal::None, 4691 internal::None, internal::None, internal::None, internal::None, 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 typedef internal::Types14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, 4696 T13, T14> type; 4697 }; 4698 template <typename T1, typename T2, typename T3, typename T4, typename T5, 4699 typename T6, typename T7, typename T8, typename T9, typename T10, 4700 typename T11, typename T12, typename T13, typename T14, typename T15> 4701 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 4702 internal::None, internal::None, internal::None, internal::None, 4703 internal::None, internal::None, internal::None, internal::None, 4704 internal::None, internal::None, internal::None, internal::None, 4705 internal::None, internal::None, internal::None, internal::None, 4706 internal::None, internal::None, internal::None, internal::None, 4707 internal::None, internal::None, internal::None, internal::None, 4708 internal::None, internal::None, internal::None, internal::None, 4709 internal::None, internal::None, internal::None, internal::None, 4710 internal::None, internal::None, internal::None> { 4711 typedef internal::Types15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, 4712 T13, T14, T15> type; 4713 }; 4714 template <typename T1, typename T2, typename T3, typename T4, typename T5, 4715 typename T6, typename T7, typename T8, typename T9, typename T10, 4716 typename T11, typename T12, typename T13, typename T14, typename T15, 4717 typename T16> 4718 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 4719 T16, internal::None, internal::None, internal::None, internal::None, 4720 internal::None, internal::None, internal::None, internal::None, 4721 internal::None, internal::None, internal::None, internal::None, 4722 internal::None, internal::None, internal::None, internal::None, 4723 internal::None, internal::None, internal::None, internal::None, 4724 internal::None, internal::None, internal::None, internal::None, 4725 internal::None, internal::None, internal::None, internal::None, 4726 internal::None, internal::None, internal::None, internal::None, 4727 internal::None, internal::None> { 4728 typedef internal::Types16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, 4729 T13, T14, T15, T16> type; 4730 }; 4731 template <typename T1, typename T2, typename T3, typename T4, typename T5, 4732 typename T6, typename T7, typename T8, typename T9, typename T10, 4733 typename T11, typename T12, typename T13, typename T14, typename T15, 4734 typename T16, typename T17> 4735 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 4736 T16, T17, internal::None, internal::None, internal::None, internal::None, 4737 internal::None, internal::None, internal::None, internal::None, 4738 internal::None, internal::None, internal::None, internal::None, 4739 internal::None, internal::None, internal::None, internal::None, 4740 internal::None, internal::None, internal::None, internal::None, 4741 internal::None, internal::None, internal::None, internal::None, 4742 internal::None, internal::None, internal::None, internal::None, 4743 internal::None, internal::None, internal::None, internal::None, 4744 internal::None> { 4745 typedef internal::Types17<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, 4746 T13, T14, T15, T16, T17> type; 4747 }; 4748 template <typename T1, typename T2, typename T3, typename T4, typename T5, 4749 typename T6, typename T7, typename T8, typename T9, typename T10, 4750 typename T11, typename T12, typename T13, typename T14, typename T15, 4751 typename T16, typename T17, typename T18> 4752 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 4753 T16, T17, T18, internal::None, internal::None, internal::None, 4754 internal::None, internal::None, internal::None, internal::None, 4755 internal::None, internal::None, internal::None, internal::None, 4756 internal::None, internal::None, internal::None, internal::None, 4757 internal::None, internal::None, internal::None, internal::None, 4758 internal::None, internal::None, internal::None, internal::None, 4759 internal::None, internal::None, internal::None, internal::None, 4760 internal::None, internal::None, internal::None, internal::None, 4761 internal::None> { 4762 typedef internal::Types18<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, 4763 T13, T14, T15, T16, T17, T18> type; 4764 }; 4765 template <typename T1, typename T2, typename T3, typename T4, typename T5, 4766 typename T6, typename T7, typename T8, typename T9, typename T10, 4767 typename T11, typename T12, typename T13, typename T14, typename T15, 4768 typename T16, typename T17, typename T18, typename T19> 4769 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 4770 T16, T17, T18, T19, internal::None, internal::None, internal::None, 4771 internal::None, internal::None, internal::None, internal::None, 4772 internal::None, internal::None, internal::None, internal::None, 4773 internal::None, internal::None, internal::None, internal::None, 4774 internal::None, internal::None, internal::None, internal::None, 4775 internal::None, internal::None, internal::None, internal::None, 4776 internal::None, internal::None, internal::None, internal::None, 4777 internal::None, internal::None, internal::None, internal::None> { 4778 typedef internal::Types19<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, 4779 T13, T14, T15, T16, T17, T18, T19> type; 4780 }; 4781 template <typename T1, typename T2, typename T3, typename T4, typename T5, 4782 typename T6, typename T7, typename T8, typename T9, typename T10, 4783 typename T11, typename T12, typename T13, typename T14, typename T15, 4784 typename T16, typename T17, typename T18, typename T19, typename T20> 4785 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 4786 T16, T17, T18, T19, T20, internal::None, internal::None, internal::None, 4787 internal::None, internal::None, internal::None, internal::None, 4788 internal::None, internal::None, internal::None, internal::None, 4789 internal::None, internal::None, internal::None, internal::None, 4790 internal::None, internal::None, internal::None, internal::None, 4791 internal::None, internal::None, internal::None, internal::None, 4792 internal::None, internal::None, internal::None, internal::None, 4793 internal::None, internal::None, internal::None> { 4794 typedef internal::Types20<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, 4795 T13, T14, T15, T16, T17, T18, T19, T20> type; 4796 }; 4797 template <typename T1, typename T2, typename T3, typename T4, typename T5, 4798 typename T6, typename T7, typename T8, typename T9, typename T10, 4799 typename T11, typename T12, typename T13, typename T14, typename T15, 4800 typename T16, typename T17, typename T18, typename T19, typename T20, 4801 typename T21> 4802 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 4803 T16, T17, T18, T19, T20, T21, internal::None, internal::None, 4804 internal::None, internal::None, internal::None, internal::None, 4805 internal::None, internal::None, internal::None, internal::None, 4806 internal::None, internal::None, internal::None, internal::None, 4807 internal::None, internal::None, internal::None, internal::None, 4808 internal::None, internal::None, internal::None, internal::None, 4809 internal::None, internal::None, internal::None, internal::None, 4810 internal::None, internal::None, internal::None> { 4811 typedef internal::Types21<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, 4812 T13, T14, T15, T16, T17, T18, T19, T20, T21> type; 4813 }; 4814 template <typename T1, typename T2, typename T3, typename T4, typename T5, 4815 typename T6, typename T7, typename T8, typename T9, typename T10, 4816 typename T11, typename T12, typename T13, typename T14, typename T15, 4817 typename T16, typename T17, typename T18, typename T19, typename T20, 4818 typename T21, typename T22> 4819 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 4820 T16, T17, T18, T19, T20, T21, T22, internal::None, internal::None, 4821 internal::None, internal::None, internal::None, internal::None, 4822 internal::None, internal::None, internal::None, internal::None, 4823 internal::None, internal::None, internal::None, internal::None, 4824 internal::None, internal::None, internal::None, internal::None, 4825 internal::None, internal::None, internal::None, internal::None, 4826 internal::None, internal::None, internal::None, internal::None, 4827 internal::None, internal::None> { 4828 typedef internal::Types22<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, 4829 T13, T14, T15, T16, T17, T18, T19, T20, T21, T22> type; 4830 }; 4831 template <typename T1, typename T2, typename T3, typename T4, typename T5, 4832 typename T6, typename T7, typename T8, typename T9, typename T10, 4833 typename T11, typename T12, typename T13, typename T14, typename T15, 4834 typename T16, typename T17, typename T18, typename T19, typename T20, 4835 typename T21, typename T22, typename T23> 4836 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 4837 T16, T17, T18, T19, T20, T21, T22, T23, internal::None, internal::None, 4838 internal::None, internal::None, internal::None, internal::None, 4839 internal::None, internal::None, internal::None, internal::None, 4840 internal::None, internal::None, internal::None, internal::None, 4841 internal::None, internal::None, internal::None, internal::None, 4842 internal::None, internal::None, internal::None, internal::None, 4843 internal::None, internal::None, internal::None, internal::None, 4844 internal::None> { 4845 typedef internal::Types23<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, 4846 T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23> type; 4847 }; 4848 template <typename T1, typename T2, typename T3, typename T4, typename T5, 4849 typename T6, typename T7, typename T8, typename T9, typename T10, 4850 typename T11, typename T12, typename T13, typename T14, typename T15, 4851 typename T16, typename T17, typename T18, typename T19, typename T20, 4852 typename T21, typename T22, typename T23, typename T24> 4853 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 4854 T16, T17, T18, T19, T20, T21, T22, T23, T24, 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, internal::None, internal::None, 4858 internal::None, internal::None, internal::None, internal::None, 4859 internal::None, internal::None, internal::None, internal::None, 4860 internal::None, internal::None, internal::None, internal::None, 4861 internal::None> { 4862 typedef internal::Types24<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, 4863 T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24> type; 4864 }; 4865 template <typename T1, typename T2, typename T3, typename T4, typename T5, 4866 typename T6, typename T7, typename T8, typename T9, typename T10, 4867 typename T11, typename T12, typename T13, typename T14, typename T15, 4868 typename T16, typename T17, typename T18, typename T19, typename T20, 4869 typename T21, typename T22, typename T23, typename T24, typename T25> 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, internal::None, 4872 internal::None, internal::None, internal::None, 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, internal::None, internal::None, 4876 internal::None, internal::None, internal::None, internal::None, 4877 internal::None, internal::None, internal::None, internal::None> { 4878 typedef internal::Types25<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, 4879 T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25> type; 4880 }; 4881 template <typename T1, typename T2, typename T3, typename T4, typename T5, 4882 typename T6, typename T7, typename T8, typename T9, typename T10, 4883 typename T11, typename T12, typename T13, typename T14, typename T15, 4884 typename T16, typename T17, typename T18, typename T19, typename T20, 4885 typename T21, typename T22, typename T23, typename T24, typename T25, 4886 typename T26> 4887 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 4888 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, internal::None, 4889 internal::None, internal::None, internal::None, internal::None, 4890 internal::None, internal::None, internal::None, internal::None, 4891 internal::None, internal::None, internal::None, internal::None, 4892 internal::None, internal::None, internal::None, internal::None, 4893 internal::None, internal::None, internal::None, internal::None, 4894 internal::None, internal::None, internal::None> { 4895 typedef internal::Types26<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, 4896 T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, 4897 T26> type; 4898 }; 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> 4905 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 4906 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, internal::None, 4907 internal::None, internal::None, internal::None, internal::None, 4908 internal::None, internal::None, internal::None, internal::None, 4909 internal::None, internal::None, internal::None, internal::None, 4910 internal::None, internal::None, internal::None, internal::None, 4911 internal::None, internal::None, internal::None, internal::None, 4912 internal::None, internal::None> { 4913 typedef internal::Types27<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> type; 4916 }; 4917 template <typename T1, typename T2, typename T3, typename T4, typename T5, 4918 typename T6, typename T7, typename T8, typename T9, typename T10, 4919 typename T11, typename T12, typename T13, typename T14, typename T15, 4920 typename T16, typename T17, typename T18, typename T19, typename T20, 4921 typename T21, typename T22, typename T23, typename T24, typename T25, 4922 typename T26, typename T27, typename T28> 4923 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 4924 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, 4925 internal::None, internal::None, internal::None, internal::None, 4926 internal::None, internal::None, internal::None, internal::None, 4927 internal::None, internal::None, internal::None, internal::None, 4928 internal::None, internal::None, internal::None, internal::None, 4929 internal::None, internal::None, internal::None, internal::None, 4930 internal::None, internal::None> { 4931 typedef internal::Types28<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, 4932 T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, 4933 T27, T28> type; 4934 }; 4935 template <typename T1, typename T2, typename T3, typename T4, typename T5, 4936 typename T6, typename T7, typename T8, typename T9, typename T10, 4937 typename T11, typename T12, typename T13, typename T14, typename T15, 4938 typename T16, typename T17, typename T18, typename T19, typename T20, 4939 typename T21, typename T22, typename T23, typename T24, typename T25, 4940 typename T26, typename T27, typename T28, typename T29> 4941 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 4942 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, 4943 internal::None, internal::None, internal::None, internal::None, 4944 internal::None, internal::None, internal::None, internal::None, 4945 internal::None, internal::None, internal::None, internal::None, 4946 internal::None, internal::None, internal::None, internal::None, 4947 internal::None, internal::None, internal::None, internal::None, 4948 internal::None> { 4949 typedef internal::Types29<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, 4950 T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, 4951 T27, T28, T29> type; 4952 }; 4953 template <typename T1, typename T2, typename T3, typename T4, typename T5, 4954 typename T6, typename T7, typename T8, typename T9, typename T10, 4955 typename T11, typename T12, typename T13, typename T14, typename T15, 4956 typename T16, typename T17, typename T18, typename T19, typename T20, 4957 typename T21, typename T22, typename T23, typename T24, typename T25, 4958 typename T26, typename T27, typename T28, typename T29, typename T30> 4959 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 4960 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, 4961 internal::None, internal::None, internal::None, internal::None, 4962 internal::None, internal::None, internal::None, internal::None, 4963 internal::None, internal::None, internal::None, internal::None, 4964 internal::None, internal::None, internal::None, internal::None, 4965 internal::None, internal::None, internal::None, internal::None> { 4966 typedef internal::Types30<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, 4967 T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, 4968 T27, T28, T29, T30> type; 4969 }; 4970 template <typename T1, typename T2, typename T3, typename T4, typename T5, 4971 typename T6, typename T7, typename T8, typename T9, typename T10, 4972 typename T11, typename T12, typename T13, typename T14, typename T15, 4973 typename T16, typename T17, typename T18, typename T19, typename T20, 4974 typename T21, typename T22, typename T23, typename T24, typename T25, 4975 typename T26, typename T27, typename T28, typename T29, typename T30, 4976 typename T31> 4977 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 4978 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, 4979 T31, internal::None, internal::None, internal::None, internal::None, 4980 internal::None, internal::None, internal::None, internal::None, 4981 internal::None, internal::None, internal::None, internal::None, 4982 internal::None, internal::None, internal::None, internal::None, 4983 internal::None, internal::None, internal::None> { 4984 typedef internal::Types31<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, 4985 T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, 4986 T27, T28, T29, T30, T31> type; 4987 }; 4988 template <typename T1, typename T2, typename T3, typename T4, typename T5, 4989 typename T6, typename T7, typename T8, typename T9, typename T10, 4990 typename T11, typename T12, typename T13, typename T14, typename T15, 4991 typename T16, typename T17, typename T18, typename T19, typename T20, 4992 typename T21, typename T22, typename T23, typename T24, typename T25, 4993 typename T26, typename T27, typename T28, typename T29, typename T30, 4994 typename T31, typename T32> 4995 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 4996 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, 4997 T31, T32, internal::None, internal::None, internal::None, internal::None, 4998 internal::None, internal::None, internal::None, internal::None, 4999 internal::None, internal::None, internal::None, internal::None, 5000 internal::None, internal::None, internal::None, internal::None, 5001 internal::None, internal::None> { 5002 typedef internal::Types32<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, 5003 T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, 5004 T27, T28, T29, T30, T31, T32> type; 5005 }; 5006 template <typename T1, typename T2, typename T3, typename T4, typename T5, 5007 typename T6, typename T7, typename T8, typename T9, typename T10, 5008 typename T11, typename T12, typename T13, typename T14, typename T15, 5009 typename T16, typename T17, typename T18, typename T19, typename T20, 5010 typename T21, typename T22, typename T23, typename T24, typename T25, 5011 typename T26, typename T27, typename T28, typename T29, typename T30, 5012 typename T31, typename T32, typename T33> 5013 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 5014 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, 5015 T31, T32, T33, internal::None, internal::None, internal::None, 5016 internal::None, internal::None, internal::None, internal::None, 5017 internal::None, internal::None, internal::None, internal::None, 5018 internal::None, internal::None, internal::None, internal::None, 5019 internal::None, internal::None> { 5020 typedef internal::Types33<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, 5021 T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, 5022 T27, T28, T29, T30, T31, T32, T33> type; 5023 }; 5024 template <typename T1, typename T2, typename T3, typename T4, typename T5, 5025 typename T6, typename T7, typename T8, typename T9, typename T10, 5026 typename T11, typename T12, typename T13, typename T14, typename T15, 5027 typename T16, typename T17, typename T18, typename T19, typename T20, 5028 typename T21, typename T22, typename T23, typename T24, typename T25, 5029 typename T26, typename T27, typename T28, typename T29, typename T30, 5030 typename T31, typename T32, typename T33, typename T34> 5031 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 5032 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, 5033 T31, T32, T33, T34, internal::None, internal::None, internal::None, 5034 internal::None, internal::None, internal::None, internal::None, 5035 internal::None, internal::None, internal::None, internal::None, 5036 internal::None, internal::None, internal::None, internal::None, 5037 internal::None> { 5038 typedef internal::Types34<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, 5039 T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, 5040 T27, T28, T29, T30, T31, T32, T33, T34> type; 5041 }; 5042 template <typename T1, typename T2, typename T3, typename T4, typename T5, 5043 typename T6, typename T7, typename T8, typename T9, typename T10, 5044 typename T11, typename T12, typename T13, typename T14, typename T15, 5045 typename T16, typename T17, typename T18, typename T19, typename T20, 5046 typename T21, typename T22, typename T23, typename T24, typename T25, 5047 typename T26, typename T27, typename T28, typename T29, typename T30, 5048 typename T31, typename T32, typename T33, typename T34, typename T35> 5049 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 5050 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, 5051 T31, T32, T33, T34, T35, internal::None, internal::None, internal::None, 5052 internal::None, internal::None, internal::None, internal::None, 5053 internal::None, internal::None, internal::None, internal::None, 5054 internal::None, internal::None, internal::None, internal::None> { 5055 typedef internal::Types35<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, 5056 T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, 5057 T27, T28, T29, T30, T31, T32, T33, T34, T35> type; 5058 }; 5059 template <typename T1, typename T2, typename T3, typename T4, typename T5, 5060 typename T6, typename T7, typename T8, typename T9, typename T10, 5061 typename T11, typename T12, typename T13, typename T14, typename T15, 5062 typename T16, typename T17, typename T18, typename T19, typename T20, 5063 typename T21, typename T22, typename T23, typename T24, typename T25, 5064 typename T26, typename T27, typename T28, typename T29, typename T30, 5065 typename T31, typename T32, typename T33, typename T34, typename T35, 5066 typename T36> 5067 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 5068 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, 5069 T31, T32, T33, T34, T35, T36, internal::None, internal::None, 5070 internal::None, internal::None, internal::None, internal::None, 5071 internal::None, internal::None, internal::None, internal::None, 5072 internal::None, internal::None, internal::None, internal::None> { 5073 typedef internal::Types36<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, 5074 T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, 5075 T27, T28, T29, T30, T31, T32, T33, T34, T35, T36> type; 5076 }; 5077 template <typename T1, typename T2, typename T3, typename T4, typename T5, 5078 typename T6, typename T7, typename T8, typename T9, typename T10, 5079 typename T11, typename T12, typename T13, typename T14, typename T15, 5080 typename T16, typename T17, typename T18, typename T19, typename T20, 5081 typename T21, typename T22, typename T23, typename T24, typename T25, 5082 typename T26, typename T27, typename T28, typename T29, typename T30, 5083 typename T31, typename T32, typename T33, typename T34, typename T35, 5084 typename T36, typename T37> 5085 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 5086 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, 5087 T31, T32, T33, T34, T35, T36, T37, internal::None, internal::None, 5088 internal::None, internal::None, internal::None, internal::None, 5089 internal::None, internal::None, internal::None, internal::None, 5090 internal::None, internal::None, internal::None> { 5091 typedef internal::Types37<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, 5092 T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, 5093 T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37> type; 5094 }; 5095 template <typename T1, typename T2, typename T3, typename T4, typename T5, 5096 typename T6, typename T7, typename T8, typename T9, typename T10, 5097 typename T11, typename T12, typename T13, typename T14, typename T15, 5098 typename T16, typename T17, typename T18, typename T19, typename T20, 5099 typename T21, typename T22, typename T23, typename T24, typename T25, 5100 typename T26, typename T27, typename T28, typename T29, typename T30, 5101 typename T31, typename T32, typename T33, typename T34, typename T35, 5102 typename T36, typename T37, typename T38> 5103 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 5104 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, 5105 T31, T32, T33, T34, T35, T36, T37, T38, internal::None, internal::None, 5106 internal::None, internal::None, internal::None, internal::None, 5107 internal::None, internal::None, internal::None, internal::None, 5108 internal::None, internal::None> { 5109 typedef internal::Types38<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, 5110 T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, 5111 T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38> type; 5112 }; 5113 template <typename T1, typename T2, typename T3, typename T4, typename T5, 5114 typename T6, typename T7, typename T8, typename T9, typename T10, 5115 typename T11, typename T12, typename T13, typename T14, typename T15, 5116 typename T16, typename T17, typename T18, typename T19, typename T20, 5117 typename T21, typename T22, typename T23, typename T24, typename T25, 5118 typename T26, typename T27, typename T28, typename T29, typename T30, 5119 typename T31, typename T32, typename T33, typename T34, typename T35, 5120 typename T36, typename T37, typename T38, typename T39> 5121 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 5122 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, 5123 T31, T32, T33, T34, T35, T36, T37, T38, T39, internal::None, 5124 internal::None, internal::None, internal::None, internal::None, 5125 internal::None, internal::None, internal::None, internal::None, 5126 internal::None, internal::None> { 5127 typedef internal::Types39<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, 5128 T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, 5129 T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39> type; 5130 }; 5131 template <typename T1, typename T2, typename T3, typename T4, typename T5, 5132 typename T6, typename T7, typename T8, typename T9, typename T10, 5133 typename T11, typename T12, typename T13, typename T14, typename T15, 5134 typename T16, typename T17, typename T18, typename T19, typename T20, 5135 typename T21, typename T22, typename T23, typename T24, typename T25, 5136 typename T26, typename T27, typename T28, typename T29, typename T30, 5137 typename T31, typename T32, typename T33, typename T34, typename T35, 5138 typename T36, typename T37, typename T38, typename T39, typename T40> 5139 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 5140 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, 5141 T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, internal::None, 5142 internal::None, internal::None, internal::None, internal::None, 5143 internal::None, internal::None, internal::None, internal::None, 5144 internal::None> { 5145 typedef internal::Types40<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, 5146 T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, 5147 T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, 5148 T40> type; 5149 }; 5150 template <typename T1, typename T2, typename T3, typename T4, typename T5, 5151 typename T6, typename T7, typename T8, typename T9, typename T10, 5152 typename T11, typename T12, typename T13, typename T14, typename T15, 5153 typename T16, typename T17, typename T18, typename T19, typename T20, 5154 typename T21, typename T22, typename T23, typename T24, typename T25, 5155 typename T26, typename T27, typename T28, typename T29, typename T30, 5156 typename T31, typename T32, typename T33, typename T34, typename T35, 5157 typename T36, typename T37, typename T38, typename T39, typename T40, 5158 typename T41> 5159 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 5160 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, 5161 T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, internal::None, 5162 internal::None, internal::None, internal::None, internal::None, 5163 internal::None, internal::None, internal::None, internal::None> { 5164 typedef internal::Types41<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, 5165 T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, 5166 T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, 5167 T41> type; 5168 }; 5169 template <typename T1, typename T2, typename T3, typename T4, typename T5, 5170 typename T6, typename T7, typename T8, typename T9, typename T10, 5171 typename T11, typename T12, typename T13, typename T14, typename T15, 5172 typename T16, typename T17, typename T18, typename T19, typename T20, 5173 typename T21, typename T22, typename T23, typename T24, typename T25, 5174 typename T26, typename T27, typename T28, typename T29, typename T30, 5175 typename T31, typename T32, typename T33, typename T34, typename T35, 5176 typename T36, typename T37, typename T38, typename T39, typename T40, 5177 typename T41, typename T42> 5178 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 5179 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, 5180 T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, internal::None, 5181 internal::None, internal::None, internal::None, internal::None, 5182 internal::None, internal::None, internal::None> { 5183 typedef internal::Types42<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, 5184 T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, 5185 T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, 5186 T41, T42> type; 5187 }; 5188 template <typename T1, typename T2, typename T3, typename T4, typename T5, 5189 typename T6, typename T7, typename T8, typename T9, typename T10, 5190 typename T11, typename T12, typename T13, typename T14, typename T15, 5191 typename T16, typename T17, typename T18, typename T19, typename T20, 5192 typename T21, typename T22, typename T23, typename T24, typename T25, 5193 typename T26, typename T27, typename T28, typename T29, typename T30, 5194 typename T31, typename T32, typename T33, typename T34, typename T35, 5195 typename T36, typename T37, typename T38, typename T39, typename T40, 5196 typename T41, typename T42, typename T43> 5197 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 5198 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, 5199 T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, 5200 internal::None, internal::None, internal::None, internal::None, 5201 internal::None, internal::None, internal::None> { 5202 typedef internal::Types43<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, 5203 T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, 5204 T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, 5205 T41, T42, T43> type; 5206 }; 5207 template <typename T1, typename T2, typename T3, typename T4, typename T5, 5208 typename T6, typename T7, typename T8, typename T9, typename T10, 5209 typename T11, typename T12, typename T13, typename T14, typename T15, 5210 typename T16, typename T17, typename T18, typename T19, typename T20, 5211 typename T21, typename T22, typename T23, typename T24, typename T25, 5212 typename T26, typename T27, typename T28, typename T29, typename T30, 5213 typename T31, typename T32, typename T33, typename T34, typename T35, 5214 typename T36, typename T37, typename T38, typename T39, typename T40, 5215 typename T41, typename T42, typename T43, typename T44> 5216 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 5217 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, 5218 T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44, 5219 internal::None, internal::None, internal::None, internal::None, 5220 internal::None, internal::None> { 5221 typedef internal::Types44<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, 5222 T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, 5223 T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, 5224 T41, T42, T43, T44> type; 5225 }; 5226 template <typename T1, typename T2, typename T3, typename T4, typename T5, 5227 typename T6, typename T7, typename T8, typename T9, typename T10, 5228 typename T11, typename T12, typename T13, typename T14, typename T15, 5229 typename T16, typename T17, typename T18, typename T19, typename T20, 5230 typename T21, typename T22, typename T23, typename T24, typename T25, 5231 typename T26, typename T27, typename T28, typename T29, typename T30, 5232 typename T31, typename T32, typename T33, typename T34, typename T35, 5233 typename T36, typename T37, typename T38, typename T39, typename T40, 5234 typename T41, typename T42, typename T43, typename T44, typename T45> 5235 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 5236 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, 5237 T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44, T45, 5238 internal::None, internal::None, internal::None, internal::None, 5239 internal::None> { 5240 typedef internal::Types45<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, 5241 T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, 5242 T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, 5243 T41, T42, T43, T44, T45> type; 5244 }; 5245 template <typename T1, typename T2, typename T3, typename T4, typename T5, 5246 typename T6, typename T7, typename T8, typename T9, typename T10, 5247 typename T11, typename T12, typename T13, typename T14, typename T15, 5248 typename T16, typename T17, typename T18, typename T19, typename T20, 5249 typename T21, typename T22, typename T23, typename T24, typename T25, 5250 typename T26, typename T27, typename T28, typename T29, typename T30, 5251 typename T31, typename T32, typename T33, typename T34, typename T35, 5252 typename T36, typename T37, typename T38, typename T39, typename T40, 5253 typename T41, typename T42, typename T43, typename T44, typename T45, 5254 typename T46> 5255 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 5256 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, 5257 T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44, T45, 5258 T46, internal::None, internal::None, internal::None, internal::None> { 5259 typedef internal::Types46<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, 5260 T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, 5261 T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, 5262 T41, T42, T43, T44, T45, T46> type; 5263 }; 5264 template <typename T1, typename T2, typename T3, typename T4, typename T5, 5265 typename T6, typename T7, typename T8, typename T9, typename T10, 5266 typename T11, typename T12, typename T13, typename T14, typename T15, 5267 typename T16, typename T17, typename T18, typename T19, typename T20, 5268 typename T21, typename T22, typename T23, typename T24, typename T25, 5269 typename T26, typename T27, typename T28, typename T29, typename T30, 5270 typename T31, typename T32, typename T33, typename T34, typename T35, 5271 typename T36, typename T37, typename T38, typename T39, typename T40, 5272 typename T41, typename T42, typename T43, typename T44, typename T45, 5273 typename T46, typename T47> 5274 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 5275 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, 5276 T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44, T45, 5277 T46, T47, internal::None, internal::None, internal::None> { 5278 typedef internal::Types47<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, 5279 T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, 5280 T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, 5281 T41, T42, T43, T44, T45, T46, T47> type; 5282 }; 5283 template <typename T1, typename T2, typename T3, typename T4, typename T5, 5284 typename T6, typename T7, typename T8, typename T9, typename T10, 5285 typename T11, typename T12, typename T13, typename T14, typename T15, 5286 typename T16, typename T17, typename T18, typename T19, typename T20, 5287 typename T21, typename T22, typename T23, typename T24, typename T25, 5288 typename T26, typename T27, typename T28, typename T29, typename T30, 5289 typename T31, typename T32, typename T33, typename T34, typename T35, 5290 typename T36, typename T37, typename T38, typename T39, typename T40, 5291 typename T41, typename T42, typename T43, typename T44, typename T45, 5292 typename T46, typename T47, typename T48> 5293 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 5294 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, 5295 T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44, T45, 5296 T46, T47, T48, internal::None, internal::None> { 5297 typedef internal::Types48<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, 5298 T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, 5299 T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, 5300 T41, T42, T43, T44, T45, T46, T47, T48> type; 5301 }; 5302 template <typename T1, typename T2, typename T3, typename T4, typename T5, 5303 typename T6, typename T7, typename T8, typename T9, typename T10, 5304 typename T11, typename T12, typename T13, typename T14, typename T15, 5305 typename T16, typename T17, typename T18, typename T19, typename T20, 5306 typename T21, typename T22, typename T23, typename T24, typename T25, 5307 typename T26, typename T27, typename T28, typename T29, typename T30, 5308 typename T31, typename T32, typename T33, typename T34, typename T35, 5309 typename T36, typename T37, typename T38, typename T39, typename T40, 5310 typename T41, typename T42, typename T43, typename T44, typename T45, 5311 typename T46, typename T47, typename T48, typename T49> 5312 struct Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, 5313 T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, 5314 T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44, T45, 5315 T46, T47, T48, T49, internal::None> { 5316 typedef internal::Types49<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, 5317 T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, 5318 T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, 5319 T41, T42, T43, T44, T45, T46, T47, T48, T49> type; 5320 }; 5321 5322 namespace internal { 5323 5324 # define GTEST_TEMPLATE_ template <typename T> class 5325 5326 // The template "selector" struct TemplateSel<Tmpl> is used to 5327 // represent Tmpl, which must be a class template with one type 5328 // parameter, as a type. TemplateSel<Tmpl>::Bind<T>::type is defined 5329 // as the type Tmpl<T>. This allows us to actually instantiate the 5330 // template "selected" by TemplateSel<Tmpl>. 5331 // 5332 // This trick is necessary for simulating typedef for class templates, 5333 // which C++ doesn't support directly. 5334 template <GTEST_TEMPLATE_ Tmpl> 5335 struct TemplateSel { 5336 template <typename T> 5337 struct Bind { 5338 typedef Tmpl<T> type; 5339 }; 5340 }; 5341 5342 # define GTEST_BIND_(TmplSel, T) \ 5343 TmplSel::template Bind<T>::type 5344 5345 // A unique struct template used as the default value for the 5346 // arguments of class template Templates. This allows us to simulate 5347 // variadic templates (e.g. Templates<int>, Templates<int, double>, 5348 // and etc), which C++ doesn't support directly. 5349 template <typename T> 5350 struct NoneT {}; 5351 5352 // The following family of struct and struct templates are used to 5353 // represent template lists. In particular, TemplatesN<T1, T2, ..., 5354 // TN> represents a list of N templates (T1, T2, ..., and TN). Except 5355 // for Templates0, every struct in the family has two member types: 5356 // Head for the selector of the first template in the list, and Tail 5357 // for the rest of the list. 5358 5359 // The empty template list. 5360 struct Templates0 {}; 5361 5362 // Template lists of length 1, 2, 3, and so on. 5363 5364 template <GTEST_TEMPLATE_ T1> 5365 struct Templates1 { 5366 typedef TemplateSel<T1> Head; 5367 typedef Templates0 Tail; 5368 }; 5369 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2> 5370 struct Templates2 { 5371 typedef TemplateSel<T1> Head; 5372 typedef Templates1<T2> Tail; 5373 }; 5374 5375 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3> 5376 struct Templates3 { 5377 typedef TemplateSel<T1> Head; 5378 typedef Templates2<T2, T3> Tail; 5379 }; 5380 5381 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 5382 GTEST_TEMPLATE_ T4> 5383 struct Templates4 { 5384 typedef TemplateSel<T1> Head; 5385 typedef Templates3<T2, T3, T4> Tail; 5386 }; 5387 5388 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 5389 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5> 5390 struct Templates5 { 5391 typedef TemplateSel<T1> Head; 5392 typedef Templates4<T2, T3, T4, T5> Tail; 5393 }; 5394 5395 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 5396 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6> 5397 struct Templates6 { 5398 typedef TemplateSel<T1> Head; 5399 typedef Templates5<T2, T3, T4, T5, T6> Tail; 5400 }; 5401 5402 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 5403 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 5404 GTEST_TEMPLATE_ T7> 5405 struct Templates7 { 5406 typedef TemplateSel<T1> Head; 5407 typedef Templates6<T2, T3, T4, T5, T6, T7> Tail; 5408 }; 5409 5410 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 5411 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 5412 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8> 5413 struct Templates8 { 5414 typedef TemplateSel<T1> Head; 5415 typedef Templates7<T2, T3, T4, T5, T6, T7, T8> Tail; 5416 }; 5417 5418 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 5419 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 5420 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9> 5421 struct Templates9 { 5422 typedef TemplateSel<T1> Head; 5423 typedef Templates8<T2, T3, T4, T5, T6, T7, T8, T9> Tail; 5424 }; 5425 5426 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 5427 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 5428 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 5429 GTEST_TEMPLATE_ T10> 5430 struct Templates10 { 5431 typedef TemplateSel<T1> Head; 5432 typedef Templates9<T2, T3, T4, T5, T6, T7, T8, T9, T10> Tail; 5433 }; 5434 5435 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 5436 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 5437 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 5438 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11> 5439 struct Templates11 { 5440 typedef TemplateSel<T1> Head; 5441 typedef Templates10<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> Tail; 5442 }; 5443 5444 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 5445 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 5446 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 5447 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12> 5448 struct Templates12 { 5449 typedef TemplateSel<T1> Head; 5450 typedef Templates11<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> Tail; 5451 }; 5452 5453 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 5454 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 5455 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 5456 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 5457 GTEST_TEMPLATE_ T13> 5458 struct Templates13 { 5459 typedef TemplateSel<T1> Head; 5460 typedef Templates12<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> Tail; 5461 }; 5462 5463 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 5464 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 5465 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 5466 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 5467 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14> 5468 struct Templates14 { 5469 typedef TemplateSel<T1> Head; 5470 typedef Templates13<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 5471 T14> Tail; 5472 }; 5473 5474 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 5475 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 5476 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 5477 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 5478 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15> 5479 struct Templates15 { 5480 typedef TemplateSel<T1> Head; 5481 typedef Templates14<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 5482 T15> Tail; 5483 }; 5484 5485 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 5486 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 5487 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 5488 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 5489 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 5490 GTEST_TEMPLATE_ T16> 5491 struct Templates16 { 5492 typedef TemplateSel<T1> Head; 5493 typedef Templates15<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 5494 T15, T16> Tail; 5495 }; 5496 5497 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 5498 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 5499 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 5500 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 5501 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 5502 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17> 5503 struct Templates17 { 5504 typedef TemplateSel<T1> Head; 5505 typedef Templates16<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 5506 T15, T16, T17> Tail; 5507 }; 5508 5509 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 5510 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 5511 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 5512 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 5513 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 5514 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18> 5515 struct Templates18 { 5516 typedef TemplateSel<T1> Head; 5517 typedef Templates17<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 5518 T15, T16, T17, T18> Tail; 5519 }; 5520 5521 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 5522 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 5523 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 5524 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 5525 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 5526 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18, 5527 GTEST_TEMPLATE_ T19> 5528 struct Templates19 { 5529 typedef TemplateSel<T1> Head; 5530 typedef Templates18<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 5531 T15, T16, T17, T18, T19> Tail; 5532 }; 5533 5534 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 5535 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 5536 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 5537 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 5538 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 5539 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18, 5540 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20> 5541 struct Templates20 { 5542 typedef TemplateSel<T1> Head; 5543 typedef Templates19<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 5544 T15, T16, T17, T18, T19, T20> Tail; 5545 }; 5546 5547 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 5548 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 5549 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 5550 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 5551 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 5552 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18, 5553 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21> 5554 struct Templates21 { 5555 typedef TemplateSel<T1> Head; 5556 typedef Templates20<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 5557 T15, T16, T17, T18, T19, T20, T21> Tail; 5558 }; 5559 5560 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 5561 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 5562 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 5563 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 5564 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 5565 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18, 5566 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21, 5567 GTEST_TEMPLATE_ T22> 5568 struct Templates22 { 5569 typedef TemplateSel<T1> Head; 5570 typedef Templates21<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 5571 T15, T16, T17, T18, T19, T20, T21, T22> Tail; 5572 }; 5573 5574 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 5575 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 5576 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 5577 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 5578 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 5579 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18, 5580 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21, 5581 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23> 5582 struct Templates23 { 5583 typedef TemplateSel<T1> Head; 5584 typedef Templates22<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 5585 T15, T16, T17, T18, T19, T20, T21, T22, T23> Tail; 5586 }; 5587 5588 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 5589 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 5590 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 5591 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 5592 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 5593 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18, 5594 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21, 5595 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24> 5596 struct Templates24 { 5597 typedef TemplateSel<T1> Head; 5598 typedef Templates23<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 5599 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24> Tail; 5600 }; 5601 5602 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 5603 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 5604 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 5605 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 5606 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 5607 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18, 5608 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21, 5609 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24, 5610 GTEST_TEMPLATE_ T25> 5611 struct Templates25 { 5612 typedef TemplateSel<T1> Head; 5613 typedef Templates24<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> Tail; 5615 }; 5616 5617 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 5618 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 5619 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 5620 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 5621 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 5622 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18, 5623 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21, 5624 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24, 5625 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26> 5626 struct Templates26 { 5627 typedef TemplateSel<T1> Head; 5628 typedef Templates25<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 5629 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26> Tail; 5630 }; 5631 5632 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 5633 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 5634 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 5635 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 5636 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 5637 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18, 5638 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21, 5639 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24, 5640 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27> 5641 struct Templates27 { 5642 typedef TemplateSel<T1> Head; 5643 typedef Templates26<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 5644 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27> Tail; 5645 }; 5646 5647 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 5648 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 5649 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 5650 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 5651 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 5652 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18, 5653 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21, 5654 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24, 5655 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27, 5656 GTEST_TEMPLATE_ T28> 5657 struct Templates28 { 5658 typedef TemplateSel<T1> Head; 5659 typedef Templates27<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 5660 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, 5661 T28> Tail; 5662 }; 5663 5664 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 5665 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 5666 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 5667 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 5668 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 5669 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18, 5670 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21, 5671 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24, 5672 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27, 5673 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29> 5674 struct Templates29 { 5675 typedef TemplateSel<T1> Head; 5676 typedef Templates28<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> Tail; 5679 }; 5680 5681 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 5682 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 5683 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 5684 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 5685 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 5686 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18, 5687 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21, 5688 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24, 5689 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27, 5690 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30> 5691 struct Templates30 { 5692 typedef TemplateSel<T1> Head; 5693 typedef Templates29<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 5694 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, 5695 T29, T30> Tail; 5696 }; 5697 5698 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 5699 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 5700 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 5701 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 5702 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 5703 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18, 5704 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21, 5705 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24, 5706 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27, 5707 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30, 5708 GTEST_TEMPLATE_ T31> 5709 struct Templates31 { 5710 typedef TemplateSel<T1> Head; 5711 typedef Templates30<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 5712 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, 5713 T29, T30, T31> Tail; 5714 }; 5715 5716 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 5717 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 5718 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 5719 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 5720 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 5721 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18, 5722 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21, 5723 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24, 5724 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27, 5725 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30, 5726 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32> 5727 struct Templates32 { 5728 typedef TemplateSel<T1> Head; 5729 typedef Templates31<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 5730 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, 5731 T29, T30, T31, T32> Tail; 5732 }; 5733 5734 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 5735 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 5736 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 5737 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 5738 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 5739 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18, 5740 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21, 5741 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24, 5742 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27, 5743 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30, 5744 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33> 5745 struct Templates33 { 5746 typedef TemplateSel<T1> Head; 5747 typedef Templates32<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 5748 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, 5749 T29, T30, T31, T32, T33> Tail; 5750 }; 5751 5752 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 5753 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 5754 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 5755 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 5756 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 5757 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18, 5758 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21, 5759 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24, 5760 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27, 5761 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30, 5762 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33, 5763 GTEST_TEMPLATE_ T34> 5764 struct Templates34 { 5765 typedef TemplateSel<T1> Head; 5766 typedef Templates33<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 5767 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, 5768 T29, T30, T31, T32, T33, T34> Tail; 5769 }; 5770 5771 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 5772 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 5773 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 5774 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 5775 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 5776 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18, 5777 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21, 5778 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24, 5779 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27, 5780 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30, 5781 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33, 5782 GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35> 5783 struct Templates35 { 5784 typedef TemplateSel<T1> Head; 5785 typedef Templates34<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 5786 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, 5787 T29, T30, T31, T32, T33, T34, T35> Tail; 5788 }; 5789 5790 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 5791 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 5792 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 5793 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 5794 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 5795 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18, 5796 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21, 5797 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24, 5798 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27, 5799 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30, 5800 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33, 5801 GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36> 5802 struct Templates36 { 5803 typedef TemplateSel<T1> Head; 5804 typedef Templates35<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 5805 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, 5806 T29, T30, T31, T32, T33, T34, T35, T36> Tail; 5807 }; 5808 5809 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 5810 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 5811 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 5812 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 5813 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 5814 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18, 5815 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21, 5816 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24, 5817 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27, 5818 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30, 5819 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33, 5820 GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36, 5821 GTEST_TEMPLATE_ T37> 5822 struct Templates37 { 5823 typedef TemplateSel<T1> Head; 5824 typedef Templates36<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 5825 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, 5826 T29, T30, T31, T32, T33, T34, T35, T36, T37> Tail; 5827 }; 5828 5829 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 5830 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 5831 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 5832 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 5833 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 5834 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18, 5835 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21, 5836 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24, 5837 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27, 5838 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30, 5839 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33, 5840 GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36, 5841 GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38> 5842 struct Templates38 { 5843 typedef TemplateSel<T1> Head; 5844 typedef Templates37<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 5845 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, 5846 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38> Tail; 5847 }; 5848 5849 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 5850 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 5851 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 5852 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 5853 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 5854 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18, 5855 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21, 5856 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24, 5857 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27, 5858 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30, 5859 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33, 5860 GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36, 5861 GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39> 5862 struct Templates39 { 5863 typedef TemplateSel<T1> Head; 5864 typedef Templates38<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 5865 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, 5866 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39> Tail; 5867 }; 5868 5869 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 5870 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 5871 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 5872 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 5873 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 5874 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18, 5875 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21, 5876 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24, 5877 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27, 5878 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30, 5879 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33, 5880 GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36, 5881 GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39, 5882 GTEST_TEMPLATE_ T40> 5883 struct Templates40 { 5884 typedef TemplateSel<T1> Head; 5885 typedef Templates39<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 5886 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, 5887 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40> Tail; 5888 }; 5889 5890 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 5891 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 5892 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 5893 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 5894 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 5895 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18, 5896 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21, 5897 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24, 5898 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27, 5899 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30, 5900 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33, 5901 GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36, 5902 GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39, 5903 GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41> 5904 struct Templates41 { 5905 typedef TemplateSel<T1> Head; 5906 typedef Templates40<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 5907 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, 5908 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41> Tail; 5909 }; 5910 5911 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 5912 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 5913 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 5914 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 5915 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 5916 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18, 5917 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21, 5918 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24, 5919 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27, 5920 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30, 5921 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33, 5922 GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36, 5923 GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39, 5924 GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42> 5925 struct Templates42 { 5926 typedef TemplateSel<T1> Head; 5927 typedef Templates41<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 5928 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, 5929 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, 5930 T42> Tail; 5931 }; 5932 5933 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 5934 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 5935 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 5936 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 5937 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 5938 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18, 5939 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21, 5940 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24, 5941 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27, 5942 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30, 5943 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33, 5944 GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36, 5945 GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39, 5946 GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42, 5947 GTEST_TEMPLATE_ T43> 5948 struct Templates43 { 5949 typedef TemplateSel<T1> Head; 5950 typedef Templates42<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 5951 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, 5952 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, 5953 T43> Tail; 5954 }; 5955 5956 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 5957 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 5958 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 5959 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 5960 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 5961 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18, 5962 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21, 5963 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24, 5964 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27, 5965 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30, 5966 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33, 5967 GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36, 5968 GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39, 5969 GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42, 5970 GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44> 5971 struct Templates44 { 5972 typedef TemplateSel<T1> Head; 5973 typedef Templates43<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 5974 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, 5975 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, 5976 T43, T44> Tail; 5977 }; 5978 5979 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 5980 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 5981 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 5982 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 5983 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 5984 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18, 5985 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21, 5986 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24, 5987 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27, 5988 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30, 5989 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33, 5990 GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36, 5991 GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39, 5992 GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42, 5993 GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45> 5994 struct Templates45 { 5995 typedef TemplateSel<T1> Head; 5996 typedef Templates44<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 5997 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, 5998 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, 5999 T43, T44, T45> Tail; 6000 }; 6001 6002 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 6003 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 6004 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 6005 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 6006 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 6007 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18, 6008 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21, 6009 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24, 6010 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27, 6011 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30, 6012 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33, 6013 GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36, 6014 GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39, 6015 GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42, 6016 GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45, 6017 GTEST_TEMPLATE_ T46> 6018 struct Templates46 { 6019 typedef TemplateSel<T1> Head; 6020 typedef Templates45<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 6021 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, 6022 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, 6023 T43, T44, T45, T46> Tail; 6024 }; 6025 6026 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 6027 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 6028 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 6029 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 6030 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 6031 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18, 6032 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21, 6033 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24, 6034 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27, 6035 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30, 6036 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33, 6037 GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36, 6038 GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39, 6039 GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42, 6040 GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45, 6041 GTEST_TEMPLATE_ T46, GTEST_TEMPLATE_ T47> 6042 struct Templates47 { 6043 typedef TemplateSel<T1> Head; 6044 typedef Templates46<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 6045 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, 6046 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, 6047 T43, T44, T45, T46, T47> Tail; 6048 }; 6049 6050 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 6051 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 6052 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 6053 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 6054 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 6055 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18, 6056 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21, 6057 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24, 6058 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27, 6059 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30, 6060 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33, 6061 GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36, 6062 GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39, 6063 GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42, 6064 GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45, 6065 GTEST_TEMPLATE_ T46, GTEST_TEMPLATE_ T47, GTEST_TEMPLATE_ T48> 6066 struct Templates48 { 6067 typedef TemplateSel<T1> Head; 6068 typedef Templates47<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 6069 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, 6070 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, 6071 T43, T44, T45, T46, T47, T48> Tail; 6072 }; 6073 6074 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 6075 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 6076 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 6077 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 6078 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 6079 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18, 6080 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21, 6081 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24, 6082 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27, 6083 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30, 6084 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33, 6085 GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36, 6086 GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39, 6087 GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42, 6088 GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45, 6089 GTEST_TEMPLATE_ T46, GTEST_TEMPLATE_ T47, GTEST_TEMPLATE_ T48, 6090 GTEST_TEMPLATE_ T49> 6091 struct Templates49 { 6092 typedef TemplateSel<T1> Head; 6093 typedef Templates48<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 6094 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, 6095 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, 6096 T43, T44, T45, T46, T47, T48, T49> Tail; 6097 }; 6098 6099 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 6100 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 6101 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 6102 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 6103 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 6104 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18, 6105 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21, 6106 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24, 6107 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27, 6108 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30, 6109 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33, 6110 GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36, 6111 GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39, 6112 GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42, 6113 GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45, 6114 GTEST_TEMPLATE_ T46, GTEST_TEMPLATE_ T47, GTEST_TEMPLATE_ T48, 6115 GTEST_TEMPLATE_ T49, GTEST_TEMPLATE_ T50> 6116 struct Templates50 { 6117 typedef TemplateSel<T1> Head; 6118 typedef Templates49<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 6119 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, 6120 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, 6121 T43, T44, T45, T46, T47, T48, T49, T50> Tail; 6122 }; 6123 6124 6125 // We don't want to require the users to write TemplatesN<...> directly, 6126 // as that would require them to count the length. Templates<...> is much 6127 // easier to write, but generates horrible messages when there is a 6128 // compiler error, as gcc insists on printing out each template 6129 // argument, even if it has the default value (this means Templates<list> 6130 // will appear as Templates<list, NoneT, NoneT, ..., NoneT> in the compiler 6131 // errors). 6132 // 6133 // Our solution is to combine the best part of the two approaches: a 6134 // user would write Templates<T1, ..., TN>, and Google Test will translate 6135 // that to TemplatesN<T1, ..., TN> internally to make error messages 6136 // readable. The translation is done by the 'type' member of the 6137 // Templates template. 6138 template <GTEST_TEMPLATE_ T1 = NoneT, GTEST_TEMPLATE_ T2 = NoneT, 6139 GTEST_TEMPLATE_ T3 = NoneT, GTEST_TEMPLATE_ T4 = NoneT, 6140 GTEST_TEMPLATE_ T5 = NoneT, GTEST_TEMPLATE_ T6 = NoneT, 6141 GTEST_TEMPLATE_ T7 = NoneT, GTEST_TEMPLATE_ T8 = NoneT, 6142 GTEST_TEMPLATE_ T9 = NoneT, GTEST_TEMPLATE_ T10 = NoneT, 6143 GTEST_TEMPLATE_ T11 = NoneT, GTEST_TEMPLATE_ T12 = NoneT, 6144 GTEST_TEMPLATE_ T13 = NoneT, GTEST_TEMPLATE_ T14 = NoneT, 6145 GTEST_TEMPLATE_ T15 = NoneT, GTEST_TEMPLATE_ T16 = NoneT, 6146 GTEST_TEMPLATE_ T17 = NoneT, GTEST_TEMPLATE_ T18 = NoneT, 6147 GTEST_TEMPLATE_ T19 = NoneT, GTEST_TEMPLATE_ T20 = NoneT, 6148 GTEST_TEMPLATE_ T21 = NoneT, GTEST_TEMPLATE_ T22 = NoneT, 6149 GTEST_TEMPLATE_ T23 = NoneT, GTEST_TEMPLATE_ T24 = NoneT, 6150 GTEST_TEMPLATE_ T25 = NoneT, GTEST_TEMPLATE_ T26 = NoneT, 6151 GTEST_TEMPLATE_ T27 = NoneT, GTEST_TEMPLATE_ T28 = NoneT, 6152 GTEST_TEMPLATE_ T29 = NoneT, GTEST_TEMPLATE_ T30 = NoneT, 6153 GTEST_TEMPLATE_ T31 = NoneT, GTEST_TEMPLATE_ T32 = NoneT, 6154 GTEST_TEMPLATE_ T33 = NoneT, GTEST_TEMPLATE_ T34 = NoneT, 6155 GTEST_TEMPLATE_ T35 = NoneT, GTEST_TEMPLATE_ T36 = NoneT, 6156 GTEST_TEMPLATE_ T37 = NoneT, GTEST_TEMPLATE_ T38 = NoneT, 6157 GTEST_TEMPLATE_ T39 = NoneT, GTEST_TEMPLATE_ T40 = NoneT, 6158 GTEST_TEMPLATE_ T41 = NoneT, GTEST_TEMPLATE_ T42 = NoneT, 6159 GTEST_TEMPLATE_ T43 = NoneT, GTEST_TEMPLATE_ T44 = NoneT, 6160 GTEST_TEMPLATE_ T45 = NoneT, GTEST_TEMPLATE_ T46 = NoneT, 6161 GTEST_TEMPLATE_ T47 = NoneT, GTEST_TEMPLATE_ T48 = NoneT, 6162 GTEST_TEMPLATE_ T49 = NoneT, GTEST_TEMPLATE_ T50 = NoneT> 6163 struct Templates { 6164 typedef Templates50<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 6165 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, 6166 T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, 6167 T42, T43, T44, T45, T46, T47, T48, T49, T50> type; 6168 }; 6169 6170 template <> 6171 struct Templates<NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6172 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6173 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6174 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6175 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6176 NoneT> { 6177 typedef Templates0 type; 6178 }; 6179 template <GTEST_TEMPLATE_ T1> 6180 struct Templates<T1, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6181 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6182 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6183 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6184 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6185 NoneT> { 6186 typedef Templates1<T1> type; 6187 }; 6188 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2> 6189 struct Templates<T1, T2, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6190 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6191 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6192 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6193 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6194 NoneT> { 6195 typedef Templates2<T1, T2> type; 6196 }; 6197 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3> 6198 struct Templates<T1, T2, T3, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6199 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6200 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6201 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6202 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> { 6203 typedef Templates3<T1, T2, T3> type; 6204 }; 6205 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 6206 GTEST_TEMPLATE_ T4> 6207 struct Templates<T1, T2, T3, T4, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6208 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6209 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6210 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6211 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> { 6212 typedef Templates4<T1, T2, T3, T4> type; 6213 }; 6214 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 6215 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5> 6216 struct Templates<T1, T2, T3, T4, T5, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6217 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6218 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6219 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6220 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> { 6221 typedef Templates5<T1, T2, T3, T4, T5> type; 6222 }; 6223 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 6224 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6> 6225 struct Templates<T1, T2, T3, T4, T5, T6, NoneT, NoneT, NoneT, NoneT, NoneT, 6226 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6227 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6228 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6229 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> { 6230 typedef Templates6<T1, T2, T3, T4, T5, T6> type; 6231 }; 6232 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 6233 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 6234 GTEST_TEMPLATE_ T7> 6235 struct Templates<T1, T2, T3, T4, T5, T6, T7, NoneT, NoneT, NoneT, NoneT, NoneT, 6236 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6237 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6238 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6239 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> { 6240 typedef Templates7<T1, T2, T3, T4, T5, T6, T7> type; 6241 }; 6242 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 6243 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 6244 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8> 6245 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, NoneT, NoneT, NoneT, NoneT, 6246 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6247 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6248 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6249 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> { 6250 typedef Templates8<T1, T2, T3, T4, T5, T6, T7, T8> type; 6251 }; 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 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, NoneT, NoneT, NoneT, 6256 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6257 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6258 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6259 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> { 6260 typedef Templates9<T1, T2, T3, T4, T5, T6, T7, T8, T9> type; 6261 }; 6262 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 6263 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 6264 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 6265 GTEST_TEMPLATE_ T10> 6266 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, NoneT, NoneT, NoneT, 6267 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6268 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6269 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6270 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> { 6271 typedef Templates10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> type; 6272 }; 6273 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 6274 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 6275 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 6276 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11> 6277 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, NoneT, NoneT, 6278 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6279 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6280 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6281 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> { 6282 typedef Templates11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> type; 6283 }; 6284 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 6285 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 6286 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 6287 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12> 6288 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, NoneT, 6289 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6290 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6291 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6292 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> { 6293 typedef Templates12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> type; 6294 }; 6295 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 6296 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 6297 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 6298 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 6299 GTEST_TEMPLATE_ T13> 6300 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, NoneT, 6301 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6302 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6303 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6304 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> { 6305 typedef Templates13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, 6306 T13> type; 6307 }; 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> 6313 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 6314 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6315 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6316 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6317 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> { 6318 typedef Templates14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 6319 T14> type; 6320 }; 6321 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 6322 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 6323 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 6324 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 6325 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15> 6326 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 6327 T15, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6328 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6329 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6330 NoneT, NoneT, NoneT, NoneT, NoneT> { 6331 typedef Templates15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 6332 T14, T15> type; 6333 }; 6334 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 6335 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 6336 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 6337 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 6338 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 6339 GTEST_TEMPLATE_ T16> 6340 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 6341 T15, T16, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6342 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6343 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6344 NoneT, NoneT, NoneT, NoneT, NoneT> { 6345 typedef Templates16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 6346 T14, T15, T16> type; 6347 }; 6348 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 6349 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 6350 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 6351 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 6352 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 6353 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17> 6354 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 6355 T15, T16, T17, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6356 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6357 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6358 NoneT, NoneT, NoneT, NoneT, NoneT> { 6359 typedef Templates17<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 6360 T14, T15, T16, T17> type; 6361 }; 6362 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 6363 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 6364 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 6365 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 6366 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 6367 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18> 6368 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 6369 T15, T16, T17, T18, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6370 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6371 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6372 NoneT, NoneT, NoneT, NoneT> { 6373 typedef Templates18<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 6374 T14, T15, T16, T17, T18> type; 6375 }; 6376 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 6377 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 6378 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 6379 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 6380 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 6381 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18, 6382 GTEST_TEMPLATE_ T19> 6383 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 6384 T15, T16, T17, T18, T19, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6385 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6386 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6387 NoneT, NoneT, NoneT, NoneT> { 6388 typedef Templates19<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 6389 T14, T15, T16, T17, T18, T19> type; 6390 }; 6391 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 6392 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 6393 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 6394 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 6395 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 6396 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18, 6397 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20> 6398 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 6399 T15, T16, T17, T18, T19, T20, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6400 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6401 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6402 NoneT, NoneT, NoneT, NoneT> { 6403 typedef Templates20<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 6404 T14, T15, T16, T17, T18, T19, T20> type; 6405 }; 6406 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 6407 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 6408 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 6409 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 6410 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 6411 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18, 6412 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21> 6413 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 6414 T15, T16, T17, T18, T19, T20, T21, NoneT, NoneT, NoneT, NoneT, NoneT, 6415 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6416 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6417 NoneT, NoneT, NoneT, NoneT> { 6418 typedef Templates21<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 6419 T14, T15, T16, T17, T18, T19, T20, T21> type; 6420 }; 6421 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 6422 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 6423 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 6424 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 6425 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 6426 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18, 6427 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21, 6428 GTEST_TEMPLATE_ T22> 6429 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 6430 T15, T16, T17, T18, T19, T20, T21, T22, NoneT, NoneT, NoneT, NoneT, NoneT, 6431 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6432 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6433 NoneT, NoneT, NoneT> { 6434 typedef Templates22<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 6435 T14, T15, T16, T17, T18, T19, T20, T21, T22> type; 6436 }; 6437 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 6438 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 6439 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 6440 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 6441 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 6442 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18, 6443 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21, 6444 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23> 6445 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 6446 T15, T16, T17, T18, T19, T20, T21, T22, T23, NoneT, NoneT, NoneT, NoneT, 6447 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6448 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6449 NoneT, NoneT, NoneT> { 6450 typedef Templates23<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 6451 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23> type; 6452 }; 6453 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 6454 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 6455 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 6456 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 6457 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 6458 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18, 6459 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21, 6460 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24> 6461 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 6462 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, NoneT, NoneT, NoneT, 6463 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6464 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6465 NoneT, NoneT, NoneT> { 6466 typedef Templates24<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 6467 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24> type; 6468 }; 6469 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 6470 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 6471 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 6472 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 6473 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 6474 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18, 6475 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21, 6476 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24, 6477 GTEST_TEMPLATE_ T25> 6478 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 6479 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, NoneT, NoneT, NoneT, 6480 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6481 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6482 NoneT, NoneT> { 6483 typedef Templates25<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 6484 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25> type; 6485 }; 6486 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 6487 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 6488 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 6489 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 6490 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 6491 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18, 6492 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21, 6493 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24, 6494 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26> 6495 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 6496 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, NoneT, NoneT, 6497 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6498 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6499 NoneT, NoneT> { 6500 typedef Templates26<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 6501 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26> type; 6502 }; 6503 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 6504 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 6505 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 6506 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 6507 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 6508 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18, 6509 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21, 6510 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24, 6511 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27> 6512 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 6513 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, NoneT, 6514 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6515 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6516 NoneT, NoneT> { 6517 typedef Templates27<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 6518 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, 6519 T27> type; 6520 }; 6521 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 6522 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 6523 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 6524 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 6525 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 6526 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18, 6527 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21, 6528 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24, 6529 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27, 6530 GTEST_TEMPLATE_ T28> 6531 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 6532 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, 6533 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6534 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6535 NoneT, NoneT> { 6536 typedef Templates28<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 6537 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, 6538 T28> type; 6539 }; 6540 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 6541 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 6542 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 6543 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 6544 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 6545 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18, 6546 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21, 6547 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24, 6548 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27, 6549 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29> 6550 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 6551 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, 6552 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6553 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6554 NoneT> { 6555 typedef Templates29<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 6556 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, 6557 T28, T29> type; 6558 }; 6559 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 6560 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 6561 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 6562 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 6563 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 6564 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18, 6565 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21, 6566 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24, 6567 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27, 6568 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30> 6569 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 6570 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, 6571 T30, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6572 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> { 6573 typedef Templates30<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 6574 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, 6575 T28, T29, T30> type; 6576 }; 6577 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 6578 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 6579 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 6580 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 6581 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 6582 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18, 6583 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21, 6584 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24, 6585 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27, 6586 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30, 6587 GTEST_TEMPLATE_ T31> 6588 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 6589 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, 6590 T30, T31, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6591 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> { 6592 typedef Templates31<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 6593 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, 6594 T28, T29, T30, T31> type; 6595 }; 6596 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 6597 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 6598 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 6599 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 6600 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 6601 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18, 6602 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21, 6603 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24, 6604 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27, 6605 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30, 6606 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32> 6607 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 6608 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, 6609 T30, T31, T32, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6610 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> { 6611 typedef Templates32<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 6612 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, 6613 T28, T29, T30, T31, T32> type; 6614 }; 6615 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 6616 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 6617 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 6618 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 6619 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 6620 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18, 6621 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21, 6622 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24, 6623 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27, 6624 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30, 6625 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33> 6626 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 6627 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, 6628 T30, T31, T32, T33, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6629 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> { 6630 typedef Templates33<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 6631 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, 6632 T28, T29, T30, T31, T32, T33> type; 6633 }; 6634 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 6635 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 6636 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 6637 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 6638 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 6639 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18, 6640 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21, 6641 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24, 6642 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27, 6643 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30, 6644 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33, 6645 GTEST_TEMPLATE_ T34> 6646 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 6647 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, 6648 T30, T31, T32, T33, T34, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6649 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> { 6650 typedef Templates34<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 6651 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, 6652 T28, T29, T30, T31, T32, T33, T34> type; 6653 }; 6654 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 6655 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 6656 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 6657 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 6658 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 6659 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18, 6660 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21, 6661 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24, 6662 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27, 6663 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30, 6664 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33, 6665 GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35> 6666 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 6667 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, 6668 T30, T31, T32, T33, T34, T35, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, 6669 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> { 6670 typedef Templates35<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 6671 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, 6672 T28, T29, T30, T31, T32, T33, T34, T35> type; 6673 }; 6674 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 6675 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 6676 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 6677 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 6678 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 6679 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18, 6680 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21, 6681 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24, 6682 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27, 6683 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30, 6684 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33, 6685 GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36> 6686 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 6687 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, 6688 T30, T31, T32, T33, T34, T35, T36, NoneT, NoneT, NoneT, NoneT, NoneT, 6689 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> { 6690 typedef Templates36<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 6691 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, 6692 T28, T29, T30, T31, T32, T33, T34, T35, T36> type; 6693 }; 6694 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 6695 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 6696 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 6697 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 6698 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 6699 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18, 6700 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21, 6701 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24, 6702 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27, 6703 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30, 6704 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33, 6705 GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36, 6706 GTEST_TEMPLATE_ T37> 6707 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 6708 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, 6709 T30, T31, T32, T33, T34, T35, T36, T37, NoneT, NoneT, NoneT, NoneT, NoneT, 6710 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> { 6711 typedef Templates37<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 6712 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, 6713 T28, T29, T30, T31, T32, T33, T34, T35, T36, T37> type; 6714 }; 6715 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 6716 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 6717 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 6718 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 6719 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 6720 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18, 6721 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21, 6722 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24, 6723 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27, 6724 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30, 6725 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33, 6726 GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36, 6727 GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38> 6728 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 6729 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, 6730 T30, T31, T32, T33, T34, T35, T36, T37, T38, NoneT, NoneT, NoneT, NoneT, 6731 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> { 6732 typedef Templates38<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 6733 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, 6734 T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38> type; 6735 }; 6736 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 6737 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 6738 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 6739 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 6740 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 6741 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18, 6742 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21, 6743 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24, 6744 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27, 6745 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30, 6746 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33, 6747 GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36, 6748 GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39> 6749 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 6750 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, 6751 T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, NoneT, NoneT, NoneT, 6752 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> { 6753 typedef Templates39<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 6754 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, 6755 T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39> type; 6756 }; 6757 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 6758 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 6759 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 6760 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 6761 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 6762 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18, 6763 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21, 6764 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24, 6765 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27, 6766 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30, 6767 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33, 6768 GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36, 6769 GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39, 6770 GTEST_TEMPLATE_ T40> 6771 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 6772 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, 6773 T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, NoneT, NoneT, NoneT, 6774 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> { 6775 typedef Templates40<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 6776 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, 6777 T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40> type; 6778 }; 6779 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 6780 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 6781 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 6782 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 6783 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 6784 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18, 6785 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21, 6786 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24, 6787 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27, 6788 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30, 6789 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33, 6790 GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36, 6791 GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39, 6792 GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41> 6793 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 6794 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, 6795 T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, NoneT, NoneT, 6796 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> { 6797 typedef Templates41<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 6798 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, 6799 T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, 6800 T41> type; 6801 }; 6802 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 6803 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 6804 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 6805 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 6806 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 6807 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18, 6808 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21, 6809 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24, 6810 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27, 6811 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30, 6812 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33, 6813 GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36, 6814 GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39, 6815 GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42> 6816 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 6817 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, 6818 T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, NoneT, 6819 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> { 6820 typedef Templates42<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 6821 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, 6822 T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, 6823 T42> type; 6824 }; 6825 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 6826 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 6827 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 6828 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 6829 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 6830 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18, 6831 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21, 6832 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24, 6833 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27, 6834 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30, 6835 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33, 6836 GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36, 6837 GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39, 6838 GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42, 6839 GTEST_TEMPLATE_ T43> 6840 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 6841 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, 6842 T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, 6843 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> { 6844 typedef Templates43<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 6845 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, 6846 T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, 6847 T42, T43> type; 6848 }; 6849 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 6850 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 6851 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 6852 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 6853 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 6854 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18, 6855 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21, 6856 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24, 6857 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27, 6858 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30, 6859 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33, 6860 GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36, 6861 GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39, 6862 GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42, 6863 GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44> 6864 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 6865 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, 6866 T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44, 6867 NoneT, NoneT, NoneT, NoneT, NoneT, NoneT> { 6868 typedef Templates44<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 6869 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, 6870 T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, 6871 T42, T43, T44> type; 6872 }; 6873 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 6874 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 6875 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 6876 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 6877 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 6878 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18, 6879 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21, 6880 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24, 6881 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27, 6882 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30, 6883 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33, 6884 GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36, 6885 GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39, 6886 GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42, 6887 GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45> 6888 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 6889 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, 6890 T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44, 6891 T45, NoneT, NoneT, NoneT, NoneT, NoneT> { 6892 typedef Templates45<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 6893 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, 6894 T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, 6895 T42, T43, T44, T45> type; 6896 }; 6897 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 6898 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 6899 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 6900 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 6901 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 6902 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18, 6903 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21, 6904 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24, 6905 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27, 6906 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30, 6907 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33, 6908 GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36, 6909 GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39, 6910 GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42, 6911 GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45, 6912 GTEST_TEMPLATE_ T46> 6913 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 6914 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, 6915 T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44, 6916 T45, T46, NoneT, NoneT, NoneT, NoneT> { 6917 typedef Templates46<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 6918 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, 6919 T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, 6920 T42, T43, T44, T45, T46> type; 6921 }; 6922 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 6923 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 6924 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 6925 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 6926 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 6927 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18, 6928 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21, 6929 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24, 6930 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27, 6931 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30, 6932 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33, 6933 GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36, 6934 GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39, 6935 GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42, 6936 GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45, 6937 GTEST_TEMPLATE_ T46, GTEST_TEMPLATE_ T47> 6938 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 6939 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, 6940 T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44, 6941 T45, T46, T47, NoneT, NoneT, NoneT> { 6942 typedef Templates47<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 6943 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, 6944 T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, 6945 T42, T43, T44, T45, T46, T47> type; 6946 }; 6947 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 6948 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 6949 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 6950 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 6951 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 6952 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18, 6953 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21, 6954 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24, 6955 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27, 6956 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30, 6957 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33, 6958 GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36, 6959 GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39, 6960 GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42, 6961 GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45, 6962 GTEST_TEMPLATE_ T46, GTEST_TEMPLATE_ T47, GTEST_TEMPLATE_ T48> 6963 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 6964 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, 6965 T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44, 6966 T45, T46, T47, T48, NoneT, NoneT> { 6967 typedef Templates48<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 6968 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, 6969 T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, 6970 T42, T43, T44, T45, T46, T47, T48> type; 6971 }; 6972 template <GTEST_TEMPLATE_ T1, GTEST_TEMPLATE_ T2, GTEST_TEMPLATE_ T3, 6973 GTEST_TEMPLATE_ T4, GTEST_TEMPLATE_ T5, GTEST_TEMPLATE_ T6, 6974 GTEST_TEMPLATE_ T7, GTEST_TEMPLATE_ T8, GTEST_TEMPLATE_ T9, 6975 GTEST_TEMPLATE_ T10, GTEST_TEMPLATE_ T11, GTEST_TEMPLATE_ T12, 6976 GTEST_TEMPLATE_ T13, GTEST_TEMPLATE_ T14, GTEST_TEMPLATE_ T15, 6977 GTEST_TEMPLATE_ T16, GTEST_TEMPLATE_ T17, GTEST_TEMPLATE_ T18, 6978 GTEST_TEMPLATE_ T19, GTEST_TEMPLATE_ T20, GTEST_TEMPLATE_ T21, 6979 GTEST_TEMPLATE_ T22, GTEST_TEMPLATE_ T23, GTEST_TEMPLATE_ T24, 6980 GTEST_TEMPLATE_ T25, GTEST_TEMPLATE_ T26, GTEST_TEMPLATE_ T27, 6981 GTEST_TEMPLATE_ T28, GTEST_TEMPLATE_ T29, GTEST_TEMPLATE_ T30, 6982 GTEST_TEMPLATE_ T31, GTEST_TEMPLATE_ T32, GTEST_TEMPLATE_ T33, 6983 GTEST_TEMPLATE_ T34, GTEST_TEMPLATE_ T35, GTEST_TEMPLATE_ T36, 6984 GTEST_TEMPLATE_ T37, GTEST_TEMPLATE_ T38, GTEST_TEMPLATE_ T39, 6985 GTEST_TEMPLATE_ T40, GTEST_TEMPLATE_ T41, GTEST_TEMPLATE_ T42, 6986 GTEST_TEMPLATE_ T43, GTEST_TEMPLATE_ T44, GTEST_TEMPLATE_ T45, 6987 GTEST_TEMPLATE_ T46, GTEST_TEMPLATE_ T47, GTEST_TEMPLATE_ T48, 6988 GTEST_TEMPLATE_ T49> 6989 struct Templates<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, 6990 T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, 6991 T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, T44, 6992 T45, T46, T47, T48, T49, NoneT> { 6993 typedef Templates49<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 6994 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, 6995 T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, 6996 T42, T43, T44, T45, T46, T47, T48, T49> type; 6997 }; 6998 6999 // The TypeList template makes it possible to use either a single type 7000 // or a Types<...> list in TYPED_TEST_CASE() and 7001 // INSTANTIATE_TYPED_TEST_CASE_P(). 7002 7003 template <typename T> 7004 struct TypeList { 7005 typedef Types1<T> type; 7006 }; 7007 7008 template <typename T1, typename T2, typename T3, typename T4, typename T5, 7009 typename T6, typename T7, typename T8, typename T9, typename T10, 7010 typename T11, typename T12, typename T13, typename T14, typename T15, 7011 typename T16, typename T17, typename T18, typename T19, typename T20, 7012 typename T21, typename T22, typename T23, typename T24, typename T25, 7013 typename T26, typename T27, typename T28, typename T29, typename T30, 7014 typename T31, typename T32, typename T33, typename T34, typename T35, 7015 typename T36, typename T37, typename T38, typename T39, typename T40, 7016 typename T41, typename T42, typename T43, typename T44, typename T45, 7017 typename T46, typename T47, typename T48, typename T49, typename T50> 7018 struct TypeList<Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 7019 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, 7020 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, 7021 T44, T45, T46, T47, T48, T49, T50> > { 7022 typedef typename Types<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, 7023 T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, 7024 T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, 7025 T41, T42, T43, T44, T45, T46, T47, T48, T49, T50>::type type; 7026 }; 7027 7028 #endif // GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P 7029 7030 } // namespace internal 7031 } // namespace testing 7032 7033 #endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_ 7034 7035 // Due to C++ preprocessor weirdness, we need double indirection to 7036 // concatenate two tokens when one of them is __LINE__. Writing 7037 // 7038 // foo ## __LINE__ 7039 // 7040 // will result in the token foo__LINE__, instead of foo followed by 7041 // the current line number. For more details, see 7042 // http://www.parashift.com/c++-faq-lite/misc-technical-issues.html#faq-39.6 7043 #define GTEST_CONCAT_TOKEN_(foo, bar) GTEST_CONCAT_TOKEN_IMPL_(foo, bar) 7044 #define GTEST_CONCAT_TOKEN_IMPL_(foo, bar) foo ## bar 7045 7046 class ProtocolMessage; 7047 namespace proto2 { class Message; } 7048 7049 namespace testing { 7050 7051 // Forward declarations. 7052 7053 class AssertionResult; // Result of an assertion. 7054 class Message; // Represents a failure message. 7055 class Test; // Represents a test. 7056 class TestInfo; // Information about a test. 7057 class TestPartResult; // Result of a test part. 7058 class UnitTest; // A collection of test cases. 7059 7060 template <typename T> 7061 ::std::string PrintToString(const T& value); 7062 7063 namespace internal { 7064 7065 struct TraceInfo; // Information about a trace point. 7066 class ScopedTrace; // Implements scoped trace. 7067 class TestInfoImpl; // Opaque implementation of TestInfo 7068 class UnitTestImpl; // Opaque implementation of UnitTest 7069 7070 // How many times InitGoogleTest() has been called. 7071 GTEST_API_ extern int g_init_gtest_count; 7072 7073 // The text used in failure messages to indicate the start of the 7074 // stack trace. 7075 GTEST_API_ extern const char kStackTraceMarker[]; 7076 7077 // Two overloaded helpers for checking at compile time whether an 7078 // expression is a null pointer literal (i.e. NULL or any 0-valued 7079 // compile-time integral constant). Their return values have 7080 // different sizes, so we can use sizeof() to test which version is 7081 // picked by the compiler. These helpers have no implementations, as 7082 // we only need their signatures. 7083 // 7084 // Given IsNullLiteralHelper(x), the compiler will pick the first 7085 // version if x can be implicitly converted to Secret*, and pick the 7086 // second version otherwise. Since Secret is a secret and incomplete 7087 // type, the only expression a user can write that has type Secret* is 7088 // a null pointer literal. Therefore, we know that x is a null 7089 // pointer literal if and only if the first version is picked by the 7090 // compiler. 7091 char IsNullLiteralHelper(Secret* p); 7092 char(&IsNullLiteralHelper(...))[2]; // NOLINT 7093 7094 // A compile-time bool constant that is true if and only if x is a 7095 // null pointer literal (i.e. NULL or any 0-valued compile-time 7096 // integral constant). 7097 #ifdef GTEST_ELLIPSIS_NEEDS_POD_ 7098 // We lose support for NULL detection where the compiler doesn't like 7099 // passing non-POD classes through ellipsis (...). 7100 # define GTEST_IS_NULL_LITERAL_(x) false 7101 #else 7102 # define GTEST_IS_NULL_LITERAL_(x) \ 7103 (sizeof(::testing::internal::IsNullLiteralHelper(x)) == 1) 7104 #endif // GTEST_ELLIPSIS_NEEDS_POD_ 7105 7106 // Appends the user-supplied message to the Google-Test-generated message. 7107 GTEST_API_ std::string AppendUserMessage( 7108 const std::string& gtest_msg, const Message& user_msg); 7109 7110 #if GTEST_HAS_EXCEPTIONS 7111 7112 // This exception is thrown by (and only by) a failed Google Test 7113 // assertion when GTEST_FLAG(throw_on_failure) is true (if exceptions 7114 // are enabled). We derive it from std::runtime_error, which is for 7115 // errors presumably detectable only at run time. Since 7116 // std::runtime_error inherits from std::exception, many testing 7117 // frameworks know how to extract and print the message inside it. 7118 class GTEST_API_ GoogleTestFailureException : public ::std::runtime_error { 7119 public: 7120 explicit GoogleTestFailureException(const TestPartResult& failure); 7121 }; 7122 7123 #endif // GTEST_HAS_EXCEPTIONS 7124 7125 // A helper class for creating scoped traces in user programs. 7126 class GTEST_API_ ScopedTrace { 7127 public: 7128 // The c'tor pushes the given source file location and message onto 7129 // a trace stack maintained by Google Test. 7130 ScopedTrace(const char* file, int line, const Message& message); 7131 7132 // The d'tor pops the info pushed by the c'tor. 7133 // 7134 // Note that the d'tor is not virtual in order to be efficient. 7135 // Don't inherit from ScopedTrace! 7136 ~ScopedTrace(); 7137 7138 private: 7139 GTEST_DISALLOW_COPY_AND_ASSIGN_(ScopedTrace); 7140 } GTEST_ATTRIBUTE_UNUSED_; // A ScopedTrace object does its job in its 7141 // c'tor and d'tor. Therefore it doesn't 7142 // need to be used otherwise. 7143 7144 // Constructs and returns the message for an equality assertion 7145 // (e.g. ASSERT_EQ, EXPECT_STREQ, etc) failure. 7146 // 7147 // The first four parameters are the expressions used in the assertion 7148 // and their values, as strings. For example, for ASSERT_EQ(foo, bar) 7149 // where foo is 5 and bar is 6, we have: 7150 // 7151 // expected_expression: "foo" 7152 // actual_expression: "bar" 7153 // expected_value: "5" 7154 // actual_value: "6" 7155 // 7156 // The ignoring_case parameter is true iff the assertion is a 7157 // *_STRCASEEQ*. When it's true, the string " (ignoring case)" will 7158 // be inserted into the message. 7159 GTEST_API_ AssertionResult EqFailure(const char* expected_expression, 7160 const char* actual_expression, 7161 const std::string& expected_value, 7162 const std::string& actual_value, 7163 bool ignoring_case); 7164 7165 // Constructs a failure message for Boolean assertions such as EXPECT_TRUE. 7166 GTEST_API_ std::string GetBoolAssertionFailureMessage( 7167 const AssertionResult& assertion_result, 7168 const char* expression_text, 7169 const char* actual_predicate_value, 7170 const char* expected_predicate_value); 7171 7172 // This template class represents an IEEE floating-point number 7173 // (either single-precision or double-precision, depending on the 7174 // template parameters). 7175 // 7176 // The purpose of this class is to do more sophisticated number 7177 // comparison. (Due to round-off error, etc, it's very unlikely that 7178 // two floating-points will be equal exactly. Hence a naive 7179 // comparison by the == operation often doesn't work.) 7180 // 7181 // Format of IEEE floating-point: 7182 // 7183 // The most-significant bit being the leftmost, an IEEE 7184 // floating-point looks like 7185 // 7186 // sign_bit exponent_bits fraction_bits 7187 // 7188 // Here, sign_bit is a single bit that designates the sign of the 7189 // number. 7190 // 7191 // For float, there are 8 exponent bits and 23 fraction bits. 7192 // 7193 // For double, there are 11 exponent bits and 52 fraction bits. 7194 // 7195 // More details can be found at 7196 // http://en.wikipedia.org/wiki/IEEE_floating-point_standard. 7197 // 7198 // Template parameter: 7199 // 7200 // RawType: the raw floating-point type (either float or double) 7201 template <typename RawType> 7202 class FloatingPoint { 7203 public: 7204 // Defines the unsigned integer type that has the same size as the 7205 // floating point number. 7206 typedef typename TypeWithSize<sizeof(RawType)>::UInt Bits; 7207 7208 // Constants. 7209 7210 // # of bits in a number. 7211 static const size_t kBitCount = 8 * sizeof(RawType); 7212 7213 // # of fraction bits in a number. 7214 static const size_t kFractionBitCount = 7215 std::numeric_limits<RawType>::digits - 1; 7216 7217 // # of exponent bits in a number. 7218 static const size_t kExponentBitCount = kBitCount - 1 - kFractionBitCount; 7219 7220 // The mask for the sign bit. 7221 static const Bits kSignBitMask = static_cast<Bits>(1) << (kBitCount - 1); 7222 7223 // The mask for the fraction bits. 7224 static const Bits kFractionBitMask = 7225 ~static_cast<Bits>(0) >> (kExponentBitCount + 1); 7226 7227 // The mask for the exponent bits. 7228 static const Bits kExponentBitMask = ~(kSignBitMask | kFractionBitMask); 7229 7230 // How many ULP's (Units in the Last Place) we want to tolerate when 7231 // comparing two numbers. The larger the value, the more error we 7232 // allow. A 0 value means that two numbers must be exactly the same 7233 // to be considered equal. 7234 // 7235 // The maximum error of a single floating-point operation is 0.5 7236 // units in the last place. On Intel CPU's, all floating-point 7237 // calculations are done with 80-bit precision, while double has 64 7238 // bits. Therefore, 4 should be enough for ordinary use. 7239 // 7240 // See the following article for more details on ULP: 7241 // http://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/ 7242 static const size_t kMaxUlps = 4; 7243 7244 // Constructs a FloatingPoint from a raw floating-point number. 7245 // 7246 // On an Intel CPU, passing a non-normalized NAN (Not a Number) 7247 // around may change its bits, although the new value is guaranteed 7248 // to be also a NAN. Therefore, don't expect this constructor to 7249 // preserve the bits in x when x is a NAN. 7250 explicit FloatingPoint(const RawType& x) { u_.value_ = x; } 7251 7252 // Static methods 7253 7254 // Reinterprets a bit pattern as a floating-point number. 7255 // 7256 // This function is needed to test the AlmostEquals() method. 7257 static RawType ReinterpretBits(const Bits bits) { 7258 FloatingPoint fp(0); 7259 fp.u_.bits_ = bits; 7260 return fp.u_.value_; 7261 } 7262 7263 // Returns the floating-point number that represent positive infinity. 7264 static RawType Infinity() { 7265 return ReinterpretBits(kExponentBitMask); 7266 } 7267 7268 // Returns the maximum representable finite floating-point number. 7269 static RawType Max(); 7270 7271 // Non-static methods 7272 7273 // Returns the bits that represents this number. 7274 const Bits &bits() const { return u_.bits_; } 7275 7276 // Returns the exponent bits of this number. 7277 Bits exponent_bits() const { return kExponentBitMask & u_.bits_; } 7278 7279 // Returns the fraction bits of this number. 7280 Bits fraction_bits() const { return kFractionBitMask & u_.bits_; } 7281 7282 // Returns the sign bit of this number. 7283 Bits sign_bit() const { return kSignBitMask & u_.bits_; } 7284 7285 // Returns true iff this is NAN (not a number). 7286 bool is_nan() const { 7287 // It's a NAN if the exponent bits are all ones and the fraction 7288 // bits are not entirely zeros. 7289 return (exponent_bits() == kExponentBitMask) && (fraction_bits() != 0); 7290 } 7291 7292 // Returns true iff this number is at most kMaxUlps ULP's away from 7293 // rhs. In particular, this function: 7294 // 7295 // - returns false if either number is (or both are) NAN. 7296 // - treats really large numbers as almost equal to infinity. 7297 // - thinks +0.0 and -0.0 are 0 DLP's apart. 7298 bool AlmostEquals(const FloatingPoint& rhs) const { 7299 // The IEEE standard says that any comparison operation involving 7300 // a NAN must return false. 7301 if (is_nan() || rhs.is_nan()) return false; 7302 7303 return DistanceBetweenSignAndMagnitudeNumbers(u_.bits_, rhs.u_.bits_) 7304 <= kMaxUlps; 7305 } 7306 7307 private: 7308 // The data type used to store the actual floating-point number. 7309 union FloatingPointUnion { 7310 RawType value_; // The raw floating-point number. 7311 Bits bits_; // The bits that represent the number. 7312 }; 7313 7314 // Converts an integer from the sign-and-magnitude representation to 7315 // the biased representation. More precisely, let N be 2 to the 7316 // power of (kBitCount - 1), an integer x is represented by the 7317 // unsigned number x + N. 7318 // 7319 // For instance, 7320 // 7321 // -N + 1 (the most negative number representable using 7322 // sign-and-magnitude) is represented by 1; 7323 // 0 is represented by N; and 7324 // N - 1 (the biggest number representable using 7325 // sign-and-magnitude) is represented by 2N - 1. 7326 // 7327 // Read http://en.wikipedia.org/wiki/Signed_number_representations 7328 // for more details on signed number representations. 7329 static Bits SignAndMagnitudeToBiased(const Bits &sam) { 7330 if (kSignBitMask & sam) { 7331 // sam represents a negative number. 7332 return ~sam + 1; 7333 } 7334 else { 7335 // sam represents a positive number. 7336 return kSignBitMask | sam; 7337 } 7338 } 7339 7340 // Given two numbers in the sign-and-magnitude representation, 7341 // returns the distance between them as an unsigned number. 7342 static Bits DistanceBetweenSignAndMagnitudeNumbers(const Bits &sam1, 7343 const Bits &sam2) { 7344 const Bits biased1 = SignAndMagnitudeToBiased(sam1); 7345 const Bits biased2 = SignAndMagnitudeToBiased(sam2); 7346 return (biased1 >= biased2) ? (biased1 - biased2) : (biased2 - biased1); 7347 } 7348 7349 FloatingPointUnion u_; 7350 }; 7351 7352 // We cannot use std::numeric_limits<T>::max() as it clashes with the max() 7353 // macro defined by <windows.h>. 7354 template <> 7355 inline float FloatingPoint<float>::Max() { return FLT_MAX; } 7356 template <> 7357 inline double FloatingPoint<double>::Max() { return DBL_MAX; } 7358 7359 // Typedefs the instances of the FloatingPoint template class that we 7360 // care to use. 7361 typedef FloatingPoint<float> Float; 7362 typedef FloatingPoint<double> Double; 7363 7364 // In order to catch the mistake of putting tests that use different 7365 // test fixture classes in the same test case, we need to assign 7366 // unique IDs to fixture classes and compare them. The TypeId type is 7367 // used to hold such IDs. The user should treat TypeId as an opaque 7368 // type: the only operation allowed on TypeId values is to compare 7369 // them for equality using the == operator. 7370 typedef const void* TypeId; 7371 7372 template <typename T> 7373 class TypeIdHelper { 7374 public: 7375 // dummy_ must not have a const type. Otherwise an overly eager 7376 // compiler (e.g. MSVC 7.1 & 8.0) may try to merge 7377 // TypeIdHelper<T>::dummy_ for different Ts as an "optimization". 7378 static bool dummy_; 7379 }; 7380 7381 template <typename T> 7382 bool TypeIdHelper<T>::dummy_ = false; 7383 7384 // GetTypeId<T>() returns the ID of type T. Different values will be 7385 // returned for different types. Calling the function twice with the 7386 // same type argument is guaranteed to return the same ID. 7387 template <typename T> 7388 TypeId GetTypeId() { 7389 // The compiler is required to allocate a different 7390 // TypeIdHelper<T>::dummy_ variable for each T used to instantiate 7391 // the template. Therefore, the address of dummy_ is guaranteed to 7392 // be unique. 7393 return &(TypeIdHelper<T>::dummy_); 7394 } 7395 7396 // Returns the type ID of ::testing::Test. Always call this instead 7397 // of GetTypeId< ::testing::Test>() to get the type ID of 7398 // ::testing::Test, as the latter may give the wrong result due to a 7399 // suspected linker bug when compiling Google Test as a Mac OS X 7400 // framework. 7401 GTEST_API_ TypeId GetTestTypeId(); 7402 7403 // Defines the abstract factory interface that creates instances 7404 // of a Test object. 7405 class TestFactoryBase { 7406 public: 7407 virtual ~TestFactoryBase() {} 7408 7409 // Creates a test instance to run. The instance is both created and destroyed 7410 // within TestInfoImpl::Run() 7411 virtual Test* CreateTest() = 0; 7412 7413 protected: 7414 TestFactoryBase() {} 7415 7416 private: 7417 GTEST_DISALLOW_COPY_AND_ASSIGN_(TestFactoryBase); 7418 }; 7419 7420 // This class provides implementation of TeastFactoryBase interface. 7421 // It is used in TEST and TEST_F macros. 7422 template <class TestClass> 7423 class TestFactoryImpl : public TestFactoryBase { 7424 public: 7425 virtual Test* CreateTest() { return new TestClass; } 7426 }; 7427 7428 #if GTEST_OS_WINDOWS 7429 7430 // Predicate-formatters for implementing the HRESULT checking macros 7431 // {ASSERT|EXPECT}_HRESULT_{SUCCEEDED|FAILED} 7432 // We pass a long instead of HRESULT to avoid causing an 7433 // include dependency for the HRESULT type. 7434 GTEST_API_ AssertionResult IsHRESULTSuccess(const char* expr, 7435 long hr); // NOLINT 7436 GTEST_API_ AssertionResult IsHRESULTFailure(const char* expr, 7437 long hr); // NOLINT 7438 7439 #endif // GTEST_OS_WINDOWS 7440 7441 // Types of SetUpTestCase() and TearDownTestCase() functions. 7442 typedef void(*SetUpTestCaseFunc)(); 7443 typedef void(*TearDownTestCaseFunc)(); 7444 7445 // Creates a new TestInfo object and registers it with Google Test; 7446 // returns the created object. 7447 // 7448 // Arguments: 7449 // 7450 // test_case_name: name of the test case 7451 // name: name of the test 7452 // type_param the name of the test's type parameter, or NULL if 7453 // this is not a typed or a type-parameterized test. 7454 // value_param text representation of the test's value parameter, 7455 // or NULL if this is not a type-parameterized test. 7456 // fixture_class_id: ID of the test fixture class 7457 // set_up_tc: pointer to the function that sets up the test case 7458 // tear_down_tc: pointer to the function that tears down the test case 7459 // factory: pointer to the factory that creates a test object. 7460 // The newly created TestInfo instance will assume 7461 // ownership of the factory object. 7462 GTEST_API_ TestInfo* MakeAndRegisterTestInfo( 7463 const char* test_case_name, 7464 const char* name, 7465 const char* type_param, 7466 const char* value_param, 7467 TypeId fixture_class_id, 7468 SetUpTestCaseFunc set_up_tc, 7469 TearDownTestCaseFunc tear_down_tc, 7470 TestFactoryBase* factory); 7471 7472 // If *pstr starts with the given prefix, modifies *pstr to be right 7473 // past the prefix and returns true; otherwise leaves *pstr unchanged 7474 // and returns false. None of pstr, *pstr, and prefix can be NULL. 7475 GTEST_API_ bool SkipPrefix(const char* prefix, const char** pstr); 7476 7477 #if GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P 7478 7479 // State of the definition of a type-parameterized test case. 7480 class GTEST_API_ TypedTestCasePState { 7481 public: 7482 TypedTestCasePState() : registered_(false) {} 7483 7484 // Adds the given test name to defined_test_names_ and return true 7485 // if the test case hasn't been registered; otherwise aborts the 7486 // program. 7487 bool AddTestName(const char* file, int line, const char* case_name, 7488 const char* test_name) { 7489 if (registered_) { 7490 fprintf(stderr, "%s Test %s must be defined before " 7491 "REGISTER_TYPED_TEST_CASE_P(%s, ...).\n", 7492 FormatFileLocation(file, line).c_str(), test_name, case_name); 7493 fflush(stderr); 7494 posix::Abort(); 7495 } 7496 defined_test_names_.insert(test_name); 7497 return true; 7498 } 7499 7500 // Verifies that registered_tests match the test names in 7501 // defined_test_names_; returns registered_tests if successful, or 7502 // aborts the program otherwise. 7503 const char* VerifyRegisteredTestNames( 7504 const char* file, int line, const char* registered_tests); 7505 7506 private: 7507 bool registered_; 7508 ::std::set<const char*> defined_test_names_; 7509 }; 7510 7511 // Skips to the first non-space char after the first comma in 'str'; 7512 // returns NULL if no comma is found in 'str'. 7513 inline const char* SkipComma(const char* str) { 7514 const char* comma = strchr(str, ','); 7515 if (comma == NULL) { 7516 return NULL; 7517 } 7518 while (IsSpace(*(++comma))) {} 7519 return comma; 7520 } 7521 7522 // Returns the prefix of 'str' before the first comma in it; returns 7523 // the entire string if it contains no comma. 7524 inline std::string GetPrefixUntilComma(const char* str) { 7525 const char* comma = strchr(str, ','); 7526 return comma == NULL ? str : std::string(str, comma); 7527 } 7528 7529 // TypeParameterizedTest<Fixture, TestSel, Types>::Register() 7530 // registers a list of type-parameterized tests with Google Test. The 7531 // return value is insignificant - we just need to return something 7532 // such that we can call this function in a namespace scope. 7533 // 7534 // Implementation note: The GTEST_TEMPLATE_ macro declares a template 7535 // template parameter. It's defined in gtest-type-util.h. 7536 template <GTEST_TEMPLATE_ Fixture, class TestSel, typename Types> 7537 class TypeParameterizedTest { 7538 public: 7539 // 'index' is the index of the test in the type list 'Types' 7540 // specified in INSTANTIATE_TYPED_TEST_CASE_P(Prefix, TestCase, 7541 // Types). Valid values for 'index' are [0, N - 1] where N is the 7542 // length of Types. 7543 static bool Register(const char* prefix, const char* case_name, 7544 const char* test_names, int index) { 7545 typedef typename Types::Head Type; 7546 typedef Fixture<Type> FixtureClass; 7547 typedef typename GTEST_BIND_(TestSel, Type) TestClass; 7548 7549 // First, registers the first type-parameterized test in the type 7550 // list. 7551 MakeAndRegisterTestInfo( 7552 (std::string(prefix) + (prefix[0] == '\0' ? "" : "/") + case_name + "/" 7553 + StreamableToString(index)).c_str(), 7554 GetPrefixUntilComma(test_names).c_str(), 7555 GetTypeName<Type>().c_str(), 7556 NULL, // No value parameter. 7557 GetTypeId<FixtureClass>(), 7558 TestClass::SetUpTestCase, 7559 TestClass::TearDownTestCase, 7560 new TestFactoryImpl<TestClass>); 7561 7562 // Next, recurses (at compile time) with the tail of the type list. 7563 return TypeParameterizedTest<Fixture, TestSel, typename Types::Tail> 7564 ::Register(prefix, case_name, test_names, index + 1); 7565 } 7566 }; 7567 7568 // The base case for the compile time recursion. 7569 template <GTEST_TEMPLATE_ Fixture, class TestSel> 7570 class TypeParameterizedTest<Fixture, TestSel, Types0> { 7571 public: 7572 static bool Register(const char* /*prefix*/, const char* /*case_name*/, 7573 const char* /*test_names*/, int /*index*/) { 7574 return true; 7575 } 7576 }; 7577 7578 // TypeParameterizedTestCase<Fixture, Tests, Types>::Register() 7579 // registers *all combinations* of 'Tests' and 'Types' with Google 7580 // Test. The return value is insignificant - we just need to return 7581 // something such that we can call this function in a namespace scope. 7582 template <GTEST_TEMPLATE_ Fixture, typename Tests, typename Types> 7583 class TypeParameterizedTestCase { 7584 public: 7585 static bool Register(const char* prefix, const char* case_name, 7586 const char* test_names) { 7587 typedef typename Tests::Head Head; 7588 7589 // First, register the first test in 'Test' for each type in 'Types'. 7590 TypeParameterizedTest<Fixture, Head, Types>::Register( 7591 prefix, case_name, test_names, 0); 7592 7593 // Next, recurses (at compile time) with the tail of the test list. 7594 return TypeParameterizedTestCase<Fixture, typename Tests::Tail, Types> 7595 ::Register(prefix, case_name, SkipComma(test_names)); 7596 } 7597 }; 7598 7599 // The base case for the compile time recursion. 7600 template <GTEST_TEMPLATE_ Fixture, typename Types> 7601 class TypeParameterizedTestCase<Fixture, Templates0, Types> { 7602 public: 7603 static bool Register(const char* /*prefix*/, const char* /*case_name*/, 7604 const char* /*test_names*/) { 7605 return true; 7606 } 7607 }; 7608 7609 #endif // GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P 7610 7611 // Returns the current OS stack trace as an std::string. 7612 // 7613 // The maximum number of stack frames to be included is specified by 7614 // the gtest_stack_trace_depth flag. The skip_count parameter 7615 // specifies the number of top frames to be skipped, which doesn't 7616 // count against the number of frames to be included. 7617 // 7618 // For example, if Foo() calls Bar(), which in turn calls 7619 // GetCurrentOsStackTraceExceptTop(..., 1), Foo() will be included in 7620 // the trace but Bar() and GetCurrentOsStackTraceExceptTop() won't. 7621 GTEST_API_ std::string GetCurrentOsStackTraceExceptTop( 7622 UnitTest* unit_test, int skip_count); 7623 7624 // Helpers for suppressing warnings on unreachable code or constant 7625 // condition. 7626 7627 // Always returns true. 7628 GTEST_API_ bool AlwaysTrue(); 7629 7630 // Always returns false. 7631 inline bool AlwaysFalse() { return !AlwaysTrue(); } 7632 7633 // Helper for suppressing false warning from Clang on a const char* 7634 // variable declared in a conditional expression always being NULL in 7635 // the else branch. 7636 struct GTEST_API_ ConstCharPtr { 7637 ConstCharPtr(const char* str) : value(str) {} 7638 operator bool() const { return true; } 7639 const char* value; 7640 }; 7641 7642 // A simple Linear Congruential Generator for generating random 7643 // numbers with a uniform distribution. Unlike rand() and srand(), it 7644 // doesn't use global state (and therefore can't interfere with user 7645 // code). Unlike rand_r(), it's portable. An LCG isn't very random, 7646 // but it's good enough for our purposes. 7647 class GTEST_API_ Random { 7648 public: 7649 static const UInt32 kMaxRange = 1u << 31; 7650 7651 explicit Random(UInt32 seed) : state_(seed) {} 7652 7653 void Reseed(UInt32 seed) { state_ = seed; } 7654 7655 // Generates a random number from [0, range). Crashes if 'range' is 7656 // 0 or greater than kMaxRange. 7657 UInt32 Generate(UInt32 range); 7658 7659 private: 7660 UInt32 state_; 7661 GTEST_DISALLOW_COPY_AND_ASSIGN_(Random); 7662 }; 7663 7664 // Defining a variable of type CompileAssertTypesEqual<T1, T2> will cause a 7665 // compiler error iff T1 and T2 are different types. 7666 template <typename T1, typename T2> 7667 struct CompileAssertTypesEqual; 7668 7669 template <typename T> 7670 struct CompileAssertTypesEqual<T, T> { 7671 }; 7672 7673 // Removes the reference from a type if it is a reference type, 7674 // otherwise leaves it unchanged. This is the same as 7675 // tr1::remove_reference, which is not widely available yet. 7676 template <typename T> 7677 struct RemoveReference { typedef T type; }; // NOLINT 7678 template <typename T> 7679 struct RemoveReference<T&> { typedef T type; }; // NOLINT 7680 7681 // A handy wrapper around RemoveReference that works when the argument 7682 // T depends on template parameters. 7683 #define GTEST_REMOVE_REFERENCE_(T) \ 7684 typename ::testing::internal::RemoveReference<T>::type 7685 7686 // Removes const from a type if it is a const type, otherwise leaves 7687 // it unchanged. This is the same as tr1::remove_const, which is not 7688 // widely available yet. 7689 template <typename T> 7690 struct RemoveConst { typedef T type; }; // NOLINT 7691 template <typename T> 7692 struct RemoveConst<const T> { typedef T type; }; // NOLINT 7693 7694 // MSVC 8.0, Sun C++, and IBM XL C++ have a bug which causes the above 7695 // definition to fail to remove the const in 'const int[3]' and 'const 7696 // char[3][4]'. The following specialization works around the bug. 7697 template <typename T, size_t N> 7698 struct RemoveConst<const T[N]> { 7699 typedef typename RemoveConst<T>::type type[N]; 7700 }; 7701 7702 #if defined(_MSC_VER) && _MSC_VER < 1400 7703 // This is the only specialization that allows VC++ 7.1 to remove const in 7704 // 'const int[3] and 'const int[3][4]'. However, it causes trouble with GCC 7705 // and thus needs to be conditionally compiled. 7706 template <typename T, size_t N> 7707 struct RemoveConst<T[N]> { 7708 typedef typename RemoveConst<T>::type type[N]; 7709 }; 7710 #endif 7711 7712 // A handy wrapper around RemoveConst that works when the argument 7713 // T depends on template parameters. 7714 #define GTEST_REMOVE_CONST_(T) \ 7715 typename ::testing::internal::RemoveConst<T>::type 7716 7717 // Turns const U&, U&, const U, and U all into U. 7718 #define GTEST_REMOVE_REFERENCE_AND_CONST_(T) \ 7719 GTEST_REMOVE_CONST_(GTEST_REMOVE_REFERENCE_(T)) 7720 7721 // Adds reference to a type if it is not a reference type, 7722 // otherwise leaves it unchanged. This is the same as 7723 // tr1::add_reference, which is not widely available yet. 7724 template <typename T> 7725 struct AddReference { typedef T& type; }; // NOLINT 7726 template <typename T> 7727 struct AddReference<T&> { typedef T& type; }; // NOLINT 7728 7729 // A handy wrapper around AddReference that works when the argument T 7730 // depends on template parameters. 7731 #define GTEST_ADD_REFERENCE_(T) \ 7732 typename ::testing::internal::AddReference<T>::type 7733 7734 // Adds a reference to const on top of T as necessary. For example, 7735 // it transforms 7736 // 7737 // char ==> const char& 7738 // const char ==> const char& 7739 // char& ==> const char& 7740 // const char& ==> const char& 7741 // 7742 // The argument T must depend on some template parameters. 7743 #define GTEST_REFERENCE_TO_CONST_(T) \ 7744 GTEST_ADD_REFERENCE_(const GTEST_REMOVE_REFERENCE_(T)) 7745 7746 // ImplicitlyConvertible<From, To>::value is a compile-time bool 7747 // constant that's true iff type From can be implicitly converted to 7748 // type To. 7749 template <typename From, typename To> 7750 class ImplicitlyConvertible { 7751 private: 7752 // We need the following helper functions only for their types. 7753 // They have no implementations. 7754 7755 // MakeFrom() is an expression whose type is From. We cannot simply 7756 // use From(), as the type From may not have a public default 7757 // constructor. 7758 static From MakeFrom(); 7759 7760 // These two functions are overloaded. Given an expression 7761 // Helper(x), the compiler will pick the first version if x can be 7762 // implicitly converted to type To; otherwise it will pick the 7763 // second version. 7764 // 7765 // The first version returns a value of size 1, and the second 7766 // version returns a value of size 2. Therefore, by checking the 7767 // size of Helper(x), which can be done at compile time, we can tell 7768 // which version of Helper() is used, and hence whether x can be 7769 // implicitly converted to type To. 7770 static char Helper(To); 7771 static char(&Helper(...))[2]; // NOLINT 7772 7773 // We have to put the 'public' section after the 'private' section, 7774 // or MSVC refuses to compile the code. 7775 public: 7776 // MSVC warns about implicitly converting from double to int for 7777 // possible loss of data, so we need to temporarily disable the 7778 // warning. 7779 #ifdef _MSC_VER 7780 # pragma warning(push) // Saves the current warning state. 7781 # pragma warning(disable:4244) // Temporarily disables warning 4244. 7782 7783 static const bool value = 7784 sizeof(Helper(ImplicitlyConvertible::MakeFrom())) == 1; 7785 # pragma warning(pop) // Restores the warning state. 7786 #elif defined(__BORLANDC__) 7787 // C++Builder cannot use member overload resolution during template 7788 // instantiation. The simplest workaround is to use its C++0x type traits 7789 // functions (C++Builder 2009 and above only). 7790 static const bool value = __is_convertible(From, To); 7791 #else 7792 static const bool value = 7793 sizeof(Helper(ImplicitlyConvertible::MakeFrom())) == 1; 7794 #endif // _MSV_VER 7795 }; 7796 template <typename From, typename To> 7797 const bool ImplicitlyConvertible<From, To>::value; 7798 7799 // IsAProtocolMessage<T>::value is a compile-time bool constant that's 7800 // true iff T is type ProtocolMessage, proto2::Message, or a subclass 7801 // of those. 7802 template <typename T> 7803 struct IsAProtocolMessage 7804 : public bool_constant< 7805 ImplicitlyConvertible<const T*, const ::ProtocolMessage*>::value || 7806 ImplicitlyConvertible<const T*, const ::proto2::Message*>::value> { 7807 }; 7808 7809 // When the compiler sees expression IsContainerTest<C>(0), if C is an 7810 // STL-style container class, the first overload of IsContainerTest 7811 // will be viable (since both C::iterator* and C::const_iterator* are 7812 // valid types and NULL can be implicitly converted to them). It will 7813 // be picked over the second overload as 'int' is a perfect match for 7814 // the type of argument 0. If C::iterator or C::const_iterator is not 7815 // a valid type, the first overload is not viable, and the second 7816 // overload will be picked. Therefore, we can determine whether C is 7817 // a container class by checking the type of IsContainerTest<C>(0). 7818 // The value of the expression is insignificant. 7819 // 7820 // Note that we look for both C::iterator and C::const_iterator. The 7821 // reason is that C++ injects the name of a class as a member of the 7822 // class itself (e.g. you can refer to class iterator as either 7823 // 'iterator' or 'iterator::iterator'). If we look for C::iterator 7824 // only, for example, we would mistakenly think that a class named 7825 // iterator is an STL container. 7826 // 7827 // Also note that the simpler approach of overloading 7828 // IsContainerTest(typename C::const_iterator*) and 7829 // IsContainerTest(...) doesn't work with Visual Age C++ and Sun C++. 7830 typedef int IsContainer; 7831 template <class C> 7832 IsContainer IsContainerTest(int /* dummy */, 7833 typename C::iterator* /* it */ = NULL, 7834 typename C::const_iterator* /* const_it */ = NULL) { 7835 return 0; 7836 } 7837 7838 typedef char IsNotContainer; 7839 template <class C> 7840 IsNotContainer IsContainerTest(long /* dummy */) { return '\0'; } 7841 7842 // EnableIf<condition>::type is void when 'Cond' is true, and 7843 // undefined when 'Cond' is false. To use SFINAE to make a function 7844 // overload only apply when a particular expression is true, add 7845 // "typename EnableIf<expression>::type* = 0" as the last parameter. 7846 template<bool> struct EnableIf; 7847 template<> struct EnableIf<true> { typedef void type; }; // NOLINT 7848 7849 // Utilities for native arrays. 7850 7851 // ArrayEq() compares two k-dimensional native arrays using the 7852 // elements' operator==, where k can be any integer >= 0. When k is 7853 // 0, ArrayEq() degenerates into comparing a single pair of values. 7854 7855 template <typename T, typename U> 7856 bool ArrayEq(const T* lhs, size_t size, const U* rhs); 7857 7858 // This generic version is used when k is 0. 7859 template <typename T, typename U> 7860 inline bool ArrayEq(const T& lhs, const U& rhs) { return lhs == rhs; } 7861 7862 // This overload is used when k >= 1. 7863 template <typename T, typename U, size_t N> 7864 inline bool ArrayEq(const T(&lhs)[N], const U(&rhs)[N]) { 7865 return internal::ArrayEq(lhs, N, rhs); 7866 } 7867 7868 // This helper reduces code bloat. If we instead put its logic inside 7869 // the previous ArrayEq() function, arrays with different sizes would 7870 // lead to different copies of the template code. 7871 template <typename T, typename U> 7872 bool ArrayEq(const T* lhs, size_t size, const U* rhs) { 7873 for (size_t i = 0; i != size; i++) { 7874 if (!internal::ArrayEq(lhs[i], rhs[i])) 7875 return false; 7876 } 7877 return true; 7878 } 7879 7880 // Finds the first element in the iterator range [begin, end) that 7881 // equals elem. Element may be a native array type itself. 7882 template <typename Iter, typename Element> 7883 Iter ArrayAwareFind(Iter begin, Iter end, const Element& elem) { 7884 for (Iter it = begin; it != end; ++it) { 7885 if (internal::ArrayEq(*it, elem)) 7886 return it; 7887 } 7888 return end; 7889 } 7890 7891 // CopyArray() copies a k-dimensional native array using the elements' 7892 // operator=, where k can be any integer >= 0. When k is 0, 7893 // CopyArray() degenerates into copying a single value. 7894 7895 template <typename T, typename U> 7896 void CopyArray(const T* from, size_t size, U* to); 7897 7898 // This generic version is used when k is 0. 7899 template <typename T, typename U> 7900 inline void CopyArray(const T& from, U* to) { *to = from; } 7901 7902 // This overload is used when k >= 1. 7903 template <typename T, typename U, size_t N> 7904 inline void CopyArray(const T(&from)[N], U(*to)[N]) { 7905 internal::CopyArray(from, N, *to); 7906 } 7907 7908 // This helper reduces code bloat. If we instead put its logic inside 7909 // the previous CopyArray() function, arrays with different sizes 7910 // would lead to different copies of the template code. 7911 template <typename T, typename U> 7912 void CopyArray(const T* from, size_t size, U* to) { 7913 for (size_t i = 0; i != size; i++) { 7914 internal::CopyArray(from[i], to + i); 7915 } 7916 } 7917 7918 // The relation between an NativeArray object (see below) and the 7919 // native array it represents. 7920 enum RelationToSource { 7921 kReference, // The NativeArray references the native array. 7922 kCopy // The NativeArray makes a copy of the native array and 7923 // owns the copy. 7924 }; 7925 7926 // Adapts a native array to a read-only STL-style container. Instead 7927 // of the complete STL container concept, this adaptor only implements 7928 // members useful for Google Mock's container matchers. New members 7929 // should be added as needed. To simplify the implementation, we only 7930 // support Element being a raw type (i.e. having no top-level const or 7931 // reference modifier). It's the client's responsibility to satisfy 7932 // this requirement. Element can be an array type itself (hence 7933 // multi-dimensional arrays are supported). 7934 template <typename Element> 7935 class NativeArray { 7936 public: 7937 // STL-style container typedefs. 7938 typedef Element value_type; 7939 typedef Element* iterator; 7940 typedef const Element* const_iterator; 7941 7942 // Constructs from a native array. 7943 NativeArray(const Element* array, size_t count, RelationToSource relation) { 7944 Init(array, count, relation); 7945 } 7946 7947 // Copy constructor. 7948 NativeArray(const NativeArray& rhs) { 7949 Init(rhs.array_, rhs.size_, rhs.relation_to_source_); 7950 } 7951 7952 ~NativeArray() { 7953 // Ensures that the user doesn't instantiate NativeArray with a 7954 // const or reference type. 7955 static_cast<void>(StaticAssertTypeEqHelper<Element, 7956 GTEST_REMOVE_REFERENCE_AND_CONST_(Element)>()); 7957 if (relation_to_source_ == kCopy) 7958 delete[] array_; 7959 } 7960 7961 // STL-style container methods. 7962 size_t size() const { return size_; } 7963 const_iterator begin() const { return array_; } 7964 const_iterator end() const { return array_ + size_; } 7965 bool operator==(const NativeArray& rhs) const { 7966 return size() == rhs.size() && 7967 ArrayEq(begin(), size(), rhs.begin()); 7968 } 7969 7970 private: 7971 // Initializes this object; makes a copy of the input array if 7972 // 'relation' is kCopy. 7973 void Init(const Element* array, size_t a_size, RelationToSource relation) { 7974 if (relation == kReference) { 7975 array_ = array; 7976 } 7977 else { 7978 Element* const copy = new Element[a_size]; 7979 CopyArray(array, a_size, copy); 7980 array_ = copy; 7981 } 7982 size_ = a_size; 7983 relation_to_source_ = relation; 7984 } 7985 7986 const Element* array_; 7987 size_t size_; 7988 RelationToSource relation_to_source_; 7989 7990 GTEST_DISALLOW_ASSIGN_(NativeArray); 7991 }; 7992 7993 } // namespace internal 7994 } // namespace testing 7995 7996 #define GTEST_MESSAGE_AT_(file, line, message, result_type) \ 7997 ::testing::internal::AssertHelper(result_type, file, line, message) \ 7998 = ::testing::Message() 7999 8000 #define GTEST_MESSAGE_(message, result_type) \ 8001 GTEST_MESSAGE_AT_(__FILE__, __LINE__, message, result_type) 8002 8003 #define GTEST_FATAL_FAILURE_(message) \ 8004 return GTEST_MESSAGE_(message, ::testing::TestPartResult::kFatalFailure) 8005 8006 #define GTEST_NONFATAL_FAILURE_(message) \ 8007 GTEST_MESSAGE_(message, ::testing::TestPartResult::kNonFatalFailure) 8008 8009 #define GTEST_SUCCESS_(message) \ 8010 GTEST_MESSAGE_(message, ::testing::TestPartResult::kSuccess) 8011 8012 // Suppresses MSVC warnings 4072 (unreachable code) for the code following 8013 // statement if it returns or throws (or doesn't return or throw in some 8014 // situations). 8015 #define GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement) \ 8016 if (::testing::internal::AlwaysTrue()) { statement; } 8017 8018 #define GTEST_TEST_THROW_(statement, expected_exception, fail) \ 8019 GTEST_AMBIGUOUS_ELSE_BLOCKER_ \ 8020 if (::testing::internal::ConstCharPtr gtest_msg = "") { \ 8021 bool gtest_caught_expected = false; \ 8022 try { \ 8023 GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \ 8024 } \ 8025 catch (expected_exception const&) { \ 8026 gtest_caught_expected = true; \ 8027 } \ 8028 catch (...) { \ 8029 gtest_msg.value = \ 8030 "Expected: " #statement " throws an exception of type " \ 8031 #expected_exception ".\n Actual: it throws a different type."; \ 8032 goto GTEST_CONCAT_TOKEN_(gtest_label_testthrow_, __LINE__); \ 8033 } \ 8034 if (!gtest_caught_expected) { \ 8035 gtest_msg.value = \ 8036 "Expected: " #statement " throws an exception of type " \ 8037 #expected_exception ".\n Actual: it throws nothing."; \ 8038 goto GTEST_CONCAT_TOKEN_(gtest_label_testthrow_, __LINE__); \ 8039 } \ 8040 } else \ 8041 GTEST_CONCAT_TOKEN_(gtest_label_testthrow_, __LINE__) : \ 8042 fail(gtest_msg.value) 8043 8044 #define GTEST_TEST_NO_THROW_(statement, fail) \ 8045 GTEST_AMBIGUOUS_ELSE_BLOCKER_ \ 8046 if (::testing::internal::AlwaysTrue()) { \ 8047 try { \ 8048 GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \} \ 8049 catch (...) { \ 8050 goto GTEST_CONCAT_TOKEN_(gtest_label_testnothrow_, __LINE__); \ 8051 } \ 8052 } else \ 8053 GTEST_CONCAT_TOKEN_(gtest_label_testnothrow_, __LINE__) : \ 8054 fail("Expected: " #statement " doesn't throw an exception.\n" \ 8055 " Actual: it throws.") 8056 8057 #define GTEST_TEST_ANY_THROW_(statement, fail) \ 8058 GTEST_AMBIGUOUS_ELSE_BLOCKER_ \ 8059 if (::testing::internal::AlwaysTrue()) { \ 8060 bool gtest_caught_any = false; \ 8061 try { \ 8062 GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \ 8063 } \ 8064 catch (...) { \ 8065 gtest_caught_any = true; \ 8066 } \ 8067 if (!gtest_caught_any) { \ 8068 goto GTEST_CONCAT_TOKEN_(gtest_label_testanythrow_, __LINE__); \ 8069 } \ 8070 } else \ 8071 GTEST_CONCAT_TOKEN_(gtest_label_testanythrow_, __LINE__) : \ 8072 fail("Expected: " #statement " throws an exception.\n" \ 8073 " Actual: it doesn't.") 8074 8075 8076 // Implements Boolean test assertions such as EXPECT_TRUE. expression can be 8077 // either a boolean expression or an AssertionResult. text is a textual 8078 // represenation of expression as it was passed into the EXPECT_TRUE. 8079 #define GTEST_TEST_BOOLEAN_(expression, text, actual, expected, fail) \ 8080 GTEST_AMBIGUOUS_ELSE_BLOCKER_ \ 8081 if (const ::testing::AssertionResult gtest_ar_ = \ 8082 ::testing::AssertionResult(expression)) \ 8083 ; \ 8084 else \ 8085 fail(::testing::internal::GetBoolAssertionFailureMessage(\ 8086 gtest_ar_, text, #actual, #expected).c_str()) 8087 8088 #define GTEST_TEST_NO_FATAL_FAILURE_(statement, fail) \ 8089 GTEST_AMBIGUOUS_ELSE_BLOCKER_ \ 8090 if (::testing::internal::AlwaysTrue()) { \ 8091 ::testing::internal::HasNewFatalFailureHelper gtest_fatal_failure_checker; \ 8092 GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \ 8093 if (gtest_fatal_failure_checker.has_new_fatal_failure()) { \ 8094 goto GTEST_CONCAT_TOKEN_(gtest_label_testnofatal_, __LINE__); \ 8095 } \ 8096 } else \ 8097 GTEST_CONCAT_TOKEN_(gtest_label_testnofatal_, __LINE__) : \ 8098 fail("Expected: " #statement " doesn't generate new fatal " \ 8099 "failures in the current thread.\n" \ 8100 " Actual: it does.") 8101 8102 // Expands to the name of the class that implements the given test. 8103 #define GTEST_TEST_CLASS_NAME_(test_case_name, test_name) \ 8104 test_case_name##_##test_name##_Test 8105 8106 // Helper macro for defining tests. 8107 #define GTEST_TEST_(test_case_name, test_name, parent_class, parent_id)\ 8108 class GTEST_TEST_CLASS_NAME_(test_case_name, test_name) : public parent_class{ \ 8109 public:\ 8110 GTEST_TEST_CLASS_NAME_(test_case_name, test_name)() {}\ 8111 private:\ 8112 virtual void TestBody(); \ 8113 static ::testing::TestInfo* const test_info_ GTEST_ATTRIBUTE_UNUSED_; \ 8114 GTEST_DISALLOW_COPY_AND_ASSIGN_(\ 8115 GTEST_TEST_CLASS_NAME_(test_case_name, test_name)); \ 8116 }; \ 8117 \ 8118 ::testing::TestInfo* const GTEST_TEST_CLASS_NAME_(test_case_name, test_name)\ 8119 ::test_info_ = \ 8120 ::testing::internal::MakeAndRegisterTestInfo(\ 8121 #test_case_name, #test_name, NULL, NULL, \ 8122 (parent_id), \ 8123 parent_class::SetUpTestCase, \ 8124 parent_class::TearDownTestCase, \ 8125 new ::testing::internal::TestFactoryImpl<\ 8126 GTEST_TEST_CLASS_NAME_(test_case_name, test_name)>); \ 8127 void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::TestBody() 8128 8129 #endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_INTERNAL_H_ 8130 // Copyright 2005, Google Inc. 8131 // All rights reserved. 8132 // 8133 // Redistribution and use in source and binary forms, with or without 8134 // modification, are permitted provided that the following conditions are 8135 // met: 8136 // 8137 // * Redistributions of source code must retain the above copyright 8138 // notice, this list of conditions and the following disclaimer. 8139 // * Redistributions in binary form must reproduce the above 8140 // copyright notice, this list of conditions and the following disclaimer 8141 // in the documentation and/or other materials provided with the 8142 // distribution. 8143 // * Neither the name of Google Inc. nor the names of its 8144 // contributors may be used to endorse or promote products derived from 8145 // this software without specific prior written permission. 8146 // 8147 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 8148 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 8149 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 8150 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 8151 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 8152 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 8153 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 8154 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 8155 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 8156 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 8157 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 8158 // 8159 // Author: [email protected] (Zhanyong Wan) 8160 // 8161 // The Google C++ Testing Framework (Google Test) 8162 // 8163 // This header file defines the public API for death tests. It is 8164 // #included by gtest.h so a user doesn't need to include this 8165 // directly. 8166 8167 #ifndef GTEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H_ 8168 #define GTEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H_ 8169 8170 // Copyright 2005, Google Inc. 8171 // All rights reserved. 8172 // 8173 // Redistribution and use in source and binary forms, with or without 8174 // modification, are permitted provided that the following conditions are 8175 // met: 8176 // 8177 // * Redistributions of source code must retain the above copyright 8178 // notice, this list of conditions and the following disclaimer. 8179 // * Redistributions in binary form must reproduce the above 8180 // copyright notice, this list of conditions and the following disclaimer 8181 // in the documentation and/or other materials provided with the 8182 // distribution. 8183 // * Neither the name of Google Inc. nor the names of its 8184 // contributors may be used to endorse or promote products derived from 8185 // this software without specific prior written permission. 8186 // 8187 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 8188 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 8189 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 8190 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 8191 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 8192 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 8193 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 8194 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 8195 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 8196 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 8197 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 8198 // 8199 // Authors: [email protected] (Zhanyong Wan), [email protected] (Sean Mcafee) 8200 // 8201 // The Google C++ Testing Framework (Google Test) 8202 // 8203 // This header file defines internal utilities needed for implementing 8204 // death tests. They are subject to change without notice. 8205 8206 #ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_DEATH_TEST_INTERNAL_H_ 8207 #define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_DEATH_TEST_INTERNAL_H_ 8208 8209 8210 #include <stdio.h> 8211 8212 namespace testing { 8213 namespace internal { 8214 8215 GTEST_DECLARE_string_(internal_run_death_test); 8216 8217 // Names of the flags (needed for parsing Google Test flags). 8218 const char kDeathTestStyleFlag[] = "death_test_style"; 8219 const char kDeathTestUseFork[] = "death_test_use_fork"; 8220 const char kInternalRunDeathTestFlag[] = "internal_run_death_test"; 8221 8222 #if GTEST_HAS_DEATH_TEST 8223 8224 // DeathTest is a class that hides much of the complexity of the 8225 // GTEST_DEATH_TEST_ macro. It is abstract; its static Create method 8226 // returns a concrete class that depends on the prevailing death test 8227 // style, as defined by the --gtest_death_test_style and/or 8228 // --gtest_internal_run_death_test flags. 8229 8230 // In describing the results of death tests, these terms are used with 8231 // the corresponding definitions: 8232 // 8233 // exit status: The integer exit information in the format specified 8234 // by wait(2) 8235 // exit code: The integer code passed to exit(3), _exit(2), or 8236 // returned from main() 8237 class GTEST_API_ DeathTest { 8238 public: 8239 // Create returns false if there was an error determining the 8240 // appropriate action to take for the current death test; for example, 8241 // if the gtest_death_test_style flag is set to an invalid value. 8242 // The LastMessage method will return a more detailed message in that 8243 // case. Otherwise, the DeathTest pointer pointed to by the "test" 8244 // argument is set. If the death test should be skipped, the pointer 8245 // is set to NULL; otherwise, it is set to the address of a new concrete 8246 // DeathTest object that controls the execution of the current test. 8247 static bool Create(const char* statement, const RE* regex, 8248 const char* file, int line, DeathTest** test); 8249 DeathTest(); 8250 virtual ~DeathTest() { } 8251 8252 // A helper class that aborts a death test when it's deleted. 8253 class ReturnSentinel { 8254 public: 8255 explicit ReturnSentinel(DeathTest* test) : test_(test) { } 8256 ~ReturnSentinel() { test_->Abort(TEST_ENCOUNTERED_RETURN_STATEMENT); } 8257 private: 8258 DeathTest* const test_; 8259 GTEST_DISALLOW_COPY_AND_ASSIGN_(ReturnSentinel); 8260 } GTEST_ATTRIBUTE_UNUSED_; 8261 8262 // An enumeration of possible roles that may be taken when a death 8263 // test is encountered. EXECUTE means that the death test logic should 8264 // be executed immediately. OVERSEE means that the program should prepare 8265 // the appropriate environment for a child process to execute the death 8266 // test, then wait for it to complete. 8267 enum TestRole { OVERSEE_TEST, EXECUTE_TEST }; 8268 8269 // An enumeration of the three reasons that a test might be aborted. 8270 enum AbortReason { 8271 TEST_ENCOUNTERED_RETURN_STATEMENT, 8272 TEST_THREW_EXCEPTION, 8273 TEST_DID_NOT_DIE 8274 }; 8275 8276 // Assumes one of the above roles. 8277 virtual TestRole AssumeRole() = 0; 8278 8279 // Waits for the death test to finish and returns its status. 8280 virtual int Wait() = 0; 8281 8282 // Returns true if the death test passed; that is, the test process 8283 // exited during the test, its exit status matches a user-supplied 8284 // predicate, and its stderr output matches a user-supplied regular 8285 // expression. 8286 // The user-supplied predicate may be a macro expression rather 8287 // than a function pointer or functor, or else Wait and Passed could 8288 // be combined. 8289 virtual bool Passed(bool exit_status_ok) = 0; 8290 8291 // Signals that the death test did not die as expected. 8292 virtual void Abort(AbortReason reason) = 0; 8293 8294 // Returns a human-readable outcome message regarding the outcome of 8295 // the last death test. 8296 static const char* LastMessage(); 8297 8298 static void set_last_death_test_message(const std::string& message); 8299 8300 private: 8301 // A string containing a description of the outcome of the last death test. 8302 static std::string last_death_test_message_; 8303 8304 GTEST_DISALLOW_COPY_AND_ASSIGN_(DeathTest); 8305 }; 8306 8307 // Factory interface for death tests. May be mocked out for testing. 8308 class DeathTestFactory { 8309 public: 8310 virtual ~DeathTestFactory() { } 8311 virtual bool Create(const char* statement, const RE* regex, 8312 const char* file, int line, DeathTest** test) = 0; 8313 }; 8314 8315 // A concrete DeathTestFactory implementation for normal use. 8316 class DefaultDeathTestFactory : public DeathTestFactory { 8317 public: 8318 virtual bool Create(const char* statement, const RE* regex, 8319 const char* file, int line, DeathTest** test); 8320 }; 8321 8322 // Returns true if exit_status describes a process that was terminated 8323 // by a signal, or exited normally with a nonzero exit code. 8324 GTEST_API_ bool ExitedUnsuccessfully(int exit_status); 8325 8326 // Traps C++ exceptions escaping statement and reports them as test 8327 // failures. Note that trapping SEH exceptions is not implemented here. 8328 # if GTEST_HAS_EXCEPTIONS 8329 # define GTEST_EXECUTE_DEATH_TEST_STATEMENT_(statement, death_test) \ 8330 try { \ 8331 GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \ 8332 } catch (const ::std::exception& gtest_exception) { \ 8333 fprintf(\ 8334 stderr, \ 8335 "\n%s: Caught std::exception-derived exception escaping the " \ 8336 "death test statement. Exception message: %s\n", \ 8337 ::testing::internal::FormatFileLocation(__FILE__, __LINE__).c_str(), \ 8338 gtest_exception.what()); \ 8339 fflush(stderr); \ 8340 death_test->Abort(::testing::internal::DeathTest::TEST_THREW_EXCEPTION); \ 8341 } catch (...) { \ 8342 death_test->Abort(::testing::internal::DeathTest::TEST_THREW_EXCEPTION); \ 8343 } 8344 8345 # else 8346 # define GTEST_EXECUTE_DEATH_TEST_STATEMENT_(statement, death_test) \ 8347 GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement) 8348 8349 # endif 8350 8351 // This macro is for implementing ASSERT_DEATH*, EXPECT_DEATH*, 8352 // ASSERT_EXIT*, and EXPECT_EXIT*. 8353 # define GTEST_DEATH_TEST_(statement, predicate, regex, fail) \ 8354 GTEST_AMBIGUOUS_ELSE_BLOCKER_ \ 8355 if (::testing::internal::AlwaysTrue()) { \ 8356 const ::testing::internal::RE& gtest_regex = (regex); \ 8357 ::testing::internal::DeathTest* gtest_dt; \ 8358 if (!::testing::internal::DeathTest::Create(#statement, >est_regex, \ 8359 __FILE__, __LINE__, >est_dt)) { \ 8360 goto GTEST_CONCAT_TOKEN_(gtest_label_, __LINE__); \ 8361 } \ 8362 if (gtest_dt != NULL) { \ 8363 ::testing::internal::scoped_ptr< ::testing::internal::DeathTest> \ 8364 gtest_dt_ptr(gtest_dt); \ 8365 switch (gtest_dt->AssumeRole()) { \ 8366 case ::testing::internal::DeathTest::OVERSEE_TEST: \ 8367 if (!gtest_dt->Passed(predicate(gtest_dt->Wait()))) { \ 8368 goto GTEST_CONCAT_TOKEN_(gtest_label_, __LINE__); \ 8369 } \ 8370 break; \ 8371 case ::testing::internal::DeathTest::EXECUTE_TEST: { \ 8372 ::testing::internal::DeathTest::ReturnSentinel \ 8373 gtest_sentinel(gtest_dt); \ 8374 GTEST_EXECUTE_DEATH_TEST_STATEMENT_(statement, gtest_dt); \ 8375 gtest_dt->Abort(::testing::internal::DeathTest::TEST_DID_NOT_DIE); \ 8376 break; \ 8377 } \ 8378 default: \ 8379 break; \ 8380 } \ 8381 } \ 8382 } else \ 8383 GTEST_CONCAT_TOKEN_(gtest_label_, __LINE__) : \ 8384 fail(::testing::internal::DeathTest::LastMessage()) 8385 // The symbol "fail" here expands to something into which a message 8386 // can be streamed. 8387 8388 // This macro is for implementing ASSERT/EXPECT_DEBUG_DEATH when compiled in 8389 // NDEBUG mode. In this case we need the statements to be executed, the regex is 8390 // ignored, and the macro must accept a streamed message even though the message 8391 // is never printed. 8392 # define GTEST_EXECUTE_STATEMENT_(statement, regex) \ 8393 GTEST_AMBIGUOUS_ELSE_BLOCKER_ \ 8394 if (::testing::internal::AlwaysTrue()) { \ 8395 GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \ 8396 } else \ 8397 ::testing::Message() 8398 8399 // A class representing the parsed contents of the 8400 // --gtest_internal_run_death_test flag, as it existed when 8401 // RUN_ALL_TESTS was called. 8402 class InternalRunDeathTestFlag { 8403 public: 8404 InternalRunDeathTestFlag(const std::string& a_file, 8405 int a_line, 8406 int an_index, 8407 int a_write_fd) 8408 : file_(a_file), line_(a_line), index_(an_index), 8409 write_fd_(a_write_fd) {} 8410 8411 ~InternalRunDeathTestFlag() { 8412 if (write_fd_ >= 0) 8413 posix::Close(write_fd_); 8414 } 8415 8416 const std::string& file() const { return file_; } 8417 int line() const { return line_; } 8418 int index() const { return index_; } 8419 int write_fd() const { return write_fd_; } 8420 8421 private: 8422 std::string file_; 8423 int line_; 8424 int index_; 8425 int write_fd_; 8426 8427 GTEST_DISALLOW_COPY_AND_ASSIGN_(InternalRunDeathTestFlag); 8428 }; 8429 8430 // Returns a newly created InternalRunDeathTestFlag object with fields 8431 // initialized from the GTEST_FLAG(internal_run_death_test) flag if 8432 // the flag is specified; otherwise returns NULL. 8433 InternalRunDeathTestFlag* ParseInternalRunDeathTestFlag(); 8434 8435 #else // GTEST_HAS_DEATH_TEST 8436 8437 // This macro is used for implementing macros such as 8438 // EXPECT_DEATH_IF_SUPPORTED and ASSERT_DEATH_IF_SUPPORTED on systems where 8439 // death tests are not supported. Those macros must compile on such systems 8440 // iff EXPECT_DEATH and ASSERT_DEATH compile with the same parameters on 8441 // systems that support death tests. This allows one to write such a macro 8442 // on a system that does not support death tests and be sure that it will 8443 // compile on a death-test supporting system. 8444 // 8445 // Parameters: 8446 // statement - A statement that a macro such as EXPECT_DEATH would test 8447 // for program termination. This macro has to make sure this 8448 // statement is compiled but not executed, to ensure that 8449 // EXPECT_DEATH_IF_SUPPORTED compiles with a certain 8450 // parameter iff EXPECT_DEATH compiles with it. 8451 // regex - A regex that a macro such as EXPECT_DEATH would use to test 8452 // the output of statement. This parameter has to be 8453 // compiled but not evaluated by this macro, to ensure that 8454 // this macro only accepts expressions that a macro such as 8455 // EXPECT_DEATH would accept. 8456 // terminator - Must be an empty statement for EXPECT_DEATH_IF_SUPPORTED 8457 // and a return statement for ASSERT_DEATH_IF_SUPPORTED. 8458 // This ensures that ASSERT_DEATH_IF_SUPPORTED will not 8459 // compile inside functions where ASSERT_DEATH doesn't 8460 // compile. 8461 // 8462 // The branch that has an always false condition is used to ensure that 8463 // statement and regex are compiled (and thus syntactically correct) but 8464 // never executed. The unreachable code macro protects the terminator 8465 // statement from generating an 'unreachable code' warning in case 8466 // statement unconditionally returns or throws. The Message constructor at 8467 // the end allows the syntax of streaming additional messages into the 8468 // macro, for compilational compatibility with EXPECT_DEATH/ASSERT_DEATH. 8469 # define GTEST_UNSUPPORTED_DEATH_TEST_(statement, regex, terminator) \ 8470 GTEST_AMBIGUOUS_ELSE_BLOCKER_ \ 8471 if (::testing::internal::AlwaysTrue()) { \ 8472 GTEST_LOG_(WARNING) \ 8473 << "Death tests are not supported on this platform.\n" \ 8474 << "Statement '" #statement "' cannot be verified."; \ 8475 } else if (::testing::internal::AlwaysFalse()) { \ 8476 ::testing::internal::RE::PartialMatch(".*", (regex)); \ 8477 GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \ 8478 terminator; \ 8479 } else \ 8480 ::testing::Message() 8481 8482 #endif // GTEST_HAS_DEATH_TEST 8483 8484 } // namespace internal 8485 } // namespace testing 8486 8487 #endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_DEATH_TEST_INTERNAL_H_ 8488 8489 namespace testing { 8490 8491 // This flag controls the style of death tests. Valid values are "threadsafe", 8492 // meaning that the death test child process will re-execute the test binary 8493 // from the start, running only a single death test, or "fast", 8494 // meaning that the child process will execute the test logic immediately 8495 // after forking. 8496 GTEST_DECLARE_string_(death_test_style); 8497 8498 #if GTEST_HAS_DEATH_TEST 8499 8500 namespace internal { 8501 8502 // Returns a Boolean value indicating whether the caller is currently 8503 // executing in the context of the death test child process. Tools such as 8504 // Valgrind heap checkers may need this to modify their behavior in death 8505 // tests. IMPORTANT: This is an internal utility. Using it may break the 8506 // implementation of death tests. User code MUST NOT use it. 8507 GTEST_API_ bool InDeathTestChild(); 8508 8509 } // namespace internal 8510 8511 // The following macros are useful for writing death tests. 8512 8513 // Here's what happens when an ASSERT_DEATH* or EXPECT_DEATH* is 8514 // executed: 8515 // 8516 // 1. It generates a warning if there is more than one active 8517 // thread. This is because it's safe to fork() or clone() only 8518 // when there is a single thread. 8519 // 8520 // 2. The parent process clone()s a sub-process and runs the death 8521 // test in it; the sub-process exits with code 0 at the end of the 8522 // death test, if it hasn't exited already. 8523 // 8524 // 3. The parent process waits for the sub-process to terminate. 8525 // 8526 // 4. The parent process checks the exit code and error message of 8527 // the sub-process. 8528 // 8529 // Examples: 8530 // 8531 // ASSERT_DEATH(server.SendMessage(56, "Hello"), "Invalid port number"); 8532 // for (int i = 0; i < 5; i++) { 8533 // EXPECT_DEATH(server.ProcessRequest(i), 8534 // "Invalid request .* in ProcessRequest()") 8535 // << "Failed to die on request " << i; 8536 // } 8537 // 8538 // ASSERT_EXIT(server.ExitNow(), ::testing::ExitedWithCode(0), "Exiting"); 8539 // 8540 // bool KilledBySIGHUP(int exit_code) { 8541 // return WIFSIGNALED(exit_code) && WTERMSIG(exit_code) == SIGHUP; 8542 // } 8543 // 8544 // ASSERT_EXIT(client.HangUpServer(), KilledBySIGHUP, "Hanging up!"); 8545 // 8546 // On the regular expressions used in death tests: 8547 // 8548 // On POSIX-compliant systems (*nix), we use the <regex.h> library, 8549 // which uses the POSIX extended regex syntax. 8550 // 8551 // On other platforms (e.g. Windows), we only support a simple regex 8552 // syntax implemented as part of Google Test. This limited 8553 // implementation should be enough most of the time when writing 8554 // death tests; though it lacks many features you can find in PCRE 8555 // or POSIX extended regex syntax. For example, we don't support 8556 // union ("x|y"), grouping ("(xy)"), brackets ("[xy]"), and 8557 // repetition count ("x{5,7}"), among others. 8558 // 8559 // Below is the syntax that we do support. We chose it to be a 8560 // subset of both PCRE and POSIX extended regex, so it's easy to 8561 // learn wherever you come from. In the following: 'A' denotes a 8562 // literal character, period (.), or a single \\ escape sequence; 8563 // 'x' and 'y' denote regular expressions; 'm' and 'n' are for 8564 // natural numbers. 8565 // 8566 // c matches any literal character c 8567 // \\d matches any decimal digit 8568 // \\D matches any character that's not a decimal digit 8569 // \\f matches \f 8570 // \\n matches \n 8571 // \\r matches \r 8572 // \\s matches any ASCII whitespace, including \n 8573 // \\S matches any character that's not a whitespace 8574 // \\t matches \t 8575 // \\v matches \v 8576 // \\w matches any letter, _, or decimal digit 8577 // \\W matches any character that \\w doesn't match 8578 // \\c matches any literal character c, which must be a punctuation 8579 // . matches any single character except \n 8580 // A? matches 0 or 1 occurrences of A 8581 // A* matches 0 or many occurrences of A 8582 // A+ matches 1 or many occurrences of A 8583 // ^ matches the beginning of a string (not that of each line) 8584 // $ matches the end of a string (not that of each line) 8585 // xy matches x followed by y 8586 // 8587 // If you accidentally use PCRE or POSIX extended regex features 8588 // not implemented by us, you will get a run-time failure. In that 8589 // case, please try to rewrite your regular expression within the 8590 // above syntax. 8591 // 8592 // This implementation is *not* meant to be as highly tuned or robust 8593 // as a compiled regex library, but should perform well enough for a 8594 // death test, which already incurs significant overhead by launching 8595 // a child process. 8596 // 8597 // Known caveats: 8598 // 8599 // A "threadsafe" style death test obtains the path to the test 8600 // program from argv[0] and re-executes it in the sub-process. For 8601 // simplicity, the current implementation doesn't search the PATH 8602 // when launching the sub-process. This means that the user must 8603 // invoke the test program via a path that contains at least one 8604 // path separator (e.g. path/to/foo_test and 8605 // /absolute/path/to/bar_test are fine, but foo_test is not). This 8606 // is rarely a problem as people usually don't put the test binary 8607 // directory in PATH. 8608 // 8609 // TODO([email protected]): make thread-safe death tests search the PATH. 8610 8611 // Asserts that a given statement causes the program to exit, with an 8612 // integer exit status that satisfies predicate, and emitting error output 8613 // that matches regex. 8614 # define ASSERT_EXIT(statement, predicate, regex) \ 8615 GTEST_DEATH_TEST_(statement, predicate, regex, GTEST_FATAL_FAILURE_) 8616 8617 // Like ASSERT_EXIT, but continues on to successive tests in the 8618 // test case, if any: 8619 # define EXPECT_EXIT(statement, predicate, regex) \ 8620 GTEST_DEATH_TEST_(statement, predicate, regex, GTEST_NONFATAL_FAILURE_) 8621 8622 // Asserts that a given statement causes the program to exit, either by 8623 // explicitly exiting with a nonzero exit code or being killed by a 8624 // signal, and emitting error output that matches regex. 8625 # define ASSERT_DEATH(statement, regex) \ 8626 ASSERT_EXIT(statement, ::testing::internal::ExitedUnsuccessfully, regex) 8627 8628 // Like ASSERT_DEATH, but continues on to successive tests in the 8629 // test case, if any: 8630 # define EXPECT_DEATH(statement, regex) \ 8631 EXPECT_EXIT(statement, ::testing::internal::ExitedUnsuccessfully, regex) 8632 8633 // Two predicate classes that can be used in {ASSERT,EXPECT}_EXIT*: 8634 8635 // Tests that an exit code describes a normal exit with a given exit code. 8636 class GTEST_API_ ExitedWithCode { 8637 public: 8638 explicit ExitedWithCode(int exit_code); 8639 bool operator()(int exit_status) const; 8640 private: 8641 // No implementation - assignment is unsupported. 8642 void operator=(const ExitedWithCode& other); 8643 8644 const int exit_code_; 8645 }; 8646 8647 # if !GTEST_OS_WINDOWS 8648 // Tests that an exit code describes an exit due to termination by a 8649 // given signal. 8650 class GTEST_API_ KilledBySignal { 8651 public: 8652 explicit KilledBySignal(int signum); 8653 bool operator()(int exit_status) const; 8654 private: 8655 const int signum_; 8656 }; 8657 # endif // !GTEST_OS_WINDOWS 8658 8659 // EXPECT_DEBUG_DEATH asserts that the given statements die in debug mode. 8660 // The death testing framework causes this to have interesting semantics, 8661 // since the sideeffects of the call are only visible in opt mode, and not 8662 // in debug mode. 8663 // 8664 // In practice, this can be used to test functions that utilize the 8665 // LOG(DFATAL) macro using the following style: 8666 // 8667 // int DieInDebugOr12(int* sideeffect) { 8668 // if (sideeffect) { 8669 // *sideeffect = 12; 8670 // } 8671 // LOG(DFATAL) << "death"; 8672 // return 12; 8673 // } 8674 // 8675 // TEST(TestCase, TestDieOr12WorksInDgbAndOpt) { 8676 // int sideeffect = 0; 8677 // // Only asserts in dbg. 8678 // EXPECT_DEBUG_DEATH(DieInDebugOr12(&sideeffect), "death"); 8679 // 8680 // #ifdef NDEBUG 8681 // // opt-mode has sideeffect visible. 8682 // EXPECT_EQ(12, sideeffect); 8683 // #else 8684 // // dbg-mode no visible sideeffect. 8685 // EXPECT_EQ(0, sideeffect); 8686 // #endif 8687 // } 8688 // 8689 // This will assert that DieInDebugReturn12InOpt() crashes in debug 8690 // mode, usually due to a DCHECK or LOG(DFATAL), but returns the 8691 // appropriate fallback value (12 in this case) in opt mode. If you 8692 // need to test that a function has appropriate side-effects in opt 8693 // mode, include assertions against the side-effects. A general 8694 // pattern for this is: 8695 // 8696 // EXPECT_DEBUG_DEATH({ 8697 // // Side-effects here will have an effect after this statement in 8698 // // opt mode, but none in debug mode. 8699 // EXPECT_EQ(12, DieInDebugOr12(&sideeffect)); 8700 // }, "death"); 8701 // 8702 # ifdef NDEBUG 8703 8704 # define EXPECT_DEBUG_DEATH(statement, regex) \ 8705 GTEST_EXECUTE_STATEMENT_(statement, regex) 8706 8707 # define ASSERT_DEBUG_DEATH(statement, regex) \ 8708 GTEST_EXECUTE_STATEMENT_(statement, regex) 8709 8710 # else 8711 8712 # define EXPECT_DEBUG_DEATH(statement, regex) \ 8713 EXPECT_DEATH(statement, regex) 8714 8715 # define ASSERT_DEBUG_DEATH(statement, regex) \ 8716 ASSERT_DEATH(statement, regex) 8717 8718 # endif // NDEBUG for EXPECT_DEBUG_DEATH 8719 #endif // GTEST_HAS_DEATH_TEST 8720 8721 // EXPECT_DEATH_IF_SUPPORTED(statement, regex) and 8722 // ASSERT_DEATH_IF_SUPPORTED(statement, regex) expand to real death tests if 8723 // death tests are supported; otherwise they just issue a warning. This is 8724 // useful when you are combining death test assertions with normal test 8725 // assertions in one test. 8726 #if GTEST_HAS_DEATH_TEST 8727 # define EXPECT_DEATH_IF_SUPPORTED(statement, regex) \ 8728 EXPECT_DEATH(statement, regex) 8729 # define ASSERT_DEATH_IF_SUPPORTED(statement, regex) \ 8730 ASSERT_DEATH(statement, regex) 8731 #else 8732 # define EXPECT_DEATH_IF_SUPPORTED(statement, regex) \ 8733 GTEST_UNSUPPORTED_DEATH_TEST_(statement, regex, ) 8734 # define ASSERT_DEATH_IF_SUPPORTED(statement, regex) \ 8735 GTEST_UNSUPPORTED_DEATH_TEST_(statement, regex, return) 8736 #endif 8737 8738 } // namespace testing 8739 8740 #endif // GTEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H_ 8741 // This file was GENERATED by command: 8742 // pump.py gtest-param-test.h.pump 8743 // DO NOT EDIT BY HAND!!! 8744 8745 // Copyright 2008, Google Inc. 8746 // All rights reserved. 8747 // 8748 // Redistribution and use in source and binary forms, with or without 8749 // modification, are permitted provided that the following conditions are 8750 // met: 8751 // 8752 // * Redistributions of source code must retain the above copyright 8753 // notice, this list of conditions and the following disclaimer. 8754 // * Redistributions in binary form must reproduce the above 8755 // copyright notice, this list of conditions and the following disclaimer 8756 // in the documentation and/or other materials provided with the 8757 // distribution. 8758 // * Neither the name of Google Inc. nor the names of its 8759 // contributors may be used to endorse or promote products derived from 8760 // this software without specific prior written permission. 8761 // 8762 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 8763 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 8764 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 8765 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 8766 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 8767 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 8768 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 8769 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 8770 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 8771 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 8772 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 8773 // 8774 // Authors: [email protected] (Vlad Losev) 8775 // 8776 // Macros and functions for implementing parameterized tests 8777 // in Google C++ Testing Framework (Google Test) 8778 // 8779 // This file is generated by a SCRIPT. DO NOT EDIT BY HAND! 8780 // 8781 #ifndef GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_ 8782 #define GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_ 8783 8784 8785 // Value-parameterized tests allow you to test your code with different 8786 // parameters without writing multiple copies of the same test. 8787 // 8788 // Here is how you use value-parameterized tests: 8789 8790 #if 0 8791 8792 // To write value-parameterized tests, first you should define a fixture 8793 // class. It is usually derived from testing::TestWithParam<T> (see below for 8794 // another inheritance scheme that's sometimes useful in more complicated 8795 // class hierarchies), where the type of your parameter values. 8796 // TestWithParam<T> is itself derived from testing::Test. T can be any 8797 // copyable type. If it's a raw pointer, you are responsible for managing the 8798 // lifespan of the pointed values. 8799 8800 class FooTest : public ::testing::TestWithParam<const char*> { 8801 // You can implement all the usual class fixture members here. 8802 }; 8803 8804 // Then, use the TEST_P macro to define as many parameterized tests 8805 // for this fixture as you want. The _P suffix is for "parameterized" 8806 // or "pattern", whichever you prefer to think. 8807 8808 TEST_P(FooTest, DoesBlah) { 8809 // Inside a test, access the test parameter with the GetParam() method 8810 // of the TestWithParam<T> class: 8811 EXPECT_TRUE(foo.Blah(GetParam())); 8812 ... 8813 } 8814 8815 TEST_P(FooTest, HasBlahBlah) { 8816 ... 8817 } 8818 8819 // Finally, you can use INSTANTIATE_TEST_CASE_P to instantiate the test 8820 // case with any set of parameters you want. Google Test defines a number 8821 // of functions for generating test parameters. They return what we call 8822 // (surprise!) parameter generators. Here is a summary of them, which 8823 // are all in the testing namespace: 8824 // 8825 // 8826 // Range(begin, end [, step]) - Yields values {begin, begin+step, 8827 // begin+step+step, ...}. The values do not 8828 // include end. step defaults to 1. 8829 // Values(v1, v2, ..., vN) - Yields values {v1, v2, ..., vN}. 8830 // ValuesIn(container) - Yields values from a C-style array, an STL 8831 // ValuesIn(begin,end) container, or an iterator range [begin, end). 8832 // Bool() - Yields sequence {false, true}. 8833 // Combine(g1, g2, ..., gN) - Yields all combinations (the Cartesian product 8834 // for the math savvy) of the values generated 8835 // by the N generators. 8836 // 8837 // For more details, see comments at the definitions of these functions below 8838 // in this file. 8839 // 8840 // The following statement will instantiate tests from the FooTest test case 8841 // each with parameter values "meeny", "miny", and "moe". 8842 8843 INSTANTIATE_TEST_CASE_P(InstantiationName, 8844 FooTest, 8845 Values("meeny", "miny", "moe")); 8846 8847 // To distinguish different instances of the pattern, (yes, you 8848 // can instantiate it more then once) the first argument to the 8849 // INSTANTIATE_TEST_CASE_P macro is a prefix that will be added to the 8850 // actual test case name. Remember to pick unique prefixes for different 8851 // instantiations. The tests from the instantiation above will have 8852 // these names: 8853 // 8854 // * InstantiationName/FooTest.DoesBlah/0 for "meeny" 8855 // * InstantiationName/FooTest.DoesBlah/1 for "miny" 8856 // * InstantiationName/FooTest.DoesBlah/2 for "moe" 8857 // * InstantiationName/FooTest.HasBlahBlah/0 for "meeny" 8858 // * InstantiationName/FooTest.HasBlahBlah/1 for "miny" 8859 // * InstantiationName/FooTest.HasBlahBlah/2 for "moe" 8860 // 8861 // You can use these names in --gtest_filter. 8862 // 8863 // This statement will instantiate all tests from FooTest again, each 8864 // with parameter values "cat" and "dog": 8865 8866 const char* pets[] = { "cat", "dog" }; 8867 INSTANTIATE_TEST_CASE_P(AnotherInstantiationName, FooTest, ValuesIn(pets)); 8868 8869 // The tests from the instantiation above will have these names: 8870 // 8871 // * AnotherInstantiationName/FooTest.DoesBlah/0 for "cat" 8872 // * AnotherInstantiationName/FooTest.DoesBlah/1 for "dog" 8873 // * AnotherInstantiationName/FooTest.HasBlahBlah/0 for "cat" 8874 // * AnotherInstantiationName/FooTest.HasBlahBlah/1 for "dog" 8875 // 8876 // Please note that INSTANTIATE_TEST_CASE_P will instantiate all tests 8877 // in the given test case, whether their definitions come before or 8878 // AFTER the INSTANTIATE_TEST_CASE_P statement. 8879 // 8880 // Please also note that generator expressions (including parameters to the 8881 // generators) are evaluated in InitGoogleTest(), after main() has started. 8882 // This allows the user on one hand, to adjust generator parameters in order 8883 // to dynamically determine a set of tests to run and on the other hand, 8884 // give the user a chance to inspect the generated tests with Google Test 8885 // reflection API before RUN_ALL_TESTS() is executed. 8886 // 8887 // You can see samples/sample7_unittest.cc and samples/sample8_unittest.cc 8888 // for more examples. 8889 // 8890 // In the future, we plan to publish the API for defining new parameter 8891 // generators. But for now this interface remains part of the internal 8892 // implementation and is subject to change. 8893 // 8894 // 8895 // A parameterized test fixture must be derived from testing::Test and from 8896 // testing::WithParamInterface<T>, where T is the type of the parameter 8897 // values. Inheriting from TestWithParam<T> satisfies that requirement because 8898 // TestWithParam<T> inherits from both Test and WithParamInterface. In more 8899 // complicated hierarchies, however, it is occasionally useful to inherit 8900 // separately from Test and WithParamInterface. For example: 8901 8902 class BaseTest : public ::testing::Test { 8903 // You can inherit all the usual members for a non-parameterized test 8904 // fixture here. 8905 }; 8906 8907 class DerivedTest : public BaseTest, public ::testing::WithParamInterface<int> { 8908 // The usual test fixture members go here too. 8909 }; 8910 8911 TEST_F(BaseTest, HasFoo) { 8912 // This is an ordinary non-parameterized test. 8913 } 8914 8915 TEST_P(DerivedTest, DoesBlah) { 8916 // GetParam works just the same here as if you inherit from TestWithParam. 8917 EXPECT_TRUE(foo.Blah(GetParam())); 8918 } 8919 8920 #endif // 0 8921 8922 8923 #if !GTEST_OS_SYMBIAN 8924 # include <utility> 8925 #endif 8926 8927 // scripts/fuse_gtest.py depends on gtest's own header being #included 8928 // *unconditionally*. Therefore these #includes cannot be moved 8929 // inside #if GTEST_HAS_PARAM_TEST. 8930 // Copyright 2008 Google Inc. 8931 // All Rights Reserved. 8932 // 8933 // Redistribution and use in source and binary forms, with or without 8934 // modification, are permitted provided that the following conditions are 8935 // met: 8936 // 8937 // * Redistributions of source code must retain the above copyright 8938 // notice, this list of conditions and the following disclaimer. 8939 // * Redistributions in binary form must reproduce the above 8940 // copyright notice, this list of conditions and the following disclaimer 8941 // in the documentation and/or other materials provided with the 8942 // distribution. 8943 // * Neither the name of Google Inc. nor the names of its 8944 // contributors may be used to endorse or promote products derived from 8945 // this software without specific prior written permission. 8946 // 8947 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 8948 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 8949 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 8950 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 8951 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 8952 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 8953 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 8954 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 8955 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 8956 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 8957 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 8958 // 8959 // Author: [email protected] (Vlad Losev) 8960 8961 // Type and function utilities for implementing parameterized tests. 8962 8963 #ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_H_ 8964 #define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_H_ 8965 8966 #include <iterator> 8967 #include <utility> 8968 #include <vector> 8969 8970 // scripts/fuse_gtest.py depends on gtest's own header being #included 8971 // *unconditionally*. Therefore these #includes cannot be moved 8972 // inside #if GTEST_HAS_PARAM_TEST. 8973 // Copyright 2003 Google Inc. 8974 // All rights reserved. 8975 // 8976 // Redistribution and use in source and binary forms, with or without 8977 // modification, are permitted provided that the following conditions are 8978 // met: 8979 // 8980 // * Redistributions of source code must retain the above copyright 8981 // notice, this list of conditions and the following disclaimer. 8982 // * Redistributions in binary form must reproduce the above 8983 // copyright notice, this list of conditions and the following disclaimer 8984 // in the documentation and/or other materials provided with the 8985 // distribution. 8986 // * Neither the name of Google Inc. nor the names of its 8987 // contributors may be used to endorse or promote products derived from 8988 // this software without specific prior written permission. 8989 // 8990 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 8991 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 8992 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 8993 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 8994 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 8995 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 8996 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 8997 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 8998 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 8999 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 9000 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 9001 // 9002 // Authors: Dan Egnor ([email protected]) 9003 // 9004 // A "smart" pointer type with reference tracking. Every pointer to a 9005 // particular object is kept on a circular linked list. When the last pointer 9006 // to an object is destroyed or reassigned, the object is deleted. 9007 // 9008 // Used properly, this deletes the object when the last reference goes away. 9009 // There are several caveats: 9010 // - Like all reference counting schemes, cycles lead to leaks. 9011 // - Each smart pointer is actually two pointers (8 bytes instead of 4). 9012 // - Every time a pointer is assigned, the entire list of pointers to that 9013 // object is traversed. This class is therefore NOT SUITABLE when there 9014 // will often be more than two or three pointers to a particular object. 9015 // - References are only tracked as long as linked_ptr<> objects are copied. 9016 // If a linked_ptr<> is converted to a raw pointer and back, BAD THINGS 9017 // will happen (double deletion). 9018 // 9019 // A good use of this class is storing object references in STL containers. 9020 // You can safely put linked_ptr<> in a vector<>. 9021 // Other uses may not be as good. 9022 // 9023 // Note: If you use an incomplete type with linked_ptr<>, the class 9024 // *containing* linked_ptr<> must have a constructor and destructor (even 9025 // if they do nothing!). 9026 // 9027 // Bill Gibbons suggested we use something like this. 9028 // 9029 // Thread Safety: 9030 // Unlike other linked_ptr implementations, in this implementation 9031 // a linked_ptr object is thread-safe in the sense that: 9032 // - it's safe to copy linked_ptr objects concurrently, 9033 // - it's safe to copy *from* a linked_ptr and read its underlying 9034 // raw pointer (e.g. via get()) concurrently, and 9035 // - it's safe to write to two linked_ptrs that point to the same 9036 // shared object concurrently. 9037 // TODO([email protected]): rename this to safe_linked_ptr to avoid 9038 // confusion with normal linked_ptr. 9039 9040 #ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_LINKED_PTR_H_ 9041 #define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_LINKED_PTR_H_ 9042 9043 #include <stdlib.h> 9044 #include <assert.h> 9045 9046 9047 namespace testing { 9048 namespace internal { 9049 9050 // Protects copying of all linked_ptr objects. 9051 GTEST_API_ GTEST_DECLARE_STATIC_MUTEX_(g_linked_ptr_mutex); 9052 9053 // This is used internally by all instances of linked_ptr<>. It needs to be 9054 // a non-template class because different types of linked_ptr<> can refer to 9055 // the same object (linked_ptr<Superclass>(obj) vs linked_ptr<Subclass>(obj)). 9056 // So, it needs to be possible for different types of linked_ptr to participate 9057 // in the same circular linked list, so we need a single class type here. 9058 // 9059 // DO NOT USE THIS CLASS DIRECTLY YOURSELF. Use linked_ptr<T>. 9060 class linked_ptr_internal { 9061 public: 9062 // Create a new circle that includes only this instance. 9063 void join_new() { 9064 next_ = this; 9065 } 9066 9067 // Many linked_ptr operations may change p.link_ for some linked_ptr 9068 // variable p in the same circle as this object. Therefore we need 9069 // to prevent two such operations from occurring concurrently. 9070 // 9071 // Note that different types of linked_ptr objects can coexist in a 9072 // circle (e.g. linked_ptr<Base>, linked_ptr<Derived1>, and 9073 // linked_ptr<Derived2>). Therefore we must use a single mutex to 9074 // protect all linked_ptr objects. This can create serious 9075 // contention in production code, but is acceptable in a testing 9076 // framework. 9077 9078 // Join an existing circle. 9079 void join(linked_ptr_internal const* ptr) 9080 GTEST_LOCK_EXCLUDED_(g_linked_ptr_mutex) { 9081 MutexLock lock(&g_linked_ptr_mutex); 9082 9083 linked_ptr_internal const* p = ptr; 9084 while (p->next_ != ptr) p = p->next_; 9085 p->next_ = this; 9086 next_ = ptr; 9087 } 9088 9089 // Leave whatever circle we're part of. Returns true if we were the 9090 // last member of the circle. Once this is done, you can join() another. 9091 bool depart() 9092 GTEST_LOCK_EXCLUDED_(g_linked_ptr_mutex) { 9093 MutexLock lock(&g_linked_ptr_mutex); 9094 9095 if (next_ == this) return true; 9096 linked_ptr_internal const* p = next_; 9097 while (p->next_ != this) p = p->next_; 9098 p->next_ = next_; 9099 return false; 9100 } 9101 9102 private: 9103 mutable linked_ptr_internal const* next_; 9104 }; 9105 9106 template <typename T> 9107 class linked_ptr { 9108 public: 9109 typedef T element_type; 9110 9111 // Take over ownership of a raw pointer. This should happen as soon as 9112 // possible after the object is created. 9113 explicit linked_ptr(T* ptr = NULL) { capture(ptr); } 9114 ~linked_ptr() { depart(); } 9115 9116 // Copy an existing linked_ptr<>, adding ourselves to the list of references. 9117 template <typename U> linked_ptr(linked_ptr<U> const& ptr) { copy(&ptr); } 9118 linked_ptr(linked_ptr const& ptr) { // NOLINT 9119 assert(&ptr != this); 9120 copy(&ptr); 9121 } 9122 9123 // Assignment releases the old value and acquires the new. 9124 template <typename U> linked_ptr& operator=(linked_ptr<U> const& ptr) { 9125 depart(); 9126 copy(&ptr); 9127 return *this; 9128 } 9129 9130 linked_ptr& operator=(linked_ptr const& ptr) { 9131 if (&ptr != this) { 9132 depart(); 9133 copy(&ptr); 9134 } 9135 return *this; 9136 } 9137 9138 // Smart pointer members. 9139 void reset(T* ptr = NULL) { 9140 depart(); 9141 capture(ptr); 9142 } 9143 T* get() const { return value_; } 9144 T* operator->() const { return value_; } 9145 T& operator*() const { return *value_; } 9146 9147 bool operator==(T* p) const { return value_ == p; } 9148 bool operator!=(T* p) const { return value_ != p; } 9149 template <typename U> 9150 bool operator==(linked_ptr<U> const& ptr) const { 9151 return value_ == ptr.get(); 9152 } 9153 template <typename U> 9154 bool operator!=(linked_ptr<U> const& ptr) const { 9155 return value_ != ptr.get(); 9156 } 9157 9158 private: 9159 template <typename U> 9160 friend class linked_ptr; 9161 9162 T* value_; 9163 linked_ptr_internal link_; 9164 9165 void depart() { 9166 if (link_.depart()) delete value_; 9167 } 9168 9169 void capture(T* ptr) { 9170 value_ = ptr; 9171 link_.join_new(); 9172 } 9173 9174 template <typename U> void copy(linked_ptr<U> const* ptr) { 9175 value_ = ptr->get(); 9176 if (value_) 9177 link_.join(&ptr->link_); 9178 else 9179 link_.join_new(); 9180 } 9181 }; 9182 9183 template<typename T> inline 9184 bool operator==(T* ptr, const linked_ptr<T>& x) { 9185 return ptr == x.get(); 9186 } 9187 9188 template<typename T> inline 9189 bool operator!=(T* ptr, const linked_ptr<T>& x) { 9190 return ptr != x.get(); 9191 } 9192 9193 // A function to convert T* into linked_ptr<T> 9194 // Doing e.g. make_linked_ptr(new FooBarBaz<type>(arg)) is a shorter notation 9195 // for linked_ptr<FooBarBaz<type> >(new FooBarBaz<type>(arg)) 9196 template <typename T> 9197 linked_ptr<T> make_linked_ptr(T* ptr) { 9198 return linked_ptr<T>(ptr); 9199 } 9200 9201 } // namespace internal 9202 } // namespace testing 9203 9204 #endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_LINKED_PTR_H_ 9205 // Copyright 2007, Google Inc. 9206 // All rights reserved. 9207 // 9208 // Redistribution and use in source and binary forms, with or without 9209 // modification, are permitted provided that the following conditions are 9210 // met: 9211 // 9212 // * Redistributions of source code must retain the above copyright 9213 // notice, this list of conditions and the following disclaimer. 9214 // * Redistributions in binary form must reproduce the above 9215 // copyright notice, this list of conditions and the following disclaimer 9216 // in the documentation and/or other materials provided with the 9217 // distribution. 9218 // * Neither the name of Google Inc. nor the names of its 9219 // contributors may be used to endorse or promote products derived from 9220 // this software without specific prior written permission. 9221 // 9222 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 9223 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 9224 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 9225 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 9226 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 9227 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 9228 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 9229 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 9230 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 9231 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 9232 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 9233 // 9234 // Author: [email protected] (Zhanyong Wan) 9235 9236 // Google Test - The Google C++ Testing Framework 9237 // 9238 // This file implements a universal value printer that can print a 9239 // value of any type T: 9240 // 9241 // void ::testing::internal::UniversalPrinter<T>::Print(value, ostream_ptr); 9242 // 9243 // A user can teach this function how to print a class type T by 9244 // defining either operator<<() or PrintTo() in the namespace that 9245 // defines T. More specifically, the FIRST defined function in the 9246 // following list will be used (assuming T is defined in namespace 9247 // foo): 9248 // 9249 // 1. foo::PrintTo(const T&, ostream*) 9250 // 2. operator<<(ostream&, const T&) defined in either foo or the 9251 // global namespace. 9252 // 9253 // If none of the above is defined, it will print the debug string of 9254 // the value if it is a protocol buffer, or print the raw bytes in the 9255 // value otherwise. 9256 // 9257 // To aid debugging: when T is a reference type, the address of the 9258 // value is also printed; when T is a (const) char pointer, both the 9259 // pointer value and the NUL-terminated string it points to are 9260 // printed. 9261 // 9262 // We also provide some convenient wrappers: 9263 // 9264 // // Prints a value to a string. For a (const or not) char 9265 // // pointer, the NUL-terminated string (but not the pointer) is 9266 // // printed. 9267 // std::string ::testing::PrintToString(const T& value); 9268 // 9269 // // Prints a value tersely: for a reference type, the referenced 9270 // // value (but not the address) is printed; for a (const or not) char 9271 // // pointer, the NUL-terminated string (but not the pointer) is 9272 // // printed. 9273 // void ::testing::internal::UniversalTersePrint(const T& value, ostream*); 9274 // 9275 // // Prints value using the type inferred by the compiler. The difference 9276 // // from UniversalTersePrint() is that this function prints both the 9277 // // pointer and the NUL-terminated string for a (const or not) char pointer. 9278 // void ::testing::internal::UniversalPrint(const T& value, ostream*); 9279 // 9280 // // Prints the fields of a tuple tersely to a string vector, one 9281 // // element for each field. Tuple support must be enabled in 9282 // // gtest-port.h. 9283 // std::vector<string> UniversalTersePrintTupleFieldsToStrings( 9284 // const Tuple& value); 9285 // 9286 // Known limitation: 9287 // 9288 // The print primitives print the elements of an STL-style container 9289 // using the compiler-inferred type of *iter where iter is a 9290 // const_iterator of the container. When const_iterator is an input 9291 // iterator but not a forward iterator, this inferred type may not 9292 // match value_type, and the print output may be incorrect. In 9293 // practice, this is rarely a problem as for most containers 9294 // const_iterator is a forward iterator. We'll fix this if there's an 9295 // actual need for it. Note that this fix cannot rely on value_type 9296 // being defined as many user-defined container types don't have 9297 // value_type. 9298 9299 #ifndef GTEST_INCLUDE_GTEST_GTEST_PRINTERS_H_ 9300 #define GTEST_INCLUDE_GTEST_GTEST_PRINTERS_H_ 9301 9302 #include <ostream> // NOLINT 9303 #include <sstream> 9304 #include <string> 9305 #include <utility> 9306 #include <vector> 9307 9308 namespace testing { 9309 9310 // Definitions in the 'internal' and 'internal2' name spaces are 9311 // subject to change without notice. DO NOT USE THEM IN USER CODE! 9312 namespace internal2 { 9313 9314 // Prints the given number of bytes in the given object to the given 9315 // ostream. 9316 GTEST_API_ void PrintBytesInObjectTo(const unsigned char* obj_bytes, 9317 size_t count, 9318 ::std::ostream* os); 9319 9320 // For selecting which printer to use when a given type has neither << 9321 // nor PrintTo(). 9322 enum TypeKind { 9323 kProtobuf, // a protobuf type 9324 kConvertibleToInteger, // a type implicitly convertible to BiggestInt 9325 // (e.g. a named or unnamed enum type) 9326 kOtherType // anything else 9327 }; 9328 9329 // TypeWithoutFormatter<T, kTypeKind>::PrintValue(value, os) is called 9330 // by the universal printer to print a value of type T when neither 9331 // operator<< nor PrintTo() is defined for T, where kTypeKind is the 9332 // "kind" of T as defined by enum TypeKind. 9333 template <typename T, TypeKind kTypeKind> 9334 class TypeWithoutFormatter { 9335 public: 9336 // This default version is called when kTypeKind is kOtherType. 9337 static void PrintValue(const T& value, ::std::ostream* os) { 9338 PrintBytesInObjectTo(reinterpret_cast<const unsigned char*>(&value), 9339 sizeof(value), os); 9340 } 9341 }; 9342 9343 // We print a protobuf using its ShortDebugString() when the string 9344 // doesn't exceed this many characters; otherwise we print it using 9345 // DebugString() for better readability. 9346 const size_t kProtobufOneLinerMaxLength = 50; 9347 9348 template <typename T> 9349 class TypeWithoutFormatter<T, kProtobuf> { 9350 public: 9351 static void PrintValue(const T& value, ::std::ostream* os) { 9352 const ::testing::internal::string short_str = value.ShortDebugString(); 9353 const ::testing::internal::string pretty_str = 9354 short_str.length() <= kProtobufOneLinerMaxLength ? 9355 short_str : ("\n" + value.DebugString()); 9356 *os << ("<" + pretty_str + ">"); 9357 } 9358 }; 9359 9360 template <typename T> 9361 class TypeWithoutFormatter<T, kConvertibleToInteger> { 9362 public: 9363 // Since T has no << operator or PrintTo() but can be implicitly 9364 // converted to BiggestInt, we print it as a BiggestInt. 9365 // 9366 // Most likely T is an enum type (either named or unnamed), in which 9367 // case printing it as an integer is the desired behavior. In case 9368 // T is not an enum, printing it as an integer is the best we can do 9369 // given that it has no user-defined printer. 9370 static void PrintValue(const T& value, ::std::ostream* os) { 9371 const internal::BiggestInt kBigInt = value; 9372 *os << kBigInt; 9373 } 9374 }; 9375 9376 // Prints the given value to the given ostream. If the value is a 9377 // protocol message, its debug string is printed; if it's an enum or 9378 // of a type implicitly convertible to BiggestInt, it's printed as an 9379 // integer; otherwise the bytes in the value are printed. This is 9380 // what UniversalPrinter<T>::Print() does when it knows nothing about 9381 // type T and T has neither << operator nor PrintTo(). 9382 // 9383 // A user can override this behavior for a class type Foo by defining 9384 // a << operator in the namespace where Foo is defined. 9385 // 9386 // We put this operator in namespace 'internal2' instead of 'internal' 9387 // to simplify the implementation, as much code in 'internal' needs to 9388 // use << in STL, which would conflict with our own << were it defined 9389 // in 'internal'. 9390 // 9391 // Note that this operator<< takes a generic std::basic_ostream<Char, 9392 // CharTraits> type instead of the more restricted std::ostream. If 9393 // we define it to take an std::ostream instead, we'll get an 9394 // "ambiguous overloads" compiler error when trying to print a type 9395 // Foo that supports streaming to std::basic_ostream<Char, 9396 // CharTraits>, as the compiler cannot tell whether 9397 // operator<<(std::ostream&, const T&) or 9398 // operator<<(std::basic_stream<Char, CharTraits>, const Foo&) is more 9399 // specific. 9400 template <typename Char, typename CharTraits, typename T> 9401 ::std::basic_ostream<Char, CharTraits>& operator<<( 9402 ::std::basic_ostream<Char, CharTraits>& os, const T& x) { 9403 TypeWithoutFormatter<T, 9404 (internal::IsAProtocolMessage<T>::value ? kProtobuf : 9405 internal::ImplicitlyConvertible<const T&, internal::BiggestInt>::value ? 9406 kConvertibleToInteger : kOtherType)>::PrintValue(x, &os); 9407 return os; 9408 } 9409 9410 } // namespace internal2 9411 } // namespace testing 9412 9413 // This namespace MUST NOT BE NESTED IN ::testing, or the name look-up 9414 // magic needed for implementing UniversalPrinter won't work. 9415 namespace testing_internal { 9416 9417 // Used to print a value that is not an STL-style container when the 9418 // user doesn't define PrintTo() for it. 9419 template <typename T> 9420 void DefaultPrintNonContainerTo(const T& value, ::std::ostream* os) { 9421 // With the following statement, during unqualified name lookup, 9422 // testing::internal2::operator<< appears as if it was declared in 9423 // the nearest enclosing namespace that contains both 9424 // ::testing_internal and ::testing::internal2, i.e. the global 9425 // namespace. For more details, refer to the C++ Standard section 9426 // 7.3.4-1 [namespace.udir]. This allows us to fall back onto 9427 // testing::internal2::operator<< in case T doesn't come with a << 9428 // operator. 9429 // 9430 // We cannot write 'using ::testing::internal2::operator<<;', which 9431 // gcc 3.3 fails to compile due to a compiler bug. 9432 using namespace ::testing::internal2; // NOLINT 9433 9434 // Assuming T is defined in namespace foo, in the next statement, 9435 // the compiler will consider all of: 9436 // 9437 // 1. foo::operator<< (thanks to Koenig look-up), 9438 // 2. ::operator<< (as the current namespace is enclosed in ::), 9439 // 3. testing::internal2::operator<< (thanks to the using statement above). 9440 // 9441 // The operator<< whose type matches T best will be picked. 9442 // 9443 // We deliberately allow #2 to be a candidate, as sometimes it's 9444 // impossible to define #1 (e.g. when foo is ::std, defining 9445 // anything in it is undefined behavior unless you are a compiler 9446 // vendor.). 9447 *os << value; 9448 } 9449 9450 } // namespace testing_internal 9451 9452 namespace testing { 9453 namespace internal { 9454 9455 // UniversalPrinter<T>::Print(value, ostream_ptr) prints the given 9456 // value to the given ostream. The caller must ensure that 9457 // 'ostream_ptr' is not NULL, or the behavior is undefined. 9458 // 9459 // We define UniversalPrinter as a class template (as opposed to a 9460 // function template), as we need to partially specialize it for 9461 // reference types, which cannot be done with function templates. 9462 template <typename T> 9463 class UniversalPrinter; 9464 9465 template <typename T> 9466 void UniversalPrint(const T& value, ::std::ostream* os); 9467 9468 // Used to print an STL-style container when the user doesn't define 9469 // a PrintTo() for it. 9470 template <typename C> 9471 void DefaultPrintTo(IsContainer /* dummy */, 9472 false_type /* is not a pointer */, 9473 const C& container, ::std::ostream* os) { 9474 const size_t kMaxCount = 32; // The maximum number of elements to print. 9475 *os << '{'; 9476 size_t count = 0; 9477 for (typename C::const_iterator it = container.begin(); 9478 it != container.end(); ++it, ++count) { 9479 if (count > 0) { 9480 *os << ','; 9481 if (count == kMaxCount) { // Enough has been printed. 9482 *os << " ..."; 9483 break; 9484 } 9485 } 9486 *os << ' '; 9487 // We cannot call PrintTo(*it, os) here as PrintTo() doesn't 9488 // handle *it being a native array. 9489 internal::UniversalPrint(*it, os); 9490 } 9491 9492 if (count > 0) { 9493 *os << ' '; 9494 } 9495 *os << '}'; 9496 } 9497 9498 // Used to print a pointer that is neither a char pointer nor a member 9499 // pointer, when the user doesn't define PrintTo() for it. (A member 9500 // variable pointer or member function pointer doesn't really point to 9501 // a location in the address space. Their representation is 9502 // implementation-defined. Therefore they will be printed as raw 9503 // bytes.) 9504 template <typename T> 9505 void DefaultPrintTo(IsNotContainer /* dummy */, 9506 true_type /* is a pointer */, 9507 T* p, ::std::ostream* os) { 9508 if (p == NULL) { 9509 *os << "NULL"; 9510 } 9511 else { 9512 // C++ doesn't allow casting from a function pointer to any object 9513 // pointer. 9514 // 9515 // IsTrue() silences warnings: "Condition is always true", 9516 // "unreachable code". 9517 if (IsTrue(ImplicitlyConvertible<T*, const void*>::value)) { 9518 // T is not a function type. We just call << to print p, 9519 // relying on ADL to pick up user-defined << for their pointer 9520 // types, if any. 9521 *os << p; 9522 } 9523 else { 9524 // T is a function type, so '*os << p' doesn't do what we want 9525 // (it just prints p as bool). We want to print p as a const 9526 // void*. However, we cannot cast it to const void* directly, 9527 // even using reinterpret_cast, as earlier versions of gcc 9528 // (e.g. 3.4.5) cannot compile the cast when p is a function 9529 // pointer. Casting to UInt64 first solves the problem. 9530 *os << reinterpret_cast<const void*>( 9531 reinterpret_cast<internal::UInt64>(p)); 9532 } 9533 } 9534 } 9535 9536 // Used to print a non-container, non-pointer value when the user 9537 // doesn't define PrintTo() for it. 9538 template <typename T> 9539 void DefaultPrintTo(IsNotContainer /* dummy */, 9540 false_type /* is not a pointer */, 9541 const T& value, ::std::ostream* os) { 9542 ::testing_internal::DefaultPrintNonContainerTo(value, os); 9543 } 9544 9545 // Prints the given value using the << operator if it has one; 9546 // otherwise prints the bytes in it. This is what 9547 // UniversalPrinter<T>::Print() does when PrintTo() is not specialized 9548 // or overloaded for type T. 9549 // 9550 // A user can override this behavior for a class type Foo by defining 9551 // an overload of PrintTo() in the namespace where Foo is defined. We 9552 // give the user this option as sometimes defining a << operator for 9553 // Foo is not desirable (e.g. the coding style may prevent doing it, 9554 // or there is already a << operator but it doesn't do what the user 9555 // wants). 9556 template <typename T> 9557 void PrintTo(const T& value, ::std::ostream* os) { 9558 // DefaultPrintTo() is overloaded. The type of its first two 9559 // arguments determine which version will be picked. If T is an 9560 // STL-style container, the version for container will be called; if 9561 // T is a pointer, the pointer version will be called; otherwise the 9562 // generic version will be called. 9563 // 9564 // Note that we check for container types here, prior to we check 9565 // for protocol message types in our operator<<. The rationale is: 9566 // 9567 // For protocol messages, we want to give people a chance to 9568 // override Google Mock's format by defining a PrintTo() or 9569 // operator<<. For STL containers, other formats can be 9570 // incompatible with Google Mock's format for the container 9571 // elements; therefore we check for container types here to ensure 9572 // that our format is used. 9573 // 9574 // The second argument of DefaultPrintTo() is needed to bypass a bug 9575 // in Symbian's C++ compiler that prevents it from picking the right 9576 // overload between: 9577 // 9578 // PrintTo(const T& x, ...); 9579 // PrintTo(T* x, ...); 9580 DefaultPrintTo(IsContainerTest<T>(0), is_pointer<T>(), value, os); 9581 } 9582 9583 // The following list of PrintTo() overloads tells 9584 // UniversalPrinter<T>::Print() how to print standard types (built-in 9585 // types, strings, plain arrays, and pointers). 9586 9587 // Overloads for various char types. 9588 GTEST_API_ void PrintTo(unsigned char c, ::std::ostream* os); 9589 GTEST_API_ void PrintTo(signed char c, ::std::ostream* os); 9590 inline void PrintTo(char c, ::std::ostream* os) { 9591 // When printing a plain char, we always treat it as unsigned. This 9592 // way, the output won't be affected by whether the compiler thinks 9593 // char is signed or not. 9594 PrintTo(static_cast<unsigned char>(c), os); 9595 } 9596 9597 // Overloads for other simple built-in types. 9598 inline void PrintTo(bool x, ::std::ostream* os) { 9599 *os << (x ? "true" : "false"); 9600 } 9601 9602 // Overload for wchar_t type. 9603 // Prints a wchar_t as a symbol if it is printable or as its internal 9604 // code otherwise and also as its decimal code (except for L'\0'). 9605 // The L'\0' char is printed as "L'\\0'". The decimal code is printed 9606 // as signed integer when wchar_t is implemented by the compiler 9607 // as a signed type and is printed as an unsigned integer when wchar_t 9608 // is implemented as an unsigned type. 9609 GTEST_API_ void PrintTo(wchar_t wc, ::std::ostream* os); 9610 9611 // Overloads for C strings. 9612 GTEST_API_ void PrintTo(const char* s, ::std::ostream* os); 9613 inline void PrintTo(char* s, ::std::ostream* os) { 9614 PrintTo(ImplicitCast_<const char*>(s), os); 9615 } 9616 9617 // signed/unsigned char is often used for representing binary data, so 9618 // we print pointers to it as void* to be safe. 9619 inline void PrintTo(const signed char* s, ::std::ostream* os) { 9620 PrintTo(ImplicitCast_<const void*>(s), os); 9621 } 9622 inline void PrintTo(signed char* s, ::std::ostream* os) { 9623 PrintTo(ImplicitCast_<const void*>(s), os); 9624 } 9625 inline void PrintTo(const unsigned char* s, ::std::ostream* os) { 9626 PrintTo(ImplicitCast_<const void*>(s), os); 9627 } 9628 inline void PrintTo(unsigned char* s, ::std::ostream* os) { 9629 PrintTo(ImplicitCast_<const void*>(s), os); 9630 } 9631 9632 // MSVC can be configured to define wchar_t as a typedef of unsigned 9633 // short. It defines _NATIVE_WCHAR_T_DEFINED when wchar_t is a native 9634 // type. When wchar_t is a typedef, defining an overload for const 9635 // wchar_t* would cause unsigned short* be printed as a wide string, 9636 // possibly causing invalid memory accesses. 9637 #if !defined(_MSC_VER) || defined(_NATIVE_WCHAR_T_DEFINED) 9638 // Overloads for wide C strings 9639 GTEST_API_ void PrintTo(const wchar_t* s, ::std::ostream* os); 9640 inline void PrintTo(wchar_t* s, ::std::ostream* os) { 9641 PrintTo(ImplicitCast_<const wchar_t*>(s), os); 9642 } 9643 #endif 9644 9645 // Overload for C arrays. Multi-dimensional arrays are printed 9646 // properly. 9647 9648 // Prints the given number of elements in an array, without printing 9649 // the curly braces. 9650 template <typename T> 9651 void PrintRawArrayTo(const T a[], size_t count, ::std::ostream* os) { 9652 UniversalPrint(a[0], os); 9653 for (size_t i = 1; i != count; i++) { 9654 *os << ", "; 9655 UniversalPrint(a[i], os); 9656 } 9657 } 9658 9659 // Overloads for ::string and ::std::string. 9660 #if GTEST_HAS_GLOBAL_STRING 9661 GTEST_API_ void PrintStringTo(const ::string&s, ::std::ostream* os); 9662 inline void PrintTo(const ::string& s, ::std::ostream* os) { 9663 PrintStringTo(s, os); 9664 } 9665 #endif // GTEST_HAS_GLOBAL_STRING 9666 9667 GTEST_API_ void PrintStringTo(const ::std::string&s, ::std::ostream* os); 9668 inline void PrintTo(const ::std::string& s, ::std::ostream* os) { 9669 PrintStringTo(s, os); 9670 } 9671 9672 // Overloads for ::wstring and ::std::wstring. 9673 #if GTEST_HAS_GLOBAL_WSTRING 9674 GTEST_API_ void PrintWideStringTo(const ::wstring&s, ::std::ostream* os); 9675 inline void PrintTo(const ::wstring& s, ::std::ostream* os) { 9676 PrintWideStringTo(s, os); 9677 } 9678 #endif // GTEST_HAS_GLOBAL_WSTRING 9679 9680 #if GTEST_HAS_STD_WSTRING 9681 GTEST_API_ void PrintWideStringTo(const ::std::wstring&s, ::std::ostream* os); 9682 inline void PrintTo(const ::std::wstring& s, ::std::ostream* os) { 9683 PrintWideStringTo(s, os); 9684 } 9685 #endif // GTEST_HAS_STD_WSTRING 9686 9687 #if GTEST_HAS_TR1_TUPLE 9688 // Overload for ::stdt::tuple. Needed for printing function arguments, 9689 // which are packed as tuples. 9690 9691 // Helper function for printing a tuple. T must be instantiated with 9692 // a tuple type. 9693 template <typename T> 9694 void PrintTupleTo(const T& t, ::std::ostream* os); 9695 9696 // Overloaded PrintTo() for tuples of various arities. We support 9697 // tuples of up-to 10 fields. The following implementation works 9698 // regardless of whether tr1::tuple is implemented using the 9699 // non-standard variadic template feature or not. 9700 9701 inline void PrintTo(const ::stdt::tuple<>& t, ::std::ostream* os) { 9702 PrintTupleTo(t, os); 9703 } 9704 9705 template <typename T1> 9706 void PrintTo(const ::stdt::tuple<T1>& t, ::std::ostream* os) { 9707 PrintTupleTo(t, os); 9708 } 9709 9710 template <typename T1, typename T2> 9711 void PrintTo(const ::stdt::tuple<T1, T2>& t, ::std::ostream* os) { 9712 PrintTupleTo(t, os); 9713 } 9714 9715 template <typename T1, typename T2, typename T3> 9716 void PrintTo(const ::stdt::tuple<T1, T2, T3>& t, ::std::ostream* os) { 9717 PrintTupleTo(t, os); 9718 } 9719 9720 template <typename T1, typename T2, typename T3, typename T4> 9721 void PrintTo(const ::stdt::tuple<T1, T2, T3, T4>& t, ::std::ostream* os) { 9722 PrintTupleTo(t, os); 9723 } 9724 9725 template <typename T1, typename T2, typename T3, typename T4, typename T5> 9726 void PrintTo(const ::stdt::tuple<T1, T2, T3, T4, T5>& t, 9727 ::std::ostream* os) { 9728 PrintTupleTo(t, os); 9729 } 9730 9731 template <typename T1, typename T2, typename T3, typename T4, typename T5, 9732 typename T6> 9733 void PrintTo(const ::stdt::tuple<T1, T2, T3, T4, T5, T6>& t, 9734 ::std::ostream* os) { 9735 PrintTupleTo(t, os); 9736 } 9737 9738 template <typename T1, typename T2, typename T3, typename T4, typename T5, 9739 typename T6, typename T7> 9740 void PrintTo(const ::stdt::tuple<T1, T2, T3, T4, T5, T6, T7>& t, 9741 ::std::ostream* os) { 9742 PrintTupleTo(t, os); 9743 } 9744 9745 template <typename T1, typename T2, typename T3, typename T4, typename T5, 9746 typename T6, typename T7, typename T8> 9747 void PrintTo(const ::stdt::tuple<T1, T2, T3, T4, T5, T6, T7, T8>& t, 9748 ::std::ostream* os) { 9749 PrintTupleTo(t, os); 9750 } 9751 9752 template <typename T1, typename T2, typename T3, typename T4, typename T5, 9753 typename T6, typename T7, typename T8, typename T9> 9754 void PrintTo(const ::stdt::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9>& t, 9755 ::std::ostream* os) { 9756 PrintTupleTo(t, os); 9757 } 9758 9759 template <typename T1, typename T2, typename T3, typename T4, typename T5, 9760 typename T6, typename T7, typename T8, typename T9, typename T10> 9761 void PrintTo( 9762 const ::stdt::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>& t, 9763 ::std::ostream* os) { 9764 PrintTupleTo(t, os); 9765 } 9766 #endif // GTEST_HAS_TR1_TUPLE 9767 9768 // Overload for std::pair. 9769 template <typename T1, typename T2> 9770 void PrintTo(const ::std::pair<T1, T2>& value, ::std::ostream* os) { 9771 *os << '('; 9772 // We cannot use UniversalPrint(value.first, os) here, as T1 may be 9773 // a reference type. The same for printing value.second. 9774 UniversalPrinter<T1>::Print(value.first, os); 9775 *os << ", "; 9776 UniversalPrinter<T2>::Print(value.second, os); 9777 *os << ')'; 9778 } 9779 9780 // Implements printing a non-reference type T by letting the compiler 9781 // pick the right overload of PrintTo() for T. 9782 template <typename T> 9783 class UniversalPrinter { 9784 public: 9785 // MSVC warns about adding const to a function type, so we want to 9786 // disable the warning. 9787 #ifdef _MSC_VER 9788 # pragma warning(push) // Saves the current warning state. 9789 # pragma warning(disable:4180) // Temporarily disables warning 4180. 9790 #endif // _MSC_VER 9791 9792 // Note: we deliberately don't call this PrintTo(), as that name 9793 // conflicts with ::testing::internal::PrintTo in the body of the 9794 // function. 9795 static void Print(const T& value, ::std::ostream* os) { 9796 // By default, ::testing::internal::PrintTo() is used for printing 9797 // the value. 9798 // 9799 // Thanks to Koenig look-up, if T is a class and has its own 9800 // PrintTo() function defined in its namespace, that function will 9801 // be visible here. Since it is more specific than the generic ones 9802 // in ::testing::internal, it will be picked by the compiler in the 9803 // following statement - exactly what we want. 9804 PrintTo(value, os); 9805 } 9806 9807 #ifdef _MSC_VER 9808 # pragma warning(pop) // Restores the warning state. 9809 #endif // _MSC_VER 9810 }; 9811 9812 // UniversalPrintArray(begin, len, os) prints an array of 'len' 9813 // elements, starting at address 'begin'. 9814 template <typename T> 9815 void UniversalPrintArray(const T* begin, size_t len, ::std::ostream* os) { 9816 if (len == 0) { 9817 *os << "{}"; 9818 } 9819 else { 9820 *os << "{ "; 9821 const size_t kThreshold = 18; 9822 const size_t kChunkSize = 8; 9823 // If the array has more than kThreshold elements, we'll have to 9824 // omit some details by printing only the first and the last 9825 // kChunkSize elements. 9826 // TODO([email protected]): let the user control the threshold using a flag. 9827 if (len <= kThreshold) { 9828 PrintRawArrayTo(begin, len, os); 9829 } 9830 else { 9831 PrintRawArrayTo(begin, kChunkSize, os); 9832 *os << ", ..., "; 9833 PrintRawArrayTo(begin + len - kChunkSize, kChunkSize, os); 9834 } 9835 *os << " }"; 9836 } 9837 } 9838 // This overload prints a (const) char array compactly. 9839 GTEST_API_ void UniversalPrintArray( 9840 const char* begin, size_t len, ::std::ostream* os); 9841 9842 // This overload prints a (const) wchar_t array compactly. 9843 GTEST_API_ void UniversalPrintArray( 9844 const wchar_t* begin, size_t len, ::std::ostream* os); 9845 9846 // Implements printing an array type T[N]. 9847 template <typename T, size_t N> 9848 class UniversalPrinter<T[N]> { 9849 public: 9850 // Prints the given array, omitting some elements when there are too 9851 // many. 9852 static void Print(const T(&a)[N], ::std::ostream* os) { 9853 UniversalPrintArray(a, N, os); 9854 } 9855 }; 9856 9857 // Implements printing a reference type T&. 9858 template <typename T> 9859 class UniversalPrinter<T&> { 9860 public: 9861 // MSVC warns about adding const to a function type, so we want to 9862 // disable the warning. 9863 #ifdef _MSC_VER 9864 # pragma warning(push) // Saves the current warning state. 9865 # pragma warning(disable:4180) // Temporarily disables warning 4180. 9866 #endif // _MSC_VER 9867 9868 static void Print(const T& value, ::std::ostream* os) { 9869 // Prints the address of the value. We use reinterpret_cast here 9870 // as static_cast doesn't compile when T is a function type. 9871 *os << "@" << reinterpret_cast<const void*>(&value) << " "; 9872 9873 // Then prints the value itself. 9874 UniversalPrint(value, os); 9875 } 9876 9877 #ifdef _MSC_VER 9878 # pragma warning(pop) // Restores the warning state. 9879 #endif // _MSC_VER 9880 }; 9881 9882 // Prints a value tersely: for a reference type, the referenced value 9883 // (but not the address) is printed; for a (const) char pointer, the 9884 // NUL-terminated string (but not the pointer) is printed. 9885 9886 template <typename T> 9887 class UniversalTersePrinter { 9888 public: 9889 static void Print(const T& value, ::std::ostream* os) { 9890 UniversalPrint(value, os); 9891 } 9892 }; 9893 template <typename T> 9894 class UniversalTersePrinter<T&> { 9895 public: 9896 static void Print(const T& value, ::std::ostream* os) { 9897 UniversalPrint(value, os); 9898 } 9899 }; 9900 template <typename T, size_t N> 9901 class UniversalTersePrinter<T[N]> { 9902 public: 9903 static void Print(const T(&value)[N], ::std::ostream* os) { 9904 UniversalPrinter<T[N]>::Print(value, os); 9905 } 9906 }; 9907 template <> 9908 class UniversalTersePrinter<const char*> { 9909 public: 9910 static void Print(const char* str, ::std::ostream* os) { 9911 if (str == NULL) { 9912 *os << "NULL"; 9913 } 9914 else { 9915 UniversalPrint(string(str), os); 9916 } 9917 } 9918 }; 9919 template <> 9920 class UniversalTersePrinter<char*> { 9921 public: 9922 static void Print(char* str, ::std::ostream* os) { 9923 UniversalTersePrinter<const char*>::Print(str, os); 9924 } 9925 }; 9926 9927 #if GTEST_HAS_STD_WSTRING 9928 template <> 9929 class UniversalTersePrinter<const wchar_t*> { 9930 public: 9931 static void Print(const wchar_t* str, ::std::ostream* os) { 9932 if (str == NULL) { 9933 *os << "NULL"; 9934 } 9935 else { 9936 UniversalPrint(::std::wstring(str), os); 9937 } 9938 } 9939 }; 9940 #endif 9941 9942 template <> 9943 class UniversalTersePrinter<wchar_t*> { 9944 public: 9945 static void Print(wchar_t* str, ::std::ostream* os) { 9946 UniversalTersePrinter<const wchar_t*>::Print(str, os); 9947 } 9948 }; 9949 9950 template <typename T> 9951 void UniversalTersePrint(const T& value, ::std::ostream* os) { 9952 UniversalTersePrinter<T>::Print(value, os); 9953 } 9954 9955 // Prints a value using the type inferred by the compiler. The 9956 // difference between this and UniversalTersePrint() is that for a 9957 // (const) char pointer, this prints both the pointer and the 9958 // NUL-terminated string. 9959 template <typename T> 9960 void UniversalPrint(const T& value, ::std::ostream* os) { 9961 // A workarond for the bug in VC++ 7.1 that prevents us from instantiating 9962 // UniversalPrinter with T directly. 9963 typedef T T1; 9964 UniversalPrinter<T1>::Print(value, os); 9965 } 9966 9967 #if GTEST_HAS_TR1_TUPLE 9968 typedef ::std::vector<string> Strings; 9969 9970 // This helper template allows PrintTo() for tuples and 9971 // UniversalTersePrintTupleFieldsToStrings() to be defined by 9972 // induction on the number of tuple fields. The idea is that 9973 // TuplePrefixPrinter<N>::PrintPrefixTo(t, os) prints the first N 9974 // fields in tuple t, and can be defined in terms of 9975 // TuplePrefixPrinter<N - 1>. 9976 9977 // The inductive case. 9978 template <size_t N> 9979 struct TuplePrefixPrinter { 9980 // Prints the first N fields of a tuple. 9981 template <typename Tuple> 9982 static void PrintPrefixTo(const Tuple& t, ::std::ostream* os) { 9983 TuplePrefixPrinter<N - 1>::PrintPrefixTo(t, os); 9984 *os << ", "; 9985 UniversalPrinter<typename ::stdt::tuple_element<N - 1, Tuple>::type> 9986 ::Print(::stdt::get<N - 1>(t), os); 9987 } 9988 9989 // Tersely prints the first N fields of a tuple to a string vector, 9990 // one element for each field. 9991 template <typename Tuple> 9992 static void TersePrintPrefixToStrings(const Tuple& t, Strings* strings) { 9993 TuplePrefixPrinter<N - 1>::TersePrintPrefixToStrings(t, strings); 9994 ::std::stringstream ss; 9995 UniversalTersePrint(::stdt::get<N - 1>(t), &ss); 9996 strings->push_back(ss.str()); 9997 } 9998 }; 9999 10000 // Base cases. 10001 template <> 10002 struct TuplePrefixPrinter<0> { 10003 template <typename Tuple> 10004 static void PrintPrefixTo(const Tuple&, ::std::ostream*) {} 10005 10006 template <typename Tuple> 10007 static void TersePrintPrefixToStrings(const Tuple&, Strings*) {} 10008 }; 10009 // We have to specialize the entire TuplePrefixPrinter<> class 10010 // template here, even though the definition of 10011 // TersePrintPrefixToStrings() is the same as the generic version, as 10012 // Embarcadero (formerly CodeGear, formerly Borland) C++ doesn't 10013 // support specializing a method template of a class template. 10014 template <> 10015 struct TuplePrefixPrinter<1> { 10016 template <typename Tuple> 10017 static void PrintPrefixTo(const Tuple& t, ::std::ostream* os) { 10018 UniversalPrinter<typename ::stdt::tuple_element<0, Tuple>::type>:: 10019 Print(::stdt::get<0>(t), os); 10020 } 10021 10022 template <typename Tuple> 10023 static void TersePrintPrefixToStrings(const Tuple& t, Strings* strings) { 10024 ::std::stringstream ss; 10025 UniversalTersePrint(::stdt::get<0>(t), &ss); 10026 strings->push_back(ss.str()); 10027 } 10028 }; 10029 10030 // Helper function for printing a tuple. T must be instantiated with 10031 // a tuple type. 10032 template <typename T> 10033 void PrintTupleTo(const T& t, ::std::ostream* os) { 10034 *os << "("; 10035 TuplePrefixPrinter< ::stdt::tuple_size<T>::value>:: 10036 PrintPrefixTo(t, os); 10037 *os << ")"; 10038 } 10039 10040 // Prints the fields of a tuple tersely to a string vector, one 10041 // element for each field. See the comment before 10042 // UniversalTersePrint() for how we define "tersely". 10043 template <typename Tuple> 10044 Strings UniversalTersePrintTupleFieldsToStrings(const Tuple& value) { 10045 Strings result; 10046 TuplePrefixPrinter< ::stdt::tuple_size<Tuple>::value>:: 10047 TersePrintPrefixToStrings(value, &result); 10048 return result; 10049 } 10050 #endif // GTEST_HAS_TR1_TUPLE 10051 10052 } // namespace internal 10053 10054 template <typename T> 10055 ::std::string PrintToString(const T& value) { 10056 ::std::stringstream ss; 10057 internal::UniversalTersePrinter<T>::Print(value, &ss); 10058 return ss.str(); 10059 } 10060 10061 } // namespace testing 10062 10063 #endif // GTEST_INCLUDE_GTEST_GTEST_PRINTERS_H_ 10064 10065 #if GTEST_HAS_PARAM_TEST 10066 10067 namespace testing { 10068 namespace internal { 10069 10070 // INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. 10071 // 10072 // Outputs a message explaining invalid registration of different 10073 // fixture class for the same test case. This may happen when 10074 // TEST_P macro is used to define two tests with the same name 10075 // but in different namespaces. 10076 GTEST_API_ void ReportInvalidTestCaseType(const char* test_case_name, 10077 const char* file, int line); 10078 10079 template <typename> class ParamGeneratorInterface; 10080 template <typename> class ParamGenerator; 10081 10082 // Interface for iterating over elements provided by an implementation 10083 // of ParamGeneratorInterface<T>. 10084 template <typename T> 10085 class ParamIteratorInterface { 10086 public: 10087 virtual ~ParamIteratorInterface() {} 10088 // A pointer to the base generator instance. 10089 // Used only for the purposes of iterator comparison 10090 // to make sure that two iterators belong to the same generator. 10091 virtual const ParamGeneratorInterface<T>* BaseGenerator() const = 0; 10092 // Advances iterator to point to the next element 10093 // provided by the generator. The caller is responsible 10094 // for not calling Advance() on an iterator equal to 10095 // BaseGenerator()->End(). 10096 virtual void Advance() = 0; 10097 // Clones the iterator object. Used for implementing copy semantics 10098 // of ParamIterator<T>. 10099 virtual ParamIteratorInterface* Clone() const = 0; 10100 // Dereferences the current iterator and provides (read-only) access 10101 // to the pointed value. It is the caller's responsibility not to call 10102 // Current() on an iterator equal to BaseGenerator()->End(). 10103 // Used for implementing ParamGenerator<T>::operator*(). 10104 virtual const T* Current() const = 0; 10105 // Determines whether the given iterator and other point to the same 10106 // element in the sequence generated by the generator. 10107 // Used for implementing ParamGenerator<T>::operator==(). 10108 virtual bool Equals(const ParamIteratorInterface& other) const = 0; 10109 }; 10110 10111 // Class iterating over elements provided by an implementation of 10112 // ParamGeneratorInterface<T>. It wraps ParamIteratorInterface<T> 10113 // and implements the const forward iterator concept. 10114 template <typename T> 10115 class ParamIterator { 10116 public: 10117 typedef T value_type; 10118 typedef const T& reference; 10119 typedef ptrdiff_t difference_type; 10120 10121 // ParamIterator assumes ownership of the impl_ pointer. 10122 ParamIterator(const ParamIterator& other) : impl_(other.impl_->Clone()) {} 10123 ParamIterator& operator=(const ParamIterator& other) { 10124 if (this != &other) 10125 impl_.reset(other.impl_->Clone()); 10126 return *this; 10127 } 10128 10129 const T& operator*() const { return *impl_->Current(); } 10130 const T* operator->() const { return impl_->Current(); } 10131 // Prefix version of operator++. 10132 ParamIterator& operator++() { 10133 impl_->Advance(); 10134 return *this; 10135 } 10136 // Postfix version of operator++. 10137 ParamIterator operator++(int /*unused*/) { 10138 ParamIteratorInterface<T>* clone = impl_->Clone(); 10139 impl_->Advance(); 10140 return ParamIterator(clone); 10141 } 10142 bool operator==(const ParamIterator& other) const { 10143 return impl_.get() == other.impl_.get() || impl_->Equals(*other.impl_); 10144 } 10145 bool operator!=(const ParamIterator& other) const { 10146 return !(*this == other); 10147 } 10148 10149 private: 10150 friend class ParamGenerator<T>; 10151 explicit ParamIterator(ParamIteratorInterface<T>* impl) : impl_(impl) {} 10152 scoped_ptr<ParamIteratorInterface<T> > impl_; 10153 }; 10154 10155 // ParamGeneratorInterface<T> is the binary interface to access generators 10156 // defined in other translation units. 10157 template <typename T> 10158 class ParamGeneratorInterface { 10159 public: 10160 typedef T ParamType; 10161 10162 virtual ~ParamGeneratorInterface() {} 10163 10164 // Generator interface definition 10165 virtual ParamIteratorInterface<T>* Begin() const = 0; 10166 virtual ParamIteratorInterface<T>* End() const = 0; 10167 }; 10168 10169 // Wraps ParamGeneratorInterface<T> and provides general generator syntax 10170 // compatible with the STL Container concept. 10171 // This class implements copy initialization semantics and the contained 10172 // ParamGeneratorInterface<T> instance is shared among all copies 10173 // of the original object. This is possible because that instance is immutable. 10174 template<typename T> 10175 class ParamGenerator { 10176 public: 10177 typedef ParamIterator<T> iterator; 10178 10179 explicit ParamGenerator(ParamGeneratorInterface<T>* impl) : impl_(impl) {} 10180 ParamGenerator(const ParamGenerator& other) : impl_(other.impl_) {} 10181 10182 ParamGenerator& operator=(const ParamGenerator& other) { 10183 impl_ = other.impl_; 10184 return *this; 10185 } 10186 10187 iterator begin() const { return iterator(impl_->Begin()); } 10188 iterator end() const { return iterator(impl_->End()); } 10189 10190 private: 10191 linked_ptr<const ParamGeneratorInterface<T> > impl_; 10192 }; 10193 10194 // Generates values from a range of two comparable values. Can be used to 10195 // generate sequences of user-defined types that implement operator+() and 10196 // operator<(). 10197 // This class is used in the Range() function. 10198 template <typename T, typename IncrementT> 10199 class RangeGenerator : public ParamGeneratorInterface<T> { 10200 public: 10201 RangeGenerator(T begin, T end, IncrementT step) 10202 : begin_(begin), end_(end), 10203 step_(step), end_index_(CalculateEndIndex(begin, end, step)) {} 10204 virtual ~RangeGenerator() {} 10205 10206 virtual ParamIteratorInterface<T>* Begin() const { 10207 return new Iterator(this, begin_, 0, step_); 10208 } 10209 virtual ParamIteratorInterface<T>* End() const { 10210 return new Iterator(this, end_, end_index_, step_); 10211 } 10212 10213 private: 10214 class Iterator : public ParamIteratorInterface<T> { 10215 public: 10216 Iterator(const ParamGeneratorInterface<T>* base, T value, int index, 10217 IncrementT step) 10218 : base_(base), value_(value), index_(index), step_(step) {} 10219 virtual ~Iterator() {} 10220 10221 virtual const ParamGeneratorInterface<T>* BaseGenerator() const { 10222 return base_; 10223 } 10224 virtual void Advance() { 10225 value_ = value_ + step_; 10226 index_++; 10227 } 10228 virtual ParamIteratorInterface<T>* Clone() const { 10229 return new Iterator(*this); 10230 } 10231 virtual const T* Current() const { return &value_; } 10232 virtual bool Equals(const ParamIteratorInterface<T>& other) const { 10233 // Having the same base generator guarantees that the other 10234 // iterator is of the same type and we can downcast. 10235 GTEST_CHECK_(BaseGenerator() == other.BaseGenerator()) 10236 << "The program attempted to compare iterators " 10237 << "from different generators." << std::endl; 10238 const int other_index = 10239 CheckedDowncastToActualType<const Iterator>(&other)->index_; 10240 return index_ == other_index; 10241 } 10242 10243 private: 10244 Iterator(const Iterator& other) 10245 : ParamIteratorInterface<T>(), 10246 base_(other.base_), value_(other.value_), index_(other.index_), 10247 step_(other.step_) {} 10248 10249 // No implementation - assignment is unsupported. 10250 void operator=(const Iterator& other); 10251 10252 const ParamGeneratorInterface<T>* const base_; 10253 T value_; 10254 int index_; 10255 const IncrementT step_; 10256 }; // class RangeGenerator::Iterator 10257 10258 static int CalculateEndIndex(const T& begin, 10259 const T& end, 10260 const IncrementT& step) { 10261 int end_index = 0; 10262 for (T i = begin; i < end; i = i + step) 10263 end_index++; 10264 return end_index; 10265 } 10266 10267 // No implementation - assignment is unsupported. 10268 void operator=(const RangeGenerator& other); 10269 10270 const T begin_; 10271 const T end_; 10272 const IncrementT step_; 10273 // The index for the end() iterator. All the elements in the generated 10274 // sequence are indexed (0-based) to aid iterator comparison. 10275 const int end_index_; 10276 }; // class RangeGenerator 10277 10278 10279 // Generates values from a pair of STL-style iterators. Used in the 10280 // ValuesIn() function. The elements are copied from the source range 10281 // since the source can be located on the stack, and the generator 10282 // is likely to persist beyond that stack frame. 10283 template <typename T> 10284 class ValuesInIteratorRangeGenerator : public ParamGeneratorInterface<T> { 10285 public: 10286 template <typename ForwardIterator> 10287 ValuesInIteratorRangeGenerator(ForwardIterator begin, ForwardIterator end) 10288 : container_(begin, end) {} 10289 virtual ~ValuesInIteratorRangeGenerator() {} 10290 10291 virtual ParamIteratorInterface<T>* Begin() const { 10292 return new Iterator(this, container_.begin()); 10293 } 10294 virtual ParamIteratorInterface<T>* End() const { 10295 return new Iterator(this, container_.end()); 10296 } 10297 10298 private: 10299 typedef typename ::std::vector<T> ContainerType; 10300 10301 class Iterator : public ParamIteratorInterface<T> { 10302 public: 10303 Iterator(const ParamGeneratorInterface<T>* base, 10304 typename ContainerType::const_iterator iterator) 10305 : base_(base), iterator_(iterator) {} 10306 virtual ~Iterator() {} 10307 10308 virtual const ParamGeneratorInterface<T>* BaseGenerator() const { 10309 return base_; 10310 } 10311 virtual void Advance() { 10312 ++iterator_; 10313 value_.reset(); 10314 } 10315 virtual ParamIteratorInterface<T>* Clone() const { 10316 return new Iterator(*this); 10317 } 10318 // We need to use cached value referenced by iterator_ because *iterator_ 10319 // can return a temporary object (and of type other then T), so just 10320 // having "return &*iterator_;" doesn't work. 10321 // value_ is updated here and not in Advance() because Advance() 10322 // can advance iterator_ beyond the end of the range, and we cannot 10323 // detect that fact. The client code, on the other hand, is 10324 // responsible for not calling Current() on an out-of-range iterator. 10325 virtual const T* Current() const { 10326 if (value_.get() == NULL) 10327 value_.reset(new T(*iterator_)); 10328 return value_.get(); 10329 } 10330 virtual bool Equals(const ParamIteratorInterface<T>& other) const { 10331 // Having the same base generator guarantees that the other 10332 // iterator is of the same type and we can downcast. 10333 GTEST_CHECK_(BaseGenerator() == other.BaseGenerator()) 10334 << "The program attempted to compare iterators " 10335 << "from different generators." << std::endl; 10336 return iterator_ == 10337 CheckedDowncastToActualType<const Iterator>(&other)->iterator_; 10338 } 10339 10340 private: 10341 Iterator(const Iterator& other) 10342 // The explicit constructor call suppresses a false warning 10343 // emitted by gcc when supplied with the -Wextra option. 10344 : ParamIteratorInterface<T>(), 10345 base_(other.base_), 10346 iterator_(other.iterator_) {} 10347 10348 const ParamGeneratorInterface<T>* const base_; 10349 typename ContainerType::const_iterator iterator_; 10350 // A cached value of *iterator_. We keep it here to allow access by 10351 // pointer in the wrapping iterator's operator->(). 10352 // value_ needs to be mutable to be accessed in Current(). 10353 // Use of scoped_ptr helps manage cached value's lifetime, 10354 // which is bound by the lifespan of the iterator itself. 10355 mutable scoped_ptr<const T> value_; 10356 }; // class ValuesInIteratorRangeGenerator::Iterator 10357 10358 // No implementation - assignment is unsupported. 10359 void operator=(const ValuesInIteratorRangeGenerator& other); 10360 10361 const ContainerType container_; 10362 }; // class ValuesInIteratorRangeGenerator 10363 10364 // INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. 10365 // 10366 // Stores a parameter value and later creates tests parameterized with that 10367 // value. 10368 template <class TestClass> 10369 class ParameterizedTestFactory : public TestFactoryBase { 10370 public: 10371 typedef typename TestClass::ParamType ParamType; 10372 explicit ParameterizedTestFactory(ParamType parameter) : 10373 parameter_(parameter) {} 10374 virtual Test* CreateTest() { 10375 TestClass::SetParam(¶meter_); 10376 return new TestClass(); 10377 } 10378 10379 private: 10380 const ParamType parameter_; 10381 10382 GTEST_DISALLOW_COPY_AND_ASSIGN_(ParameterizedTestFactory); 10383 }; 10384 10385 // INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. 10386 // 10387 // TestMetaFactoryBase is a base class for meta-factories that create 10388 // test factories for passing into MakeAndRegisterTestInfo function. 10389 template <class ParamType> 10390 class TestMetaFactoryBase { 10391 public: 10392 virtual ~TestMetaFactoryBase() {} 10393 10394 virtual TestFactoryBase* CreateTestFactory(ParamType parameter) = 0; 10395 }; 10396 10397 // INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. 10398 // 10399 // TestMetaFactory creates test factories for passing into 10400 // MakeAndRegisterTestInfo function. Since MakeAndRegisterTestInfo receives 10401 // ownership of test factory pointer, same factory object cannot be passed 10402 // into that method twice. But ParameterizedTestCaseInfo is going to call 10403 // it for each Test/Parameter value combination. Thus it needs meta factory 10404 // creator class. 10405 template <class TestCase> 10406 class TestMetaFactory 10407 : public TestMetaFactoryBase<typename TestCase::ParamType> { 10408 public: 10409 typedef typename TestCase::ParamType ParamType; 10410 10411 TestMetaFactory() {} 10412 10413 virtual TestFactoryBase* CreateTestFactory(ParamType parameter) { 10414 return new ParameterizedTestFactory<TestCase>(parameter); 10415 } 10416 10417 private: 10418 GTEST_DISALLOW_COPY_AND_ASSIGN_(TestMetaFactory); 10419 }; 10420 10421 // INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. 10422 // 10423 // ParameterizedTestCaseInfoBase is a generic interface 10424 // to ParameterizedTestCaseInfo classes. ParameterizedTestCaseInfoBase 10425 // accumulates test information provided by TEST_P macro invocations 10426 // and generators provided by INSTANTIATE_TEST_CASE_P macro invocations 10427 // and uses that information to register all resulting test instances 10428 // in RegisterTests method. The ParameterizeTestCaseRegistry class holds 10429 // a collection of pointers to the ParameterizedTestCaseInfo objects 10430 // and calls RegisterTests() on each of them when asked. 10431 class ParameterizedTestCaseInfoBase { 10432 public: 10433 virtual ~ParameterizedTestCaseInfoBase() {} 10434 10435 // Base part of test case name for display purposes. 10436 virtual const string& GetTestCaseName() const = 0; 10437 // Test case id to verify identity. 10438 virtual TypeId GetTestCaseTypeId() const = 0; 10439 // UnitTest class invokes this method to register tests in this 10440 // test case right before running them in RUN_ALL_TESTS macro. 10441 // This method should not be called more then once on any single 10442 // instance of a ParameterizedTestCaseInfoBase derived class. 10443 virtual void RegisterTests() = 0; 10444 10445 protected: 10446 ParameterizedTestCaseInfoBase() {} 10447 10448 private: 10449 GTEST_DISALLOW_COPY_AND_ASSIGN_(ParameterizedTestCaseInfoBase); 10450 }; 10451 10452 // INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. 10453 // 10454 // ParameterizedTestCaseInfo accumulates tests obtained from TEST_P 10455 // macro invocations for a particular test case and generators 10456 // obtained from INSTANTIATE_TEST_CASE_P macro invocations for that 10457 // test case. It registers tests with all values generated by all 10458 // generators when asked. 10459 template <class TestCase> 10460 class ParameterizedTestCaseInfo : public ParameterizedTestCaseInfoBase { 10461 public: 10462 // ParamType and GeneratorCreationFunc are private types but are required 10463 // for declarations of public methods AddTestPattern() and 10464 // AddTestCaseInstantiation(). 10465 typedef typename TestCase::ParamType ParamType; 10466 // A function that returns an instance of appropriate generator type. 10467 typedef ParamGenerator<ParamType>(GeneratorCreationFunc)(); 10468 10469 explicit ParameterizedTestCaseInfo(const char* name) 10470 : test_case_name_(name) {} 10471 10472 // Test case base name for display purposes. 10473 virtual const string& GetTestCaseName() const { return test_case_name_; } 10474 // Test case id to verify identity. 10475 virtual TypeId GetTestCaseTypeId() const { return GetTypeId<TestCase>(); } 10476 // TEST_P macro uses AddTestPattern() to record information 10477 // about a single test in a LocalTestInfo structure. 10478 // test_case_name is the base name of the test case (without invocation 10479 // prefix). test_base_name is the name of an individual test without 10480 // parameter index. For the test SequenceA/FooTest.DoBar/1 FooTest is 10481 // test case base name and DoBar is test base name. 10482 void AddTestPattern(const char* test_case_name, 10483 const char* test_base_name, 10484 TestMetaFactoryBase<ParamType>* meta_factory) { 10485 tests_.push_back(linked_ptr<TestInfo>(new TestInfo(test_case_name, 10486 test_base_name, 10487 meta_factory))); 10488 } 10489 // INSTANTIATE_TEST_CASE_P macro uses AddGenerator() to record information 10490 // about a generator. 10491 int AddTestCaseInstantiation(const string& instantiation_name, 10492 GeneratorCreationFunc* func, 10493 const char* /* file */, 10494 int /* line */) { 10495 instantiations_.push_back(::std::make_pair(instantiation_name, func)); 10496 return 0; // Return value used only to run this method in namespace scope. 10497 } 10498 // UnitTest class invokes this method to register tests in this test case 10499 // test cases right before running tests in RUN_ALL_TESTS macro. 10500 // This method should not be called more then once on any single 10501 // instance of a ParameterizedTestCaseInfoBase derived class. 10502 // UnitTest has a guard to prevent from calling this method more then once. 10503 virtual void RegisterTests() { 10504 for (typename TestInfoContainer::iterator test_it = tests_.begin(); 10505 test_it != tests_.end(); ++test_it) { 10506 linked_ptr<TestInfo> test_info = *test_it; 10507 for (typename InstantiationContainer::iterator gen_it = 10508 instantiations_.begin(); gen_it != instantiations_.end(); 10509 ++gen_it) { 10510 const string& instantiation_name = gen_it->first; 10511 ParamGenerator<ParamType> generator((*gen_it->second)()); 10512 10513 string test_case_name; 10514 if (!instantiation_name.empty()) 10515 test_case_name = instantiation_name + "/"; 10516 test_case_name += test_info->test_case_base_name; 10517 10518 int i = 0; 10519 for (typename ParamGenerator<ParamType>::iterator param_it = 10520 generator.begin(); 10521 param_it != generator.end(); ++param_it, ++i) { 10522 Message test_name_stream; 10523 test_name_stream << test_info->test_base_name << "/" << i; 10524 MakeAndRegisterTestInfo( 10525 test_case_name.c_str(), 10526 test_name_stream.GetString().c_str(), 10527 NULL, // No type parameter. 10528 PrintToString(*param_it).c_str(), 10529 GetTestCaseTypeId(), 10530 TestCase::SetUpTestCase, 10531 TestCase::TearDownTestCase, 10532 test_info->test_meta_factory->CreateTestFactory(*param_it)); 10533 } // for param_it 10534 } // for gen_it 10535 } // for test_it 10536 } // RegisterTests 10537 10538 private: 10539 // LocalTestInfo structure keeps information about a single test registered 10540 // with TEST_P macro. 10541 struct TestInfo { 10542 TestInfo(const char* a_test_case_base_name, 10543 const char* a_test_base_name, 10544 TestMetaFactoryBase<ParamType>* a_test_meta_factory) : 10545 test_case_base_name(a_test_case_base_name), 10546 test_base_name(a_test_base_name), 10547 test_meta_factory(a_test_meta_factory) {} 10548 10549 const string test_case_base_name; 10550 const string test_base_name; 10551 const scoped_ptr<TestMetaFactoryBase<ParamType> > test_meta_factory; 10552 }; 10553 typedef ::std::vector<linked_ptr<TestInfo> > TestInfoContainer; 10554 // Keeps pairs of <Instantiation name, Sequence generator creation function> 10555 // received from INSTANTIATE_TEST_CASE_P macros. 10556 typedef ::std::vector<std::pair<string, GeneratorCreationFunc*> > 10557 InstantiationContainer; 10558 10559 const string test_case_name_; 10560 TestInfoContainer tests_; 10561 InstantiationContainer instantiations_; 10562 10563 GTEST_DISALLOW_COPY_AND_ASSIGN_(ParameterizedTestCaseInfo); 10564 }; // class ParameterizedTestCaseInfo 10565 10566 // INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. 10567 // 10568 // ParameterizedTestCaseRegistry contains a map of ParameterizedTestCaseInfoBase 10569 // classes accessed by test case names. TEST_P and INSTANTIATE_TEST_CASE_P 10570 // macros use it to locate their corresponding ParameterizedTestCaseInfo 10571 // descriptors. 10572 class ParameterizedTestCaseRegistry { 10573 public: 10574 ParameterizedTestCaseRegistry() {} 10575 ~ParameterizedTestCaseRegistry() { 10576 for (TestCaseInfoContainer::iterator it = test_case_infos_.begin(); 10577 it != test_case_infos_.end(); ++it) { 10578 delete *it; 10579 } 10580 } 10581 10582 // Looks up or creates and returns a structure containing information about 10583 // tests and instantiations of a particular test case. 10584 template <class TestCase> 10585 ParameterizedTestCaseInfo<TestCase>* GetTestCasePatternHolder( 10586 const char* test_case_name, 10587 const char* file, 10588 int line) { 10589 ParameterizedTestCaseInfo<TestCase>* typed_test_info = NULL; 10590 for (TestCaseInfoContainer::iterator it = test_case_infos_.begin(); 10591 it != test_case_infos_.end(); ++it) { 10592 if ((*it)->GetTestCaseName() == test_case_name) { 10593 if ((*it)->GetTestCaseTypeId() != GetTypeId<TestCase>()) { 10594 // Complain about incorrect usage of Google Test facilities 10595 // and terminate the program since we cannot guaranty correct 10596 // test case setup and tear-down in this case. 10597 ReportInvalidTestCaseType(test_case_name, file, line); 10598 posix::Abort(); 10599 } 10600 else { 10601 // At this point we are sure that the object we found is of the same 10602 // type we are looking for, so we downcast it to that type 10603 // without further checks. 10604 typed_test_info = CheckedDowncastToActualType< 10605 ParameterizedTestCaseInfo<TestCase> >(*it); 10606 } 10607 break; 10608 } 10609 } 10610 if (typed_test_info == NULL) { 10611 typed_test_info = new ParameterizedTestCaseInfo<TestCase>(test_case_name); 10612 test_case_infos_.push_back(typed_test_info); 10613 } 10614 return typed_test_info; 10615 } 10616 void RegisterTests() { 10617 for (TestCaseInfoContainer::iterator it = test_case_infos_.begin(); 10618 it != test_case_infos_.end(); ++it) { 10619 (*it)->RegisterTests(); 10620 } 10621 } 10622 10623 private: 10624 typedef ::std::vector<ParameterizedTestCaseInfoBase*> TestCaseInfoContainer; 10625 10626 TestCaseInfoContainer test_case_infos_; 10627 10628 GTEST_DISALLOW_COPY_AND_ASSIGN_(ParameterizedTestCaseRegistry); 10629 }; 10630 10631 } // namespace internal 10632 } // namespace testing 10633 10634 #endif // GTEST_HAS_PARAM_TEST 10635 10636 #endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_H_ 10637 // This file was GENERATED by command: 10638 // pump.py gtest-param-util-generated.h.pump 10639 // DO NOT EDIT BY HAND!!! 10640 10641 // Copyright 2008 Google Inc. 10642 // All Rights Reserved. 10643 // 10644 // Redistribution and use in source and binary forms, with or without 10645 // modification, are permitted provided that the following conditions are 10646 // met: 10647 // 10648 // * Redistributions of source code must retain the above copyright 10649 // notice, this list of conditions and the following disclaimer. 10650 // * Redistributions in binary form must reproduce the above 10651 // copyright notice, this list of conditions and the following disclaimer 10652 // in the documentation and/or other materials provided with the 10653 // distribution. 10654 // * Neither the name of Google Inc. nor the names of its 10655 // contributors may be used to endorse or promote products derived from 10656 // this software without specific prior written permission. 10657 // 10658 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 10659 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 10660 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 10661 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 10662 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 10663 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 10664 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 10665 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 10666 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 10667 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 10668 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 10669 // 10670 // Author: [email protected] (Vlad Losev) 10671 10672 // Type and function utilities for implementing parameterized tests. 10673 // This file is generated by a SCRIPT. DO NOT EDIT BY HAND! 10674 // 10675 // Currently Google Test supports at most 50 arguments in Values, 10676 // and at most 10 arguments in Combine. Please contact 10677 // [email protected] if you need more. 10678 // Please note that the number of arguments to Combine is limited 10679 // by the maximum arity of the implementation of tr1::tuple which is 10680 // currently set at 10. 10681 10682 #ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_GENERATED_H_ 10683 #define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_GENERATED_H_ 10684 10685 // scripts/fuse_gtest.py depends on gtest's own header being #included 10686 // *unconditionally*. Therefore these #includes cannot be moved 10687 // inside #if GTEST_HAS_PARAM_TEST. 10688 10689 #if GTEST_HAS_PARAM_TEST 10690 10691 namespace testing { 10692 10693 // Forward declarations of ValuesIn(), which is implemented in 10694 // include/gtest/gtest-param-test.h. 10695 template <typename ForwardIterator> 10696 internal::ParamGenerator< 10697 typename ::testing::internal::IteratorTraits<ForwardIterator>::value_type> 10698 ValuesIn(ForwardIterator begin, ForwardIterator end); 10699 10700 template <typename T, size_t N> 10701 internal::ParamGenerator<T> ValuesIn(const T(&array)[N]); 10702 10703 template <class Container> 10704 internal::ParamGenerator<typename Container::value_type> ValuesIn( 10705 const Container& container); 10706 10707 namespace internal { 10708 10709 // Used in the Values() function to provide polymorphic capabilities. 10710 template <typename T1> 10711 class ValueArray1 { 10712 public: 10713 explicit ValueArray1(T1 v1) : v1_(v1) {} 10714 10715 template <typename T> 10716 operator ParamGenerator<T>() const { return ValuesIn(&v1_, &v1_ + 1); } 10717 10718 private: 10719 // No implementation - assignment is unsupported. 10720 void operator=(const ValueArray1& other); 10721 10722 const T1 v1_; 10723 }; 10724 10725 template <typename T1, typename T2> 10726 class ValueArray2 { 10727 public: 10728 ValueArray2(T1 v1, T2 v2) : v1_(v1), v2_(v2) {} 10729 10730 template <typename T> 10731 operator ParamGenerator<T>() const { 10732 const T array[] = { static_cast<T>(v1_), static_cast<T>(v2_) }; 10733 return ValuesIn(array); 10734 } 10735 10736 private: 10737 // No implementation - assignment is unsupported. 10738 void operator=(const ValueArray2& other); 10739 10740 const T1 v1_; 10741 const T2 v2_; 10742 }; 10743 10744 template <typename T1, typename T2, typename T3> 10745 class ValueArray3 { 10746 public: 10747 ValueArray3(T1 v1, T2 v2, T3 v3) : v1_(v1), v2_(v2), v3_(v3) {} 10748 10749 template <typename T> 10750 operator ParamGenerator<T>() const { 10751 const T array[] = { static_cast<T>(v1_), static_cast<T>(v2_), 10752 static_cast<T>(v3_) }; 10753 return ValuesIn(array); 10754 } 10755 10756 private: 10757 // No implementation - assignment is unsupported. 10758 void operator=(const ValueArray3& other); 10759 10760 const T1 v1_; 10761 const T2 v2_; 10762 const T3 v3_; 10763 }; 10764 10765 template <typename T1, typename T2, typename T3, typename T4> 10766 class ValueArray4 { 10767 public: 10768 ValueArray4(T1 v1, T2 v2, T3 v3, T4 v4) : v1_(v1), v2_(v2), v3_(v3), 10769 v4_(v4) {} 10770 10771 template <typename T> 10772 operator ParamGenerator<T>() const { 10773 const T array[] = { static_cast<T>(v1_), static_cast<T>(v2_), 10774 static_cast<T>(v3_), static_cast<T>(v4_) }; 10775 return ValuesIn(array); 10776 } 10777 10778 private: 10779 // No implementation - assignment is unsupported. 10780 void operator=(const ValueArray4& other); 10781 10782 const T1 v1_; 10783 const T2 v2_; 10784 const T3 v3_; 10785 const T4 v4_; 10786 }; 10787 10788 template <typename T1, typename T2, typename T3, typename T4, typename T5> 10789 class ValueArray5 { 10790 public: 10791 ValueArray5(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5) : v1_(v1), v2_(v2), v3_(v3), 10792 v4_(v4), v5_(v5) {} 10793 10794 template <typename T> 10795 operator ParamGenerator<T>() const { 10796 const T array[] = { static_cast<T>(v1_), static_cast<T>(v2_), 10797 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_) }; 10798 return ValuesIn(array); 10799 } 10800 10801 private: 10802 // No implementation - assignment is unsupported. 10803 void operator=(const ValueArray5& other); 10804 10805 const T1 v1_; 10806 const T2 v2_; 10807 const T3 v3_; 10808 const T4 v4_; 10809 const T5 v5_; 10810 }; 10811 10812 template <typename T1, typename T2, typename T3, typename T4, typename T5, 10813 typename T6> 10814 class ValueArray6 { 10815 public: 10816 ValueArray6(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6) : v1_(v1), v2_(v2), 10817 v3_(v3), v4_(v4), v5_(v5), v6_(v6) {} 10818 10819 template <typename T> 10820 operator ParamGenerator<T>() const { 10821 const T array[] = { static_cast<T>(v1_), static_cast<T>(v2_), 10822 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_), 10823 static_cast<T>(v6_) }; 10824 return ValuesIn(array); 10825 } 10826 10827 private: 10828 // No implementation - assignment is unsupported. 10829 void operator=(const ValueArray6& other); 10830 10831 const T1 v1_; 10832 const T2 v2_; 10833 const T3 v3_; 10834 const T4 v4_; 10835 const T5 v5_; 10836 const T6 v6_; 10837 }; 10838 10839 template <typename T1, typename T2, typename T3, typename T4, typename T5, 10840 typename T6, typename T7> 10841 class ValueArray7 { 10842 public: 10843 ValueArray7(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7) : v1_(v1), 10844 v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7) {} 10845 10846 template <typename T> 10847 operator ParamGenerator<T>() const { 10848 const T array[] = { static_cast<T>(v1_), static_cast<T>(v2_), 10849 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_), 10850 static_cast<T>(v6_), static_cast<T>(v7_) }; 10851 return ValuesIn(array); 10852 } 10853 10854 private: 10855 // No implementation - assignment is unsupported. 10856 void operator=(const ValueArray7& other); 10857 10858 const T1 v1_; 10859 const T2 v2_; 10860 const T3 v3_; 10861 const T4 v4_; 10862 const T5 v5_; 10863 const T6 v6_; 10864 const T7 v7_; 10865 }; 10866 10867 template <typename T1, typename T2, typename T3, typename T4, typename T5, 10868 typename T6, typename T7, typename T8> 10869 class ValueArray8 { 10870 public: 10871 ValueArray8(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, 10872 T8 v8) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), 10873 v8_(v8) {} 10874 10875 template <typename T> 10876 operator ParamGenerator<T>() const { 10877 const T array[] = { static_cast<T>(v1_), static_cast<T>(v2_), 10878 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_), 10879 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_) }; 10880 return ValuesIn(array); 10881 } 10882 10883 private: 10884 // No implementation - assignment is unsupported. 10885 void operator=(const ValueArray8& other); 10886 10887 const T1 v1_; 10888 const T2 v2_; 10889 const T3 v3_; 10890 const T4 v4_; 10891 const T5 v5_; 10892 const T6 v6_; 10893 const T7 v7_; 10894 const T8 v8_; 10895 }; 10896 10897 template <typename T1, typename T2, typename T3, typename T4, typename T5, 10898 typename T6, typename T7, typename T8, typename T9> 10899 class ValueArray9 { 10900 public: 10901 ValueArray9(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, 10902 T9 v9) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), 10903 v8_(v8), v9_(v9) {} 10904 10905 template <typename T> 10906 operator ParamGenerator<T>() const { 10907 const T array[] = { static_cast<T>(v1_), static_cast<T>(v2_), 10908 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_), 10909 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_), 10910 static_cast<T>(v9_) }; 10911 return ValuesIn(array); 10912 } 10913 10914 private: 10915 // No implementation - assignment is unsupported. 10916 void operator=(const ValueArray9& other); 10917 10918 const T1 v1_; 10919 const T2 v2_; 10920 const T3 v3_; 10921 const T4 v4_; 10922 const T5 v5_; 10923 const T6 v6_; 10924 const T7 v7_; 10925 const T8 v8_; 10926 const T9 v9_; 10927 }; 10928 10929 template <typename T1, typename T2, typename T3, typename T4, typename T5, 10930 typename T6, typename T7, typename T8, typename T9, typename T10> 10931 class ValueArray10 { 10932 public: 10933 ValueArray10(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, 10934 T10 v10) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), 10935 v8_(v8), v9_(v9), v10_(v10) {} 10936 10937 template <typename T> 10938 operator ParamGenerator<T>() const { 10939 const T array[] = { static_cast<T>(v1_), static_cast<T>(v2_), 10940 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_), 10941 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_), 10942 static_cast<T>(v9_), static_cast<T>(v10_) }; 10943 return ValuesIn(array); 10944 } 10945 10946 private: 10947 // No implementation - assignment is unsupported. 10948 void operator=(const ValueArray10& other); 10949 10950 const T1 v1_; 10951 const T2 v2_; 10952 const T3 v3_; 10953 const T4 v4_; 10954 const T5 v5_; 10955 const T6 v6_; 10956 const T7 v7_; 10957 const T8 v8_; 10958 const T9 v9_; 10959 const T10 v10_; 10960 }; 10961 10962 template <typename T1, typename T2, typename T3, typename T4, typename T5, 10963 typename T6, typename T7, typename T8, typename T9, typename T10, 10964 typename T11> 10965 class ValueArray11 { 10966 public: 10967 ValueArray11(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, 10968 T10 v10, T11 v11) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), 10969 v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11) {} 10970 10971 template <typename T> 10972 operator ParamGenerator<T>() const { 10973 const T array[] = { static_cast<T>(v1_), static_cast<T>(v2_), 10974 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_), 10975 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_), 10976 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_) }; 10977 return ValuesIn(array); 10978 } 10979 10980 private: 10981 // No implementation - assignment is unsupported. 10982 void operator=(const ValueArray11& other); 10983 10984 const T1 v1_; 10985 const T2 v2_; 10986 const T3 v3_; 10987 const T4 v4_; 10988 const T5 v5_; 10989 const T6 v6_; 10990 const T7 v7_; 10991 const T8 v8_; 10992 const T9 v9_; 10993 const T10 v10_; 10994 const T11 v11_; 10995 }; 10996 10997 template <typename T1, typename T2, typename T3, typename T4, typename T5, 10998 typename T6, typename T7, typename T8, typename T9, typename T10, 10999 typename T11, typename T12> 11000 class ValueArray12 { 11001 public: 11002 ValueArray12(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, 11003 T10 v10, T11 v11, T12 v12) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), 11004 v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12) {} 11005 11006 template <typename T> 11007 operator ParamGenerator<T>() const { 11008 const T array[] = { static_cast<T>(v1_), static_cast<T>(v2_), 11009 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_), 11010 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_), 11011 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_), 11012 static_cast<T>(v12_) }; 11013 return ValuesIn(array); 11014 } 11015 11016 private: 11017 // No implementation - assignment is unsupported. 11018 void operator=(const ValueArray12& other); 11019 11020 const T1 v1_; 11021 const T2 v2_; 11022 const T3 v3_; 11023 const T4 v4_; 11024 const T5 v5_; 11025 const T6 v6_; 11026 const T7 v7_; 11027 const T8 v8_; 11028 const T9 v9_; 11029 const T10 v10_; 11030 const T11 v11_; 11031 const T12 v12_; 11032 }; 11033 11034 template <typename T1, typename T2, typename T3, typename T4, typename T5, 11035 typename T6, typename T7, typename T8, typename T9, typename T10, 11036 typename T11, typename T12, typename T13> 11037 class ValueArray13 { 11038 public: 11039 ValueArray13(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, 11040 T10 v10, T11 v11, T12 v12, T13 v13) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), 11041 v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), 11042 v12_(v12), v13_(v13) {} 11043 11044 template <typename T> 11045 operator ParamGenerator<T>() const { 11046 const T array[] = { static_cast<T>(v1_), static_cast<T>(v2_), 11047 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_), 11048 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_), 11049 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_), 11050 static_cast<T>(v12_), static_cast<T>(v13_) }; 11051 return ValuesIn(array); 11052 } 11053 11054 private: 11055 // No implementation - assignment is unsupported. 11056 void operator=(const ValueArray13& other); 11057 11058 const T1 v1_; 11059 const T2 v2_; 11060 const T3 v3_; 11061 const T4 v4_; 11062 const T5 v5_; 11063 const T6 v6_; 11064 const T7 v7_; 11065 const T8 v8_; 11066 const T9 v9_; 11067 const T10 v10_; 11068 const T11 v11_; 11069 const T12 v12_; 11070 const T13 v13_; 11071 }; 11072 11073 template <typename T1, typename T2, typename T3, typename T4, typename T5, 11074 typename T6, typename T7, typename T8, typename T9, typename T10, 11075 typename T11, typename T12, typename T13, typename T14> 11076 class ValueArray14 { 11077 public: 11078 ValueArray14(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, 11079 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14) : v1_(v1), v2_(v2), v3_(v3), 11080 v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), 11081 v11_(v11), v12_(v12), v13_(v13), v14_(v14) {} 11082 11083 template <typename T> 11084 operator ParamGenerator<T>() const { 11085 const T array[] = { static_cast<T>(v1_), static_cast<T>(v2_), 11086 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_), 11087 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_), 11088 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_), 11089 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_) }; 11090 return ValuesIn(array); 11091 } 11092 11093 private: 11094 // No implementation - assignment is unsupported. 11095 void operator=(const ValueArray14& other); 11096 11097 const T1 v1_; 11098 const T2 v2_; 11099 const T3 v3_; 11100 const T4 v4_; 11101 const T5 v5_; 11102 const T6 v6_; 11103 const T7 v7_; 11104 const T8 v8_; 11105 const T9 v9_; 11106 const T10 v10_; 11107 const T11 v11_; 11108 const T12 v12_; 11109 const T13 v13_; 11110 const T14 v14_; 11111 }; 11112 11113 template <typename T1, typename T2, typename T3, typename T4, typename T5, 11114 typename T6, typename T7, typename T8, typename T9, typename T10, 11115 typename T11, typename T12, typename T13, typename T14, typename T15> 11116 class ValueArray15 { 11117 public: 11118 ValueArray15(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, 11119 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15) : v1_(v1), v2_(v2), 11120 v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), 11121 v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15) {} 11122 11123 template <typename T> 11124 operator ParamGenerator<T>() const { 11125 const T array[] = { static_cast<T>(v1_), static_cast<T>(v2_), 11126 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_), 11127 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_), 11128 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_), 11129 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_), 11130 static_cast<T>(v15_) }; 11131 return ValuesIn(array); 11132 } 11133 11134 private: 11135 // No implementation - assignment is unsupported. 11136 void operator=(const ValueArray15& other); 11137 11138 const T1 v1_; 11139 const T2 v2_; 11140 const T3 v3_; 11141 const T4 v4_; 11142 const T5 v5_; 11143 const T6 v6_; 11144 const T7 v7_; 11145 const T8 v8_; 11146 const T9 v9_; 11147 const T10 v10_; 11148 const T11 v11_; 11149 const T12 v12_; 11150 const T13 v13_; 11151 const T14 v14_; 11152 const T15 v15_; 11153 }; 11154 11155 template <typename T1, typename T2, typename T3, typename T4, typename T5, 11156 typename T6, typename T7, typename T8, typename T9, typename T10, 11157 typename T11, typename T12, typename T13, typename T14, typename T15, 11158 typename T16> 11159 class ValueArray16 { 11160 public: 11161 ValueArray16(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, 11162 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16) : v1_(v1), 11163 v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), 11164 v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), 11165 v16_(v16) {} 11166 11167 template <typename T> 11168 operator ParamGenerator<T>() const { 11169 const T array[] = { static_cast<T>(v1_), static_cast<T>(v2_), 11170 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_), 11171 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_), 11172 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_), 11173 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_), 11174 static_cast<T>(v15_), static_cast<T>(v16_) }; 11175 return ValuesIn(array); 11176 } 11177 11178 private: 11179 // No implementation - assignment is unsupported. 11180 void operator=(const ValueArray16& other); 11181 11182 const T1 v1_; 11183 const T2 v2_; 11184 const T3 v3_; 11185 const T4 v4_; 11186 const T5 v5_; 11187 const T6 v6_; 11188 const T7 v7_; 11189 const T8 v8_; 11190 const T9 v9_; 11191 const T10 v10_; 11192 const T11 v11_; 11193 const T12 v12_; 11194 const T13 v13_; 11195 const T14 v14_; 11196 const T15 v15_; 11197 const T16 v16_; 11198 }; 11199 11200 template <typename T1, typename T2, typename T3, typename T4, typename T5, 11201 typename T6, typename T7, typename T8, typename T9, typename T10, 11202 typename T11, typename T12, typename T13, typename T14, typename T15, 11203 typename T16, typename T17> 11204 class ValueArray17 { 11205 public: 11206 ValueArray17(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, 11207 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, 11208 T17 v17) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), 11209 v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), 11210 v15_(v15), v16_(v16), v17_(v17) {} 11211 11212 template <typename T> 11213 operator ParamGenerator<T>() const { 11214 const T array[] = { static_cast<T>(v1_), static_cast<T>(v2_), 11215 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_), 11216 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_), 11217 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_), 11218 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_), 11219 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_) }; 11220 return ValuesIn(array); 11221 } 11222 11223 private: 11224 // No implementation - assignment is unsupported. 11225 void operator=(const ValueArray17& other); 11226 11227 const T1 v1_; 11228 const T2 v2_; 11229 const T3 v3_; 11230 const T4 v4_; 11231 const T5 v5_; 11232 const T6 v6_; 11233 const T7 v7_; 11234 const T8 v8_; 11235 const T9 v9_; 11236 const T10 v10_; 11237 const T11 v11_; 11238 const T12 v12_; 11239 const T13 v13_; 11240 const T14 v14_; 11241 const T15 v15_; 11242 const T16 v16_; 11243 const T17 v17_; 11244 }; 11245 11246 template <typename T1, typename T2, typename T3, typename T4, typename T5, 11247 typename T6, typename T7, typename T8, typename T9, typename T10, 11248 typename T11, typename T12, typename T13, typename T14, typename T15, 11249 typename T16, typename T17, typename T18> 11250 class ValueArray18 { 11251 public: 11252 ValueArray18(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, 11253 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, 11254 T18 v18) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), 11255 v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), 11256 v15_(v15), v16_(v16), v17_(v17), v18_(v18) {} 11257 11258 template <typename T> 11259 operator ParamGenerator<T>() const { 11260 const T array[] = { static_cast<T>(v1_), static_cast<T>(v2_), 11261 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_), 11262 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_), 11263 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_), 11264 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_), 11265 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_), 11266 static_cast<T>(v18_) }; 11267 return ValuesIn(array); 11268 } 11269 11270 private: 11271 // No implementation - assignment is unsupported. 11272 void operator=(const ValueArray18& other); 11273 11274 const T1 v1_; 11275 const T2 v2_; 11276 const T3 v3_; 11277 const T4 v4_; 11278 const T5 v5_; 11279 const T6 v6_; 11280 const T7 v7_; 11281 const T8 v8_; 11282 const T9 v9_; 11283 const T10 v10_; 11284 const T11 v11_; 11285 const T12 v12_; 11286 const T13 v13_; 11287 const T14 v14_; 11288 const T15 v15_; 11289 const T16 v16_; 11290 const T17 v17_; 11291 const T18 v18_; 11292 }; 11293 11294 template <typename T1, typename T2, typename T3, typename T4, typename T5, 11295 typename T6, typename T7, typename T8, typename T9, typename T10, 11296 typename T11, typename T12, typename T13, typename T14, typename T15, 11297 typename T16, typename T17, typename T18, typename T19> 11298 class ValueArray19 { 11299 public: 11300 ValueArray19(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, 11301 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, 11302 T18 v18, T19 v19) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), 11303 v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), 11304 v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19) {} 11305 11306 template <typename T> 11307 operator ParamGenerator<T>() const { 11308 const T array[] = { static_cast<T>(v1_), static_cast<T>(v2_), 11309 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_), 11310 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_), 11311 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_), 11312 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_), 11313 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_), 11314 static_cast<T>(v18_), static_cast<T>(v19_) }; 11315 return ValuesIn(array); 11316 } 11317 11318 private: 11319 // No implementation - assignment is unsupported. 11320 void operator=(const ValueArray19& other); 11321 11322 const T1 v1_; 11323 const T2 v2_; 11324 const T3 v3_; 11325 const T4 v4_; 11326 const T5 v5_; 11327 const T6 v6_; 11328 const T7 v7_; 11329 const T8 v8_; 11330 const T9 v9_; 11331 const T10 v10_; 11332 const T11 v11_; 11333 const T12 v12_; 11334 const T13 v13_; 11335 const T14 v14_; 11336 const T15 v15_; 11337 const T16 v16_; 11338 const T17 v17_; 11339 const T18 v18_; 11340 const T19 v19_; 11341 }; 11342 11343 template <typename T1, typename T2, typename T3, typename T4, typename T5, 11344 typename T6, typename T7, typename T8, typename T9, typename T10, 11345 typename T11, typename T12, typename T13, typename T14, typename T15, 11346 typename T16, typename T17, typename T18, typename T19, typename T20> 11347 class ValueArray20 { 11348 public: 11349 ValueArray20(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, 11350 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, 11351 T18 v18, T19 v19, T20 v20) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), 11352 v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), 11353 v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18), 11354 v19_(v19), v20_(v20) {} 11355 11356 template <typename T> 11357 operator ParamGenerator<T>() const { 11358 const T array[] = { static_cast<T>(v1_), static_cast<T>(v2_), 11359 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_), 11360 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_), 11361 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_), 11362 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_), 11363 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_), 11364 static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_) }; 11365 return ValuesIn(array); 11366 } 11367 11368 private: 11369 // No implementation - assignment is unsupported. 11370 void operator=(const ValueArray20& other); 11371 11372 const T1 v1_; 11373 const T2 v2_; 11374 const T3 v3_; 11375 const T4 v4_; 11376 const T5 v5_; 11377 const T6 v6_; 11378 const T7 v7_; 11379 const T8 v8_; 11380 const T9 v9_; 11381 const T10 v10_; 11382 const T11 v11_; 11383 const T12 v12_; 11384 const T13 v13_; 11385 const T14 v14_; 11386 const T15 v15_; 11387 const T16 v16_; 11388 const T17 v17_; 11389 const T18 v18_; 11390 const T19 v19_; 11391 const T20 v20_; 11392 }; 11393 11394 template <typename T1, typename T2, typename T3, typename T4, typename T5, 11395 typename T6, typename T7, typename T8, typename T9, typename T10, 11396 typename T11, typename T12, typename T13, typename T14, typename T15, 11397 typename T16, typename T17, typename T18, typename T19, typename T20, 11398 typename T21> 11399 class ValueArray21 { 11400 public: 11401 ValueArray21(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, 11402 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, 11403 T18 v18, T19 v19, T20 v20, T21 v21) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), 11404 v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), 11405 v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17), 11406 v18_(v18), v19_(v19), v20_(v20), v21_(v21) {} 11407 11408 template <typename T> 11409 operator ParamGenerator<T>() const { 11410 const T array[] = { static_cast<T>(v1_), static_cast<T>(v2_), 11411 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_), 11412 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_), 11413 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_), 11414 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_), 11415 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_), 11416 static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_), 11417 static_cast<T>(v21_) }; 11418 return ValuesIn(array); 11419 } 11420 11421 private: 11422 // No implementation - assignment is unsupported. 11423 void operator=(const ValueArray21& other); 11424 11425 const T1 v1_; 11426 const T2 v2_; 11427 const T3 v3_; 11428 const T4 v4_; 11429 const T5 v5_; 11430 const T6 v6_; 11431 const T7 v7_; 11432 const T8 v8_; 11433 const T9 v9_; 11434 const T10 v10_; 11435 const T11 v11_; 11436 const T12 v12_; 11437 const T13 v13_; 11438 const T14 v14_; 11439 const T15 v15_; 11440 const T16 v16_; 11441 const T17 v17_; 11442 const T18 v18_; 11443 const T19 v19_; 11444 const T20 v20_; 11445 const T21 v21_; 11446 }; 11447 11448 template <typename T1, typename T2, typename T3, typename T4, typename T5, 11449 typename T6, typename T7, typename T8, typename T9, typename T10, 11450 typename T11, typename T12, typename T13, typename T14, typename T15, 11451 typename T16, typename T17, typename T18, typename T19, typename T20, 11452 typename T21, typename T22> 11453 class ValueArray22 { 11454 public: 11455 ValueArray22(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, 11456 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, 11457 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22) : v1_(v1), v2_(v2), v3_(v3), 11458 v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), 11459 v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), 11460 v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22) {} 11461 11462 template <typename T> 11463 operator ParamGenerator<T>() const { 11464 const T array[] = { static_cast<T>(v1_), static_cast<T>(v2_), 11465 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_), 11466 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_), 11467 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_), 11468 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_), 11469 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_), 11470 static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_), 11471 static_cast<T>(v21_), static_cast<T>(v22_) }; 11472 return ValuesIn(array); 11473 } 11474 11475 private: 11476 // No implementation - assignment is unsupported. 11477 void operator=(const ValueArray22& other); 11478 11479 const T1 v1_; 11480 const T2 v2_; 11481 const T3 v3_; 11482 const T4 v4_; 11483 const T5 v5_; 11484 const T6 v6_; 11485 const T7 v7_; 11486 const T8 v8_; 11487 const T9 v9_; 11488 const T10 v10_; 11489 const T11 v11_; 11490 const T12 v12_; 11491 const T13 v13_; 11492 const T14 v14_; 11493 const T15 v15_; 11494 const T16 v16_; 11495 const T17 v17_; 11496 const T18 v18_; 11497 const T19 v19_; 11498 const T20 v20_; 11499 const T21 v21_; 11500 const T22 v22_; 11501 }; 11502 11503 template <typename T1, typename T2, typename T3, typename T4, typename T5, 11504 typename T6, typename T7, typename T8, typename T9, typename T10, 11505 typename T11, typename T12, typename T13, typename T14, typename T15, 11506 typename T16, typename T17, typename T18, typename T19, typename T20, 11507 typename T21, typename T22, typename T23> 11508 class ValueArray23 { 11509 public: 11510 ValueArray23(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, 11511 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, 11512 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23) : v1_(v1), v2_(v2), 11513 v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), 11514 v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), 11515 v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22), 11516 v23_(v23) {} 11517 11518 template <typename T> 11519 operator ParamGenerator<T>() const { 11520 const T array[] = { static_cast<T>(v1_), static_cast<T>(v2_), 11521 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_), 11522 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_), 11523 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_), 11524 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_), 11525 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_), 11526 static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_), 11527 static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_) }; 11528 return ValuesIn(array); 11529 } 11530 11531 private: 11532 // No implementation - assignment is unsupported. 11533 void operator=(const ValueArray23& other); 11534 11535 const T1 v1_; 11536 const T2 v2_; 11537 const T3 v3_; 11538 const T4 v4_; 11539 const T5 v5_; 11540 const T6 v6_; 11541 const T7 v7_; 11542 const T8 v8_; 11543 const T9 v9_; 11544 const T10 v10_; 11545 const T11 v11_; 11546 const T12 v12_; 11547 const T13 v13_; 11548 const T14 v14_; 11549 const T15 v15_; 11550 const T16 v16_; 11551 const T17 v17_; 11552 const T18 v18_; 11553 const T19 v19_; 11554 const T20 v20_; 11555 const T21 v21_; 11556 const T22 v22_; 11557 const T23 v23_; 11558 }; 11559 11560 template <typename T1, typename T2, typename T3, typename T4, typename T5, 11561 typename T6, typename T7, typename T8, typename T9, typename T10, 11562 typename T11, typename T12, typename T13, typename T14, typename T15, 11563 typename T16, typename T17, typename T18, typename T19, typename T20, 11564 typename T21, typename T22, typename T23, typename T24> 11565 class ValueArray24 { 11566 public: 11567 ValueArray24(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, 11568 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, 11569 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24) : v1_(v1), 11570 v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), 11571 v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), 11572 v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), 11573 v22_(v22), v23_(v23), v24_(v24) {} 11574 11575 template <typename T> 11576 operator ParamGenerator<T>() const { 11577 const T array[] = { static_cast<T>(v1_), static_cast<T>(v2_), 11578 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_), 11579 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_), 11580 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_), 11581 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_), 11582 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_), 11583 static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_), 11584 static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_), 11585 static_cast<T>(v24_) }; 11586 return ValuesIn(array); 11587 } 11588 11589 private: 11590 // No implementation - assignment is unsupported. 11591 void operator=(const ValueArray24& other); 11592 11593 const T1 v1_; 11594 const T2 v2_; 11595 const T3 v3_; 11596 const T4 v4_; 11597 const T5 v5_; 11598 const T6 v6_; 11599 const T7 v7_; 11600 const T8 v8_; 11601 const T9 v9_; 11602 const T10 v10_; 11603 const T11 v11_; 11604 const T12 v12_; 11605 const T13 v13_; 11606 const T14 v14_; 11607 const T15 v15_; 11608 const T16 v16_; 11609 const T17 v17_; 11610 const T18 v18_; 11611 const T19 v19_; 11612 const T20 v20_; 11613 const T21 v21_; 11614 const T22 v22_; 11615 const T23 v23_; 11616 const T24 v24_; 11617 }; 11618 11619 template <typename T1, typename T2, typename T3, typename T4, typename T5, 11620 typename T6, typename T7, typename T8, typename T9, typename T10, 11621 typename T11, typename T12, typename T13, typename T14, typename T15, 11622 typename T16, typename T17, typename T18, typename T19, typename T20, 11623 typename T21, typename T22, typename T23, typename T24, typename T25> 11624 class ValueArray25 { 11625 public: 11626 ValueArray25(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, 11627 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, 11628 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, 11629 T25 v25) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), 11630 v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), 11631 v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), 11632 v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25) {} 11633 11634 template <typename T> 11635 operator ParamGenerator<T>() const { 11636 const T array[] = { static_cast<T>(v1_), static_cast<T>(v2_), 11637 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_), 11638 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_), 11639 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_), 11640 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_), 11641 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_), 11642 static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_), 11643 static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_), 11644 static_cast<T>(v24_), static_cast<T>(v25_) }; 11645 return ValuesIn(array); 11646 } 11647 11648 private: 11649 // No implementation - assignment is unsupported. 11650 void operator=(const ValueArray25& other); 11651 11652 const T1 v1_; 11653 const T2 v2_; 11654 const T3 v3_; 11655 const T4 v4_; 11656 const T5 v5_; 11657 const T6 v6_; 11658 const T7 v7_; 11659 const T8 v8_; 11660 const T9 v9_; 11661 const T10 v10_; 11662 const T11 v11_; 11663 const T12 v12_; 11664 const T13 v13_; 11665 const T14 v14_; 11666 const T15 v15_; 11667 const T16 v16_; 11668 const T17 v17_; 11669 const T18 v18_; 11670 const T19 v19_; 11671 const T20 v20_; 11672 const T21 v21_; 11673 const T22 v22_; 11674 const T23 v23_; 11675 const T24 v24_; 11676 const T25 v25_; 11677 }; 11678 11679 template <typename T1, typename T2, typename T3, typename T4, typename T5, 11680 typename T6, typename T7, typename T8, typename T9, typename T10, 11681 typename T11, typename T12, typename T13, typename T14, typename T15, 11682 typename T16, typename T17, typename T18, typename T19, typename T20, 11683 typename T21, typename T22, typename T23, typename T24, typename T25, 11684 typename T26> 11685 class ValueArray26 { 11686 public: 11687 ValueArray26(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, 11688 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, 11689 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, 11690 T26 v26) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), 11691 v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), 11692 v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), 11693 v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26) {} 11694 11695 template <typename T> 11696 operator ParamGenerator<T>() const { 11697 const T array[] = { static_cast<T>(v1_), static_cast<T>(v2_), 11698 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_), 11699 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_), 11700 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_), 11701 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_), 11702 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_), 11703 static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_), 11704 static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_), 11705 static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_) }; 11706 return ValuesIn(array); 11707 } 11708 11709 private: 11710 // No implementation - assignment is unsupported. 11711 void operator=(const ValueArray26& other); 11712 11713 const T1 v1_; 11714 const T2 v2_; 11715 const T3 v3_; 11716 const T4 v4_; 11717 const T5 v5_; 11718 const T6 v6_; 11719 const T7 v7_; 11720 const T8 v8_; 11721 const T9 v9_; 11722 const T10 v10_; 11723 const T11 v11_; 11724 const T12 v12_; 11725 const T13 v13_; 11726 const T14 v14_; 11727 const T15 v15_; 11728 const T16 v16_; 11729 const T17 v17_; 11730 const T18 v18_; 11731 const T19 v19_; 11732 const T20 v20_; 11733 const T21 v21_; 11734 const T22 v22_; 11735 const T23 v23_; 11736 const T24 v24_; 11737 const T25 v25_; 11738 const T26 v26_; 11739 }; 11740 11741 template <typename T1, typename T2, typename T3, typename T4, typename T5, 11742 typename T6, typename T7, typename T8, typename T9, typename T10, 11743 typename T11, typename T12, typename T13, typename T14, typename T15, 11744 typename T16, typename T17, typename T18, typename T19, typename T20, 11745 typename T21, typename T22, typename T23, typename T24, typename T25, 11746 typename T26, typename T27> 11747 class ValueArray27 { 11748 public: 11749 ValueArray27(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, 11750 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, 11751 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, 11752 T26 v26, T27 v27) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), 11753 v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), 11754 v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), 11755 v20_(v20), v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), 11756 v26_(v26), v27_(v27) {} 11757 11758 template <typename T> 11759 operator ParamGenerator<T>() const { 11760 const T array[] = { static_cast<T>(v1_), static_cast<T>(v2_), 11761 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_), 11762 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_), 11763 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_), 11764 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_), 11765 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_), 11766 static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_), 11767 static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_), 11768 static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_), 11769 static_cast<T>(v27_) }; 11770 return ValuesIn(array); 11771 } 11772 11773 private: 11774 // No implementation - assignment is unsupported. 11775 void operator=(const ValueArray27& other); 11776 11777 const T1 v1_; 11778 const T2 v2_; 11779 const T3 v3_; 11780 const T4 v4_; 11781 const T5 v5_; 11782 const T6 v6_; 11783 const T7 v7_; 11784 const T8 v8_; 11785 const T9 v9_; 11786 const T10 v10_; 11787 const T11 v11_; 11788 const T12 v12_; 11789 const T13 v13_; 11790 const T14 v14_; 11791 const T15 v15_; 11792 const T16 v16_; 11793 const T17 v17_; 11794 const T18 v18_; 11795 const T19 v19_; 11796 const T20 v20_; 11797 const T21 v21_; 11798 const T22 v22_; 11799 const T23 v23_; 11800 const T24 v24_; 11801 const T25 v25_; 11802 const T26 v26_; 11803 const T27 v27_; 11804 }; 11805 11806 template <typename T1, typename T2, typename T3, typename T4, typename T5, 11807 typename T6, typename T7, typename T8, typename T9, typename T10, 11808 typename T11, typename T12, typename T13, typename T14, typename T15, 11809 typename T16, typename T17, typename T18, typename T19, typename T20, 11810 typename T21, typename T22, typename T23, typename T24, typename T25, 11811 typename T26, typename T27, typename T28> 11812 class ValueArray28 { 11813 public: 11814 ValueArray28(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, 11815 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, 11816 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, 11817 T26 v26, T27 v27, T28 v28) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), 11818 v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), 11819 v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18), 11820 v19_(v19), v20_(v20), v21_(v21), v22_(v22), v23_(v23), v24_(v24), 11821 v25_(v25), v26_(v26), v27_(v27), v28_(v28) {} 11822 11823 template <typename T> 11824 operator ParamGenerator<T>() const { 11825 const T array[] = { static_cast<T>(v1_), static_cast<T>(v2_), 11826 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_), 11827 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_), 11828 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_), 11829 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_), 11830 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_), 11831 static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_), 11832 static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_), 11833 static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_), 11834 static_cast<T>(v27_), static_cast<T>(v28_) }; 11835 return ValuesIn(array); 11836 } 11837 11838 private: 11839 // No implementation - assignment is unsupported. 11840 void operator=(const ValueArray28& other); 11841 11842 const T1 v1_; 11843 const T2 v2_; 11844 const T3 v3_; 11845 const T4 v4_; 11846 const T5 v5_; 11847 const T6 v6_; 11848 const T7 v7_; 11849 const T8 v8_; 11850 const T9 v9_; 11851 const T10 v10_; 11852 const T11 v11_; 11853 const T12 v12_; 11854 const T13 v13_; 11855 const T14 v14_; 11856 const T15 v15_; 11857 const T16 v16_; 11858 const T17 v17_; 11859 const T18 v18_; 11860 const T19 v19_; 11861 const T20 v20_; 11862 const T21 v21_; 11863 const T22 v22_; 11864 const T23 v23_; 11865 const T24 v24_; 11866 const T25 v25_; 11867 const T26 v26_; 11868 const T27 v27_; 11869 const T28 v28_; 11870 }; 11871 11872 template <typename T1, typename T2, typename T3, typename T4, typename T5, 11873 typename T6, typename T7, typename T8, typename T9, typename T10, 11874 typename T11, typename T12, typename T13, typename T14, typename T15, 11875 typename T16, typename T17, typename T18, typename T19, typename T20, 11876 typename T21, typename T22, typename T23, typename T24, typename T25, 11877 typename T26, typename T27, typename T28, typename T29> 11878 class ValueArray29 { 11879 public: 11880 ValueArray29(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, 11881 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, 11882 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, 11883 T26 v26, T27 v27, T28 v28, T29 v29) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), 11884 v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), 11885 v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17), 11886 v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22), v23_(v23), 11887 v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28), v29_(v29) {} 11888 11889 template <typename T> 11890 operator ParamGenerator<T>() const { 11891 const T array[] = { static_cast<T>(v1_), static_cast<T>(v2_), 11892 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_), 11893 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_), 11894 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_), 11895 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_), 11896 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_), 11897 static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_), 11898 static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_), 11899 static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_), 11900 static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_) }; 11901 return ValuesIn(array); 11902 } 11903 11904 private: 11905 // No implementation - assignment is unsupported. 11906 void operator=(const ValueArray29& other); 11907 11908 const T1 v1_; 11909 const T2 v2_; 11910 const T3 v3_; 11911 const T4 v4_; 11912 const T5 v5_; 11913 const T6 v6_; 11914 const T7 v7_; 11915 const T8 v8_; 11916 const T9 v9_; 11917 const T10 v10_; 11918 const T11 v11_; 11919 const T12 v12_; 11920 const T13 v13_; 11921 const T14 v14_; 11922 const T15 v15_; 11923 const T16 v16_; 11924 const T17 v17_; 11925 const T18 v18_; 11926 const T19 v19_; 11927 const T20 v20_; 11928 const T21 v21_; 11929 const T22 v22_; 11930 const T23 v23_; 11931 const T24 v24_; 11932 const T25 v25_; 11933 const T26 v26_; 11934 const T27 v27_; 11935 const T28 v28_; 11936 const T29 v29_; 11937 }; 11938 11939 template <typename T1, typename T2, typename T3, typename T4, typename T5, 11940 typename T6, typename T7, typename T8, typename T9, typename T10, 11941 typename T11, typename T12, typename T13, typename T14, typename T15, 11942 typename T16, typename T17, typename T18, typename T19, typename T20, 11943 typename T21, typename T22, typename T23, typename T24, typename T25, 11944 typename T26, typename T27, typename T28, typename T29, typename T30> 11945 class ValueArray30 { 11946 public: 11947 ValueArray30(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, 11948 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, 11949 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, 11950 T26 v26, T27 v27, T28 v28, T29 v29, T30 v30) : v1_(v1), v2_(v2), v3_(v3), 11951 v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), 11952 v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), 11953 v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22), 11954 v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28), 11955 v29_(v29), v30_(v30) {} 11956 11957 template <typename T> 11958 operator ParamGenerator<T>() const { 11959 const T array[] = { static_cast<T>(v1_), static_cast<T>(v2_), 11960 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_), 11961 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_), 11962 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_), 11963 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_), 11964 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_), 11965 static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_), 11966 static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_), 11967 static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_), 11968 static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_), 11969 static_cast<T>(v30_) }; 11970 return ValuesIn(array); 11971 } 11972 11973 private: 11974 // No implementation - assignment is unsupported. 11975 void operator=(const ValueArray30& other); 11976 11977 const T1 v1_; 11978 const T2 v2_; 11979 const T3 v3_; 11980 const T4 v4_; 11981 const T5 v5_; 11982 const T6 v6_; 11983 const T7 v7_; 11984 const T8 v8_; 11985 const T9 v9_; 11986 const T10 v10_; 11987 const T11 v11_; 11988 const T12 v12_; 11989 const T13 v13_; 11990 const T14 v14_; 11991 const T15 v15_; 11992 const T16 v16_; 11993 const T17 v17_; 11994 const T18 v18_; 11995 const T19 v19_; 11996 const T20 v20_; 11997 const T21 v21_; 11998 const T22 v22_; 11999 const T23 v23_; 12000 const T24 v24_; 12001 const T25 v25_; 12002 const T26 v26_; 12003 const T27 v27_; 12004 const T28 v28_; 12005 const T29 v29_; 12006 const T30 v30_; 12007 }; 12008 12009 template <typename T1, typename T2, typename T3, typename T4, typename T5, 12010 typename T6, typename T7, typename T8, typename T9, typename T10, 12011 typename T11, typename T12, typename T13, typename T14, typename T15, 12012 typename T16, typename T17, typename T18, typename T19, typename T20, 12013 typename T21, typename T22, typename T23, typename T24, typename T25, 12014 typename T26, typename T27, typename T28, typename T29, typename T30, 12015 typename T31> 12016 class ValueArray31 { 12017 public: 12018 ValueArray31(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, 12019 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, 12020 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, 12021 T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31) : v1_(v1), v2_(v2), 12022 v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), 12023 v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), 12024 v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22), 12025 v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28), 12026 v29_(v29), v30_(v30), v31_(v31) {} 12027 12028 template <typename T> 12029 operator ParamGenerator<T>() const { 12030 const T array[] = { static_cast<T>(v1_), static_cast<T>(v2_), 12031 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_), 12032 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_), 12033 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_), 12034 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_), 12035 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_), 12036 static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_), 12037 static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_), 12038 static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_), 12039 static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_), 12040 static_cast<T>(v30_), static_cast<T>(v31_) }; 12041 return ValuesIn(array); 12042 } 12043 12044 private: 12045 // No implementation - assignment is unsupported. 12046 void operator=(const ValueArray31& other); 12047 12048 const T1 v1_; 12049 const T2 v2_; 12050 const T3 v3_; 12051 const T4 v4_; 12052 const T5 v5_; 12053 const T6 v6_; 12054 const T7 v7_; 12055 const T8 v8_; 12056 const T9 v9_; 12057 const T10 v10_; 12058 const T11 v11_; 12059 const T12 v12_; 12060 const T13 v13_; 12061 const T14 v14_; 12062 const T15 v15_; 12063 const T16 v16_; 12064 const T17 v17_; 12065 const T18 v18_; 12066 const T19 v19_; 12067 const T20 v20_; 12068 const T21 v21_; 12069 const T22 v22_; 12070 const T23 v23_; 12071 const T24 v24_; 12072 const T25 v25_; 12073 const T26 v26_; 12074 const T27 v27_; 12075 const T28 v28_; 12076 const T29 v29_; 12077 const T30 v30_; 12078 const T31 v31_; 12079 }; 12080 12081 template <typename T1, typename T2, typename T3, typename T4, typename T5, 12082 typename T6, typename T7, typename T8, typename T9, typename T10, 12083 typename T11, typename T12, typename T13, typename T14, typename T15, 12084 typename T16, typename T17, typename T18, typename T19, typename T20, 12085 typename T21, typename T22, typename T23, typename T24, typename T25, 12086 typename T26, typename T27, typename T28, typename T29, typename T30, 12087 typename T31, typename T32> 12088 class ValueArray32 { 12089 public: 12090 ValueArray32(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, 12091 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, 12092 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, 12093 T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32) : v1_(v1), 12094 v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), 12095 v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), 12096 v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), 12097 v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), 12098 v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32) {} 12099 12100 template <typename T> 12101 operator ParamGenerator<T>() const { 12102 const T array[] = { static_cast<T>(v1_), static_cast<T>(v2_), 12103 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_), 12104 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_), 12105 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_), 12106 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_), 12107 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_), 12108 static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_), 12109 static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_), 12110 static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_), 12111 static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_), 12112 static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_) }; 12113 return ValuesIn(array); 12114 } 12115 12116 private: 12117 // No implementation - assignment is unsupported. 12118 void operator=(const ValueArray32& other); 12119 12120 const T1 v1_; 12121 const T2 v2_; 12122 const T3 v3_; 12123 const T4 v4_; 12124 const T5 v5_; 12125 const T6 v6_; 12126 const T7 v7_; 12127 const T8 v8_; 12128 const T9 v9_; 12129 const T10 v10_; 12130 const T11 v11_; 12131 const T12 v12_; 12132 const T13 v13_; 12133 const T14 v14_; 12134 const T15 v15_; 12135 const T16 v16_; 12136 const T17 v17_; 12137 const T18 v18_; 12138 const T19 v19_; 12139 const T20 v20_; 12140 const T21 v21_; 12141 const T22 v22_; 12142 const T23 v23_; 12143 const T24 v24_; 12144 const T25 v25_; 12145 const T26 v26_; 12146 const T27 v27_; 12147 const T28 v28_; 12148 const T29 v29_; 12149 const T30 v30_; 12150 const T31 v31_; 12151 const T32 v32_; 12152 }; 12153 12154 template <typename T1, typename T2, typename T3, typename T4, typename T5, 12155 typename T6, typename T7, typename T8, typename T9, typename T10, 12156 typename T11, typename T12, typename T13, typename T14, typename T15, 12157 typename T16, typename T17, typename T18, typename T19, typename T20, 12158 typename T21, typename T22, typename T23, typename T24, typename T25, 12159 typename T26, typename T27, typename T28, typename T29, typename T30, 12160 typename T31, typename T32, typename T33> 12161 class ValueArray33 { 12162 public: 12163 ValueArray33(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, 12164 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, 12165 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, 12166 T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, 12167 T33 v33) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), 12168 v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), 12169 v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), 12170 v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26), 12171 v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32), 12172 v33_(v33) {} 12173 12174 template <typename T> 12175 operator ParamGenerator<T>() const { 12176 const T array[] = { static_cast<T>(v1_), static_cast<T>(v2_), 12177 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_), 12178 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_), 12179 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_), 12180 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_), 12181 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_), 12182 static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_), 12183 static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_), 12184 static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_), 12185 static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_), 12186 static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_), 12187 static_cast<T>(v33_) }; 12188 return ValuesIn(array); 12189 } 12190 12191 private: 12192 // No implementation - assignment is unsupported. 12193 void operator=(const ValueArray33& other); 12194 12195 const T1 v1_; 12196 const T2 v2_; 12197 const T3 v3_; 12198 const T4 v4_; 12199 const T5 v5_; 12200 const T6 v6_; 12201 const T7 v7_; 12202 const T8 v8_; 12203 const T9 v9_; 12204 const T10 v10_; 12205 const T11 v11_; 12206 const T12 v12_; 12207 const T13 v13_; 12208 const T14 v14_; 12209 const T15 v15_; 12210 const T16 v16_; 12211 const T17 v17_; 12212 const T18 v18_; 12213 const T19 v19_; 12214 const T20 v20_; 12215 const T21 v21_; 12216 const T22 v22_; 12217 const T23 v23_; 12218 const T24 v24_; 12219 const T25 v25_; 12220 const T26 v26_; 12221 const T27 v27_; 12222 const T28 v28_; 12223 const T29 v29_; 12224 const T30 v30_; 12225 const T31 v31_; 12226 const T32 v32_; 12227 const T33 v33_; 12228 }; 12229 12230 template <typename T1, typename T2, typename T3, typename T4, typename T5, 12231 typename T6, typename T7, typename T8, typename T9, typename T10, 12232 typename T11, typename T12, typename T13, typename T14, typename T15, 12233 typename T16, typename T17, typename T18, typename T19, typename T20, 12234 typename T21, typename T22, typename T23, typename T24, typename T25, 12235 typename T26, typename T27, typename T28, typename T29, typename T30, 12236 typename T31, typename T32, typename T33, typename T34> 12237 class ValueArray34 { 12238 public: 12239 ValueArray34(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, 12240 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, 12241 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, 12242 T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, 12243 T34 v34) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), 12244 v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), 12245 v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), 12246 v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26), 12247 v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32), 12248 v33_(v33), v34_(v34) {} 12249 12250 template <typename T> 12251 operator ParamGenerator<T>() const { 12252 const T array[] = { static_cast<T>(v1_), static_cast<T>(v2_), 12253 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_), 12254 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_), 12255 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_), 12256 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_), 12257 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_), 12258 static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_), 12259 static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_), 12260 static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_), 12261 static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_), 12262 static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_), 12263 static_cast<T>(v33_), static_cast<T>(v34_) }; 12264 return ValuesIn(array); 12265 } 12266 12267 private: 12268 // No implementation - assignment is unsupported. 12269 void operator=(const ValueArray34& other); 12270 12271 const T1 v1_; 12272 const T2 v2_; 12273 const T3 v3_; 12274 const T4 v4_; 12275 const T5 v5_; 12276 const T6 v6_; 12277 const T7 v7_; 12278 const T8 v8_; 12279 const T9 v9_; 12280 const T10 v10_; 12281 const T11 v11_; 12282 const T12 v12_; 12283 const T13 v13_; 12284 const T14 v14_; 12285 const T15 v15_; 12286 const T16 v16_; 12287 const T17 v17_; 12288 const T18 v18_; 12289 const T19 v19_; 12290 const T20 v20_; 12291 const T21 v21_; 12292 const T22 v22_; 12293 const T23 v23_; 12294 const T24 v24_; 12295 const T25 v25_; 12296 const T26 v26_; 12297 const T27 v27_; 12298 const T28 v28_; 12299 const T29 v29_; 12300 const T30 v30_; 12301 const T31 v31_; 12302 const T32 v32_; 12303 const T33 v33_; 12304 const T34 v34_; 12305 }; 12306 12307 template <typename T1, typename T2, typename T3, typename T4, typename T5, 12308 typename T6, typename T7, typename T8, typename T9, typename T10, 12309 typename T11, typename T12, typename T13, typename T14, typename T15, 12310 typename T16, typename T17, typename T18, typename T19, typename T20, 12311 typename T21, typename T22, typename T23, typename T24, typename T25, 12312 typename T26, typename T27, typename T28, typename T29, typename T30, 12313 typename T31, typename T32, typename T33, typename T34, typename T35> 12314 class ValueArray35 { 12315 public: 12316 ValueArray35(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, 12317 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, 12318 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, 12319 T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, 12320 T34 v34, T35 v35) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), 12321 v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), 12322 v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), 12323 v20_(v20), v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), 12324 v26_(v26), v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), 12325 v32_(v32), v33_(v33), v34_(v34), v35_(v35) {} 12326 12327 template <typename T> 12328 operator ParamGenerator<T>() const { 12329 const T array[] = { static_cast<T>(v1_), static_cast<T>(v2_), 12330 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_), 12331 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_), 12332 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_), 12333 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_), 12334 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_), 12335 static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_), 12336 static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_), 12337 static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_), 12338 static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_), 12339 static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_), 12340 static_cast<T>(v33_), static_cast<T>(v34_), static_cast<T>(v35_) }; 12341 return ValuesIn(array); 12342 } 12343 12344 private: 12345 // No implementation - assignment is unsupported. 12346 void operator=(const ValueArray35& other); 12347 12348 const T1 v1_; 12349 const T2 v2_; 12350 const T3 v3_; 12351 const T4 v4_; 12352 const T5 v5_; 12353 const T6 v6_; 12354 const T7 v7_; 12355 const T8 v8_; 12356 const T9 v9_; 12357 const T10 v10_; 12358 const T11 v11_; 12359 const T12 v12_; 12360 const T13 v13_; 12361 const T14 v14_; 12362 const T15 v15_; 12363 const T16 v16_; 12364 const T17 v17_; 12365 const T18 v18_; 12366 const T19 v19_; 12367 const T20 v20_; 12368 const T21 v21_; 12369 const T22 v22_; 12370 const T23 v23_; 12371 const T24 v24_; 12372 const T25 v25_; 12373 const T26 v26_; 12374 const T27 v27_; 12375 const T28 v28_; 12376 const T29 v29_; 12377 const T30 v30_; 12378 const T31 v31_; 12379 const T32 v32_; 12380 const T33 v33_; 12381 const T34 v34_; 12382 const T35 v35_; 12383 }; 12384 12385 template <typename T1, typename T2, typename T3, typename T4, typename T5, 12386 typename T6, typename T7, typename T8, typename T9, typename T10, 12387 typename T11, typename T12, typename T13, typename T14, typename T15, 12388 typename T16, typename T17, typename T18, typename T19, typename T20, 12389 typename T21, typename T22, typename T23, typename T24, typename T25, 12390 typename T26, typename T27, typename T28, typename T29, typename T30, 12391 typename T31, typename T32, typename T33, typename T34, typename T35, 12392 typename T36> 12393 class ValueArray36 { 12394 public: 12395 ValueArray36(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, 12396 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, 12397 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, 12398 T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, 12399 T34 v34, T35 v35, T36 v36) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), 12400 v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), 12401 v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18), 12402 v19_(v19), v20_(v20), v21_(v21), v22_(v22), v23_(v23), v24_(v24), 12403 v25_(v25), v26_(v26), v27_(v27), v28_(v28), v29_(v29), v30_(v30), 12404 v31_(v31), v32_(v32), v33_(v33), v34_(v34), v35_(v35), v36_(v36) {} 12405 12406 template <typename T> 12407 operator ParamGenerator<T>() const { 12408 const T array[] = { static_cast<T>(v1_), static_cast<T>(v2_), 12409 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_), 12410 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_), 12411 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_), 12412 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_), 12413 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_), 12414 static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_), 12415 static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_), 12416 static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_), 12417 static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_), 12418 static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_), 12419 static_cast<T>(v33_), static_cast<T>(v34_), static_cast<T>(v35_), 12420 static_cast<T>(v36_) }; 12421 return ValuesIn(array); 12422 } 12423 12424 private: 12425 // No implementation - assignment is unsupported. 12426 void operator=(const ValueArray36& other); 12427 12428 const T1 v1_; 12429 const T2 v2_; 12430 const T3 v3_; 12431 const T4 v4_; 12432 const T5 v5_; 12433 const T6 v6_; 12434 const T7 v7_; 12435 const T8 v8_; 12436 const T9 v9_; 12437 const T10 v10_; 12438 const T11 v11_; 12439 const T12 v12_; 12440 const T13 v13_; 12441 const T14 v14_; 12442 const T15 v15_; 12443 const T16 v16_; 12444 const T17 v17_; 12445 const T18 v18_; 12446 const T19 v19_; 12447 const T20 v20_; 12448 const T21 v21_; 12449 const T22 v22_; 12450 const T23 v23_; 12451 const T24 v24_; 12452 const T25 v25_; 12453 const T26 v26_; 12454 const T27 v27_; 12455 const T28 v28_; 12456 const T29 v29_; 12457 const T30 v30_; 12458 const T31 v31_; 12459 const T32 v32_; 12460 const T33 v33_; 12461 const T34 v34_; 12462 const T35 v35_; 12463 const T36 v36_; 12464 }; 12465 12466 template <typename T1, typename T2, typename T3, typename T4, typename T5, 12467 typename T6, typename T7, typename T8, typename T9, typename T10, 12468 typename T11, typename T12, typename T13, typename T14, typename T15, 12469 typename T16, typename T17, typename T18, typename T19, typename T20, 12470 typename T21, typename T22, typename T23, typename T24, typename T25, 12471 typename T26, typename T27, typename T28, typename T29, typename T30, 12472 typename T31, typename T32, typename T33, typename T34, typename T35, 12473 typename T36, typename T37> 12474 class ValueArray37 { 12475 public: 12476 ValueArray37(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, 12477 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, 12478 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, 12479 T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, 12480 T34 v34, T35 v35, T36 v36, T37 v37) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), 12481 v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), 12482 v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17), 12483 v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22), v23_(v23), 12484 v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28), v29_(v29), 12485 v30_(v30), v31_(v31), v32_(v32), v33_(v33), v34_(v34), v35_(v35), 12486 v36_(v36), v37_(v37) {} 12487 12488 template <typename T> 12489 operator ParamGenerator<T>() const { 12490 const T array[] = { static_cast<T>(v1_), static_cast<T>(v2_), 12491 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_), 12492 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_), 12493 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_), 12494 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_), 12495 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_), 12496 static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_), 12497 static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_), 12498 static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_), 12499 static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_), 12500 static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_), 12501 static_cast<T>(v33_), static_cast<T>(v34_), static_cast<T>(v35_), 12502 static_cast<T>(v36_), static_cast<T>(v37_) }; 12503 return ValuesIn(array); 12504 } 12505 12506 private: 12507 // No implementation - assignment is unsupported. 12508 void operator=(const ValueArray37& other); 12509 12510 const T1 v1_; 12511 const T2 v2_; 12512 const T3 v3_; 12513 const T4 v4_; 12514 const T5 v5_; 12515 const T6 v6_; 12516 const T7 v7_; 12517 const T8 v8_; 12518 const T9 v9_; 12519 const T10 v10_; 12520 const T11 v11_; 12521 const T12 v12_; 12522 const T13 v13_; 12523 const T14 v14_; 12524 const T15 v15_; 12525 const T16 v16_; 12526 const T17 v17_; 12527 const T18 v18_; 12528 const T19 v19_; 12529 const T20 v20_; 12530 const T21 v21_; 12531 const T22 v22_; 12532 const T23 v23_; 12533 const T24 v24_; 12534 const T25 v25_; 12535 const T26 v26_; 12536 const T27 v27_; 12537 const T28 v28_; 12538 const T29 v29_; 12539 const T30 v30_; 12540 const T31 v31_; 12541 const T32 v32_; 12542 const T33 v33_; 12543 const T34 v34_; 12544 const T35 v35_; 12545 const T36 v36_; 12546 const T37 v37_; 12547 }; 12548 12549 template <typename T1, typename T2, typename T3, typename T4, typename T5, 12550 typename T6, typename T7, typename T8, typename T9, typename T10, 12551 typename T11, typename T12, typename T13, typename T14, typename T15, 12552 typename T16, typename T17, typename T18, typename T19, typename T20, 12553 typename T21, typename T22, typename T23, typename T24, typename T25, 12554 typename T26, typename T27, typename T28, typename T29, typename T30, 12555 typename T31, typename T32, typename T33, typename T34, typename T35, 12556 typename T36, typename T37, typename T38> 12557 class ValueArray38 { 12558 public: 12559 ValueArray38(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, 12560 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, 12561 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, 12562 T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, 12563 T34 v34, T35 v35, T36 v36, T37 v37, T38 v38) : v1_(v1), v2_(v2), v3_(v3), 12564 v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), 12565 v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), 12566 v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22), 12567 v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28), 12568 v29_(v29), v30_(v30), v31_(v31), v32_(v32), v33_(v33), v34_(v34), 12569 v35_(v35), v36_(v36), v37_(v37), v38_(v38) {} 12570 12571 template <typename T> 12572 operator ParamGenerator<T>() const { 12573 const T array[] = { static_cast<T>(v1_), static_cast<T>(v2_), 12574 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_), 12575 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_), 12576 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_), 12577 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_), 12578 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_), 12579 static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_), 12580 static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_), 12581 static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_), 12582 static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_), 12583 static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_), 12584 static_cast<T>(v33_), static_cast<T>(v34_), static_cast<T>(v35_), 12585 static_cast<T>(v36_), static_cast<T>(v37_), static_cast<T>(v38_) }; 12586 return ValuesIn(array); 12587 } 12588 12589 private: 12590 // No implementation - assignment is unsupported. 12591 void operator=(const ValueArray38& other); 12592 12593 const T1 v1_; 12594 const T2 v2_; 12595 const T3 v3_; 12596 const T4 v4_; 12597 const T5 v5_; 12598 const T6 v6_; 12599 const T7 v7_; 12600 const T8 v8_; 12601 const T9 v9_; 12602 const T10 v10_; 12603 const T11 v11_; 12604 const T12 v12_; 12605 const T13 v13_; 12606 const T14 v14_; 12607 const T15 v15_; 12608 const T16 v16_; 12609 const T17 v17_; 12610 const T18 v18_; 12611 const T19 v19_; 12612 const T20 v20_; 12613 const T21 v21_; 12614 const T22 v22_; 12615 const T23 v23_; 12616 const T24 v24_; 12617 const T25 v25_; 12618 const T26 v26_; 12619 const T27 v27_; 12620 const T28 v28_; 12621 const T29 v29_; 12622 const T30 v30_; 12623 const T31 v31_; 12624 const T32 v32_; 12625 const T33 v33_; 12626 const T34 v34_; 12627 const T35 v35_; 12628 const T36 v36_; 12629 const T37 v37_; 12630 const T38 v38_; 12631 }; 12632 12633 template <typename T1, typename T2, typename T3, typename T4, typename T5, 12634 typename T6, typename T7, typename T8, typename T9, typename T10, 12635 typename T11, typename T12, typename T13, typename T14, typename T15, 12636 typename T16, typename T17, typename T18, typename T19, typename T20, 12637 typename T21, typename T22, typename T23, typename T24, typename T25, 12638 typename T26, typename T27, typename T28, typename T29, typename T30, 12639 typename T31, typename T32, typename T33, typename T34, typename T35, 12640 typename T36, typename T37, typename T38, typename T39> 12641 class ValueArray39 { 12642 public: 12643 ValueArray39(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, 12644 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, 12645 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, 12646 T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, 12647 T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39) : v1_(v1), v2_(v2), 12648 v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), 12649 v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), 12650 v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22), 12651 v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28), 12652 v29_(v29), v30_(v30), v31_(v31), v32_(v32), v33_(v33), v34_(v34), 12653 v35_(v35), v36_(v36), v37_(v37), v38_(v38), v39_(v39) {} 12654 12655 template <typename T> 12656 operator ParamGenerator<T>() const { 12657 const T array[] = { static_cast<T>(v1_), static_cast<T>(v2_), 12658 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_), 12659 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_), 12660 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_), 12661 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_), 12662 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_), 12663 static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_), 12664 static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_), 12665 static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_), 12666 static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_), 12667 static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_), 12668 static_cast<T>(v33_), static_cast<T>(v34_), static_cast<T>(v35_), 12669 static_cast<T>(v36_), static_cast<T>(v37_), static_cast<T>(v38_), 12670 static_cast<T>(v39_) }; 12671 return ValuesIn(array); 12672 } 12673 12674 private: 12675 // No implementation - assignment is unsupported. 12676 void operator=(const ValueArray39& other); 12677 12678 const T1 v1_; 12679 const T2 v2_; 12680 const T3 v3_; 12681 const T4 v4_; 12682 const T5 v5_; 12683 const T6 v6_; 12684 const T7 v7_; 12685 const T8 v8_; 12686 const T9 v9_; 12687 const T10 v10_; 12688 const T11 v11_; 12689 const T12 v12_; 12690 const T13 v13_; 12691 const T14 v14_; 12692 const T15 v15_; 12693 const T16 v16_; 12694 const T17 v17_; 12695 const T18 v18_; 12696 const T19 v19_; 12697 const T20 v20_; 12698 const T21 v21_; 12699 const T22 v22_; 12700 const T23 v23_; 12701 const T24 v24_; 12702 const T25 v25_; 12703 const T26 v26_; 12704 const T27 v27_; 12705 const T28 v28_; 12706 const T29 v29_; 12707 const T30 v30_; 12708 const T31 v31_; 12709 const T32 v32_; 12710 const T33 v33_; 12711 const T34 v34_; 12712 const T35 v35_; 12713 const T36 v36_; 12714 const T37 v37_; 12715 const T38 v38_; 12716 const T39 v39_; 12717 }; 12718 12719 template <typename T1, typename T2, typename T3, typename T4, typename T5, 12720 typename T6, typename T7, typename T8, typename T9, typename T10, 12721 typename T11, typename T12, typename T13, typename T14, typename T15, 12722 typename T16, typename T17, typename T18, typename T19, typename T20, 12723 typename T21, typename T22, typename T23, typename T24, typename T25, 12724 typename T26, typename T27, typename T28, typename T29, typename T30, 12725 typename T31, typename T32, typename T33, typename T34, typename T35, 12726 typename T36, typename T37, typename T38, typename T39, typename T40> 12727 class ValueArray40 { 12728 public: 12729 ValueArray40(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, 12730 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, 12731 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, 12732 T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, 12733 T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40) : v1_(v1), 12734 v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), 12735 v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), 12736 v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), 12737 v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), 12738 v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32), v33_(v33), 12739 v34_(v34), v35_(v35), v36_(v36), v37_(v37), v38_(v38), v39_(v39), 12740 v40_(v40) {} 12741 12742 template <typename T> 12743 operator ParamGenerator<T>() const { 12744 const T array[] = { static_cast<T>(v1_), static_cast<T>(v2_), 12745 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_), 12746 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_), 12747 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_), 12748 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_), 12749 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_), 12750 static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_), 12751 static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_), 12752 static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_), 12753 static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_), 12754 static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_), 12755 static_cast<T>(v33_), static_cast<T>(v34_), static_cast<T>(v35_), 12756 static_cast<T>(v36_), static_cast<T>(v37_), static_cast<T>(v38_), 12757 static_cast<T>(v39_), static_cast<T>(v40_) }; 12758 return ValuesIn(array); 12759 } 12760 12761 private: 12762 // No implementation - assignment is unsupported. 12763 void operator=(const ValueArray40& other); 12764 12765 const T1 v1_; 12766 const T2 v2_; 12767 const T3 v3_; 12768 const T4 v4_; 12769 const T5 v5_; 12770 const T6 v6_; 12771 const T7 v7_; 12772 const T8 v8_; 12773 const T9 v9_; 12774 const T10 v10_; 12775 const T11 v11_; 12776 const T12 v12_; 12777 const T13 v13_; 12778 const T14 v14_; 12779 const T15 v15_; 12780 const T16 v16_; 12781 const T17 v17_; 12782 const T18 v18_; 12783 const T19 v19_; 12784 const T20 v20_; 12785 const T21 v21_; 12786 const T22 v22_; 12787 const T23 v23_; 12788 const T24 v24_; 12789 const T25 v25_; 12790 const T26 v26_; 12791 const T27 v27_; 12792 const T28 v28_; 12793 const T29 v29_; 12794 const T30 v30_; 12795 const T31 v31_; 12796 const T32 v32_; 12797 const T33 v33_; 12798 const T34 v34_; 12799 const T35 v35_; 12800 const T36 v36_; 12801 const T37 v37_; 12802 const T38 v38_; 12803 const T39 v39_; 12804 const T40 v40_; 12805 }; 12806 12807 template <typename T1, typename T2, typename T3, typename T4, typename T5, 12808 typename T6, typename T7, typename T8, typename T9, typename T10, 12809 typename T11, typename T12, typename T13, typename T14, typename T15, 12810 typename T16, typename T17, typename T18, typename T19, typename T20, 12811 typename T21, typename T22, typename T23, typename T24, typename T25, 12812 typename T26, typename T27, typename T28, typename T29, typename T30, 12813 typename T31, typename T32, typename T33, typename T34, typename T35, 12814 typename T36, typename T37, typename T38, typename T39, typename T40, 12815 typename T41> 12816 class ValueArray41 { 12817 public: 12818 ValueArray41(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, 12819 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, 12820 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, 12821 T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, 12822 T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, 12823 T41 v41) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), 12824 v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), 12825 v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), 12826 v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26), 12827 v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32), 12828 v33_(v33), v34_(v34), v35_(v35), v36_(v36), v37_(v37), v38_(v38), 12829 v39_(v39), v40_(v40), v41_(v41) {} 12830 12831 template <typename T> 12832 operator ParamGenerator<T>() const { 12833 const T array[] = { static_cast<T>(v1_), static_cast<T>(v2_), 12834 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_), 12835 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_), 12836 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_), 12837 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_), 12838 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_), 12839 static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_), 12840 static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_), 12841 static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_), 12842 static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_), 12843 static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_), 12844 static_cast<T>(v33_), static_cast<T>(v34_), static_cast<T>(v35_), 12845 static_cast<T>(v36_), static_cast<T>(v37_), static_cast<T>(v38_), 12846 static_cast<T>(v39_), static_cast<T>(v40_), static_cast<T>(v41_) }; 12847 return ValuesIn(array); 12848 } 12849 12850 private: 12851 // No implementation - assignment is unsupported. 12852 void operator=(const ValueArray41& other); 12853 12854 const T1 v1_; 12855 const T2 v2_; 12856 const T3 v3_; 12857 const T4 v4_; 12858 const T5 v5_; 12859 const T6 v6_; 12860 const T7 v7_; 12861 const T8 v8_; 12862 const T9 v9_; 12863 const T10 v10_; 12864 const T11 v11_; 12865 const T12 v12_; 12866 const T13 v13_; 12867 const T14 v14_; 12868 const T15 v15_; 12869 const T16 v16_; 12870 const T17 v17_; 12871 const T18 v18_; 12872 const T19 v19_; 12873 const T20 v20_; 12874 const T21 v21_; 12875 const T22 v22_; 12876 const T23 v23_; 12877 const T24 v24_; 12878 const T25 v25_; 12879 const T26 v26_; 12880 const T27 v27_; 12881 const T28 v28_; 12882 const T29 v29_; 12883 const T30 v30_; 12884 const T31 v31_; 12885 const T32 v32_; 12886 const T33 v33_; 12887 const T34 v34_; 12888 const T35 v35_; 12889 const T36 v36_; 12890 const T37 v37_; 12891 const T38 v38_; 12892 const T39 v39_; 12893 const T40 v40_; 12894 const T41 v41_; 12895 }; 12896 12897 template <typename T1, typename T2, typename T3, typename T4, typename T5, 12898 typename T6, typename T7, typename T8, typename T9, typename T10, 12899 typename T11, typename T12, typename T13, typename T14, typename T15, 12900 typename T16, typename T17, typename T18, typename T19, typename T20, 12901 typename T21, typename T22, typename T23, typename T24, typename T25, 12902 typename T26, typename T27, typename T28, typename T29, typename T30, 12903 typename T31, typename T32, typename T33, typename T34, typename T35, 12904 typename T36, typename T37, typename T38, typename T39, typename T40, 12905 typename T41, typename T42> 12906 class ValueArray42 { 12907 public: 12908 ValueArray42(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, 12909 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, 12910 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, 12911 T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, 12912 T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41, 12913 T42 v42) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), 12914 v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), 12915 v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), 12916 v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26), 12917 v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32), 12918 v33_(v33), v34_(v34), v35_(v35), v36_(v36), v37_(v37), v38_(v38), 12919 v39_(v39), v40_(v40), v41_(v41), v42_(v42) {} 12920 12921 template <typename T> 12922 operator ParamGenerator<T>() const { 12923 const T array[] = { static_cast<T>(v1_), static_cast<T>(v2_), 12924 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_), 12925 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_), 12926 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_), 12927 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_), 12928 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_), 12929 static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_), 12930 static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_), 12931 static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_), 12932 static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_), 12933 static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_), 12934 static_cast<T>(v33_), static_cast<T>(v34_), static_cast<T>(v35_), 12935 static_cast<T>(v36_), static_cast<T>(v37_), static_cast<T>(v38_), 12936 static_cast<T>(v39_), static_cast<T>(v40_), static_cast<T>(v41_), 12937 static_cast<T>(v42_) }; 12938 return ValuesIn(array); 12939 } 12940 12941 private: 12942 // No implementation - assignment is unsupported. 12943 void operator=(const ValueArray42& other); 12944 12945 const T1 v1_; 12946 const T2 v2_; 12947 const T3 v3_; 12948 const T4 v4_; 12949 const T5 v5_; 12950 const T6 v6_; 12951 const T7 v7_; 12952 const T8 v8_; 12953 const T9 v9_; 12954 const T10 v10_; 12955 const T11 v11_; 12956 const T12 v12_; 12957 const T13 v13_; 12958 const T14 v14_; 12959 const T15 v15_; 12960 const T16 v16_; 12961 const T17 v17_; 12962 const T18 v18_; 12963 const T19 v19_; 12964 const T20 v20_; 12965 const T21 v21_; 12966 const T22 v22_; 12967 const T23 v23_; 12968 const T24 v24_; 12969 const T25 v25_; 12970 const T26 v26_; 12971 const T27 v27_; 12972 const T28 v28_; 12973 const T29 v29_; 12974 const T30 v30_; 12975 const T31 v31_; 12976 const T32 v32_; 12977 const T33 v33_; 12978 const T34 v34_; 12979 const T35 v35_; 12980 const T36 v36_; 12981 const T37 v37_; 12982 const T38 v38_; 12983 const T39 v39_; 12984 const T40 v40_; 12985 const T41 v41_; 12986 const T42 v42_; 12987 }; 12988 12989 template <typename T1, typename T2, typename T3, typename T4, typename T5, 12990 typename T6, typename T7, typename T8, typename T9, typename T10, 12991 typename T11, typename T12, typename T13, typename T14, typename T15, 12992 typename T16, typename T17, typename T18, typename T19, typename T20, 12993 typename T21, typename T22, typename T23, typename T24, typename T25, 12994 typename T26, typename T27, typename T28, typename T29, typename T30, 12995 typename T31, typename T32, typename T33, typename T34, typename T35, 12996 typename T36, typename T37, typename T38, typename T39, typename T40, 12997 typename T41, typename T42, typename T43> 12998 class ValueArray43 { 12999 public: 13000 ValueArray43(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, 13001 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, 13002 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, 13003 T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, 13004 T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41, 13005 T42 v42, T43 v43) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), 13006 v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), 13007 v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), 13008 v20_(v20), v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), 13009 v26_(v26), v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), 13010 v32_(v32), v33_(v33), v34_(v34), v35_(v35), v36_(v36), v37_(v37), 13011 v38_(v38), v39_(v39), v40_(v40), v41_(v41), v42_(v42), v43_(v43) {} 13012 13013 template <typename T> 13014 operator ParamGenerator<T>() const { 13015 const T array[] = { static_cast<T>(v1_), static_cast<T>(v2_), 13016 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_), 13017 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_), 13018 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_), 13019 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_), 13020 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_), 13021 static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_), 13022 static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_), 13023 static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_), 13024 static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_), 13025 static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_), 13026 static_cast<T>(v33_), static_cast<T>(v34_), static_cast<T>(v35_), 13027 static_cast<T>(v36_), static_cast<T>(v37_), static_cast<T>(v38_), 13028 static_cast<T>(v39_), static_cast<T>(v40_), static_cast<T>(v41_), 13029 static_cast<T>(v42_), static_cast<T>(v43_) }; 13030 return ValuesIn(array); 13031 } 13032 13033 private: 13034 // No implementation - assignment is unsupported. 13035 void operator=(const ValueArray43& other); 13036 13037 const T1 v1_; 13038 const T2 v2_; 13039 const T3 v3_; 13040 const T4 v4_; 13041 const T5 v5_; 13042 const T6 v6_; 13043 const T7 v7_; 13044 const T8 v8_; 13045 const T9 v9_; 13046 const T10 v10_; 13047 const T11 v11_; 13048 const T12 v12_; 13049 const T13 v13_; 13050 const T14 v14_; 13051 const T15 v15_; 13052 const T16 v16_; 13053 const T17 v17_; 13054 const T18 v18_; 13055 const T19 v19_; 13056 const T20 v20_; 13057 const T21 v21_; 13058 const T22 v22_; 13059 const T23 v23_; 13060 const T24 v24_; 13061 const T25 v25_; 13062 const T26 v26_; 13063 const T27 v27_; 13064 const T28 v28_; 13065 const T29 v29_; 13066 const T30 v30_; 13067 const T31 v31_; 13068 const T32 v32_; 13069 const T33 v33_; 13070 const T34 v34_; 13071 const T35 v35_; 13072 const T36 v36_; 13073 const T37 v37_; 13074 const T38 v38_; 13075 const T39 v39_; 13076 const T40 v40_; 13077 const T41 v41_; 13078 const T42 v42_; 13079 const T43 v43_; 13080 }; 13081 13082 template <typename T1, typename T2, typename T3, typename T4, typename T5, 13083 typename T6, typename T7, typename T8, typename T9, typename T10, 13084 typename T11, typename T12, typename T13, typename T14, typename T15, 13085 typename T16, typename T17, typename T18, typename T19, typename T20, 13086 typename T21, typename T22, typename T23, typename T24, typename T25, 13087 typename T26, typename T27, typename T28, typename T29, typename T30, 13088 typename T31, typename T32, typename T33, typename T34, typename T35, 13089 typename T36, typename T37, typename T38, typename T39, typename T40, 13090 typename T41, typename T42, typename T43, typename T44> 13091 class ValueArray44 { 13092 public: 13093 ValueArray44(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, 13094 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, 13095 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, 13096 T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, 13097 T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41, 13098 T42 v42, T43 v43, T44 v44) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), 13099 v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), 13100 v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17), v18_(v18), 13101 v19_(v19), v20_(v20), v21_(v21), v22_(v22), v23_(v23), v24_(v24), 13102 v25_(v25), v26_(v26), v27_(v27), v28_(v28), v29_(v29), v30_(v30), 13103 v31_(v31), v32_(v32), v33_(v33), v34_(v34), v35_(v35), v36_(v36), 13104 v37_(v37), v38_(v38), v39_(v39), v40_(v40), v41_(v41), v42_(v42), 13105 v43_(v43), v44_(v44) {} 13106 13107 template <typename T> 13108 operator ParamGenerator<T>() const { 13109 const T array[] = { static_cast<T>(v1_), static_cast<T>(v2_), 13110 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_), 13111 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_), 13112 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_), 13113 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_), 13114 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_), 13115 static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_), 13116 static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_), 13117 static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_), 13118 static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_), 13119 static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_), 13120 static_cast<T>(v33_), static_cast<T>(v34_), static_cast<T>(v35_), 13121 static_cast<T>(v36_), static_cast<T>(v37_), static_cast<T>(v38_), 13122 static_cast<T>(v39_), static_cast<T>(v40_), static_cast<T>(v41_), 13123 static_cast<T>(v42_), static_cast<T>(v43_), static_cast<T>(v44_) }; 13124 return ValuesIn(array); 13125 } 13126 13127 private: 13128 // No implementation - assignment is unsupported. 13129 void operator=(const ValueArray44& other); 13130 13131 const T1 v1_; 13132 const T2 v2_; 13133 const T3 v3_; 13134 const T4 v4_; 13135 const T5 v5_; 13136 const T6 v6_; 13137 const T7 v7_; 13138 const T8 v8_; 13139 const T9 v9_; 13140 const T10 v10_; 13141 const T11 v11_; 13142 const T12 v12_; 13143 const T13 v13_; 13144 const T14 v14_; 13145 const T15 v15_; 13146 const T16 v16_; 13147 const T17 v17_; 13148 const T18 v18_; 13149 const T19 v19_; 13150 const T20 v20_; 13151 const T21 v21_; 13152 const T22 v22_; 13153 const T23 v23_; 13154 const T24 v24_; 13155 const T25 v25_; 13156 const T26 v26_; 13157 const T27 v27_; 13158 const T28 v28_; 13159 const T29 v29_; 13160 const T30 v30_; 13161 const T31 v31_; 13162 const T32 v32_; 13163 const T33 v33_; 13164 const T34 v34_; 13165 const T35 v35_; 13166 const T36 v36_; 13167 const T37 v37_; 13168 const T38 v38_; 13169 const T39 v39_; 13170 const T40 v40_; 13171 const T41 v41_; 13172 const T42 v42_; 13173 const T43 v43_; 13174 const T44 v44_; 13175 }; 13176 13177 template <typename T1, typename T2, typename T3, typename T4, typename T5, 13178 typename T6, typename T7, typename T8, typename T9, typename T10, 13179 typename T11, typename T12, typename T13, typename T14, typename T15, 13180 typename T16, typename T17, typename T18, typename T19, typename T20, 13181 typename T21, typename T22, typename T23, typename T24, typename T25, 13182 typename T26, typename T27, typename T28, typename T29, typename T30, 13183 typename T31, typename T32, typename T33, typename T34, typename T35, 13184 typename T36, typename T37, typename T38, typename T39, typename T40, 13185 typename T41, typename T42, typename T43, typename T44, typename T45> 13186 class ValueArray45 { 13187 public: 13188 ValueArray45(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, 13189 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, 13190 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, 13191 T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, 13192 T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41, 13193 T42 v42, T43 v43, T44 v44, T45 v45) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), 13194 v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), v11_(v11), 13195 v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), v17_(v17), 13196 v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22), v23_(v23), 13197 v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28), v29_(v29), 13198 v30_(v30), v31_(v31), v32_(v32), v33_(v33), v34_(v34), v35_(v35), 13199 v36_(v36), v37_(v37), v38_(v38), v39_(v39), v40_(v40), v41_(v41), 13200 v42_(v42), v43_(v43), v44_(v44), v45_(v45) {} 13201 13202 template <typename T> 13203 operator ParamGenerator<T>() const { 13204 const T array[] = { static_cast<T>(v1_), static_cast<T>(v2_), 13205 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_), 13206 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_), 13207 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_), 13208 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_), 13209 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_), 13210 static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_), 13211 static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_), 13212 static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_), 13213 static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_), 13214 static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_), 13215 static_cast<T>(v33_), static_cast<T>(v34_), static_cast<T>(v35_), 13216 static_cast<T>(v36_), static_cast<T>(v37_), static_cast<T>(v38_), 13217 static_cast<T>(v39_), static_cast<T>(v40_), static_cast<T>(v41_), 13218 static_cast<T>(v42_), static_cast<T>(v43_), static_cast<T>(v44_), 13219 static_cast<T>(v45_) }; 13220 return ValuesIn(array); 13221 } 13222 13223 private: 13224 // No implementation - assignment is unsupported. 13225 void operator=(const ValueArray45& other); 13226 13227 const T1 v1_; 13228 const T2 v2_; 13229 const T3 v3_; 13230 const T4 v4_; 13231 const T5 v5_; 13232 const T6 v6_; 13233 const T7 v7_; 13234 const T8 v8_; 13235 const T9 v9_; 13236 const T10 v10_; 13237 const T11 v11_; 13238 const T12 v12_; 13239 const T13 v13_; 13240 const T14 v14_; 13241 const T15 v15_; 13242 const T16 v16_; 13243 const T17 v17_; 13244 const T18 v18_; 13245 const T19 v19_; 13246 const T20 v20_; 13247 const T21 v21_; 13248 const T22 v22_; 13249 const T23 v23_; 13250 const T24 v24_; 13251 const T25 v25_; 13252 const T26 v26_; 13253 const T27 v27_; 13254 const T28 v28_; 13255 const T29 v29_; 13256 const T30 v30_; 13257 const T31 v31_; 13258 const T32 v32_; 13259 const T33 v33_; 13260 const T34 v34_; 13261 const T35 v35_; 13262 const T36 v36_; 13263 const T37 v37_; 13264 const T38 v38_; 13265 const T39 v39_; 13266 const T40 v40_; 13267 const T41 v41_; 13268 const T42 v42_; 13269 const T43 v43_; 13270 const T44 v44_; 13271 const T45 v45_; 13272 }; 13273 13274 template <typename T1, typename T2, typename T3, typename T4, typename T5, 13275 typename T6, typename T7, typename T8, typename T9, typename T10, 13276 typename T11, typename T12, typename T13, typename T14, typename T15, 13277 typename T16, typename T17, typename T18, typename T19, typename T20, 13278 typename T21, typename T22, typename T23, typename T24, typename T25, 13279 typename T26, typename T27, typename T28, typename T29, typename T30, 13280 typename T31, typename T32, typename T33, typename T34, typename T35, 13281 typename T36, typename T37, typename T38, typename T39, typename T40, 13282 typename T41, typename T42, typename T43, typename T44, typename T45, 13283 typename T46> 13284 class ValueArray46 { 13285 public: 13286 ValueArray46(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, 13287 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, 13288 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, 13289 T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, 13290 T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41, 13291 T42 v42, T43 v43, T44 v44, T45 v45, T46 v46) : v1_(v1), v2_(v2), v3_(v3), 13292 v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), 13293 v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), 13294 v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22), 13295 v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28), 13296 v29_(v29), v30_(v30), v31_(v31), v32_(v32), v33_(v33), v34_(v34), 13297 v35_(v35), v36_(v36), v37_(v37), v38_(v38), v39_(v39), v40_(v40), 13298 v41_(v41), v42_(v42), v43_(v43), v44_(v44), v45_(v45), v46_(v46) {} 13299 13300 template <typename T> 13301 operator ParamGenerator<T>() const { 13302 const T array[] = { static_cast<T>(v1_), static_cast<T>(v2_), 13303 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_), 13304 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_), 13305 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_), 13306 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_), 13307 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_), 13308 static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_), 13309 static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_), 13310 static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_), 13311 static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_), 13312 static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_), 13313 static_cast<T>(v33_), static_cast<T>(v34_), static_cast<T>(v35_), 13314 static_cast<T>(v36_), static_cast<T>(v37_), static_cast<T>(v38_), 13315 static_cast<T>(v39_), static_cast<T>(v40_), static_cast<T>(v41_), 13316 static_cast<T>(v42_), static_cast<T>(v43_), static_cast<T>(v44_), 13317 static_cast<T>(v45_), static_cast<T>(v46_) }; 13318 return ValuesIn(array); 13319 } 13320 13321 private: 13322 // No implementation - assignment is unsupported. 13323 void operator=(const ValueArray46& other); 13324 13325 const T1 v1_; 13326 const T2 v2_; 13327 const T3 v3_; 13328 const T4 v4_; 13329 const T5 v5_; 13330 const T6 v6_; 13331 const T7 v7_; 13332 const T8 v8_; 13333 const T9 v9_; 13334 const T10 v10_; 13335 const T11 v11_; 13336 const T12 v12_; 13337 const T13 v13_; 13338 const T14 v14_; 13339 const T15 v15_; 13340 const T16 v16_; 13341 const T17 v17_; 13342 const T18 v18_; 13343 const T19 v19_; 13344 const T20 v20_; 13345 const T21 v21_; 13346 const T22 v22_; 13347 const T23 v23_; 13348 const T24 v24_; 13349 const T25 v25_; 13350 const T26 v26_; 13351 const T27 v27_; 13352 const T28 v28_; 13353 const T29 v29_; 13354 const T30 v30_; 13355 const T31 v31_; 13356 const T32 v32_; 13357 const T33 v33_; 13358 const T34 v34_; 13359 const T35 v35_; 13360 const T36 v36_; 13361 const T37 v37_; 13362 const T38 v38_; 13363 const T39 v39_; 13364 const T40 v40_; 13365 const T41 v41_; 13366 const T42 v42_; 13367 const T43 v43_; 13368 const T44 v44_; 13369 const T45 v45_; 13370 const T46 v46_; 13371 }; 13372 13373 template <typename T1, typename T2, typename T3, typename T4, typename T5, 13374 typename T6, typename T7, typename T8, typename T9, typename T10, 13375 typename T11, typename T12, typename T13, typename T14, typename T15, 13376 typename T16, typename T17, typename T18, typename T19, typename T20, 13377 typename T21, typename T22, typename T23, typename T24, typename T25, 13378 typename T26, typename T27, typename T28, typename T29, typename T30, 13379 typename T31, typename T32, typename T33, typename T34, typename T35, 13380 typename T36, typename T37, typename T38, typename T39, typename T40, 13381 typename T41, typename T42, typename T43, typename T44, typename T45, 13382 typename T46, typename T47> 13383 class ValueArray47 { 13384 public: 13385 ValueArray47(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, 13386 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, 13387 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, 13388 T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, 13389 T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41, 13390 T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47) : v1_(v1), v2_(v2), 13391 v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), v10_(v10), 13392 v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), v16_(v16), 13393 v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), v22_(v22), 13394 v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), v28_(v28), 13395 v29_(v29), v30_(v30), v31_(v31), v32_(v32), v33_(v33), v34_(v34), 13396 v35_(v35), v36_(v36), v37_(v37), v38_(v38), v39_(v39), v40_(v40), 13397 v41_(v41), v42_(v42), v43_(v43), v44_(v44), v45_(v45), v46_(v46), 13398 v47_(v47) {} 13399 13400 template <typename T> 13401 operator ParamGenerator<T>() const { 13402 const T array[] = { static_cast<T>(v1_), static_cast<T>(v2_), 13403 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_), 13404 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_), 13405 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_), 13406 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_), 13407 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_), 13408 static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_), 13409 static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_), 13410 static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_), 13411 static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_), 13412 static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_), 13413 static_cast<T>(v33_), static_cast<T>(v34_), static_cast<T>(v35_), 13414 static_cast<T>(v36_), static_cast<T>(v37_), static_cast<T>(v38_), 13415 static_cast<T>(v39_), static_cast<T>(v40_), static_cast<T>(v41_), 13416 static_cast<T>(v42_), static_cast<T>(v43_), static_cast<T>(v44_), 13417 static_cast<T>(v45_), static_cast<T>(v46_), static_cast<T>(v47_) }; 13418 return ValuesIn(array); 13419 } 13420 13421 private: 13422 // No implementation - assignment is unsupported. 13423 void operator=(const ValueArray47& other); 13424 13425 const T1 v1_; 13426 const T2 v2_; 13427 const T3 v3_; 13428 const T4 v4_; 13429 const T5 v5_; 13430 const T6 v6_; 13431 const T7 v7_; 13432 const T8 v8_; 13433 const T9 v9_; 13434 const T10 v10_; 13435 const T11 v11_; 13436 const T12 v12_; 13437 const T13 v13_; 13438 const T14 v14_; 13439 const T15 v15_; 13440 const T16 v16_; 13441 const T17 v17_; 13442 const T18 v18_; 13443 const T19 v19_; 13444 const T20 v20_; 13445 const T21 v21_; 13446 const T22 v22_; 13447 const T23 v23_; 13448 const T24 v24_; 13449 const T25 v25_; 13450 const T26 v26_; 13451 const T27 v27_; 13452 const T28 v28_; 13453 const T29 v29_; 13454 const T30 v30_; 13455 const T31 v31_; 13456 const T32 v32_; 13457 const T33 v33_; 13458 const T34 v34_; 13459 const T35 v35_; 13460 const T36 v36_; 13461 const T37 v37_; 13462 const T38 v38_; 13463 const T39 v39_; 13464 const T40 v40_; 13465 const T41 v41_; 13466 const T42 v42_; 13467 const T43 v43_; 13468 const T44 v44_; 13469 const T45 v45_; 13470 const T46 v46_; 13471 const T47 v47_; 13472 }; 13473 13474 template <typename T1, typename T2, typename T3, typename T4, typename T5, 13475 typename T6, typename T7, typename T8, typename T9, typename T10, 13476 typename T11, typename T12, typename T13, typename T14, typename T15, 13477 typename T16, typename T17, typename T18, typename T19, typename T20, 13478 typename T21, typename T22, typename T23, typename T24, typename T25, 13479 typename T26, typename T27, typename T28, typename T29, typename T30, 13480 typename T31, typename T32, typename T33, typename T34, typename T35, 13481 typename T36, typename T37, typename T38, typename T39, typename T40, 13482 typename T41, typename T42, typename T43, typename T44, typename T45, 13483 typename T46, typename T47, typename T48> 13484 class ValueArray48 { 13485 public: 13486 ValueArray48(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, 13487 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, 13488 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, 13489 T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, 13490 T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41, 13491 T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47, T48 v48) : v1_(v1), 13492 v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), v8_(v8), v9_(v9), 13493 v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), v15_(v15), 13494 v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), v21_(v21), 13495 v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26), v27_(v27), 13496 v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32), v33_(v33), 13497 v34_(v34), v35_(v35), v36_(v36), v37_(v37), v38_(v38), v39_(v39), 13498 v40_(v40), v41_(v41), v42_(v42), v43_(v43), v44_(v44), v45_(v45), 13499 v46_(v46), v47_(v47), v48_(v48) {} 13500 13501 template <typename T> 13502 operator ParamGenerator<T>() const { 13503 const T array[] = { static_cast<T>(v1_), static_cast<T>(v2_), 13504 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_), 13505 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_), 13506 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_), 13507 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_), 13508 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_), 13509 static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_), 13510 static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_), 13511 static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_), 13512 static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_), 13513 static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_), 13514 static_cast<T>(v33_), static_cast<T>(v34_), static_cast<T>(v35_), 13515 static_cast<T>(v36_), static_cast<T>(v37_), static_cast<T>(v38_), 13516 static_cast<T>(v39_), static_cast<T>(v40_), static_cast<T>(v41_), 13517 static_cast<T>(v42_), static_cast<T>(v43_), static_cast<T>(v44_), 13518 static_cast<T>(v45_), static_cast<T>(v46_), static_cast<T>(v47_), 13519 static_cast<T>(v48_) }; 13520 return ValuesIn(array); 13521 } 13522 13523 private: 13524 // No implementation - assignment is unsupported. 13525 void operator=(const ValueArray48& other); 13526 13527 const T1 v1_; 13528 const T2 v2_; 13529 const T3 v3_; 13530 const T4 v4_; 13531 const T5 v5_; 13532 const T6 v6_; 13533 const T7 v7_; 13534 const T8 v8_; 13535 const T9 v9_; 13536 const T10 v10_; 13537 const T11 v11_; 13538 const T12 v12_; 13539 const T13 v13_; 13540 const T14 v14_; 13541 const T15 v15_; 13542 const T16 v16_; 13543 const T17 v17_; 13544 const T18 v18_; 13545 const T19 v19_; 13546 const T20 v20_; 13547 const T21 v21_; 13548 const T22 v22_; 13549 const T23 v23_; 13550 const T24 v24_; 13551 const T25 v25_; 13552 const T26 v26_; 13553 const T27 v27_; 13554 const T28 v28_; 13555 const T29 v29_; 13556 const T30 v30_; 13557 const T31 v31_; 13558 const T32 v32_; 13559 const T33 v33_; 13560 const T34 v34_; 13561 const T35 v35_; 13562 const T36 v36_; 13563 const T37 v37_; 13564 const T38 v38_; 13565 const T39 v39_; 13566 const T40 v40_; 13567 const T41 v41_; 13568 const T42 v42_; 13569 const T43 v43_; 13570 const T44 v44_; 13571 const T45 v45_; 13572 const T46 v46_; 13573 const T47 v47_; 13574 const T48 v48_; 13575 }; 13576 13577 template <typename T1, typename T2, typename T3, typename T4, typename T5, 13578 typename T6, typename T7, typename T8, typename T9, typename T10, 13579 typename T11, typename T12, typename T13, typename T14, typename T15, 13580 typename T16, typename T17, typename T18, typename T19, typename T20, 13581 typename T21, typename T22, typename T23, typename T24, typename T25, 13582 typename T26, typename T27, typename T28, typename T29, typename T30, 13583 typename T31, typename T32, typename T33, typename T34, typename T35, 13584 typename T36, typename T37, typename T38, typename T39, typename T40, 13585 typename T41, typename T42, typename T43, typename T44, typename T45, 13586 typename T46, typename T47, typename T48, typename T49> 13587 class ValueArray49 { 13588 public: 13589 ValueArray49(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, 13590 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, 13591 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, 13592 T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, 13593 T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41, 13594 T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47, T48 v48, 13595 T49 v49) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), 13596 v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), 13597 v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), 13598 v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26), 13599 v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32), 13600 v33_(v33), v34_(v34), v35_(v35), v36_(v36), v37_(v37), v38_(v38), 13601 v39_(v39), v40_(v40), v41_(v41), v42_(v42), v43_(v43), v44_(v44), 13602 v45_(v45), v46_(v46), v47_(v47), v48_(v48), v49_(v49) {} 13603 13604 template <typename T> 13605 operator ParamGenerator<T>() const { 13606 const T array[] = { static_cast<T>(v1_), static_cast<T>(v2_), 13607 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_), 13608 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_), 13609 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_), 13610 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_), 13611 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_), 13612 static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_), 13613 static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_), 13614 static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_), 13615 static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_), 13616 static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_), 13617 static_cast<T>(v33_), static_cast<T>(v34_), static_cast<T>(v35_), 13618 static_cast<T>(v36_), static_cast<T>(v37_), static_cast<T>(v38_), 13619 static_cast<T>(v39_), static_cast<T>(v40_), static_cast<T>(v41_), 13620 static_cast<T>(v42_), static_cast<T>(v43_), static_cast<T>(v44_), 13621 static_cast<T>(v45_), static_cast<T>(v46_), static_cast<T>(v47_), 13622 static_cast<T>(v48_), static_cast<T>(v49_) }; 13623 return ValuesIn(array); 13624 } 13625 13626 private: 13627 // No implementation - assignment is unsupported. 13628 void operator=(const ValueArray49& other); 13629 13630 const T1 v1_; 13631 const T2 v2_; 13632 const T3 v3_; 13633 const T4 v4_; 13634 const T5 v5_; 13635 const T6 v6_; 13636 const T7 v7_; 13637 const T8 v8_; 13638 const T9 v9_; 13639 const T10 v10_; 13640 const T11 v11_; 13641 const T12 v12_; 13642 const T13 v13_; 13643 const T14 v14_; 13644 const T15 v15_; 13645 const T16 v16_; 13646 const T17 v17_; 13647 const T18 v18_; 13648 const T19 v19_; 13649 const T20 v20_; 13650 const T21 v21_; 13651 const T22 v22_; 13652 const T23 v23_; 13653 const T24 v24_; 13654 const T25 v25_; 13655 const T26 v26_; 13656 const T27 v27_; 13657 const T28 v28_; 13658 const T29 v29_; 13659 const T30 v30_; 13660 const T31 v31_; 13661 const T32 v32_; 13662 const T33 v33_; 13663 const T34 v34_; 13664 const T35 v35_; 13665 const T36 v36_; 13666 const T37 v37_; 13667 const T38 v38_; 13668 const T39 v39_; 13669 const T40 v40_; 13670 const T41 v41_; 13671 const T42 v42_; 13672 const T43 v43_; 13673 const T44 v44_; 13674 const T45 v45_; 13675 const T46 v46_; 13676 const T47 v47_; 13677 const T48 v48_; 13678 const T49 v49_; 13679 }; 13680 13681 template <typename T1, typename T2, typename T3, typename T4, typename T5, 13682 typename T6, typename T7, typename T8, typename T9, typename T10, 13683 typename T11, typename T12, typename T13, typename T14, typename T15, 13684 typename T16, typename T17, typename T18, typename T19, typename T20, 13685 typename T21, typename T22, typename T23, typename T24, typename T25, 13686 typename T26, typename T27, typename T28, typename T29, typename T30, 13687 typename T31, typename T32, typename T33, typename T34, typename T35, 13688 typename T36, typename T37, typename T38, typename T39, typename T40, 13689 typename T41, typename T42, typename T43, typename T44, typename T45, 13690 typename T46, typename T47, typename T48, typename T49, typename T50> 13691 class ValueArray50 { 13692 public: 13693 ValueArray50(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, 13694 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, 13695 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, 13696 T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, 13697 T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41, 13698 T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47, T48 v48, T49 v49, 13699 T50 v50) : v1_(v1), v2_(v2), v3_(v3), v4_(v4), v5_(v5), v6_(v6), v7_(v7), 13700 v8_(v8), v9_(v9), v10_(v10), v11_(v11), v12_(v12), v13_(v13), v14_(v14), 13701 v15_(v15), v16_(v16), v17_(v17), v18_(v18), v19_(v19), v20_(v20), 13702 v21_(v21), v22_(v22), v23_(v23), v24_(v24), v25_(v25), v26_(v26), 13703 v27_(v27), v28_(v28), v29_(v29), v30_(v30), v31_(v31), v32_(v32), 13704 v33_(v33), v34_(v34), v35_(v35), v36_(v36), v37_(v37), v38_(v38), 13705 v39_(v39), v40_(v40), v41_(v41), v42_(v42), v43_(v43), v44_(v44), 13706 v45_(v45), v46_(v46), v47_(v47), v48_(v48), v49_(v49), v50_(v50) {} 13707 13708 template <typename T> 13709 operator ParamGenerator<T>() const { 13710 const T array[] = { static_cast<T>(v1_), static_cast<T>(v2_), 13711 static_cast<T>(v3_), static_cast<T>(v4_), static_cast<T>(v5_), 13712 static_cast<T>(v6_), static_cast<T>(v7_), static_cast<T>(v8_), 13713 static_cast<T>(v9_), static_cast<T>(v10_), static_cast<T>(v11_), 13714 static_cast<T>(v12_), static_cast<T>(v13_), static_cast<T>(v14_), 13715 static_cast<T>(v15_), static_cast<T>(v16_), static_cast<T>(v17_), 13716 static_cast<T>(v18_), static_cast<T>(v19_), static_cast<T>(v20_), 13717 static_cast<T>(v21_), static_cast<T>(v22_), static_cast<T>(v23_), 13718 static_cast<T>(v24_), static_cast<T>(v25_), static_cast<T>(v26_), 13719 static_cast<T>(v27_), static_cast<T>(v28_), static_cast<T>(v29_), 13720 static_cast<T>(v30_), static_cast<T>(v31_), static_cast<T>(v32_), 13721 static_cast<T>(v33_), static_cast<T>(v34_), static_cast<T>(v35_), 13722 static_cast<T>(v36_), static_cast<T>(v37_), static_cast<T>(v38_), 13723 static_cast<T>(v39_), static_cast<T>(v40_), static_cast<T>(v41_), 13724 static_cast<T>(v42_), static_cast<T>(v43_), static_cast<T>(v44_), 13725 static_cast<T>(v45_), static_cast<T>(v46_), static_cast<T>(v47_), 13726 static_cast<T>(v48_), static_cast<T>(v49_), static_cast<T>(v50_) }; 13727 return ValuesIn(array); 13728 } 13729 13730 private: 13731 // No implementation - assignment is unsupported. 13732 void operator=(const ValueArray50& other); 13733 13734 const T1 v1_; 13735 const T2 v2_; 13736 const T3 v3_; 13737 const T4 v4_; 13738 const T5 v5_; 13739 const T6 v6_; 13740 const T7 v7_; 13741 const T8 v8_; 13742 const T9 v9_; 13743 const T10 v10_; 13744 const T11 v11_; 13745 const T12 v12_; 13746 const T13 v13_; 13747 const T14 v14_; 13748 const T15 v15_; 13749 const T16 v16_; 13750 const T17 v17_; 13751 const T18 v18_; 13752 const T19 v19_; 13753 const T20 v20_; 13754 const T21 v21_; 13755 const T22 v22_; 13756 const T23 v23_; 13757 const T24 v24_; 13758 const T25 v25_; 13759 const T26 v26_; 13760 const T27 v27_; 13761 const T28 v28_; 13762 const T29 v29_; 13763 const T30 v30_; 13764 const T31 v31_; 13765 const T32 v32_; 13766 const T33 v33_; 13767 const T34 v34_; 13768 const T35 v35_; 13769 const T36 v36_; 13770 const T37 v37_; 13771 const T38 v38_; 13772 const T39 v39_; 13773 const T40 v40_; 13774 const T41 v41_; 13775 const T42 v42_; 13776 const T43 v43_; 13777 const T44 v44_; 13778 const T45 v45_; 13779 const T46 v46_; 13780 const T47 v47_; 13781 const T48 v48_; 13782 const T49 v49_; 13783 const T50 v50_; 13784 }; 13785 13786 # if GTEST_HAS_COMBINE 13787 // INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. 13788 // 13789 // Generates values from the Cartesian product of values produced 13790 // by the argument generators. 13791 // 13792 template <typename T1, typename T2> 13793 class CartesianProductGenerator2 13794 : public ParamGeneratorInterface< ::stdt::tuple<T1, T2> > { 13795 public: 13796 typedef ::stdt::tuple<T1, T2> ParamType; 13797 13798 CartesianProductGenerator2(const ParamGenerator<T1>& g1, 13799 const ParamGenerator<T2>& g2) 13800 : g1_(g1), g2_(g2) {} 13801 virtual ~CartesianProductGenerator2() {} 13802 13803 virtual ParamIteratorInterface<ParamType>* Begin() const { 13804 return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin()); 13805 } 13806 virtual ParamIteratorInterface<ParamType>* End() const { 13807 return new Iterator(this, g1_, g1_.end(), g2_, g2_.end()); 13808 } 13809 13810 private: 13811 class Iterator : public ParamIteratorInterface<ParamType> { 13812 public: 13813 Iterator(const ParamGeneratorInterface<ParamType>* base, 13814 const ParamGenerator<T1>& g1, 13815 const typename ParamGenerator<T1>::iterator& current1, 13816 const ParamGenerator<T2>& g2, 13817 const typename ParamGenerator<T2>::iterator& current2) 13818 : base_(base), 13819 begin1_(g1.begin()), end1_(g1.end()), current1_(current1), 13820 begin2_(g2.begin()), end2_(g2.end()), current2_(current2) { 13821 ComputeCurrentValue(); 13822 } 13823 virtual ~Iterator() {} 13824 13825 virtual const ParamGeneratorInterface<ParamType>* BaseGenerator() const { 13826 return base_; 13827 } 13828 // Advance should not be called on beyond-of-range iterators 13829 // so no component iterators must be beyond end of range, either. 13830 virtual void Advance() { 13831 assert(!AtEnd()); 13832 ++current2_; 13833 if (current2_ == end2_) { 13834 current2_ = begin2_; 13835 ++current1_; 13836 } 13837 ComputeCurrentValue(); 13838 } 13839 virtual ParamIteratorInterface<ParamType>* Clone() const { 13840 return new Iterator(*this); 13841 } 13842 virtual const ParamType* Current() const { return ¤t_value_; } 13843 virtual bool Equals(const ParamIteratorInterface<ParamType>& other) const { 13844 // Having the same base generator guarantees that the other 13845 // iterator is of the same type and we can downcast. 13846 GTEST_CHECK_(BaseGenerator() == other.BaseGenerator()) 13847 << "The program attempted to compare iterators " 13848 << "from different generators." << std::endl; 13849 const Iterator* typed_other = 13850 CheckedDowncastToActualType<const Iterator>(&other); 13851 // We must report iterators equal if they both point beyond their 13852 // respective ranges. That can happen in a variety of fashions, 13853 // so we have to consult AtEnd(). 13854 return (AtEnd() && typed_other->AtEnd()) || 13855 ( 13856 current1_ == typed_other->current1_ && 13857 current2_ == typed_other->current2_); 13858 } 13859 13860 private: 13861 Iterator(const Iterator& other) 13862 : base_(other.base_), 13863 begin1_(other.begin1_), 13864 end1_(other.end1_), 13865 current1_(other.current1_), 13866 begin2_(other.begin2_), 13867 end2_(other.end2_), 13868 current2_(other.current2_) { 13869 ComputeCurrentValue(); 13870 } 13871 13872 void ComputeCurrentValue() { 13873 if (!AtEnd()) 13874 current_value_ = ParamType(*current1_, *current2_); 13875 } 13876 bool AtEnd() const { 13877 // We must report iterator past the end of the range when either of the 13878 // component iterators has reached the end of its range. 13879 return 13880 current1_ == end1_ || 13881 current2_ == end2_; 13882 } 13883 13884 // No implementation - assignment is unsupported. 13885 void operator=(const Iterator& other); 13886 13887 const ParamGeneratorInterface<ParamType>* const base_; 13888 // begin[i]_ and end[i]_ define the i-th range that Iterator traverses. 13889 // current[i]_ is the actual traversing iterator. 13890 const typename ParamGenerator<T1>::iterator begin1_; 13891 const typename ParamGenerator<T1>::iterator end1_; 13892 typename ParamGenerator<T1>::iterator current1_; 13893 const typename ParamGenerator<T2>::iterator begin2_; 13894 const typename ParamGenerator<T2>::iterator end2_; 13895 typename ParamGenerator<T2>::iterator current2_; 13896 ParamType current_value_; 13897 }; // class CartesianProductGenerator2::Iterator 13898 13899 // No implementation - assignment is unsupported. 13900 void operator=(const CartesianProductGenerator2& other); 13901 13902 const ParamGenerator<T1> g1_; 13903 const ParamGenerator<T2> g2_; 13904 }; // class CartesianProductGenerator2 13905 13906 13907 template <typename T1, typename T2, typename T3> 13908 class CartesianProductGenerator3 13909 : public ParamGeneratorInterface< ::stdt::tuple<T1, T2, T3> > { 13910 public: 13911 typedef ::stdt::tuple<T1, T2, T3> ParamType; 13912 13913 CartesianProductGenerator3(const ParamGenerator<T1>& g1, 13914 const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3) 13915 : g1_(g1), g2_(g2), g3_(g3) {} 13916 virtual ~CartesianProductGenerator3() {} 13917 13918 virtual ParamIteratorInterface<ParamType>* Begin() const { 13919 return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_, 13920 g3_.begin()); 13921 } 13922 virtual ParamIteratorInterface<ParamType>* End() const { 13923 return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end()); 13924 } 13925 13926 private: 13927 class Iterator : public ParamIteratorInterface<ParamType> { 13928 public: 13929 Iterator(const ParamGeneratorInterface<ParamType>* base, 13930 const ParamGenerator<T1>& g1, 13931 const typename ParamGenerator<T1>::iterator& current1, 13932 const ParamGenerator<T2>& g2, 13933 const typename ParamGenerator<T2>::iterator& current2, 13934 const ParamGenerator<T3>& g3, 13935 const typename ParamGenerator<T3>::iterator& current3) 13936 : base_(base), 13937 begin1_(g1.begin()), end1_(g1.end()), current1_(current1), 13938 begin2_(g2.begin()), end2_(g2.end()), current2_(current2), 13939 begin3_(g3.begin()), end3_(g3.end()), current3_(current3) { 13940 ComputeCurrentValue(); 13941 } 13942 virtual ~Iterator() {} 13943 13944 virtual const ParamGeneratorInterface<ParamType>* BaseGenerator() const { 13945 return base_; 13946 } 13947 // Advance should not be called on beyond-of-range iterators 13948 // so no component iterators must be beyond end of range, either. 13949 virtual void Advance() { 13950 assert(!AtEnd()); 13951 ++current3_; 13952 if (current3_ == end3_) { 13953 current3_ = begin3_; 13954 ++current2_; 13955 } 13956 if (current2_ == end2_) { 13957 current2_ = begin2_; 13958 ++current1_; 13959 } 13960 ComputeCurrentValue(); 13961 } 13962 virtual ParamIteratorInterface<ParamType>* Clone() const { 13963 return new Iterator(*this); 13964 } 13965 virtual const ParamType* Current() const { return ¤t_value_; } 13966 virtual bool Equals(const ParamIteratorInterface<ParamType>& other) const { 13967 // Having the same base generator guarantees that the other 13968 // iterator is of the same type and we can downcast. 13969 GTEST_CHECK_(BaseGenerator() == other.BaseGenerator()) 13970 << "The program attempted to compare iterators " 13971 << "from different generators." << std::endl; 13972 const Iterator* typed_other = 13973 CheckedDowncastToActualType<const Iterator>(&other); 13974 // We must report iterators equal if they both point beyond their 13975 // respective ranges. That can happen in a variety of fashions, 13976 // so we have to consult AtEnd(). 13977 return (AtEnd() && typed_other->AtEnd()) || 13978 ( 13979 current1_ == typed_other->current1_ && 13980 current2_ == typed_other->current2_ && 13981 current3_ == typed_other->current3_); 13982 } 13983 13984 private: 13985 Iterator(const Iterator& other) 13986 : base_(other.base_), 13987 begin1_(other.begin1_), 13988 end1_(other.end1_), 13989 current1_(other.current1_), 13990 begin2_(other.begin2_), 13991 end2_(other.end2_), 13992 current2_(other.current2_), 13993 begin3_(other.begin3_), 13994 end3_(other.end3_), 13995 current3_(other.current3_) { 13996 ComputeCurrentValue(); 13997 } 13998 13999 void ComputeCurrentValue() { 14000 if (!AtEnd()) 14001 current_value_ = ParamType(*current1_, *current2_, *current3_); 14002 } 14003 bool AtEnd() const { 14004 // We must report iterator past the end of the range when either of the 14005 // component iterators has reached the end of its range. 14006 return 14007 current1_ == end1_ || 14008 current2_ == end2_ || 14009 current3_ == end3_; 14010 } 14011 14012 // No implementation - assignment is unsupported. 14013 void operator=(const Iterator& other); 14014 14015 const ParamGeneratorInterface<ParamType>* const base_; 14016 // begin[i]_ and end[i]_ define the i-th range that Iterator traverses. 14017 // current[i]_ is the actual traversing iterator. 14018 const typename ParamGenerator<T1>::iterator begin1_; 14019 const typename ParamGenerator<T1>::iterator end1_; 14020 typename ParamGenerator<T1>::iterator current1_; 14021 const typename ParamGenerator<T2>::iterator begin2_; 14022 const typename ParamGenerator<T2>::iterator end2_; 14023 typename ParamGenerator<T2>::iterator current2_; 14024 const typename ParamGenerator<T3>::iterator begin3_; 14025 const typename ParamGenerator<T3>::iterator end3_; 14026 typename ParamGenerator<T3>::iterator current3_; 14027 ParamType current_value_; 14028 }; // class CartesianProductGenerator3::Iterator 14029 14030 // No implementation - assignment is unsupported. 14031 void operator=(const CartesianProductGenerator3& other); 14032 14033 const ParamGenerator<T1> g1_; 14034 const ParamGenerator<T2> g2_; 14035 const ParamGenerator<T3> g3_; 14036 }; // class CartesianProductGenerator3 14037 14038 14039 template <typename T1, typename T2, typename T3, typename T4> 14040 class CartesianProductGenerator4 14041 : public ParamGeneratorInterface< ::stdt::tuple<T1, T2, T3, T4> > { 14042 public: 14043 typedef ::stdt::tuple<T1, T2, T3, T4> ParamType; 14044 14045 CartesianProductGenerator4(const ParamGenerator<T1>& g1, 14046 const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3, 14047 const ParamGenerator<T4>& g4) 14048 : g1_(g1), g2_(g2), g3_(g3), g4_(g4) {} 14049 virtual ~CartesianProductGenerator4() {} 14050 14051 virtual ParamIteratorInterface<ParamType>* Begin() const { 14052 return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_, 14053 g3_.begin(), g4_, g4_.begin()); 14054 } 14055 virtual ParamIteratorInterface<ParamType>* End() const { 14056 return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(), 14057 g4_, g4_.end()); 14058 } 14059 14060 private: 14061 class Iterator : public ParamIteratorInterface<ParamType> { 14062 public: 14063 Iterator(const ParamGeneratorInterface<ParamType>* base, 14064 const ParamGenerator<T1>& g1, 14065 const typename ParamGenerator<T1>::iterator& current1, 14066 const ParamGenerator<T2>& g2, 14067 const typename ParamGenerator<T2>::iterator& current2, 14068 const ParamGenerator<T3>& g3, 14069 const typename ParamGenerator<T3>::iterator& current3, 14070 const ParamGenerator<T4>& g4, 14071 const typename ParamGenerator<T4>::iterator& current4) 14072 : base_(base), 14073 begin1_(g1.begin()), end1_(g1.end()), current1_(current1), 14074 begin2_(g2.begin()), end2_(g2.end()), current2_(current2), 14075 begin3_(g3.begin()), end3_(g3.end()), current3_(current3), 14076 begin4_(g4.begin()), end4_(g4.end()), current4_(current4) { 14077 ComputeCurrentValue(); 14078 } 14079 virtual ~Iterator() {} 14080 14081 virtual const ParamGeneratorInterface<ParamType>* BaseGenerator() const { 14082 return base_; 14083 } 14084 // Advance should not be called on beyond-of-range iterators 14085 // so no component iterators must be beyond end of range, either. 14086 virtual void Advance() { 14087 assert(!AtEnd()); 14088 ++current4_; 14089 if (current4_ == end4_) { 14090 current4_ = begin4_; 14091 ++current3_; 14092 } 14093 if (current3_ == end3_) { 14094 current3_ = begin3_; 14095 ++current2_; 14096 } 14097 if (current2_ == end2_) { 14098 current2_ = begin2_; 14099 ++current1_; 14100 } 14101 ComputeCurrentValue(); 14102 } 14103 virtual ParamIteratorInterface<ParamType>* Clone() const { 14104 return new Iterator(*this); 14105 } 14106 virtual const ParamType* Current() const { return ¤t_value_; } 14107 virtual bool Equals(const ParamIteratorInterface<ParamType>& other) const { 14108 // Having the same base generator guarantees that the other 14109 // iterator is of the same type and we can downcast. 14110 GTEST_CHECK_(BaseGenerator() == other.BaseGenerator()) 14111 << "The program attempted to compare iterators " 14112 << "from different generators." << std::endl; 14113 const Iterator* typed_other = 14114 CheckedDowncastToActualType<const Iterator>(&other); 14115 // We must report iterators equal if they both point beyond their 14116 // respective ranges. That can happen in a variety of fashions, 14117 // so we have to consult AtEnd(). 14118 return (AtEnd() && typed_other->AtEnd()) || 14119 ( 14120 current1_ == typed_other->current1_ && 14121 current2_ == typed_other->current2_ && 14122 current3_ == typed_other->current3_ && 14123 current4_ == typed_other->current4_); 14124 } 14125 14126 private: 14127 Iterator(const Iterator& other) 14128 : base_(other.base_), 14129 begin1_(other.begin1_), 14130 end1_(other.end1_), 14131 current1_(other.current1_), 14132 begin2_(other.begin2_), 14133 end2_(other.end2_), 14134 current2_(other.current2_), 14135 begin3_(other.begin3_), 14136 end3_(other.end3_), 14137 current3_(other.current3_), 14138 begin4_(other.begin4_), 14139 end4_(other.end4_), 14140 current4_(other.current4_) { 14141 ComputeCurrentValue(); 14142 } 14143 14144 void ComputeCurrentValue() { 14145 if (!AtEnd()) 14146 current_value_ = ParamType(*current1_, *current2_, *current3_, 14147 *current4_); 14148 } 14149 bool AtEnd() const { 14150 // We must report iterator past the end of the range when either of the 14151 // component iterators has reached the end of its range. 14152 return 14153 current1_ == end1_ || 14154 current2_ == end2_ || 14155 current3_ == end3_ || 14156 current4_ == end4_; 14157 } 14158 14159 // No implementation - assignment is unsupported. 14160 void operator=(const Iterator& other); 14161 14162 const ParamGeneratorInterface<ParamType>* const base_; 14163 // begin[i]_ and end[i]_ define the i-th range that Iterator traverses. 14164 // current[i]_ is the actual traversing iterator. 14165 const typename ParamGenerator<T1>::iterator begin1_; 14166 const typename ParamGenerator<T1>::iterator end1_; 14167 typename ParamGenerator<T1>::iterator current1_; 14168 const typename ParamGenerator<T2>::iterator begin2_; 14169 const typename ParamGenerator<T2>::iterator end2_; 14170 typename ParamGenerator<T2>::iterator current2_; 14171 const typename ParamGenerator<T3>::iterator begin3_; 14172 const typename ParamGenerator<T3>::iterator end3_; 14173 typename ParamGenerator<T3>::iterator current3_; 14174 const typename ParamGenerator<T4>::iterator begin4_; 14175 const typename ParamGenerator<T4>::iterator end4_; 14176 typename ParamGenerator<T4>::iterator current4_; 14177 ParamType current_value_; 14178 }; // class CartesianProductGenerator4::Iterator 14179 14180 // No implementation - assignment is unsupported. 14181 void operator=(const CartesianProductGenerator4& other); 14182 14183 const ParamGenerator<T1> g1_; 14184 const ParamGenerator<T2> g2_; 14185 const ParamGenerator<T3> g3_; 14186 const ParamGenerator<T4> g4_; 14187 }; // class CartesianProductGenerator4 14188 14189 14190 template <typename T1, typename T2, typename T3, typename T4, typename T5> 14191 class CartesianProductGenerator5 14192 : public ParamGeneratorInterface< ::stdt::tuple<T1, T2, T3, T4, T5> > { 14193 public: 14194 typedef ::stdt::tuple<T1, T2, T3, T4, T5> ParamType; 14195 14196 CartesianProductGenerator5(const ParamGenerator<T1>& g1, 14197 const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3, 14198 const ParamGenerator<T4>& g4, const ParamGenerator<T5>& g5) 14199 : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5) {} 14200 virtual ~CartesianProductGenerator5() {} 14201 14202 virtual ParamIteratorInterface<ParamType>* Begin() const { 14203 return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_, 14204 g3_.begin(), g4_, g4_.begin(), g5_, g5_.begin()); 14205 } 14206 virtual ParamIteratorInterface<ParamType>* End() const { 14207 return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(), 14208 g4_, g4_.end(), g5_, g5_.end()); 14209 } 14210 14211 private: 14212 class Iterator : public ParamIteratorInterface<ParamType> { 14213 public: 14214 Iterator(const ParamGeneratorInterface<ParamType>* base, 14215 const ParamGenerator<T1>& g1, 14216 const typename ParamGenerator<T1>::iterator& current1, 14217 const ParamGenerator<T2>& g2, 14218 const typename ParamGenerator<T2>::iterator& current2, 14219 const ParamGenerator<T3>& g3, 14220 const typename ParamGenerator<T3>::iterator& current3, 14221 const ParamGenerator<T4>& g4, 14222 const typename ParamGenerator<T4>::iterator& current4, 14223 const ParamGenerator<T5>& g5, 14224 const typename ParamGenerator<T5>::iterator& current5) 14225 : base_(base), 14226 begin1_(g1.begin()), end1_(g1.end()), current1_(current1), 14227 begin2_(g2.begin()), end2_(g2.end()), current2_(current2), 14228 begin3_(g3.begin()), end3_(g3.end()), current3_(current3), 14229 begin4_(g4.begin()), end4_(g4.end()), current4_(current4), 14230 begin5_(g5.begin()), end5_(g5.end()), current5_(current5) { 14231 ComputeCurrentValue(); 14232 } 14233 virtual ~Iterator() {} 14234 14235 virtual const ParamGeneratorInterface<ParamType>* BaseGenerator() const { 14236 return base_; 14237 } 14238 // Advance should not be called on beyond-of-range iterators 14239 // so no component iterators must be beyond end of range, either. 14240 virtual void Advance() { 14241 assert(!AtEnd()); 14242 ++current5_; 14243 if (current5_ == end5_) { 14244 current5_ = begin5_; 14245 ++current4_; 14246 } 14247 if (current4_ == end4_) { 14248 current4_ = begin4_; 14249 ++current3_; 14250 } 14251 if (current3_ == end3_) { 14252 current3_ = begin3_; 14253 ++current2_; 14254 } 14255 if (current2_ == end2_) { 14256 current2_ = begin2_; 14257 ++current1_; 14258 } 14259 ComputeCurrentValue(); 14260 } 14261 virtual ParamIteratorInterface<ParamType>* Clone() const { 14262 return new Iterator(*this); 14263 } 14264 virtual const ParamType* Current() const { return ¤t_value_; } 14265 virtual bool Equals(const ParamIteratorInterface<ParamType>& other) const { 14266 // Having the same base generator guarantees that the other 14267 // iterator is of the same type and we can downcast. 14268 GTEST_CHECK_(BaseGenerator() == other.BaseGenerator()) 14269 << "The program attempted to compare iterators " 14270 << "from different generators." << std::endl; 14271 const Iterator* typed_other = 14272 CheckedDowncastToActualType<const Iterator>(&other); 14273 // We must report iterators equal if they both point beyond their 14274 // respective ranges. That can happen in a variety of fashions, 14275 // so we have to consult AtEnd(). 14276 return (AtEnd() && typed_other->AtEnd()) || 14277 ( 14278 current1_ == typed_other->current1_ && 14279 current2_ == typed_other->current2_ && 14280 current3_ == typed_other->current3_ && 14281 current4_ == typed_other->current4_ && 14282 current5_ == typed_other->current5_); 14283 } 14284 14285 private: 14286 Iterator(const Iterator& other) 14287 : base_(other.base_), 14288 begin1_(other.begin1_), 14289 end1_(other.end1_), 14290 current1_(other.current1_), 14291 begin2_(other.begin2_), 14292 end2_(other.end2_), 14293 current2_(other.current2_), 14294 begin3_(other.begin3_), 14295 end3_(other.end3_), 14296 current3_(other.current3_), 14297 begin4_(other.begin4_), 14298 end4_(other.end4_), 14299 current4_(other.current4_), 14300 begin5_(other.begin5_), 14301 end5_(other.end5_), 14302 current5_(other.current5_) { 14303 ComputeCurrentValue(); 14304 } 14305 14306 void ComputeCurrentValue() { 14307 if (!AtEnd()) 14308 current_value_ = ParamType(*current1_, *current2_, *current3_, 14309 *current4_, *current5_); 14310 } 14311 bool AtEnd() const { 14312 // We must report iterator past the end of the range when either of the 14313 // component iterators has reached the end of its range. 14314 return 14315 current1_ == end1_ || 14316 current2_ == end2_ || 14317 current3_ == end3_ || 14318 current4_ == end4_ || 14319 current5_ == end5_; 14320 } 14321 14322 // No implementation - assignment is unsupported. 14323 void operator=(const Iterator& other); 14324 14325 const ParamGeneratorInterface<ParamType>* const base_; 14326 // begin[i]_ and end[i]_ define the i-th range that Iterator traverses. 14327 // current[i]_ is the actual traversing iterator. 14328 const typename ParamGenerator<T1>::iterator begin1_; 14329 const typename ParamGenerator<T1>::iterator end1_; 14330 typename ParamGenerator<T1>::iterator current1_; 14331 const typename ParamGenerator<T2>::iterator begin2_; 14332 const typename ParamGenerator<T2>::iterator end2_; 14333 typename ParamGenerator<T2>::iterator current2_; 14334 const typename ParamGenerator<T3>::iterator begin3_; 14335 const typename ParamGenerator<T3>::iterator end3_; 14336 typename ParamGenerator<T3>::iterator current3_; 14337 const typename ParamGenerator<T4>::iterator begin4_; 14338 const typename ParamGenerator<T4>::iterator end4_; 14339 typename ParamGenerator<T4>::iterator current4_; 14340 const typename ParamGenerator<T5>::iterator begin5_; 14341 const typename ParamGenerator<T5>::iterator end5_; 14342 typename ParamGenerator<T5>::iterator current5_; 14343 ParamType current_value_; 14344 }; // class CartesianProductGenerator5::Iterator 14345 14346 // No implementation - assignment is unsupported. 14347 void operator=(const CartesianProductGenerator5& other); 14348 14349 const ParamGenerator<T1> g1_; 14350 const ParamGenerator<T2> g2_; 14351 const ParamGenerator<T3> g3_; 14352 const ParamGenerator<T4> g4_; 14353 const ParamGenerator<T5> g5_; 14354 }; // class CartesianProductGenerator5 14355 14356 14357 template <typename T1, typename T2, typename T3, typename T4, typename T5, 14358 typename T6> 14359 class CartesianProductGenerator6 14360 : public ParamGeneratorInterface< ::stdt::tuple<T1, T2, T3, T4, T5, 14361 T6> > { 14362 public: 14363 typedef ::stdt::tuple<T1, T2, T3, T4, T5, T6> ParamType; 14364 14365 CartesianProductGenerator6(const ParamGenerator<T1>& g1, 14366 const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3, 14367 const ParamGenerator<T4>& g4, const ParamGenerator<T5>& g5, 14368 const ParamGenerator<T6>& g6) 14369 : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6) {} 14370 virtual ~CartesianProductGenerator6() {} 14371 14372 virtual ParamIteratorInterface<ParamType>* Begin() const { 14373 return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_, 14374 g3_.begin(), g4_, g4_.begin(), g5_, g5_.begin(), g6_, g6_.begin()); 14375 } 14376 virtual ParamIteratorInterface<ParamType>* End() const { 14377 return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(), 14378 g4_, g4_.end(), g5_, g5_.end(), g6_, g6_.end()); 14379 } 14380 14381 private: 14382 class Iterator : public ParamIteratorInterface<ParamType> { 14383 public: 14384 Iterator(const ParamGeneratorInterface<ParamType>* base, 14385 const ParamGenerator<T1>& g1, 14386 const typename ParamGenerator<T1>::iterator& current1, 14387 const ParamGenerator<T2>& g2, 14388 const typename ParamGenerator<T2>::iterator& current2, 14389 const ParamGenerator<T3>& g3, 14390 const typename ParamGenerator<T3>::iterator& current3, 14391 const ParamGenerator<T4>& g4, 14392 const typename ParamGenerator<T4>::iterator& current4, 14393 const ParamGenerator<T5>& g5, 14394 const typename ParamGenerator<T5>::iterator& current5, 14395 const ParamGenerator<T6>& g6, 14396 const typename ParamGenerator<T6>::iterator& current6) 14397 : base_(base), 14398 begin1_(g1.begin()), end1_(g1.end()), current1_(current1), 14399 begin2_(g2.begin()), end2_(g2.end()), current2_(current2), 14400 begin3_(g3.begin()), end3_(g3.end()), current3_(current3), 14401 begin4_(g4.begin()), end4_(g4.end()), current4_(current4), 14402 begin5_(g5.begin()), end5_(g5.end()), current5_(current5), 14403 begin6_(g6.begin()), end6_(g6.end()), current6_(current6) { 14404 ComputeCurrentValue(); 14405 } 14406 virtual ~Iterator() {} 14407 14408 virtual const ParamGeneratorInterface<ParamType>* BaseGenerator() const { 14409 return base_; 14410 } 14411 // Advance should not be called on beyond-of-range iterators 14412 // so no component iterators must be beyond end of range, either. 14413 virtual void Advance() { 14414 assert(!AtEnd()); 14415 ++current6_; 14416 if (current6_ == end6_) { 14417 current6_ = begin6_; 14418 ++current5_; 14419 } 14420 if (current5_ == end5_) { 14421 current5_ = begin5_; 14422 ++current4_; 14423 } 14424 if (current4_ == end4_) { 14425 current4_ = begin4_; 14426 ++current3_; 14427 } 14428 if (current3_ == end3_) { 14429 current3_ = begin3_; 14430 ++current2_; 14431 } 14432 if (current2_ == end2_) { 14433 current2_ = begin2_; 14434 ++current1_; 14435 } 14436 ComputeCurrentValue(); 14437 } 14438 virtual ParamIteratorInterface<ParamType>* Clone() const { 14439 return new Iterator(*this); 14440 } 14441 virtual const ParamType* Current() const { return ¤t_value_; } 14442 virtual bool Equals(const ParamIteratorInterface<ParamType>& other) const { 14443 // Having the same base generator guarantees that the other 14444 // iterator is of the same type and we can downcast. 14445 GTEST_CHECK_(BaseGenerator() == other.BaseGenerator()) 14446 << "The program attempted to compare iterators " 14447 << "from different generators." << std::endl; 14448 const Iterator* typed_other = 14449 CheckedDowncastToActualType<const Iterator>(&other); 14450 // We must report iterators equal if they both point beyond their 14451 // respective ranges. That can happen in a variety of fashions, 14452 // so we have to consult AtEnd(). 14453 return (AtEnd() && typed_other->AtEnd()) || 14454 ( 14455 current1_ == typed_other->current1_ && 14456 current2_ == typed_other->current2_ && 14457 current3_ == typed_other->current3_ && 14458 current4_ == typed_other->current4_ && 14459 current5_ == typed_other->current5_ && 14460 current6_ == typed_other->current6_); 14461 } 14462 14463 private: 14464 Iterator(const Iterator& other) 14465 : base_(other.base_), 14466 begin1_(other.begin1_), 14467 end1_(other.end1_), 14468 current1_(other.current1_), 14469 begin2_(other.begin2_), 14470 end2_(other.end2_), 14471 current2_(other.current2_), 14472 begin3_(other.begin3_), 14473 end3_(other.end3_), 14474 current3_(other.current3_), 14475 begin4_(other.begin4_), 14476 end4_(other.end4_), 14477 current4_(other.current4_), 14478 begin5_(other.begin5_), 14479 end5_(other.end5_), 14480 current5_(other.current5_), 14481 begin6_(other.begin6_), 14482 end6_(other.end6_), 14483 current6_(other.current6_) { 14484 ComputeCurrentValue(); 14485 } 14486 14487 void ComputeCurrentValue() { 14488 if (!AtEnd()) 14489 current_value_ = ParamType(*current1_, *current2_, *current3_, 14490 *current4_, *current5_, *current6_); 14491 } 14492 bool AtEnd() const { 14493 // We must report iterator past the end of the range when either of the 14494 // component iterators has reached the end of its range. 14495 return 14496 current1_ == end1_ || 14497 current2_ == end2_ || 14498 current3_ == end3_ || 14499 current4_ == end4_ || 14500 current5_ == end5_ || 14501 current6_ == end6_; 14502 } 14503 14504 // No implementation - assignment is unsupported. 14505 void operator=(const Iterator& other); 14506 14507 const ParamGeneratorInterface<ParamType>* const base_; 14508 // begin[i]_ and end[i]_ define the i-th range that Iterator traverses. 14509 // current[i]_ is the actual traversing iterator. 14510 const typename ParamGenerator<T1>::iterator begin1_; 14511 const typename ParamGenerator<T1>::iterator end1_; 14512 typename ParamGenerator<T1>::iterator current1_; 14513 const typename ParamGenerator<T2>::iterator begin2_; 14514 const typename ParamGenerator<T2>::iterator end2_; 14515 typename ParamGenerator<T2>::iterator current2_; 14516 const typename ParamGenerator<T3>::iterator begin3_; 14517 const typename ParamGenerator<T3>::iterator end3_; 14518 typename ParamGenerator<T3>::iterator current3_; 14519 const typename ParamGenerator<T4>::iterator begin4_; 14520 const typename ParamGenerator<T4>::iterator end4_; 14521 typename ParamGenerator<T4>::iterator current4_; 14522 const typename ParamGenerator<T5>::iterator begin5_; 14523 const typename ParamGenerator<T5>::iterator end5_; 14524 typename ParamGenerator<T5>::iterator current5_; 14525 const typename ParamGenerator<T6>::iterator begin6_; 14526 const typename ParamGenerator<T6>::iterator end6_; 14527 typename ParamGenerator<T6>::iterator current6_; 14528 ParamType current_value_; 14529 }; // class CartesianProductGenerator6::Iterator 14530 14531 // No implementation - assignment is unsupported. 14532 void operator=(const CartesianProductGenerator6& other); 14533 14534 const ParamGenerator<T1> g1_; 14535 const ParamGenerator<T2> g2_; 14536 const ParamGenerator<T3> g3_; 14537 const ParamGenerator<T4> g4_; 14538 const ParamGenerator<T5> g5_; 14539 const ParamGenerator<T6> g6_; 14540 }; // class CartesianProductGenerator6 14541 14542 14543 template <typename T1, typename T2, typename T3, typename T4, typename T5, 14544 typename T6, typename T7> 14545 class CartesianProductGenerator7 14546 : public ParamGeneratorInterface< ::stdt::tuple<T1, T2, T3, T4, T5, T6, 14547 T7> > { 14548 public: 14549 typedef ::stdt::tuple<T1, T2, T3, T4, T5, T6, T7> ParamType; 14550 14551 CartesianProductGenerator7(const ParamGenerator<T1>& g1, 14552 const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3, 14553 const ParamGenerator<T4>& g4, const ParamGenerator<T5>& g5, 14554 const ParamGenerator<T6>& g6, const ParamGenerator<T7>& g7) 14555 : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7) {} 14556 virtual ~CartesianProductGenerator7() {} 14557 14558 virtual ParamIteratorInterface<ParamType>* Begin() const { 14559 return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_, 14560 g3_.begin(), g4_, g4_.begin(), g5_, g5_.begin(), g6_, g6_.begin(), g7_, 14561 g7_.begin()); 14562 } 14563 virtual ParamIteratorInterface<ParamType>* End() const { 14564 return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(), 14565 g4_, g4_.end(), g5_, g5_.end(), g6_, g6_.end(), g7_, g7_.end()); 14566 } 14567 14568 private: 14569 class Iterator : public ParamIteratorInterface<ParamType> { 14570 public: 14571 Iterator(const ParamGeneratorInterface<ParamType>* base, 14572 const ParamGenerator<T1>& g1, 14573 const typename ParamGenerator<T1>::iterator& current1, 14574 const ParamGenerator<T2>& g2, 14575 const typename ParamGenerator<T2>::iterator& current2, 14576 const ParamGenerator<T3>& g3, 14577 const typename ParamGenerator<T3>::iterator& current3, 14578 const ParamGenerator<T4>& g4, 14579 const typename ParamGenerator<T4>::iterator& current4, 14580 const ParamGenerator<T5>& g5, 14581 const typename ParamGenerator<T5>::iterator& current5, 14582 const ParamGenerator<T6>& g6, 14583 const typename ParamGenerator<T6>::iterator& current6, 14584 const ParamGenerator<T7>& g7, 14585 const typename ParamGenerator<T7>::iterator& current7) 14586 : base_(base), 14587 begin1_(g1.begin()), end1_(g1.end()), current1_(current1), 14588 begin2_(g2.begin()), end2_(g2.end()), current2_(current2), 14589 begin3_(g3.begin()), end3_(g3.end()), current3_(current3), 14590 begin4_(g4.begin()), end4_(g4.end()), current4_(current4), 14591 begin5_(g5.begin()), end5_(g5.end()), current5_(current5), 14592 begin6_(g6.begin()), end6_(g6.end()), current6_(current6), 14593 begin7_(g7.begin()), end7_(g7.end()), current7_(current7) { 14594 ComputeCurrentValue(); 14595 } 14596 virtual ~Iterator() {} 14597 14598 virtual const ParamGeneratorInterface<ParamType>* BaseGenerator() const { 14599 return base_; 14600 } 14601 // Advance should not be called on beyond-of-range iterators 14602 // so no component iterators must be beyond end of range, either. 14603 virtual void Advance() { 14604 assert(!AtEnd()); 14605 ++current7_; 14606 if (current7_ == end7_) { 14607 current7_ = begin7_; 14608 ++current6_; 14609 } 14610 if (current6_ == end6_) { 14611 current6_ = begin6_; 14612 ++current5_; 14613 } 14614 if (current5_ == end5_) { 14615 current5_ = begin5_; 14616 ++current4_; 14617 } 14618 if (current4_ == end4_) { 14619 current4_ = begin4_; 14620 ++current3_; 14621 } 14622 if (current3_ == end3_) { 14623 current3_ = begin3_; 14624 ++current2_; 14625 } 14626 if (current2_ == end2_) { 14627 current2_ = begin2_; 14628 ++current1_; 14629 } 14630 ComputeCurrentValue(); 14631 } 14632 virtual ParamIteratorInterface<ParamType>* Clone() const { 14633 return new Iterator(*this); 14634 } 14635 virtual const ParamType* Current() const { return ¤t_value_; } 14636 virtual bool Equals(const ParamIteratorInterface<ParamType>& other) const { 14637 // Having the same base generator guarantees that the other 14638 // iterator is of the same type and we can downcast. 14639 GTEST_CHECK_(BaseGenerator() == other.BaseGenerator()) 14640 << "The program attempted to compare iterators " 14641 << "from different generators." << std::endl; 14642 const Iterator* typed_other = 14643 CheckedDowncastToActualType<const Iterator>(&other); 14644 // We must report iterators equal if they both point beyond their 14645 // respective ranges. That can happen in a variety of fashions, 14646 // so we have to consult AtEnd(). 14647 return (AtEnd() && typed_other->AtEnd()) || 14648 ( 14649 current1_ == typed_other->current1_ && 14650 current2_ == typed_other->current2_ && 14651 current3_ == typed_other->current3_ && 14652 current4_ == typed_other->current4_ && 14653 current5_ == typed_other->current5_ && 14654 current6_ == typed_other->current6_ && 14655 current7_ == typed_other->current7_); 14656 } 14657 14658 private: 14659 Iterator(const Iterator& other) 14660 : base_(other.base_), 14661 begin1_(other.begin1_), 14662 end1_(other.end1_), 14663 current1_(other.current1_), 14664 begin2_(other.begin2_), 14665 end2_(other.end2_), 14666 current2_(other.current2_), 14667 begin3_(other.begin3_), 14668 end3_(other.end3_), 14669 current3_(other.current3_), 14670 begin4_(other.begin4_), 14671 end4_(other.end4_), 14672 current4_(other.current4_), 14673 begin5_(other.begin5_), 14674 end5_(other.end5_), 14675 current5_(other.current5_), 14676 begin6_(other.begin6_), 14677 end6_(other.end6_), 14678 current6_(other.current6_), 14679 begin7_(other.begin7_), 14680 end7_(other.end7_), 14681 current7_(other.current7_) { 14682 ComputeCurrentValue(); 14683 } 14684 14685 void ComputeCurrentValue() { 14686 if (!AtEnd()) 14687 current_value_ = ParamType(*current1_, *current2_, *current3_, 14688 *current4_, *current5_, *current6_, *current7_); 14689 } 14690 bool AtEnd() const { 14691 // We must report iterator past the end of the range when either of the 14692 // component iterators has reached the end of its range. 14693 return 14694 current1_ == end1_ || 14695 current2_ == end2_ || 14696 current3_ == end3_ || 14697 current4_ == end4_ || 14698 current5_ == end5_ || 14699 current6_ == end6_ || 14700 current7_ == end7_; 14701 } 14702 14703 // No implementation - assignment is unsupported. 14704 void operator=(const Iterator& other); 14705 14706 const ParamGeneratorInterface<ParamType>* const base_; 14707 // begin[i]_ and end[i]_ define the i-th range that Iterator traverses. 14708 // current[i]_ is the actual traversing iterator. 14709 const typename ParamGenerator<T1>::iterator begin1_; 14710 const typename ParamGenerator<T1>::iterator end1_; 14711 typename ParamGenerator<T1>::iterator current1_; 14712 const typename ParamGenerator<T2>::iterator begin2_; 14713 const typename ParamGenerator<T2>::iterator end2_; 14714 typename ParamGenerator<T2>::iterator current2_; 14715 const typename ParamGenerator<T3>::iterator begin3_; 14716 const typename ParamGenerator<T3>::iterator end3_; 14717 typename ParamGenerator<T3>::iterator current3_; 14718 const typename ParamGenerator<T4>::iterator begin4_; 14719 const typename ParamGenerator<T4>::iterator end4_; 14720 typename ParamGenerator<T4>::iterator current4_; 14721 const typename ParamGenerator<T5>::iterator begin5_; 14722 const typename ParamGenerator<T5>::iterator end5_; 14723 typename ParamGenerator<T5>::iterator current5_; 14724 const typename ParamGenerator<T6>::iterator begin6_; 14725 const typename ParamGenerator<T6>::iterator end6_; 14726 typename ParamGenerator<T6>::iterator current6_; 14727 const typename ParamGenerator<T7>::iterator begin7_; 14728 const typename ParamGenerator<T7>::iterator end7_; 14729 typename ParamGenerator<T7>::iterator current7_; 14730 ParamType current_value_; 14731 }; // class CartesianProductGenerator7::Iterator 14732 14733 // No implementation - assignment is unsupported. 14734 void operator=(const CartesianProductGenerator7& other); 14735 14736 const ParamGenerator<T1> g1_; 14737 const ParamGenerator<T2> g2_; 14738 const ParamGenerator<T3> g3_; 14739 const ParamGenerator<T4> g4_; 14740 const ParamGenerator<T5> g5_; 14741 const ParamGenerator<T6> g6_; 14742 const ParamGenerator<T7> g7_; 14743 }; // class CartesianProductGenerator7 14744 14745 14746 template <typename T1, typename T2, typename T3, typename T4, typename T5, 14747 typename T6, typename T7, typename T8> 14748 class CartesianProductGenerator8 14749 : public ParamGeneratorInterface< ::stdt::tuple<T1, T2, T3, T4, T5, T6, 14750 T7, T8> > { 14751 public: 14752 typedef ::stdt::tuple<T1, T2, T3, T4, T5, T6, T7, T8> ParamType; 14753 14754 CartesianProductGenerator8(const ParamGenerator<T1>& g1, 14755 const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3, 14756 const ParamGenerator<T4>& g4, const ParamGenerator<T5>& g5, 14757 const ParamGenerator<T6>& g6, const ParamGenerator<T7>& g7, 14758 const ParamGenerator<T8>& g8) 14759 : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7), 14760 g8_(g8) {} 14761 virtual ~CartesianProductGenerator8() {} 14762 14763 virtual ParamIteratorInterface<ParamType>* Begin() const { 14764 return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_, 14765 g3_.begin(), g4_, g4_.begin(), g5_, g5_.begin(), g6_, g6_.begin(), g7_, 14766 g7_.begin(), g8_, g8_.begin()); 14767 } 14768 virtual ParamIteratorInterface<ParamType>* End() const { 14769 return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(), 14770 g4_, g4_.end(), g5_, g5_.end(), g6_, g6_.end(), g7_, g7_.end(), g8_, 14771 g8_.end()); 14772 } 14773 14774 private: 14775 class Iterator : public ParamIteratorInterface<ParamType> { 14776 public: 14777 Iterator(const ParamGeneratorInterface<ParamType>* base, 14778 const ParamGenerator<T1>& g1, 14779 const typename ParamGenerator<T1>::iterator& current1, 14780 const ParamGenerator<T2>& g2, 14781 const typename ParamGenerator<T2>::iterator& current2, 14782 const ParamGenerator<T3>& g3, 14783 const typename ParamGenerator<T3>::iterator& current3, 14784 const ParamGenerator<T4>& g4, 14785 const typename ParamGenerator<T4>::iterator& current4, 14786 const ParamGenerator<T5>& g5, 14787 const typename ParamGenerator<T5>::iterator& current5, 14788 const ParamGenerator<T6>& g6, 14789 const typename ParamGenerator<T6>::iterator& current6, 14790 const ParamGenerator<T7>& g7, 14791 const typename ParamGenerator<T7>::iterator& current7, 14792 const ParamGenerator<T8>& g8, 14793 const typename ParamGenerator<T8>::iterator& current8) 14794 : base_(base), 14795 begin1_(g1.begin()), end1_(g1.end()), current1_(current1), 14796 begin2_(g2.begin()), end2_(g2.end()), current2_(current2), 14797 begin3_(g3.begin()), end3_(g3.end()), current3_(current3), 14798 begin4_(g4.begin()), end4_(g4.end()), current4_(current4), 14799 begin5_(g5.begin()), end5_(g5.end()), current5_(current5), 14800 begin6_(g6.begin()), end6_(g6.end()), current6_(current6), 14801 begin7_(g7.begin()), end7_(g7.end()), current7_(current7), 14802 begin8_(g8.begin()), end8_(g8.end()), current8_(current8) { 14803 ComputeCurrentValue(); 14804 } 14805 virtual ~Iterator() {} 14806 14807 virtual const ParamGeneratorInterface<ParamType>* BaseGenerator() const { 14808 return base_; 14809 } 14810 // Advance should not be called on beyond-of-range iterators 14811 // so no component iterators must be beyond end of range, either. 14812 virtual void Advance() { 14813 assert(!AtEnd()); 14814 ++current8_; 14815 if (current8_ == end8_) { 14816 current8_ = begin8_; 14817 ++current7_; 14818 } 14819 if (current7_ == end7_) { 14820 current7_ = begin7_; 14821 ++current6_; 14822 } 14823 if (current6_ == end6_) { 14824 current6_ = begin6_; 14825 ++current5_; 14826 } 14827 if (current5_ == end5_) { 14828 current5_ = begin5_; 14829 ++current4_; 14830 } 14831 if (current4_ == end4_) { 14832 current4_ = begin4_; 14833 ++current3_; 14834 } 14835 if (current3_ == end3_) { 14836 current3_ = begin3_; 14837 ++current2_; 14838 } 14839 if (current2_ == end2_) { 14840 current2_ = begin2_; 14841 ++current1_; 14842 } 14843 ComputeCurrentValue(); 14844 } 14845 virtual ParamIteratorInterface<ParamType>* Clone() const { 14846 return new Iterator(*this); 14847 } 14848 virtual const ParamType* Current() const { return ¤t_value_; } 14849 virtual bool Equals(const ParamIteratorInterface<ParamType>& other) const { 14850 // Having the same base generator guarantees that the other 14851 // iterator is of the same type and we can downcast. 14852 GTEST_CHECK_(BaseGenerator() == other.BaseGenerator()) 14853 << "The program attempted to compare iterators " 14854 << "from different generators." << std::endl; 14855 const Iterator* typed_other = 14856 CheckedDowncastToActualType<const Iterator>(&other); 14857 // We must report iterators equal if they both point beyond their 14858 // respective ranges. That can happen in a variety of fashions, 14859 // so we have to consult AtEnd(). 14860 return (AtEnd() && typed_other->AtEnd()) || 14861 ( 14862 current1_ == typed_other->current1_ && 14863 current2_ == typed_other->current2_ && 14864 current3_ == typed_other->current3_ && 14865 current4_ == typed_other->current4_ && 14866 current5_ == typed_other->current5_ && 14867 current6_ == typed_other->current6_ && 14868 current7_ == typed_other->current7_ && 14869 current8_ == typed_other->current8_); 14870 } 14871 14872 private: 14873 Iterator(const Iterator& other) 14874 : base_(other.base_), 14875 begin1_(other.begin1_), 14876 end1_(other.end1_), 14877 current1_(other.current1_), 14878 begin2_(other.begin2_), 14879 end2_(other.end2_), 14880 current2_(other.current2_), 14881 begin3_(other.begin3_), 14882 end3_(other.end3_), 14883 current3_(other.current3_), 14884 begin4_(other.begin4_), 14885 end4_(other.end4_), 14886 current4_(other.current4_), 14887 begin5_(other.begin5_), 14888 end5_(other.end5_), 14889 current5_(other.current5_), 14890 begin6_(other.begin6_), 14891 end6_(other.end6_), 14892 current6_(other.current6_), 14893 begin7_(other.begin7_), 14894 end7_(other.end7_), 14895 current7_(other.current7_), 14896 begin8_(other.begin8_), 14897 end8_(other.end8_), 14898 current8_(other.current8_) { 14899 ComputeCurrentValue(); 14900 } 14901 14902 void ComputeCurrentValue() { 14903 if (!AtEnd()) 14904 current_value_ = ParamType(*current1_, *current2_, *current3_, 14905 *current4_, *current5_, *current6_, *current7_, *current8_); 14906 } 14907 bool AtEnd() const { 14908 // We must report iterator past the end of the range when either of the 14909 // component iterators has reached the end of its range. 14910 return 14911 current1_ == end1_ || 14912 current2_ == end2_ || 14913 current3_ == end3_ || 14914 current4_ == end4_ || 14915 current5_ == end5_ || 14916 current6_ == end6_ || 14917 current7_ == end7_ || 14918 current8_ == end8_; 14919 } 14920 14921 // No implementation - assignment is unsupported. 14922 void operator=(const Iterator& other); 14923 14924 const ParamGeneratorInterface<ParamType>* const base_; 14925 // begin[i]_ and end[i]_ define the i-th range that Iterator traverses. 14926 // current[i]_ is the actual traversing iterator. 14927 const typename ParamGenerator<T1>::iterator begin1_; 14928 const typename ParamGenerator<T1>::iterator end1_; 14929 typename ParamGenerator<T1>::iterator current1_; 14930 const typename ParamGenerator<T2>::iterator begin2_; 14931 const typename ParamGenerator<T2>::iterator end2_; 14932 typename ParamGenerator<T2>::iterator current2_; 14933 const typename ParamGenerator<T3>::iterator begin3_; 14934 const typename ParamGenerator<T3>::iterator end3_; 14935 typename ParamGenerator<T3>::iterator current3_; 14936 const typename ParamGenerator<T4>::iterator begin4_; 14937 const typename ParamGenerator<T4>::iterator end4_; 14938 typename ParamGenerator<T4>::iterator current4_; 14939 const typename ParamGenerator<T5>::iterator begin5_; 14940 const typename ParamGenerator<T5>::iterator end5_; 14941 typename ParamGenerator<T5>::iterator current5_; 14942 const typename ParamGenerator<T6>::iterator begin6_; 14943 const typename ParamGenerator<T6>::iterator end6_; 14944 typename ParamGenerator<T6>::iterator current6_; 14945 const typename ParamGenerator<T7>::iterator begin7_; 14946 const typename ParamGenerator<T7>::iterator end7_; 14947 typename ParamGenerator<T7>::iterator current7_; 14948 const typename ParamGenerator<T8>::iterator begin8_; 14949 const typename ParamGenerator<T8>::iterator end8_; 14950 typename ParamGenerator<T8>::iterator current8_; 14951 ParamType current_value_; 14952 }; // class CartesianProductGenerator8::Iterator 14953 14954 // No implementation - assignment is unsupported. 14955 void operator=(const CartesianProductGenerator8& other); 14956 14957 const ParamGenerator<T1> g1_; 14958 const ParamGenerator<T2> g2_; 14959 const ParamGenerator<T3> g3_; 14960 const ParamGenerator<T4> g4_; 14961 const ParamGenerator<T5> g5_; 14962 const ParamGenerator<T6> g6_; 14963 const ParamGenerator<T7> g7_; 14964 const ParamGenerator<T8> g8_; 14965 }; // class CartesianProductGenerator8 14966 14967 14968 template <typename T1, typename T2, typename T3, typename T4, typename T5, 14969 typename T6, typename T7, typename T8, typename T9> 14970 class CartesianProductGenerator9 14971 : public ParamGeneratorInterface< ::stdt::tuple<T1, T2, T3, T4, T5, T6, 14972 T7, T8, T9> > { 14973 public: 14974 typedef ::stdt::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9> ParamType; 14975 14976 CartesianProductGenerator9(const ParamGenerator<T1>& g1, 14977 const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3, 14978 const ParamGenerator<T4>& g4, const ParamGenerator<T5>& g5, 14979 const ParamGenerator<T6>& g6, const ParamGenerator<T7>& g7, 14980 const ParamGenerator<T8>& g8, const ParamGenerator<T9>& g9) 14981 : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7), g8_(g8), 14982 g9_(g9) {} 14983 virtual ~CartesianProductGenerator9() {} 14984 14985 virtual ParamIteratorInterface<ParamType>* Begin() const { 14986 return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_, 14987 g3_.begin(), g4_, g4_.begin(), g5_, g5_.begin(), g6_, g6_.begin(), g7_, 14988 g7_.begin(), g8_, g8_.begin(), g9_, g9_.begin()); 14989 } 14990 virtual ParamIteratorInterface<ParamType>* End() const { 14991 return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(), 14992 g4_, g4_.end(), g5_, g5_.end(), g6_, g6_.end(), g7_, g7_.end(), g8_, 14993 g8_.end(), g9_, g9_.end()); 14994 } 14995 14996 private: 14997 class Iterator : public ParamIteratorInterface<ParamType> { 14998 public: 14999 Iterator(const ParamGeneratorInterface<ParamType>* base, 15000 const ParamGenerator<T1>& g1, 15001 const typename ParamGenerator<T1>::iterator& current1, 15002 const ParamGenerator<T2>& g2, 15003 const typename ParamGenerator<T2>::iterator& current2, 15004 const ParamGenerator<T3>& g3, 15005 const typename ParamGenerator<T3>::iterator& current3, 15006 const ParamGenerator<T4>& g4, 15007 const typename ParamGenerator<T4>::iterator& current4, 15008 const ParamGenerator<T5>& g5, 15009 const typename ParamGenerator<T5>::iterator& current5, 15010 const ParamGenerator<T6>& g6, 15011 const typename ParamGenerator<T6>::iterator& current6, 15012 const ParamGenerator<T7>& g7, 15013 const typename ParamGenerator<T7>::iterator& current7, 15014 const ParamGenerator<T8>& g8, 15015 const typename ParamGenerator<T8>::iterator& current8, 15016 const ParamGenerator<T9>& g9, 15017 const typename ParamGenerator<T9>::iterator& current9) 15018 : base_(base), 15019 begin1_(g1.begin()), end1_(g1.end()), current1_(current1), 15020 begin2_(g2.begin()), end2_(g2.end()), current2_(current2), 15021 begin3_(g3.begin()), end3_(g3.end()), current3_(current3), 15022 begin4_(g4.begin()), end4_(g4.end()), current4_(current4), 15023 begin5_(g5.begin()), end5_(g5.end()), current5_(current5), 15024 begin6_(g6.begin()), end6_(g6.end()), current6_(current6), 15025 begin7_(g7.begin()), end7_(g7.end()), current7_(current7), 15026 begin8_(g8.begin()), end8_(g8.end()), current8_(current8), 15027 begin9_(g9.begin()), end9_(g9.end()), current9_(current9) { 15028 ComputeCurrentValue(); 15029 } 15030 virtual ~Iterator() {} 15031 15032 virtual const ParamGeneratorInterface<ParamType>* BaseGenerator() const { 15033 return base_; 15034 } 15035 // Advance should not be called on beyond-of-range iterators 15036 // so no component iterators must be beyond end of range, either. 15037 virtual void Advance() { 15038 assert(!AtEnd()); 15039 ++current9_; 15040 if (current9_ == end9_) { 15041 current9_ = begin9_; 15042 ++current8_; 15043 } 15044 if (current8_ == end8_) { 15045 current8_ = begin8_; 15046 ++current7_; 15047 } 15048 if (current7_ == end7_) { 15049 current7_ = begin7_; 15050 ++current6_; 15051 } 15052 if (current6_ == end6_) { 15053 current6_ = begin6_; 15054 ++current5_; 15055 } 15056 if (current5_ == end5_) { 15057 current5_ = begin5_; 15058 ++current4_; 15059 } 15060 if (current4_ == end4_) { 15061 current4_ = begin4_; 15062 ++current3_; 15063 } 15064 if (current3_ == end3_) { 15065 current3_ = begin3_; 15066 ++current2_; 15067 } 15068 if (current2_ == end2_) { 15069 current2_ = begin2_; 15070 ++current1_; 15071 } 15072 ComputeCurrentValue(); 15073 } 15074 virtual ParamIteratorInterface<ParamType>* Clone() const { 15075 return new Iterator(*this); 15076 } 15077 virtual const ParamType* Current() const { return ¤t_value_; } 15078 virtual bool Equals(const ParamIteratorInterface<ParamType>& other) const { 15079 // Having the same base generator guarantees that the other 15080 // iterator is of the same type and we can downcast. 15081 GTEST_CHECK_(BaseGenerator() == other.BaseGenerator()) 15082 << "The program attempted to compare iterators " 15083 << "from different generators." << std::endl; 15084 const Iterator* typed_other = 15085 CheckedDowncastToActualType<const Iterator>(&other); 15086 // We must report iterators equal if they both point beyond their 15087 // respective ranges. That can happen in a variety of fashions, 15088 // so we have to consult AtEnd(). 15089 return (AtEnd() && typed_other->AtEnd()) || 15090 ( 15091 current1_ == typed_other->current1_ && 15092 current2_ == typed_other->current2_ && 15093 current3_ == typed_other->current3_ && 15094 current4_ == typed_other->current4_ && 15095 current5_ == typed_other->current5_ && 15096 current6_ == typed_other->current6_ && 15097 current7_ == typed_other->current7_ && 15098 current8_ == typed_other->current8_ && 15099 current9_ == typed_other->current9_); 15100 } 15101 15102 private: 15103 Iterator(const Iterator& other) 15104 : base_(other.base_), 15105 begin1_(other.begin1_), 15106 end1_(other.end1_), 15107 current1_(other.current1_), 15108 begin2_(other.begin2_), 15109 end2_(other.end2_), 15110 current2_(other.current2_), 15111 begin3_(other.begin3_), 15112 end3_(other.end3_), 15113 current3_(other.current3_), 15114 begin4_(other.begin4_), 15115 end4_(other.end4_), 15116 current4_(other.current4_), 15117 begin5_(other.begin5_), 15118 end5_(other.end5_), 15119 current5_(other.current5_), 15120 begin6_(other.begin6_), 15121 end6_(other.end6_), 15122 current6_(other.current6_), 15123 begin7_(other.begin7_), 15124 end7_(other.end7_), 15125 current7_(other.current7_), 15126 begin8_(other.begin8_), 15127 end8_(other.end8_), 15128 current8_(other.current8_), 15129 begin9_(other.begin9_), 15130 end9_(other.end9_), 15131 current9_(other.current9_) { 15132 ComputeCurrentValue(); 15133 } 15134 15135 void ComputeCurrentValue() { 15136 if (!AtEnd()) 15137 current_value_ = ParamType(*current1_, *current2_, *current3_, 15138 *current4_, *current5_, *current6_, *current7_, *current8_, 15139 *current9_); 15140 } 15141 bool AtEnd() const { 15142 // We must report iterator past the end of the range when either of the 15143 // component iterators has reached the end of its range. 15144 return 15145 current1_ == end1_ || 15146 current2_ == end2_ || 15147 current3_ == end3_ || 15148 current4_ == end4_ || 15149 current5_ == end5_ || 15150 current6_ == end6_ || 15151 current7_ == end7_ || 15152 current8_ == end8_ || 15153 current9_ == end9_; 15154 } 15155 15156 // No implementation - assignment is unsupported. 15157 void operator=(const Iterator& other); 15158 15159 const ParamGeneratorInterface<ParamType>* const base_; 15160 // begin[i]_ and end[i]_ define the i-th range that Iterator traverses. 15161 // current[i]_ is the actual traversing iterator. 15162 const typename ParamGenerator<T1>::iterator begin1_; 15163 const typename ParamGenerator<T1>::iterator end1_; 15164 typename ParamGenerator<T1>::iterator current1_; 15165 const typename ParamGenerator<T2>::iterator begin2_; 15166 const typename ParamGenerator<T2>::iterator end2_; 15167 typename ParamGenerator<T2>::iterator current2_; 15168 const typename ParamGenerator<T3>::iterator begin3_; 15169 const typename ParamGenerator<T3>::iterator end3_; 15170 typename ParamGenerator<T3>::iterator current3_; 15171 const typename ParamGenerator<T4>::iterator begin4_; 15172 const typename ParamGenerator<T4>::iterator end4_; 15173 typename ParamGenerator<T4>::iterator current4_; 15174 const typename ParamGenerator<T5>::iterator begin5_; 15175 const typename ParamGenerator<T5>::iterator end5_; 15176 typename ParamGenerator<T5>::iterator current5_; 15177 const typename ParamGenerator<T6>::iterator begin6_; 15178 const typename ParamGenerator<T6>::iterator end6_; 15179 typename ParamGenerator<T6>::iterator current6_; 15180 const typename ParamGenerator<T7>::iterator begin7_; 15181 const typename ParamGenerator<T7>::iterator end7_; 15182 typename ParamGenerator<T7>::iterator current7_; 15183 const typename ParamGenerator<T8>::iterator begin8_; 15184 const typename ParamGenerator<T8>::iterator end8_; 15185 typename ParamGenerator<T8>::iterator current8_; 15186 const typename ParamGenerator<T9>::iterator begin9_; 15187 const typename ParamGenerator<T9>::iterator end9_; 15188 typename ParamGenerator<T9>::iterator current9_; 15189 ParamType current_value_; 15190 }; // class CartesianProductGenerator9::Iterator 15191 15192 // No implementation - assignment is unsupported. 15193 void operator=(const CartesianProductGenerator9& other); 15194 15195 const ParamGenerator<T1> g1_; 15196 const ParamGenerator<T2> g2_; 15197 const ParamGenerator<T3> g3_; 15198 const ParamGenerator<T4> g4_; 15199 const ParamGenerator<T5> g5_; 15200 const ParamGenerator<T6> g6_; 15201 const ParamGenerator<T7> g7_; 15202 const ParamGenerator<T8> g8_; 15203 const ParamGenerator<T9> g9_; 15204 }; // class CartesianProductGenerator9 15205 15206 15207 template <typename T1, typename T2, typename T3, typename T4, typename T5, 15208 typename T6, typename T7, typename T8, typename T9, typename T10> 15209 class CartesianProductGenerator10 15210 : public ParamGeneratorInterface< ::stdt::tuple<T1, T2, T3, T4, T5, T6, 15211 T7, T8, T9, T10> > { 15212 public: 15213 typedef ::stdt::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> ParamType; 15214 15215 CartesianProductGenerator10(const ParamGenerator<T1>& g1, 15216 const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3, 15217 const ParamGenerator<T4>& g4, const ParamGenerator<T5>& g5, 15218 const ParamGenerator<T6>& g6, const ParamGenerator<T7>& g7, 15219 const ParamGenerator<T8>& g8, const ParamGenerator<T9>& g9, 15220 const ParamGenerator<T10>& g10) 15221 : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7), g8_(g8), 15222 g9_(g9), g10_(g10) {} 15223 virtual ~CartesianProductGenerator10() {} 15224 15225 virtual ParamIteratorInterface<ParamType>* Begin() const { 15226 return new Iterator(this, g1_, g1_.begin(), g2_, g2_.begin(), g3_, 15227 g3_.begin(), g4_, g4_.begin(), g5_, g5_.begin(), g6_, g6_.begin(), g7_, 15228 g7_.begin(), g8_, g8_.begin(), g9_, g9_.begin(), g10_, g10_.begin()); 15229 } 15230 virtual ParamIteratorInterface<ParamType>* End() const { 15231 return new Iterator(this, g1_, g1_.end(), g2_, g2_.end(), g3_, g3_.end(), 15232 g4_, g4_.end(), g5_, g5_.end(), g6_, g6_.end(), g7_, g7_.end(), g8_, 15233 g8_.end(), g9_, g9_.end(), g10_, g10_.end()); 15234 } 15235 15236 private: 15237 class Iterator : public ParamIteratorInterface<ParamType> { 15238 public: 15239 Iterator(const ParamGeneratorInterface<ParamType>* base, 15240 const ParamGenerator<T1>& g1, 15241 const typename ParamGenerator<T1>::iterator& current1, 15242 const ParamGenerator<T2>& g2, 15243 const typename ParamGenerator<T2>::iterator& current2, 15244 const ParamGenerator<T3>& g3, 15245 const typename ParamGenerator<T3>::iterator& current3, 15246 const ParamGenerator<T4>& g4, 15247 const typename ParamGenerator<T4>::iterator& current4, 15248 const ParamGenerator<T5>& g5, 15249 const typename ParamGenerator<T5>::iterator& current5, 15250 const ParamGenerator<T6>& g6, 15251 const typename ParamGenerator<T6>::iterator& current6, 15252 const ParamGenerator<T7>& g7, 15253 const typename ParamGenerator<T7>::iterator& current7, 15254 const ParamGenerator<T8>& g8, 15255 const typename ParamGenerator<T8>::iterator& current8, 15256 const ParamGenerator<T9>& g9, 15257 const typename ParamGenerator<T9>::iterator& current9, 15258 const ParamGenerator<T10>& g10, 15259 const typename ParamGenerator<T10>::iterator& current10) 15260 : base_(base), 15261 begin1_(g1.begin()), end1_(g1.end()), current1_(current1), 15262 begin2_(g2.begin()), end2_(g2.end()), current2_(current2), 15263 begin3_(g3.begin()), end3_(g3.end()), current3_(current3), 15264 begin4_(g4.begin()), end4_(g4.end()), current4_(current4), 15265 begin5_(g5.begin()), end5_(g5.end()), current5_(current5), 15266 begin6_(g6.begin()), end6_(g6.end()), current6_(current6), 15267 begin7_(g7.begin()), end7_(g7.end()), current7_(current7), 15268 begin8_(g8.begin()), end8_(g8.end()), current8_(current8), 15269 begin9_(g9.begin()), end9_(g9.end()), current9_(current9), 15270 begin10_(g10.begin()), end10_(g10.end()), current10_(current10) { 15271 ComputeCurrentValue(); 15272 } 15273 virtual ~Iterator() {} 15274 15275 virtual const ParamGeneratorInterface<ParamType>* BaseGenerator() const { 15276 return base_; 15277 } 15278 // Advance should not be called on beyond-of-range iterators 15279 // so no component iterators must be beyond end of range, either. 15280 virtual void Advance() { 15281 assert(!AtEnd()); 15282 ++current10_; 15283 if (current10_ == end10_) { 15284 current10_ = begin10_; 15285 ++current9_; 15286 } 15287 if (current9_ == end9_) { 15288 current9_ = begin9_; 15289 ++current8_; 15290 } 15291 if (current8_ == end8_) { 15292 current8_ = begin8_; 15293 ++current7_; 15294 } 15295 if (current7_ == end7_) { 15296 current7_ = begin7_; 15297 ++current6_; 15298 } 15299 if (current6_ == end6_) { 15300 current6_ = begin6_; 15301 ++current5_; 15302 } 15303 if (current5_ == end5_) { 15304 current5_ = begin5_; 15305 ++current4_; 15306 } 15307 if (current4_ == end4_) { 15308 current4_ = begin4_; 15309 ++current3_; 15310 } 15311 if (current3_ == end3_) { 15312 current3_ = begin3_; 15313 ++current2_; 15314 } 15315 if (current2_ == end2_) { 15316 current2_ = begin2_; 15317 ++current1_; 15318 } 15319 ComputeCurrentValue(); 15320 } 15321 virtual ParamIteratorInterface<ParamType>* Clone() const { 15322 return new Iterator(*this); 15323 } 15324 virtual const ParamType* Current() const { return ¤t_value_; } 15325 virtual bool Equals(const ParamIteratorInterface<ParamType>& other) const { 15326 // Having the same base generator guarantees that the other 15327 // iterator is of the same type and we can downcast. 15328 GTEST_CHECK_(BaseGenerator() == other.BaseGenerator()) 15329 << "The program attempted to compare iterators " 15330 << "from different generators." << std::endl; 15331 const Iterator* typed_other = 15332 CheckedDowncastToActualType<const Iterator>(&other); 15333 // We must report iterators equal if they both point beyond their 15334 // respective ranges. That can happen in a variety of fashions, 15335 // so we have to consult AtEnd(). 15336 return (AtEnd() && typed_other->AtEnd()) || 15337 ( 15338 current1_ == typed_other->current1_ && 15339 current2_ == typed_other->current2_ && 15340 current3_ == typed_other->current3_ && 15341 current4_ == typed_other->current4_ && 15342 current5_ == typed_other->current5_ && 15343 current6_ == typed_other->current6_ && 15344 current7_ == typed_other->current7_ && 15345 current8_ == typed_other->current8_ && 15346 current9_ == typed_other->current9_ && 15347 current10_ == typed_other->current10_); 15348 } 15349 15350 private: 15351 Iterator(const Iterator& other) 15352 : base_(other.base_), 15353 begin1_(other.begin1_), 15354 end1_(other.end1_), 15355 current1_(other.current1_), 15356 begin2_(other.begin2_), 15357 end2_(other.end2_), 15358 current2_(other.current2_), 15359 begin3_(other.begin3_), 15360 end3_(other.end3_), 15361 current3_(other.current3_), 15362 begin4_(other.begin4_), 15363 end4_(other.end4_), 15364 current4_(other.current4_), 15365 begin5_(other.begin5_), 15366 end5_(other.end5_), 15367 current5_(other.current5_), 15368 begin6_(other.begin6_), 15369 end6_(other.end6_), 15370 current6_(other.current6_), 15371 begin7_(other.begin7_), 15372 end7_(other.end7_), 15373 current7_(other.current7_), 15374 begin8_(other.begin8_), 15375 end8_(other.end8_), 15376 current8_(other.current8_), 15377 begin9_(other.begin9_), 15378 end9_(other.end9_), 15379 current9_(other.current9_), 15380 begin10_(other.begin10_), 15381 end10_(other.end10_), 15382 current10_(other.current10_) { 15383 ComputeCurrentValue(); 15384 } 15385 15386 void ComputeCurrentValue() { 15387 if (!AtEnd()) 15388 current_value_ = ParamType(*current1_, *current2_, *current3_, 15389 *current4_, *current5_, *current6_, *current7_, *current8_, 15390 *current9_, *current10_); 15391 } 15392 bool AtEnd() const { 15393 // We must report iterator past the end of the range when either of the 15394 // component iterators has reached the end of its range. 15395 return 15396 current1_ == end1_ || 15397 current2_ == end2_ || 15398 current3_ == end3_ || 15399 current4_ == end4_ || 15400 current5_ == end5_ || 15401 current6_ == end6_ || 15402 current7_ == end7_ || 15403 current8_ == end8_ || 15404 current9_ == end9_ || 15405 current10_ == end10_; 15406 } 15407 15408 // No implementation - assignment is unsupported. 15409 void operator=(const Iterator& other); 15410 15411 const ParamGeneratorInterface<ParamType>* const base_; 15412 // begin[i]_ and end[i]_ define the i-th range that Iterator traverses. 15413 // current[i]_ is the actual traversing iterator. 15414 const typename ParamGenerator<T1>::iterator begin1_; 15415 const typename ParamGenerator<T1>::iterator end1_; 15416 typename ParamGenerator<T1>::iterator current1_; 15417 const typename ParamGenerator<T2>::iterator begin2_; 15418 const typename ParamGenerator<T2>::iterator end2_; 15419 typename ParamGenerator<T2>::iterator current2_; 15420 const typename ParamGenerator<T3>::iterator begin3_; 15421 const typename ParamGenerator<T3>::iterator end3_; 15422 typename ParamGenerator<T3>::iterator current3_; 15423 const typename ParamGenerator<T4>::iterator begin4_; 15424 const typename ParamGenerator<T4>::iterator end4_; 15425 typename ParamGenerator<T4>::iterator current4_; 15426 const typename ParamGenerator<T5>::iterator begin5_; 15427 const typename ParamGenerator<T5>::iterator end5_; 15428 typename ParamGenerator<T5>::iterator current5_; 15429 const typename ParamGenerator<T6>::iterator begin6_; 15430 const typename ParamGenerator<T6>::iterator end6_; 15431 typename ParamGenerator<T6>::iterator current6_; 15432 const typename ParamGenerator<T7>::iterator begin7_; 15433 const typename ParamGenerator<T7>::iterator end7_; 15434 typename ParamGenerator<T7>::iterator current7_; 15435 const typename ParamGenerator<T8>::iterator begin8_; 15436 const typename ParamGenerator<T8>::iterator end8_; 15437 typename ParamGenerator<T8>::iterator current8_; 15438 const typename ParamGenerator<T9>::iterator begin9_; 15439 const typename ParamGenerator<T9>::iterator end9_; 15440 typename ParamGenerator<T9>::iterator current9_; 15441 const typename ParamGenerator<T10>::iterator begin10_; 15442 const typename ParamGenerator<T10>::iterator end10_; 15443 typename ParamGenerator<T10>::iterator current10_; 15444 ParamType current_value_; 15445 }; // class CartesianProductGenerator10::Iterator 15446 15447 // No implementation - assignment is unsupported. 15448 void operator=(const CartesianProductGenerator10& other); 15449 15450 const ParamGenerator<T1> g1_; 15451 const ParamGenerator<T2> g2_; 15452 const ParamGenerator<T3> g3_; 15453 const ParamGenerator<T4> g4_; 15454 const ParamGenerator<T5> g5_; 15455 const ParamGenerator<T6> g6_; 15456 const ParamGenerator<T7> g7_; 15457 const ParamGenerator<T8> g8_; 15458 const ParamGenerator<T9> g9_; 15459 const ParamGenerator<T10> g10_; 15460 }; // class CartesianProductGenerator10 15461 15462 15463 // INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. 15464 // 15465 // Helper classes providing Combine() with polymorphic features. They allow 15466 // casting CartesianProductGeneratorN<T> to ParamGenerator<U> if T is 15467 // convertible to U. 15468 // 15469 template <class Generator1, class Generator2> 15470 class CartesianProductHolder2 { 15471 public: 15472 CartesianProductHolder2(const Generator1& g1, const Generator2& g2) 15473 : g1_(g1), g2_(g2) {} 15474 template <typename T1, typename T2> 15475 operator ParamGenerator< ::stdt::tuple<T1, T2> >() const { 15476 return ParamGenerator< ::stdt::tuple<T1, T2> >( 15477 new CartesianProductGenerator2<T1, T2>( 15478 static_cast<ParamGenerator<T1> >(g1_), 15479 static_cast<ParamGenerator<T2> >(g2_))); 15480 } 15481 15482 private: 15483 // No implementation - assignment is unsupported. 15484 void operator=(const CartesianProductHolder2& other); 15485 15486 const Generator1 g1_; 15487 const Generator2 g2_; 15488 }; // class CartesianProductHolder2 15489 15490 template <class Generator1, class Generator2, class Generator3> 15491 class CartesianProductHolder3 { 15492 public: 15493 CartesianProductHolder3(const Generator1& g1, const Generator2& g2, 15494 const Generator3& g3) 15495 : g1_(g1), g2_(g2), g3_(g3) {} 15496 template <typename T1, typename T2, typename T3> 15497 operator ParamGenerator< ::stdt::tuple<T1, T2, T3> >() const { 15498 return ParamGenerator< ::stdt::tuple<T1, T2, T3> >( 15499 new CartesianProductGenerator3<T1, T2, T3>( 15500 static_cast<ParamGenerator<T1> >(g1_), 15501 static_cast<ParamGenerator<T2> >(g2_), 15502 static_cast<ParamGenerator<T3> >(g3_))); 15503 } 15504 15505 private: 15506 // No implementation - assignment is unsupported. 15507 void operator=(const CartesianProductHolder3& other); 15508 15509 const Generator1 g1_; 15510 const Generator2 g2_; 15511 const Generator3 g3_; 15512 }; // class CartesianProductHolder3 15513 15514 template <class Generator1, class Generator2, class Generator3, 15515 class Generator4> 15516 class CartesianProductHolder4 { 15517 public: 15518 CartesianProductHolder4(const Generator1& g1, const Generator2& g2, 15519 const Generator3& g3, const Generator4& g4) 15520 : g1_(g1), g2_(g2), g3_(g3), g4_(g4) {} 15521 template <typename T1, typename T2, typename T3, typename T4> 15522 operator ParamGenerator< ::stdt::tuple<T1, T2, T3, T4> >() const { 15523 return ParamGenerator< ::stdt::tuple<T1, T2, T3, T4> >( 15524 new CartesianProductGenerator4<T1, T2, T3, T4>( 15525 static_cast<ParamGenerator<T1> >(g1_), 15526 static_cast<ParamGenerator<T2> >(g2_), 15527 static_cast<ParamGenerator<T3> >(g3_), 15528 static_cast<ParamGenerator<T4> >(g4_))); 15529 } 15530 15531 private: 15532 // No implementation - assignment is unsupported. 15533 void operator=(const CartesianProductHolder4& other); 15534 15535 const Generator1 g1_; 15536 const Generator2 g2_; 15537 const Generator3 g3_; 15538 const Generator4 g4_; 15539 }; // class CartesianProductHolder4 15540 15541 template <class Generator1, class Generator2, class Generator3, 15542 class Generator4, class Generator5> 15543 class CartesianProductHolder5 { 15544 public: 15545 CartesianProductHolder5(const Generator1& g1, const Generator2& g2, 15546 const Generator3& g3, const Generator4& g4, const Generator5& g5) 15547 : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5) {} 15548 template <typename T1, typename T2, typename T3, typename T4, typename T5> 15549 operator ParamGenerator< ::stdt::tuple<T1, T2, T3, T4, T5> >() const { 15550 return ParamGenerator< ::stdt::tuple<T1, T2, T3, T4, T5> >( 15551 new CartesianProductGenerator5<T1, T2, T3, T4, T5>( 15552 static_cast<ParamGenerator<T1> >(g1_), 15553 static_cast<ParamGenerator<T2> >(g2_), 15554 static_cast<ParamGenerator<T3> >(g3_), 15555 static_cast<ParamGenerator<T4> >(g4_), 15556 static_cast<ParamGenerator<T5> >(g5_))); 15557 } 15558 15559 private: 15560 // No implementation - assignment is unsupported. 15561 void operator=(const CartesianProductHolder5& other); 15562 15563 const Generator1 g1_; 15564 const Generator2 g2_; 15565 const Generator3 g3_; 15566 const Generator4 g4_; 15567 const Generator5 g5_; 15568 }; // class CartesianProductHolder5 15569 15570 template <class Generator1, class Generator2, class Generator3, 15571 class Generator4, class Generator5, class Generator6> 15572 class CartesianProductHolder6 { 15573 public: 15574 CartesianProductHolder6(const Generator1& g1, const Generator2& g2, 15575 const Generator3& g3, const Generator4& g4, const Generator5& g5, 15576 const Generator6& g6) 15577 : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6) {} 15578 template <typename T1, typename T2, typename T3, typename T4, typename T5, 15579 typename T6> 15580 operator ParamGenerator< ::stdt::tuple<T1, T2, T3, T4, T5, T6> >() const { 15581 return ParamGenerator< ::stdt::tuple<T1, T2, T3, T4, T5, T6> >( 15582 new CartesianProductGenerator6<T1, T2, T3, T4, T5, T6>( 15583 static_cast<ParamGenerator<T1> >(g1_), 15584 static_cast<ParamGenerator<T2> >(g2_), 15585 static_cast<ParamGenerator<T3> >(g3_), 15586 static_cast<ParamGenerator<T4> >(g4_), 15587 static_cast<ParamGenerator<T5> >(g5_), 15588 static_cast<ParamGenerator<T6> >(g6_))); 15589 } 15590 15591 private: 15592 // No implementation - assignment is unsupported. 15593 void operator=(const CartesianProductHolder6& other); 15594 15595 const Generator1 g1_; 15596 const Generator2 g2_; 15597 const Generator3 g3_; 15598 const Generator4 g4_; 15599 const Generator5 g5_; 15600 const Generator6 g6_; 15601 }; // class CartesianProductHolder6 15602 15603 template <class Generator1, class Generator2, class Generator3, 15604 class Generator4, class Generator5, class Generator6, class Generator7> 15605 class CartesianProductHolder7 { 15606 public: 15607 CartesianProductHolder7(const Generator1& g1, const Generator2& g2, 15608 const Generator3& g3, const Generator4& g4, const Generator5& g5, 15609 const Generator6& g6, const Generator7& g7) 15610 : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7) {} 15611 template <typename T1, typename T2, typename T3, typename T4, typename T5, 15612 typename T6, typename T7> 15613 operator ParamGenerator< ::stdt::tuple<T1, T2, T3, T4, T5, T6, 15614 T7> >() const { 15615 return ParamGenerator< ::stdt::tuple<T1, T2, T3, T4, T5, T6, T7> >( 15616 new CartesianProductGenerator7<T1, T2, T3, T4, T5, T6, T7>( 15617 static_cast<ParamGenerator<T1> >(g1_), 15618 static_cast<ParamGenerator<T2> >(g2_), 15619 static_cast<ParamGenerator<T3> >(g3_), 15620 static_cast<ParamGenerator<T4> >(g4_), 15621 static_cast<ParamGenerator<T5> >(g5_), 15622 static_cast<ParamGenerator<T6> >(g6_), 15623 static_cast<ParamGenerator<T7> >(g7_))); 15624 } 15625 15626 private: 15627 // No implementation - assignment is unsupported. 15628 void operator=(const CartesianProductHolder7& other); 15629 15630 const Generator1 g1_; 15631 const Generator2 g2_; 15632 const Generator3 g3_; 15633 const Generator4 g4_; 15634 const Generator5 g5_; 15635 const Generator6 g6_; 15636 const Generator7 g7_; 15637 }; // class CartesianProductHolder7 15638 15639 template <class Generator1, class Generator2, class Generator3, 15640 class Generator4, class Generator5, class Generator6, class Generator7, 15641 class Generator8> 15642 class CartesianProductHolder8 { 15643 public: 15644 CartesianProductHolder8(const Generator1& g1, const Generator2& g2, 15645 const Generator3& g3, const Generator4& g4, const Generator5& g5, 15646 const Generator6& g6, const Generator7& g7, const Generator8& g8) 15647 : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7), 15648 g8_(g8) {} 15649 template <typename T1, typename T2, typename T3, typename T4, typename T5, 15650 typename T6, typename T7, typename T8> 15651 operator ParamGenerator< ::stdt::tuple<T1, T2, T3, T4, T5, T6, T7, 15652 T8> >() const { 15653 return ParamGenerator< ::stdt::tuple<T1, T2, T3, T4, T5, T6, T7, T8> >( 15654 new CartesianProductGenerator8<T1, T2, T3, T4, T5, T6, T7, T8>( 15655 static_cast<ParamGenerator<T1> >(g1_), 15656 static_cast<ParamGenerator<T2> >(g2_), 15657 static_cast<ParamGenerator<T3> >(g3_), 15658 static_cast<ParamGenerator<T4> >(g4_), 15659 static_cast<ParamGenerator<T5> >(g5_), 15660 static_cast<ParamGenerator<T6> >(g6_), 15661 static_cast<ParamGenerator<T7> >(g7_), 15662 static_cast<ParamGenerator<T8> >(g8_))); 15663 } 15664 15665 private: 15666 // No implementation - assignment is unsupported. 15667 void operator=(const CartesianProductHolder8& other); 15668 15669 const Generator1 g1_; 15670 const Generator2 g2_; 15671 const Generator3 g3_; 15672 const Generator4 g4_; 15673 const Generator5 g5_; 15674 const Generator6 g6_; 15675 const Generator7 g7_; 15676 const Generator8 g8_; 15677 }; // class CartesianProductHolder8 15678 15679 template <class Generator1, class Generator2, class Generator3, 15680 class Generator4, class Generator5, class Generator6, class Generator7, 15681 class Generator8, class Generator9> 15682 class CartesianProductHolder9 { 15683 public: 15684 CartesianProductHolder9(const Generator1& g1, const Generator2& g2, 15685 const Generator3& g3, const Generator4& g4, const Generator5& g5, 15686 const Generator6& g6, const Generator7& g7, const Generator8& g8, 15687 const Generator9& g9) 15688 : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7), g8_(g8), 15689 g9_(g9) {} 15690 template <typename T1, typename T2, typename T3, typename T4, typename T5, 15691 typename T6, typename T7, typename T8, typename T9> 15692 operator ParamGenerator< ::stdt::tuple<T1, T2, T3, T4, T5, T6, T7, T8, 15693 T9> >() const { 15694 return ParamGenerator< ::stdt::tuple<T1, T2, T3, T4, T5, T6, T7, T8, 15695 T9> >( 15696 new CartesianProductGenerator9<T1, T2, T3, T4, T5, T6, T7, T8, T9>( 15697 static_cast<ParamGenerator<T1> >(g1_), 15698 static_cast<ParamGenerator<T2> >(g2_), 15699 static_cast<ParamGenerator<T3> >(g3_), 15700 static_cast<ParamGenerator<T4> >(g4_), 15701 static_cast<ParamGenerator<T5> >(g5_), 15702 static_cast<ParamGenerator<T6> >(g6_), 15703 static_cast<ParamGenerator<T7> >(g7_), 15704 static_cast<ParamGenerator<T8> >(g8_), 15705 static_cast<ParamGenerator<T9> >(g9_))); 15706 } 15707 15708 private: 15709 // No implementation - assignment is unsupported. 15710 void operator=(const CartesianProductHolder9& other); 15711 15712 const Generator1 g1_; 15713 const Generator2 g2_; 15714 const Generator3 g3_; 15715 const Generator4 g4_; 15716 const Generator5 g5_; 15717 const Generator6 g6_; 15718 const Generator7 g7_; 15719 const Generator8 g8_; 15720 const Generator9 g9_; 15721 }; // class CartesianProductHolder9 15722 15723 template <class Generator1, class Generator2, class Generator3, 15724 class Generator4, class Generator5, class Generator6, class Generator7, 15725 class Generator8, class Generator9, class Generator10> 15726 class CartesianProductHolder10 { 15727 public: 15728 CartesianProductHolder10(const Generator1& g1, const Generator2& g2, 15729 const Generator3& g3, const Generator4& g4, const Generator5& g5, 15730 const Generator6& g6, const Generator7& g7, const Generator8& g8, 15731 const Generator9& g9, const Generator10& g10) 15732 : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7), g8_(g8), 15733 g9_(g9), g10_(g10) {} 15734 template <typename T1, typename T2, typename T3, typename T4, typename T5, 15735 typename T6, typename T7, typename T8, typename T9, typename T10> 15736 operator ParamGenerator< ::stdt::tuple<T1, T2, T3, T4, T5, T6, T7, T8, 15737 T9, T10> >() const { 15738 return ParamGenerator< ::stdt::tuple<T1, T2, T3, T4, T5, T6, T7, T8, 15739 T9, T10> >( 15740 new CartesianProductGenerator10<T1, T2, T3, T4, T5, T6, T7, T8, T9, 15741 T10>( 15742 static_cast<ParamGenerator<T1> >(g1_), 15743 static_cast<ParamGenerator<T2> >(g2_), 15744 static_cast<ParamGenerator<T3> >(g3_), 15745 static_cast<ParamGenerator<T4> >(g4_), 15746 static_cast<ParamGenerator<T5> >(g5_), 15747 static_cast<ParamGenerator<T6> >(g6_), 15748 static_cast<ParamGenerator<T7> >(g7_), 15749 static_cast<ParamGenerator<T8> >(g8_), 15750 static_cast<ParamGenerator<T9> >(g9_), 15751 static_cast<ParamGenerator<T10> >(g10_))); 15752 } 15753 15754 private: 15755 // No implementation - assignment is unsupported. 15756 void operator=(const CartesianProductHolder10& other); 15757 15758 const Generator1 g1_; 15759 const Generator2 g2_; 15760 const Generator3 g3_; 15761 const Generator4 g4_; 15762 const Generator5 g5_; 15763 const Generator6 g6_; 15764 const Generator7 g7_; 15765 const Generator8 g8_; 15766 const Generator9 g9_; 15767 const Generator10 g10_; 15768 }; // class CartesianProductHolder10 15769 15770 # endif // GTEST_HAS_COMBINE 15771 15772 } // namespace internal 15773 } // namespace testing 15774 15775 #endif // GTEST_HAS_PARAM_TEST 15776 15777 #endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_GENERATED_H_ 15778 15779 #if GTEST_HAS_PARAM_TEST 15780 15781 namespace testing { 15782 15783 // Functions producing parameter generators. 15784 // 15785 // Google Test uses these generators to produce parameters for value- 15786 // parameterized tests. When a parameterized test case is instantiated 15787 // with a particular generator, Google Test creates and runs tests 15788 // for each element in the sequence produced by the generator. 15789 // 15790 // In the following sample, tests from test case FooTest are instantiated 15791 // each three times with parameter values 3, 5, and 8: 15792 // 15793 // class FooTest : public TestWithParam<int> { ... }; 15794 // 15795 // TEST_P(FooTest, TestThis) { 15796 // } 15797 // TEST_P(FooTest, TestThat) { 15798 // } 15799 // INSTANTIATE_TEST_CASE_P(TestSequence, FooTest, Values(3, 5, 8)); 15800 // 15801 15802 // Range() returns generators providing sequences of values in a range. 15803 // 15804 // Synopsis: 15805 // Range(start, end) 15806 // - returns a generator producing a sequence of values {start, start+1, 15807 // start+2, ..., }. 15808 // Range(start, end, step) 15809 // - returns a generator producing a sequence of values {start, start+step, 15810 // start+step+step, ..., }. 15811 // Notes: 15812 // * The generated sequences never include end. For example, Range(1, 5) 15813 // returns a generator producing a sequence {1, 2, 3, 4}. Range(1, 9, 2) 15814 // returns a generator producing {1, 3, 5, 7}. 15815 // * start and end must have the same type. That type may be any integral or 15816 // floating-point type or a user defined type satisfying these conditions: 15817 // * It must be assignable (have operator=() defined). 15818 // * It must have operator+() (operator+(int-compatible type) for 15819 // two-operand version). 15820 // * It must have operator<() defined. 15821 // Elements in the resulting sequences will also have that type. 15822 // * Condition start < end must be satisfied in order for resulting sequences 15823 // to contain any elements. 15824 // 15825 template <typename T, typename IncrementT> 15826 internal::ParamGenerator<T> Range(T start, T end, IncrementT step) { 15827 return internal::ParamGenerator<T>( 15828 new internal::RangeGenerator<T, IncrementT>(start, end, step)); 15829 } 15830 15831 template <typename T> 15832 internal::ParamGenerator<T> Range(T start, T end) { 15833 return Range(start, end, 1); 15834 } 15835 15836 // ValuesIn() function allows generation of tests with parameters coming from 15837 // a container. 15838 // 15839 // Synopsis: 15840 // ValuesIn(const T (&array)[N]) 15841 // - returns a generator producing sequences with elements from 15842 // a C-style array. 15843 // ValuesIn(const Container& container) 15844 // - returns a generator producing sequences with elements from 15845 // an STL-style container. 15846 // ValuesIn(Iterator begin, Iterator end) 15847 // - returns a generator producing sequences with elements from 15848 // a range [begin, end) defined by a pair of STL-style iterators. These 15849 // iterators can also be plain C pointers. 15850 // 15851 // Please note that ValuesIn copies the values from the containers 15852 // passed in and keeps them to generate tests in RUN_ALL_TESTS(). 15853 // 15854 // Examples: 15855 // 15856 // This instantiates tests from test case StringTest 15857 // each with C-string values of "foo", "bar", and "baz": 15858 // 15859 // const char* strings[] = {"foo", "bar", "baz"}; 15860 // INSTANTIATE_TEST_CASE_P(StringSequence, SrtingTest, ValuesIn(strings)); 15861 // 15862 // This instantiates tests from test case StlStringTest 15863 // each with STL strings with values "a" and "b": 15864 // 15865 // ::std::vector< ::std::string> GetParameterStrings() { 15866 // ::std::vector< ::std::string> v; 15867 // v.push_back("a"); 15868 // v.push_back("b"); 15869 // return v; 15870 // } 15871 // 15872 // INSTANTIATE_TEST_CASE_P(CharSequence, 15873 // StlStringTest, 15874 // ValuesIn(GetParameterStrings())); 15875 // 15876 // 15877 // This will also instantiate tests from CharTest 15878 // each with parameter values 'a' and 'b': 15879 // 15880 // ::std::list<char> GetParameterChars() { 15881 // ::std::list<char> list; 15882 // list.push_back('a'); 15883 // list.push_back('b'); 15884 // return list; 15885 // } 15886 // ::std::list<char> l = GetParameterChars(); 15887 // INSTANTIATE_TEST_CASE_P(CharSequence2, 15888 // CharTest, 15889 // ValuesIn(l.begin(), l.end())); 15890 // 15891 template <typename ForwardIterator> 15892 internal::ParamGenerator< 15893 typename ::testing::internal::IteratorTraits<ForwardIterator>::value_type> 15894 ValuesIn(ForwardIterator begin, ForwardIterator end) { 15895 typedef typename ::testing::internal::IteratorTraits<ForwardIterator> 15896 ::value_type ParamType; 15897 return internal::ParamGenerator<ParamType>( 15898 new internal::ValuesInIteratorRangeGenerator<ParamType>(begin, end)); 15899 } 15900 15901 template <typename T, size_t N> 15902 internal::ParamGenerator<T> ValuesIn(const T(&array)[N]) { 15903 return ValuesIn(array, array + N); 15904 } 15905 15906 template <class Container> 15907 internal::ParamGenerator<typename Container::value_type> ValuesIn( 15908 const Container& container) { 15909 return ValuesIn(container.begin(), container.end()); 15910 } 15911 15912 // Values() allows generating tests from explicitly specified list of 15913 // parameters. 15914 // 15915 // Synopsis: 15916 // Values(T v1, T v2, ..., T vN) 15917 // - returns a generator producing sequences with elements v1, v2, ..., vN. 15918 // 15919 // For example, this instantiates tests from test case BarTest each 15920 // with values "one", "two", and "three": 15921 // 15922 // INSTANTIATE_TEST_CASE_P(NumSequence, BarTest, Values("one", "two", "three")); 15923 // 15924 // This instantiates tests from test case BazTest each with values 1, 2, 3.5. 15925 // The exact type of values will depend on the type of parameter in BazTest. 15926 // 15927 // INSTANTIATE_TEST_CASE_P(FloatingNumbers, BazTest, Values(1, 2, 3.5)); 15928 // 15929 // Currently, Values() supports from 1 to 50 parameters. 15930 // 15931 template <typename T1> 15932 internal::ValueArray1<T1> Values(T1 v1) { 15933 return internal::ValueArray1<T1>(v1); 15934 } 15935 15936 template <typename T1, typename T2> 15937 internal::ValueArray2<T1, T2> Values(T1 v1, T2 v2) { 15938 return internal::ValueArray2<T1, T2>(v1, v2); 15939 } 15940 15941 template <typename T1, typename T2, typename T3> 15942 internal::ValueArray3<T1, T2, T3> Values(T1 v1, T2 v2, T3 v3) { 15943 return internal::ValueArray3<T1, T2, T3>(v1, v2, v3); 15944 } 15945 15946 template <typename T1, typename T2, typename T3, typename T4> 15947 internal::ValueArray4<T1, T2, T3, T4> Values(T1 v1, T2 v2, T3 v3, T4 v4) { 15948 return internal::ValueArray4<T1, T2, T3, T4>(v1, v2, v3, v4); 15949 } 15950 15951 template <typename T1, typename T2, typename T3, typename T4, typename T5> 15952 internal::ValueArray5<T1, T2, T3, T4, T5> Values(T1 v1, T2 v2, T3 v3, T4 v4, 15953 T5 v5) { 15954 return internal::ValueArray5<T1, T2, T3, T4, T5>(v1, v2, v3, v4, v5); 15955 } 15956 15957 template <typename T1, typename T2, typename T3, typename T4, typename T5, 15958 typename T6> 15959 internal::ValueArray6<T1, T2, T3, T4, T5, T6> Values(T1 v1, T2 v2, T3 v3, 15960 T4 v4, T5 v5, T6 v6) { 15961 return internal::ValueArray6<T1, T2, T3, T4, T5, T6>(v1, v2, v3, v4, v5, v6); 15962 } 15963 15964 template <typename T1, typename T2, typename T3, typename T4, typename T5, 15965 typename T6, typename T7> 15966 internal::ValueArray7<T1, T2, T3, T4, T5, T6, T7> Values(T1 v1, T2 v2, T3 v3, 15967 T4 v4, T5 v5, T6 v6, T7 v7) { 15968 return internal::ValueArray7<T1, T2, T3, T4, T5, T6, T7>(v1, v2, v3, v4, v5, 15969 v6, v7); 15970 } 15971 15972 template <typename T1, typename T2, typename T3, typename T4, typename T5, 15973 typename T6, typename T7, typename T8> 15974 internal::ValueArray8<T1, T2, T3, T4, T5, T6, T7, T8> Values(T1 v1, T2 v2, 15975 T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8) { 15976 return internal::ValueArray8<T1, T2, T3, T4, T5, T6, T7, T8>(v1, v2, v3, v4, 15977 v5, v6, v7, v8); 15978 } 15979 15980 template <typename T1, typename T2, typename T3, typename T4, typename T5, 15981 typename T6, typename T7, typename T8, typename T9> 15982 internal::ValueArray9<T1, T2, T3, T4, T5, T6, T7, T8, T9> Values(T1 v1, T2 v2, 15983 T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9) { 15984 return internal::ValueArray9<T1, T2, T3, T4, T5, T6, T7, T8, T9>(v1, v2, v3, 15985 v4, v5, v6, v7, v8, v9); 15986 } 15987 15988 template <typename T1, typename T2, typename T3, typename T4, typename T5, 15989 typename T6, typename T7, typename T8, typename T9, typename T10> 15990 internal::ValueArray10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> Values(T1 v1, 15991 T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10) { 15992 return internal::ValueArray10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(v1, 15993 v2, v3, v4, v5, v6, v7, v8, v9, v10); 15994 } 15995 15996 template <typename T1, typename T2, typename T3, typename T4, typename T5, 15997 typename T6, typename T7, typename T8, typename T9, typename T10, 15998 typename T11> 15999 internal::ValueArray11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, 16000 T11> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, 16001 T10 v10, T11 v11) { 16002 return internal::ValueArray11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, 16003 T11>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11); 16004 } 16005 16006 template <typename T1, typename T2, typename T3, typename T4, typename T5, 16007 typename T6, typename T7, typename T8, typename T9, typename T10, 16008 typename T11, typename T12> 16009 internal::ValueArray12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, 16010 T12> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, 16011 T10 v10, T11 v11, T12 v12) { 16012 return internal::ValueArray12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, 16013 T12>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12); 16014 } 16015 16016 template <typename T1, typename T2, typename T3, typename T4, typename T5, 16017 typename T6, typename T7, typename T8, typename T9, typename T10, 16018 typename T11, typename T12, typename T13> 16019 internal::ValueArray13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, 16020 T13> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, 16021 T10 v10, T11 v11, T12 v12, T13 v13) { 16022 return internal::ValueArray13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, 16023 T12, T13>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13); 16024 } 16025 16026 template <typename T1, typename T2, typename T3, typename T4, typename T5, 16027 typename T6, typename T7, typename T8, typename T9, typename T10, 16028 typename T11, typename T12, typename T13, typename T14> 16029 internal::ValueArray14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 16030 T14> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, 16031 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14) { 16032 return internal::ValueArray14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, 16033 T12, T13, T14>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, 16034 v14); 16035 } 16036 16037 template <typename T1, typename T2, typename T3, typename T4, typename T5, 16038 typename T6, typename T7, typename T8, typename T9, typename T10, 16039 typename T11, typename T12, typename T13, typename T14, typename T15> 16040 internal::ValueArray15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 16041 T14, T15> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, 16042 T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15) { 16043 return internal::ValueArray15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, 16044 T12, T13, T14, T15>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, 16045 v13, v14, v15); 16046 } 16047 16048 template <typename T1, typename T2, typename T3, typename T4, typename T5, 16049 typename T6, typename T7, typename T8, typename T9, typename T10, 16050 typename T11, typename T12, typename T13, typename T14, typename T15, 16051 typename T16> 16052 internal::ValueArray16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 16053 T14, T15, T16> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, 16054 T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, 16055 T16 v16) { 16056 return internal::ValueArray16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, 16057 T12, T13, T14, T15, T16>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, 16058 v12, v13, v14, v15, v16); 16059 } 16060 16061 template <typename T1, typename T2, typename T3, typename T4, typename T5, 16062 typename T6, typename T7, typename T8, typename T9, typename T10, 16063 typename T11, typename T12, typename T13, typename T14, typename T15, 16064 typename T16, typename T17> 16065 internal::ValueArray17<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 16066 T14, T15, T16, T17> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, 16067 T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, 16068 T16 v16, T17 v17) { 16069 return internal::ValueArray17<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, 16070 T12, T13, T14, T15, T16, T17>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, 16071 v11, v12, v13, v14, v15, v16, v17); 16072 } 16073 16074 template <typename T1, typename T2, typename T3, typename T4, typename T5, 16075 typename T6, typename T7, typename T8, typename T9, typename T10, 16076 typename T11, typename T12, typename T13, typename T14, typename T15, 16077 typename T16, typename T17, typename T18> 16078 internal::ValueArray18<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 16079 T14, T15, T16, T17, T18> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, 16080 T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, 16081 T16 v16, T17 v17, T18 v18) { 16082 return internal::ValueArray18<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, 16083 T12, T13, T14, T15, T16, T17, T18>(v1, v2, v3, v4, v5, v6, v7, v8, v9, 16084 v10, v11, v12, v13, v14, v15, v16, v17, v18); 16085 } 16086 16087 template <typename T1, typename T2, typename T3, typename T4, typename T5, 16088 typename T6, typename T7, typename T8, typename T9, typename T10, 16089 typename T11, typename T12, typename T13, typename T14, typename T15, 16090 typename T16, typename T17, typename T18, typename T19> 16091 internal::ValueArray19<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 16092 T14, T15, T16, T17, T18, T19> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, 16093 T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, 16094 T15 v15, T16 v16, T17 v17, T18 v18, T19 v19) { 16095 return internal::ValueArray19<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, 16096 T12, T13, T14, T15, T16, T17, T18, T19>(v1, v2, v3, v4, v5, v6, v7, v8, 16097 v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19); 16098 } 16099 16100 template <typename T1, typename T2, typename T3, typename T4, typename T5, 16101 typename T6, typename T7, typename T8, typename T9, typename T10, 16102 typename T11, typename T12, typename T13, typename T14, typename T15, 16103 typename T16, typename T17, typename T18, typename T19, typename T20> 16104 internal::ValueArray20<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 16105 T14, T15, T16, T17, T18, T19, T20> Values(T1 v1, T2 v2, T3 v3, T4 v4, 16106 T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, 16107 T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20) { 16108 return internal::ValueArray20<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, 16109 T12, T13, T14, T15, T16, T17, T18, T19, T20>(v1, v2, v3, v4, v5, v6, v7, 16110 v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20); 16111 } 16112 16113 template <typename T1, typename T2, typename T3, typename T4, typename T5, 16114 typename T6, typename T7, typename T8, typename T9, typename T10, 16115 typename T11, typename T12, typename T13, typename T14, typename T15, 16116 typename T16, typename T17, typename T18, typename T19, typename T20, 16117 typename T21> 16118 internal::ValueArray21<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 16119 T14, T15, T16, T17, T18, T19, T20, T21> Values(T1 v1, T2 v2, T3 v3, T4 v4, 16120 T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, 16121 T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21) { 16122 return internal::ValueArray21<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, 16123 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21>(v1, v2, v3, v4, v5, v6, 16124 v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21); 16125 } 16126 16127 template <typename T1, typename T2, typename T3, typename T4, typename T5, 16128 typename T6, typename T7, typename T8, typename T9, typename T10, 16129 typename T11, typename T12, typename T13, typename T14, typename T15, 16130 typename T16, typename T17, typename T18, typename T19, typename T20, 16131 typename T21, typename T22> 16132 internal::ValueArray22<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 16133 T14, T15, T16, T17, T18, T19, T20, T21, T22> Values(T1 v1, T2 v2, T3 v3, 16134 T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, 16135 T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, 16136 T21 v21, T22 v22) { 16137 return internal::ValueArray22<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, 16138 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22>(v1, v2, v3, v4, 16139 v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, 16140 v20, v21, v22); 16141 } 16142 16143 template <typename T1, typename T2, typename T3, typename T4, typename T5, 16144 typename T6, typename T7, typename T8, typename T9, typename T10, 16145 typename T11, typename T12, typename T13, typename T14, typename T15, 16146 typename T16, typename T17, typename T18, typename T19, typename T20, 16147 typename T21, typename T22, typename T23> 16148 internal::ValueArray23<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 16149 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23> Values(T1 v1, T2 v2, 16150 T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, 16151 T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, 16152 T21 v21, T22 v22, T23 v23) { 16153 return internal::ValueArray23<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, 16154 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23>(v1, v2, v3, 16155 v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, 16156 v20, v21, v22, v23); 16157 } 16158 16159 template <typename T1, typename T2, typename T3, typename T4, typename T5, 16160 typename T6, typename T7, typename T8, typename T9, typename T10, 16161 typename T11, typename T12, typename T13, typename T14, typename T15, 16162 typename T16, typename T17, typename T18, typename T19, typename T20, 16163 typename T21, typename T22, typename T23, typename T24> 16164 internal::ValueArray24<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 16165 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24> Values(T1 v1, T2 v2, 16166 T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, 16167 T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, 16168 T21 v21, T22 v22, T23 v23, T24 v24) { 16169 return internal::ValueArray24<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, 16170 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24>(v1, v2, 16171 v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, 16172 v19, v20, v21, v22, v23, v24); 16173 } 16174 16175 template <typename T1, typename T2, typename T3, typename T4, typename T5, 16176 typename T6, typename T7, typename T8, typename T9, typename T10, 16177 typename T11, typename T12, typename T13, typename T14, typename T15, 16178 typename T16, typename T17, typename T18, typename T19, typename T20, 16179 typename T21, typename T22, typename T23, typename T24, typename T25> 16180 internal::ValueArray25<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 16181 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25> Values(T1 v1, 16182 T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, 16183 T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, 16184 T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25) { 16185 return internal::ValueArray25<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, 16186 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25>(v1, 16187 v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, 16188 v18, v19, v20, v21, v22, v23, v24, v25); 16189 } 16190 16191 template <typename T1, typename T2, typename T3, typename T4, typename T5, 16192 typename T6, typename T7, typename T8, typename T9, typename T10, 16193 typename T11, typename T12, typename T13, typename T14, typename T15, 16194 typename T16, typename T17, typename T18, typename T19, typename T20, 16195 typename T21, typename T22, typename T23, typename T24, typename T25, 16196 typename T26> 16197 internal::ValueArray26<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 16198 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, 16199 T26> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, 16200 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, 16201 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, 16202 T26 v26) { 16203 return internal::ValueArray26<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, 16204 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, 16205 T26>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, 16206 v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26); 16207 } 16208 16209 template <typename T1, typename T2, typename T3, typename T4, typename T5, 16210 typename T6, typename T7, typename T8, typename T9, typename T10, 16211 typename T11, typename T12, typename T13, typename T14, typename T15, 16212 typename T16, typename T17, typename T18, typename T19, typename T20, 16213 typename T21, typename T22, typename T23, typename T24, typename T25, 16214 typename T26, typename T27> 16215 internal::ValueArray27<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 16216 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, 16217 T27> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, 16218 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, 16219 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, 16220 T26 v26, T27 v27) { 16221 return internal::ValueArray27<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, 16222 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, 16223 T26, T27>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, 16224 v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27); 16225 } 16226 16227 template <typename T1, typename T2, typename T3, typename T4, typename T5, 16228 typename T6, typename T7, typename T8, typename T9, typename T10, 16229 typename T11, typename T12, typename T13, typename T14, typename T15, 16230 typename T16, typename T17, typename T18, typename T19, typename T20, 16231 typename T21, typename T22, typename T23, typename T24, typename T25, 16232 typename T26, typename T27, typename T28> 16233 internal::ValueArray28<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 16234 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, 16235 T28> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, 16236 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, 16237 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, 16238 T26 v26, T27 v27, T28 v28) { 16239 return internal::ValueArray28<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, 16240 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, 16241 T26, T27, T28>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, 16242 v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, 16243 v28); 16244 } 16245 16246 template <typename T1, typename T2, typename T3, typename T4, typename T5, 16247 typename T6, typename T7, typename T8, typename T9, typename T10, 16248 typename T11, typename T12, typename T13, typename T14, typename T15, 16249 typename T16, typename T17, typename T18, typename T19, typename T20, 16250 typename T21, typename T22, typename T23, typename T24, typename T25, 16251 typename T26, typename T27, typename T28, typename T29> 16252 internal::ValueArray29<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 16253 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, 16254 T29> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, 16255 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, 16256 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, 16257 T26 v26, T27 v27, T28 v28, T29 v29) { 16258 return internal::ValueArray29<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, 16259 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, 16260 T26, T27, T28, T29>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, 16261 v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, 16262 v27, v28, v29); 16263 } 16264 16265 template <typename T1, typename T2, typename T3, typename T4, typename T5, 16266 typename T6, typename T7, typename T8, typename T9, typename T10, 16267 typename T11, typename T12, typename T13, typename T14, typename T15, 16268 typename T16, typename T17, typename T18, typename T19, typename T20, 16269 typename T21, typename T22, typename T23, typename T24, typename T25, 16270 typename T26, typename T27, typename T28, typename T29, typename T30> 16271 internal::ValueArray30<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 16272 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, 16273 T29, T30> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, 16274 T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, 16275 T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, 16276 T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30) { 16277 return internal::ValueArray30<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, 16278 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, 16279 T26, T27, T28, T29, T30>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, 16280 v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, 16281 v26, v27, v28, v29, v30); 16282 } 16283 16284 template <typename T1, typename T2, typename T3, typename T4, typename T5, 16285 typename T6, typename T7, typename T8, typename T9, typename T10, 16286 typename T11, typename T12, typename T13, typename T14, typename T15, 16287 typename T16, typename T17, typename T18, typename T19, typename T20, 16288 typename T21, typename T22, typename T23, typename T24, typename T25, 16289 typename T26, typename T27, typename T28, typename T29, typename T30, 16290 typename T31> 16291 internal::ValueArray31<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 16292 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, 16293 T29, T30, T31> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, 16294 T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, 16295 T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, 16296 T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31) { 16297 return internal::ValueArray31<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, 16298 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, 16299 T26, T27, T28, T29, T30, T31>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, 16300 v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, 16301 v25, v26, v27, v28, v29, v30, v31); 16302 } 16303 16304 template <typename T1, typename T2, typename T3, typename T4, typename T5, 16305 typename T6, typename T7, typename T8, typename T9, typename T10, 16306 typename T11, typename T12, typename T13, typename T14, typename T15, 16307 typename T16, typename T17, typename T18, typename T19, typename T20, 16308 typename T21, typename T22, typename T23, typename T24, typename T25, 16309 typename T26, typename T27, typename T28, typename T29, typename T30, 16310 typename T31, typename T32> 16311 internal::ValueArray32<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 16312 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, 16313 T29, T30, T31, T32> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, 16314 T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, 16315 T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, 16316 T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, 16317 T32 v32) { 16318 return internal::ValueArray32<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, 16319 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, 16320 T26, T27, T28, T29, T30, T31, T32>(v1, v2, v3, v4, v5, v6, v7, v8, v9, 16321 v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, 16322 v24, v25, v26, v27, v28, v29, v30, v31, v32); 16323 } 16324 16325 template <typename T1, typename T2, typename T3, typename T4, typename T5, 16326 typename T6, typename T7, typename T8, typename T9, typename T10, 16327 typename T11, typename T12, typename T13, typename T14, typename T15, 16328 typename T16, typename T17, typename T18, typename T19, typename T20, 16329 typename T21, typename T22, typename T23, typename T24, typename T25, 16330 typename T26, typename T27, typename T28, typename T29, typename T30, 16331 typename T31, typename T32, typename T33> 16332 internal::ValueArray33<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 16333 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, 16334 T29, T30, T31, T32, T33> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, 16335 T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, 16336 T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, 16337 T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, 16338 T32 v32, T33 v33) { 16339 return internal::ValueArray33<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, 16340 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, 16341 T26, T27, T28, T29, T30, T31, T32, T33>(v1, v2, v3, v4, v5, v6, v7, v8, 16342 v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, 16343 v24, v25, v26, v27, v28, v29, v30, v31, v32, v33); 16344 } 16345 16346 template <typename T1, typename T2, typename T3, typename T4, typename T5, 16347 typename T6, typename T7, typename T8, typename T9, typename T10, 16348 typename T11, typename T12, typename T13, typename T14, typename T15, 16349 typename T16, typename T17, typename T18, typename T19, typename T20, 16350 typename T21, typename T22, typename T23, typename T24, typename T25, 16351 typename T26, typename T27, typename T28, typename T29, typename T30, 16352 typename T31, typename T32, typename T33, typename T34> 16353 internal::ValueArray34<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 16354 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, 16355 T29, T30, T31, T32, T33, T34> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, 16356 T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, 16357 T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, 16358 T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, 16359 T31 v31, T32 v32, T33 v33, T34 v34) { 16360 return internal::ValueArray34<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, 16361 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, 16362 T26, T27, T28, T29, T30, T31, T32, T33, T34>(v1, v2, v3, v4, v5, v6, v7, 16363 v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, 16364 v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34); 16365 } 16366 16367 template <typename T1, typename T2, typename T3, typename T4, typename T5, 16368 typename T6, typename T7, typename T8, typename T9, typename T10, 16369 typename T11, typename T12, typename T13, typename T14, typename T15, 16370 typename T16, typename T17, typename T18, typename T19, typename T20, 16371 typename T21, typename T22, typename T23, typename T24, typename T25, 16372 typename T26, typename T27, typename T28, typename T29, typename T30, 16373 typename T31, typename T32, typename T33, typename T34, typename T35> 16374 internal::ValueArray35<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 16375 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, 16376 T29, T30, T31, T32, T33, T34, T35> Values(T1 v1, T2 v2, T3 v3, T4 v4, 16377 T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, 16378 T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, 16379 T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, 16380 T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35) { 16381 return internal::ValueArray35<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, 16382 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, 16383 T26, T27, T28, T29, T30, T31, T32, T33, T34, T35>(v1, v2, v3, v4, v5, v6, 16384 v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, 16385 v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35); 16386 } 16387 16388 template <typename T1, typename T2, typename T3, typename T4, typename T5, 16389 typename T6, typename T7, typename T8, typename T9, typename T10, 16390 typename T11, typename T12, typename T13, typename T14, typename T15, 16391 typename T16, typename T17, typename T18, typename T19, typename T20, 16392 typename T21, typename T22, typename T23, typename T24, typename T25, 16393 typename T26, typename T27, typename T28, typename T29, typename T30, 16394 typename T31, typename T32, typename T33, typename T34, typename T35, 16395 typename T36> 16396 internal::ValueArray36<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 16397 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, 16398 T29, T30, T31, T32, T33, T34, T35, T36> Values(T1 v1, T2 v2, T3 v3, T4 v4, 16399 T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, 16400 T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, 16401 T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, 16402 T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36) { 16403 return internal::ValueArray36<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, 16404 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, 16405 T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36>(v1, v2, v3, v4, 16406 v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, 16407 v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, 16408 v34, v35, v36); 16409 } 16410 16411 template <typename T1, typename T2, typename T3, typename T4, typename T5, 16412 typename T6, typename T7, typename T8, typename T9, typename T10, 16413 typename T11, typename T12, typename T13, typename T14, typename T15, 16414 typename T16, typename T17, typename T18, typename T19, typename T20, 16415 typename T21, typename T22, typename T23, typename T24, typename T25, 16416 typename T26, typename T27, typename T28, typename T29, typename T30, 16417 typename T31, typename T32, typename T33, typename T34, typename T35, 16418 typename T36, typename T37> 16419 internal::ValueArray37<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 16420 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, 16421 T29, T30, T31, T32, T33, T34, T35, T36, T37> Values(T1 v1, T2 v2, T3 v3, 16422 T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, 16423 T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, 16424 T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, 16425 T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, 16426 T37 v37) { 16427 return internal::ValueArray37<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, 16428 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, 16429 T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37>(v1, v2, v3, 16430 v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, 16431 v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, 16432 v34, v35, v36, v37); 16433 } 16434 16435 template <typename T1, typename T2, typename T3, typename T4, typename T5, 16436 typename T6, typename T7, typename T8, typename T9, typename T10, 16437 typename T11, typename T12, typename T13, typename T14, typename T15, 16438 typename T16, typename T17, typename T18, typename T19, typename T20, 16439 typename T21, typename T22, typename T23, typename T24, typename T25, 16440 typename T26, typename T27, typename T28, typename T29, typename T30, 16441 typename T31, typename T32, typename T33, typename T34, typename T35, 16442 typename T36, typename T37, typename T38> 16443 internal::ValueArray38<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 16444 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, 16445 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38> Values(T1 v1, T2 v2, 16446 T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, 16447 T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, 16448 T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, 16449 T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, 16450 T37 v37, T38 v38) { 16451 return internal::ValueArray38<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, 16452 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, 16453 T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38>(v1, v2, 16454 v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, 16455 v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, 16456 v33, v34, v35, v36, v37, v38); 16457 } 16458 16459 template <typename T1, typename T2, typename T3, typename T4, typename T5, 16460 typename T6, typename T7, typename T8, typename T9, typename T10, 16461 typename T11, typename T12, typename T13, typename T14, typename T15, 16462 typename T16, typename T17, typename T18, typename T19, typename T20, 16463 typename T21, typename T22, typename T23, typename T24, typename T25, 16464 typename T26, typename T27, typename T28, typename T29, typename T30, 16465 typename T31, typename T32, typename T33, typename T34, typename T35, 16466 typename T36, typename T37, typename T38, typename T39> 16467 internal::ValueArray39<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 16468 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, 16469 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39> Values(T1 v1, T2 v2, 16470 T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, 16471 T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, 16472 T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, 16473 T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, 16474 T37 v37, T38 v38, T39 v39) { 16475 return internal::ValueArray39<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, 16476 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, 16477 T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39>(v1, 16478 v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, 16479 v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, 16480 v32, v33, v34, v35, v36, v37, v38, v39); 16481 } 16482 16483 template <typename T1, typename T2, typename T3, typename T4, typename T5, 16484 typename T6, typename T7, typename T8, typename T9, typename T10, 16485 typename T11, typename T12, typename T13, typename T14, typename T15, 16486 typename T16, typename T17, typename T18, typename T19, typename T20, 16487 typename T21, typename T22, typename T23, typename T24, typename T25, 16488 typename T26, typename T27, typename T28, typename T29, typename T30, 16489 typename T31, typename T32, typename T33, typename T34, typename T35, 16490 typename T36, typename T37, typename T38, typename T39, typename T40> 16491 internal::ValueArray40<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 16492 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, 16493 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40> Values(T1 v1, 16494 T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, 16495 T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, 16496 T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, 16497 T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, 16498 T36 v36, T37 v37, T38 v38, T39 v39, T40 v40) { 16499 return internal::ValueArray40<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, 16500 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, 16501 T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, 16502 T40>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, 16503 v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, 16504 v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40); 16505 } 16506 16507 template <typename T1, typename T2, typename T3, typename T4, typename T5, 16508 typename T6, typename T7, typename T8, typename T9, typename T10, 16509 typename T11, typename T12, typename T13, typename T14, typename T15, 16510 typename T16, typename T17, typename T18, typename T19, typename T20, 16511 typename T21, typename T22, typename T23, typename T24, typename T25, 16512 typename T26, typename T27, typename T28, typename T29, typename T30, 16513 typename T31, typename T32, typename T33, typename T34, typename T35, 16514 typename T36, typename T37, typename T38, typename T39, typename T40, 16515 typename T41> 16516 internal::ValueArray41<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 16517 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, 16518 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, 16519 T41> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, 16520 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, 16521 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, 16522 T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, 16523 T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41) { 16524 return internal::ValueArray41<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, 16525 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, 16526 T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, 16527 T40, T41>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, 16528 v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, 16529 v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41); 16530 } 16531 16532 template <typename T1, typename T2, typename T3, typename T4, typename T5, 16533 typename T6, typename T7, typename T8, typename T9, typename T10, 16534 typename T11, typename T12, typename T13, typename T14, typename T15, 16535 typename T16, typename T17, typename T18, typename T19, typename T20, 16536 typename T21, typename T22, typename T23, typename T24, typename T25, 16537 typename T26, typename T27, typename T28, typename T29, typename T30, 16538 typename T31, typename T32, typename T33, typename T34, typename T35, 16539 typename T36, typename T37, typename T38, typename T39, typename T40, 16540 typename T41, typename T42> 16541 internal::ValueArray42<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 16542 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, 16543 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, 16544 T42> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, 16545 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, 16546 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, 16547 T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, 16548 T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41, 16549 T42 v42) { 16550 return internal::ValueArray42<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, 16551 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, 16552 T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, 16553 T40, T41, T42>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, 16554 v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, 16555 v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, 16556 v42); 16557 } 16558 16559 template <typename T1, typename T2, typename T3, typename T4, typename T5, 16560 typename T6, typename T7, typename T8, typename T9, typename T10, 16561 typename T11, typename T12, typename T13, typename T14, typename T15, 16562 typename T16, typename T17, typename T18, typename T19, typename T20, 16563 typename T21, typename T22, typename T23, typename T24, typename T25, 16564 typename T26, typename T27, typename T28, typename T29, typename T30, 16565 typename T31, typename T32, typename T33, typename T34, typename T35, 16566 typename T36, typename T37, typename T38, typename T39, typename T40, 16567 typename T41, typename T42, typename T43> 16568 internal::ValueArray43<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 16569 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, 16570 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, 16571 T43> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, 16572 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, 16573 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, 16574 T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, 16575 T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41, 16576 T42 v42, T43 v43) { 16577 return internal::ValueArray43<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, 16578 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, 16579 T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, 16580 T40, T41, T42, T43>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, 16581 v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, 16582 v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, 16583 v41, v42, v43); 16584 } 16585 16586 template <typename T1, typename T2, typename T3, typename T4, typename T5, 16587 typename T6, typename T7, typename T8, typename T9, typename T10, 16588 typename T11, typename T12, typename T13, typename T14, typename T15, 16589 typename T16, typename T17, typename T18, typename T19, typename T20, 16590 typename T21, typename T22, typename T23, typename T24, typename T25, 16591 typename T26, typename T27, typename T28, typename T29, typename T30, 16592 typename T31, typename T32, typename T33, typename T34, typename T35, 16593 typename T36, typename T37, typename T38, typename T39, typename T40, 16594 typename T41, typename T42, typename T43, typename T44> 16595 internal::ValueArray44<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 16596 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, 16597 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, 16598 T44> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, 16599 T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, T17 v17, 16600 T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, T25 v25, 16601 T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, T33 v33, 16602 T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, T41 v41, 16603 T42 v42, T43 v43, T44 v44) { 16604 return internal::ValueArray44<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, 16605 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, 16606 T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, 16607 T40, T41, T42, T43, T44>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, 16608 v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, 16609 v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, 16610 v40, v41, v42, v43, v44); 16611 } 16612 16613 template <typename T1, typename T2, typename T3, typename T4, typename T5, 16614 typename T6, typename T7, typename T8, typename T9, typename T10, 16615 typename T11, typename T12, typename T13, typename T14, typename T15, 16616 typename T16, typename T17, typename T18, typename T19, typename T20, 16617 typename T21, typename T22, typename T23, typename T24, typename T25, 16618 typename T26, typename T27, typename T28, typename T29, typename T30, 16619 typename T31, typename T32, typename T33, typename T34, typename T35, 16620 typename T36, typename T37, typename T38, typename T39, typename T40, 16621 typename T41, typename T42, typename T43, typename T44, typename T45> 16622 internal::ValueArray45<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 16623 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, 16624 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, 16625 T44, T45> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8, 16626 T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, T16 v16, 16627 T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, T24 v24, 16628 T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, T32 v32, 16629 T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, T40 v40, 16630 T41 v41, T42 v42, T43 v43, T44 v44, T45 v45) { 16631 return internal::ValueArray45<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, 16632 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, 16633 T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, 16634 T40, T41, T42, T43, T44, T45>(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, 16635 v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, 16636 v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, 16637 v39, v40, v41, v42, v43, v44, v45); 16638 } 16639 16640 template <typename T1, typename T2, typename T3, typename T4, typename T5, 16641 typename T6, typename T7, typename T8, typename T9, typename T10, 16642 typename T11, typename T12, typename T13, typename T14, typename T15, 16643 typename T16, typename T17, typename T18, typename T19, typename T20, 16644 typename T21, typename T22, typename T23, typename T24, typename T25, 16645 typename T26, typename T27, typename T28, typename T29, typename T30, 16646 typename T31, typename T32, typename T33, typename T34, typename T35, 16647 typename T36, typename T37, typename T38, typename T39, typename T40, 16648 typename T41, typename T42, typename T43, typename T44, typename T45, 16649 typename T46> 16650 internal::ValueArray46<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 16651 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, 16652 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, 16653 T44, T45, T46> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, 16654 T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, 16655 T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, 16656 T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, 16657 T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, 16658 T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45, T46 v46) { 16659 return internal::ValueArray46<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, 16660 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, 16661 T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, 16662 T40, T41, T42, T43, T44, T45, T46>(v1, v2, v3, v4, v5, v6, v7, v8, v9, 16663 v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, 16664 v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, 16665 v38, v39, v40, v41, v42, v43, v44, v45, v46); 16666 } 16667 16668 template <typename T1, typename T2, typename T3, typename T4, typename T5, 16669 typename T6, typename T7, typename T8, typename T9, typename T10, 16670 typename T11, typename T12, typename T13, typename T14, typename T15, 16671 typename T16, typename T17, typename T18, typename T19, typename T20, 16672 typename T21, typename T22, typename T23, typename T24, typename T25, 16673 typename T26, typename T27, typename T28, typename T29, typename T30, 16674 typename T31, typename T32, typename T33, typename T34, typename T35, 16675 typename T36, typename T37, typename T38, typename T39, typename T40, 16676 typename T41, typename T42, typename T43, typename T44, typename T45, 16677 typename T46, typename T47> 16678 internal::ValueArray47<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 16679 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, 16680 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, 16681 T44, T45, T46, T47> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, 16682 T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, 16683 T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, 16684 T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, 16685 T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, 16686 T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47) { 16687 return internal::ValueArray47<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, 16688 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, 16689 T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, 16690 T40, T41, T42, T43, T44, T45, T46, T47>(v1, v2, v3, v4, v5, v6, v7, v8, 16691 v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, 16692 v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, 16693 v38, v39, v40, v41, v42, v43, v44, v45, v46, v47); 16694 } 16695 16696 template <typename T1, typename T2, typename T3, typename T4, typename T5, 16697 typename T6, typename T7, typename T8, typename T9, typename T10, 16698 typename T11, typename T12, typename T13, typename T14, typename T15, 16699 typename T16, typename T17, typename T18, typename T19, typename T20, 16700 typename T21, typename T22, typename T23, typename T24, typename T25, 16701 typename T26, typename T27, typename T28, typename T29, typename T30, 16702 typename T31, typename T32, typename T33, typename T34, typename T35, 16703 typename T36, typename T37, typename T38, typename T39, typename T40, 16704 typename T41, typename T42, typename T43, typename T44, typename T45, 16705 typename T46, typename T47, typename T48> 16706 internal::ValueArray48<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 16707 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, 16708 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, 16709 T44, T45, T46, T47, T48> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, 16710 T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, T15 v15, 16711 T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, T23 v23, 16712 T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, T31 v31, 16713 T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, T39 v39, 16714 T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, T47 v47, 16715 T48 v48) { 16716 return internal::ValueArray48<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, 16717 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, 16718 T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, 16719 T40, T41, T42, T43, T44, T45, T46, T47, T48>(v1, v2, v3, v4, v5, v6, v7, 16720 v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, 16721 v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, 16722 v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48); 16723 } 16724 16725 template <typename T1, typename T2, typename T3, typename T4, typename T5, 16726 typename T6, typename T7, typename T8, typename T9, typename T10, 16727 typename T11, typename T12, typename T13, typename T14, typename T15, 16728 typename T16, typename T17, typename T18, typename T19, typename T20, 16729 typename T21, typename T22, typename T23, typename T24, typename T25, 16730 typename T26, typename T27, typename T28, typename T29, typename T30, 16731 typename T31, typename T32, typename T33, typename T34, typename T35, 16732 typename T36, typename T37, typename T38, typename T39, typename T40, 16733 typename T41, typename T42, typename T43, typename T44, typename T45, 16734 typename T46, typename T47, typename T48, typename T49> 16735 internal::ValueArray49<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 16736 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, 16737 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, 16738 T44, T45, T46, T47, T48, T49> Values(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, 16739 T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, T14 v14, 16740 T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, T22 v22, 16741 T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, T30 v30, 16742 T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, T38 v38, 16743 T39 v39, T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45, T46 v46, 16744 T47 v47, T48 v48, T49 v49) { 16745 return internal::ValueArray49<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, 16746 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, 16747 T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, 16748 T40, T41, T42, T43, T44, T45, T46, T47, T48, T49>(v1, v2, v3, v4, v5, v6, 16749 v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, 16750 v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, 16751 v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49); 16752 } 16753 16754 template <typename T1, typename T2, typename T3, typename T4, typename T5, 16755 typename T6, typename T7, typename T8, typename T9, typename T10, 16756 typename T11, typename T12, typename T13, typename T14, typename T15, 16757 typename T16, typename T17, typename T18, typename T19, typename T20, 16758 typename T21, typename T22, typename T23, typename T24, typename T25, 16759 typename T26, typename T27, typename T28, typename T29, typename T30, 16760 typename T31, typename T32, typename T33, typename T34, typename T35, 16761 typename T36, typename T37, typename T38, typename T39, typename T40, 16762 typename T41, typename T42, typename T43, typename T44, typename T45, 16763 typename T46, typename T47, typename T48, typename T49, typename T50> 16764 internal::ValueArray50<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, 16765 T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, 16766 T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, T40, T41, T42, T43, 16767 T44, T45, T46, T47, T48, T49, T50> Values(T1 v1, T2 v2, T3 v3, T4 v4, 16768 T5 v5, T6 v6, T7 v7, T8 v8, T9 v9, T10 v10, T11 v11, T12 v12, T13 v13, 16769 T14 v14, T15 v15, T16 v16, T17 v17, T18 v18, T19 v19, T20 v20, T21 v21, 16770 T22 v22, T23 v23, T24 v24, T25 v25, T26 v26, T27 v27, T28 v28, T29 v29, 16771 T30 v30, T31 v31, T32 v32, T33 v33, T34 v34, T35 v35, T36 v36, T37 v37, 16772 T38 v38, T39 v39, T40 v40, T41 v41, T42 v42, T43 v43, T44 v44, T45 v45, 16773 T46 v46, T47 v47, T48 v48, T49 v49, T50 v50) { 16774 return internal::ValueArray50<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, 16775 T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, 16776 T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39, 16777 T40, T41, T42, T43, T44, T45, T46, T47, T48, T49, T50>(v1, v2, v3, v4, 16778 v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, 16779 v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, 16780 v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, 16781 v48, v49, v50); 16782 } 16783 16784 // Bool() allows generating tests with parameters in a set of (false, true). 16785 // 16786 // Synopsis: 16787 // Bool() 16788 // - returns a generator producing sequences with elements {false, true}. 16789 // 16790 // It is useful when testing code that depends on Boolean flags. Combinations 16791 // of multiple flags can be tested when several Bool()'s are combined using 16792 // Combine() function. 16793 // 16794 // In the following example all tests in the test case FlagDependentTest 16795 // will be instantiated twice with parameters false and true. 16796 // 16797 // class FlagDependentTest : public testing::TestWithParam<bool> { 16798 // virtual void SetUp() { 16799 // external_flag = GetParam(); 16800 // } 16801 // } 16802 // INSTANTIATE_TEST_CASE_P(BoolSequence, FlagDependentTest, Bool()); 16803 // 16804 inline internal::ParamGenerator<bool> Bool() { 16805 return Values(false, true); 16806 } 16807 16808 # if GTEST_HAS_COMBINE 16809 // Combine() allows the user to combine two or more sequences to produce 16810 // values of a Cartesian product of those sequences' elements. 16811 // 16812 // Synopsis: 16813 // Combine(gen1, gen2, ..., genN) 16814 // - returns a generator producing sequences with elements coming from 16815 // the Cartesian product of elements from the sequences generated by 16816 // gen1, gen2, ..., genN. The sequence elements will have a type of 16817 // tuple<T1, T2, ..., TN> where T1, T2, ..., TN are the types 16818 // of elements from sequences produces by gen1, gen2, ..., genN. 16819 // 16820 // Combine can have up to 10 arguments. This number is currently limited 16821 // by the maximum number of elements in the tuple implementation used by Google 16822 // Test. 16823 // 16824 // Example: 16825 // 16826 // This will instantiate tests in test case AnimalTest each one with 16827 // the parameter values tuple("cat", BLACK), tuple("cat", WHITE), 16828 // tuple("dog", BLACK), and tuple("dog", WHITE): 16829 // 16830 // enum Color { BLACK, GRAY, WHITE }; 16831 // class AnimalTest 16832 // : public testing::TestWithParam<tuple<const char*, Color> > {...}; 16833 // 16834 // TEST_P(AnimalTest, AnimalLooksNice) {...} 16835 // 16836 // INSTANTIATE_TEST_CASE_P(AnimalVariations, AnimalTest, 16837 // Combine(Values("cat", "dog"), 16838 // Values(BLACK, WHITE))); 16839 // 16840 // This will instantiate tests in FlagDependentTest with all variations of two 16841 // Boolean flags: 16842 // 16843 // class FlagDependentTest 16844 // : public testing::TestWithParam<tuple<bool, bool> > { 16845 // virtual void SetUp() { 16846 // // Assigns external_flag_1 and external_flag_2 values from the tuple. 16847 // tie(external_flag_1, external_flag_2) = GetParam(); 16848 // } 16849 // }; 16850 // 16851 // TEST_P(FlagDependentTest, TestFeature1) { 16852 // // Test your code using external_flag_1 and external_flag_2 here. 16853 // } 16854 // INSTANTIATE_TEST_CASE_P(TwoBoolSequence, FlagDependentTest, 16855 // Combine(Bool(), Bool())); 16856 // 16857 template <typename Generator1, typename Generator2> 16858 internal::CartesianProductHolder2<Generator1, Generator2> Combine( 16859 const Generator1& g1, const Generator2& g2) { 16860 return internal::CartesianProductHolder2<Generator1, Generator2>( 16861 g1, g2); 16862 } 16863 16864 template <typename Generator1, typename Generator2, typename Generator3> 16865 internal::CartesianProductHolder3<Generator1, Generator2, Generator3> Combine( 16866 const Generator1& g1, const Generator2& g2, const Generator3& g3) { 16867 return internal::CartesianProductHolder3<Generator1, Generator2, Generator3>( 16868 g1, g2, g3); 16869 } 16870 16871 template <typename Generator1, typename Generator2, typename Generator3, 16872 typename Generator4> 16873 internal::CartesianProductHolder4<Generator1, Generator2, Generator3, 16874 Generator4> Combine( 16875 const Generator1& g1, const Generator2& g2, const Generator3& g3, 16876 const Generator4& g4) { 16877 return internal::CartesianProductHolder4<Generator1, Generator2, Generator3, 16878 Generator4>( 16879 g1, g2, g3, g4); 16880 } 16881 16882 template <typename Generator1, typename Generator2, typename Generator3, 16883 typename Generator4, typename Generator5> 16884 internal::CartesianProductHolder5<Generator1, Generator2, Generator3, 16885 Generator4, Generator5> Combine( 16886 const Generator1& g1, const Generator2& g2, const Generator3& g3, 16887 const Generator4& g4, const Generator5& g5) { 16888 return internal::CartesianProductHolder5<Generator1, Generator2, Generator3, 16889 Generator4, Generator5>( 16890 g1, g2, g3, g4, g5); 16891 } 16892 16893 template <typename Generator1, typename Generator2, typename Generator3, 16894 typename Generator4, typename Generator5, typename Generator6> 16895 internal::CartesianProductHolder6<Generator1, Generator2, Generator3, 16896 Generator4, Generator5, Generator6> Combine( 16897 const Generator1& g1, const Generator2& g2, const Generator3& g3, 16898 const Generator4& g4, const Generator5& g5, const Generator6& g6) { 16899 return internal::CartesianProductHolder6<Generator1, Generator2, Generator3, 16900 Generator4, Generator5, Generator6>( 16901 g1, g2, g3, g4, g5, g6); 16902 } 16903 16904 template <typename Generator1, typename Generator2, typename Generator3, 16905 typename Generator4, typename Generator5, typename Generator6, 16906 typename Generator7> 16907 internal::CartesianProductHolder7<Generator1, Generator2, Generator3, 16908 Generator4, Generator5, Generator6, Generator7> Combine( 16909 const Generator1& g1, const Generator2& g2, const Generator3& g3, 16910 const Generator4& g4, const Generator5& g5, const Generator6& g6, 16911 const Generator7& g7) { 16912 return internal::CartesianProductHolder7<Generator1, Generator2, Generator3, 16913 Generator4, Generator5, Generator6, Generator7>( 16914 g1, g2, g3, g4, g5, g6, g7); 16915 } 16916 16917 template <typename Generator1, typename Generator2, typename Generator3, 16918 typename Generator4, typename Generator5, typename Generator6, 16919 typename Generator7, typename Generator8> 16920 internal::CartesianProductHolder8<Generator1, Generator2, Generator3, 16921 Generator4, Generator5, Generator6, Generator7, Generator8> Combine( 16922 const Generator1& g1, const Generator2& g2, const Generator3& g3, 16923 const Generator4& g4, const Generator5& g5, const Generator6& g6, 16924 const Generator7& g7, const Generator8& g8) { 16925 return internal::CartesianProductHolder8<Generator1, Generator2, Generator3, 16926 Generator4, Generator5, Generator6, Generator7, Generator8>( 16927 g1, g2, g3, g4, g5, g6, g7, g8); 16928 } 16929 16930 template <typename Generator1, typename Generator2, typename Generator3, 16931 typename Generator4, typename Generator5, typename Generator6, 16932 typename Generator7, typename Generator8, typename Generator9> 16933 internal::CartesianProductHolder9<Generator1, Generator2, Generator3, 16934 Generator4, Generator5, Generator6, Generator7, Generator8, 16935 Generator9> Combine( 16936 const Generator1& g1, const Generator2& g2, const Generator3& g3, 16937 const Generator4& g4, const Generator5& g5, const Generator6& g6, 16938 const Generator7& g7, const Generator8& g8, const Generator9& g9) { 16939 return internal::CartesianProductHolder9<Generator1, Generator2, Generator3, 16940 Generator4, Generator5, Generator6, Generator7, Generator8, Generator9>( 16941 g1, g2, g3, g4, g5, g6, g7, g8, g9); 16942 } 16943 16944 template <typename Generator1, typename Generator2, typename Generator3, 16945 typename Generator4, typename Generator5, typename Generator6, 16946 typename Generator7, typename Generator8, typename Generator9, 16947 typename Generator10> 16948 internal::CartesianProductHolder10<Generator1, Generator2, Generator3, 16949 Generator4, Generator5, Generator6, Generator7, Generator8, Generator9, 16950 Generator10> Combine( 16951 const Generator1& g1, const Generator2& g2, const Generator3& g3, 16952 const Generator4& g4, const Generator5& g5, const Generator6& g6, 16953 const Generator7& g7, const Generator8& g8, const Generator9& g9, 16954 const Generator10& g10) { 16955 return internal::CartesianProductHolder10<Generator1, Generator2, Generator3, 16956 Generator4, Generator5, Generator6, Generator7, Generator8, Generator9, 16957 Generator10>( 16958 g1, g2, g3, g4, g5, g6, g7, g8, g9, g10); 16959 } 16960 # endif // GTEST_HAS_COMBINE 16961 16962 16963 16964 # define TEST_P(test_case_name, test_name) \ 16965 class GTEST_TEST_CLASS_NAME_(test_case_name, test_name) \ 16966 : public test_case_name{ \ 16967 public: \ 16968 GTEST_TEST_CLASS_NAME_(test_case_name, test_name)() {} \ 16969 virtual void TestBody(); \ 16970 private: \ 16971 static int AddToRegistry() { \ 16972 ::testing::UnitTest::GetInstance()->parameterized_test_registry(). \ 16973 GetTestCasePatternHolder<test_case_name>(\ 16974 #test_case_name, __FILE__, __LINE__)->AddTestPattern(\ 16975 #test_case_name, \ 16976 #test_name, \ 16977 new ::testing::internal::TestMetaFactory< \ 16978 GTEST_TEST_CLASS_NAME_(test_case_name, test_name)>()); \ 16979 return 0; \ 16980 } \ 16981 static int gtest_registering_dummy_; \ 16982 GTEST_DISALLOW_COPY_AND_ASSIGN_(\ 16983 GTEST_TEST_CLASS_NAME_(test_case_name, test_name)); \ 16984 }; \ 16985 int GTEST_TEST_CLASS_NAME_(test_case_name, \ 16986 test_name)::gtest_registering_dummy_ = \ 16987 GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::AddToRegistry(); \ 16988 void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::TestBody() 16989 16990 # define INSTANTIATE_TEST_CASE_P(prefix, test_case_name, generator) \ 16991 ::testing::internal::ParamGenerator<test_case_name::ParamType> \ 16992 gtest_##prefix##test_case_name##_EvalGenerator_() { return generator; } \ 16993 int gtest_##prefix##test_case_name##_dummy_ = \ 16994 ::testing::UnitTest::GetInstance()->parameterized_test_registry(). \ 16995 GetTestCasePatternHolder<test_case_name>(\ 16996 #test_case_name, __FILE__, __LINE__)->AddTestCaseInstantiation(\ 16997 #prefix, \ 16998 >est_##prefix##test_case_name##_EvalGenerator_, \ 16999 __FILE__, __LINE__) 17000 17001 } // namespace testing 17002 17003 #endif // GTEST_HAS_PARAM_TEST 17004 17005 #endif // GTEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_ 17006 // Copyright 2006, Google Inc. 17007 // All rights reserved. 17008 // 17009 // Redistribution and use in source and binary forms, with or without 17010 // modification, are permitted provided that the following conditions are 17011 // met: 17012 // 17013 // * Redistributions of source code must retain the above copyright 17014 // notice, this list of conditions and the following disclaimer. 17015 // * Redistributions in binary form must reproduce the above 17016 // copyright notice, this list of conditions and the following disclaimer 17017 // in the documentation and/or other materials provided with the 17018 // distribution. 17019 // * Neither the name of Google Inc. nor the names of its 17020 // contributors may be used to endorse or promote products derived from 17021 // this software without specific prior written permission. 17022 // 17023 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 17024 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 17025 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 17026 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 17027 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 17028 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 17029 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 17030 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 17031 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 17032 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 17033 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 17034 // 17035 // Author: [email protected] (Zhanyong Wan) 17036 // 17037 // Google C++ Testing Framework definitions useful in production code. 17038 17039 #ifndef GTEST_INCLUDE_GTEST_GTEST_PROD_H_ 17040 #define GTEST_INCLUDE_GTEST_GTEST_PROD_H_ 17041 17042 // When you need to test the private or protected members of a class, 17043 // use the FRIEND_TEST macro to declare your tests as friends of the 17044 // class. For example: 17045 // 17046 // class MyClass { 17047 // private: 17048 // void MyMethod(); 17049 // FRIEND_TEST(MyClassTest, MyMethod); 17050 // }; 17051 // 17052 // class MyClassTest : public testing::Test { 17053 // // ... 17054 // }; 17055 // 17056 // TEST_F(MyClassTest, MyMethod) { 17057 // // Can call MyClass::MyMethod() here. 17058 // } 17059 17060 #define FRIEND_TEST(test_case_name, test_name)\ 17061 friend class test_case_name##_##test_name##_Test 17062 17063 #endif // GTEST_INCLUDE_GTEST_GTEST_PROD_H_ 17064 // Copyright 2008, Google Inc. 17065 // All rights reserved. 17066 // 17067 // Redistribution and use in source and binary forms, with or without 17068 // modification, are permitted provided that the following conditions are 17069 // met: 17070 // 17071 // * Redistributions of source code must retain the above copyright 17072 // notice, this list of conditions and the following disclaimer. 17073 // * Redistributions in binary form must reproduce the above 17074 // copyright notice, this list of conditions and the following disclaimer 17075 // in the documentation and/or other materials provided with the 17076 // distribution. 17077 // * Neither the name of Google Inc. nor the names of its 17078 // contributors may be used to endorse or promote products derived from 17079 // this software without specific prior written permission. 17080 // 17081 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 17082 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 17083 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 17084 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 17085 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 17086 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 17087 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 17088 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 17089 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 17090 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 17091 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 17092 // 17093 // Author: [email protected] (Markus Heule) 17094 // 17095 17096 #ifndef GTEST_INCLUDE_GTEST_GTEST_TEST_PART_H_ 17097 #define GTEST_INCLUDE_GTEST_GTEST_TEST_PART_H_ 17098 17099 #include <iosfwd> 17100 #include <vector> 17101 17102 namespace testing { 17103 17104 // A copyable object representing the result of a test part (i.e. an 17105 // assertion or an explicit FAIL(), ADD_FAILURE(), or SUCCESS()). 17106 // 17107 // Don't inherit from TestPartResult as its destructor is not virtual. 17108 class GTEST_API_ TestPartResult { 17109 public: 17110 // The possible outcomes of a test part (i.e. an assertion or an 17111 // explicit SUCCEED(), FAIL(), or ADD_FAILURE()). 17112 enum Type { 17113 kSuccess, // Succeeded. 17114 kNonFatalFailure, // Failed but the test can continue. 17115 kFatalFailure // Failed and the test should be terminated. 17116 }; 17117 17118 // C'tor. TestPartResult does NOT have a default constructor. 17119 // Always use this constructor (with parameters) to create a 17120 // TestPartResult object. 17121 TestPartResult(Type a_type, 17122 const char* a_file_name, 17123 int a_line_number, 17124 const char* a_message) 17125 : type_(a_type), 17126 file_name_(a_file_name == NULL ? "" : a_file_name), 17127 line_number_(a_line_number), 17128 summary_(ExtractSummary(a_message)), 17129 message_(a_message) { 17130 } 17131 17132 // Gets the outcome of the test part. 17133 Type type() const { return type_; } 17134 17135 // Gets the name of the source file where the test part took place, or 17136 // NULL if it's unknown. 17137 const char* file_name() const { 17138 return file_name_.empty() ? NULL : file_name_.c_str(); 17139 } 17140 17141 // Gets the line in the source file where the test part took place, 17142 // or -1 if it's unknown. 17143 int line_number() const { return line_number_; } 17144 17145 // Gets the summary of the failure message. 17146 const char* summary() const { return summary_.c_str(); } 17147 17148 // Gets the message associated with the test part. 17149 const char* message() const { return message_.c_str(); } 17150 17151 // Returns true iff the test part passed. 17152 bool passed() const { return type_ == kSuccess; } 17153 17154 // Returns true iff the test part failed. 17155 bool failed() const { return type_ != kSuccess; } 17156 17157 // Returns true iff the test part non-fatally failed. 17158 bool nonfatally_failed() const { return type_ == kNonFatalFailure; } 17159 17160 // Returns true iff the test part fatally failed. 17161 bool fatally_failed() const { return type_ == kFatalFailure; } 17162 17163 private: 17164 Type type_; 17165 17166 // Gets the summary of the failure message by omitting the stack 17167 // trace in it. 17168 static std::string ExtractSummary(const char* message); 17169 17170 // The name of the source file where the test part took place, or 17171 // "" if the source file is unknown. 17172 std::string file_name_; 17173 // The line in the source file where the test part took place, or -1 17174 // if the line number is unknown. 17175 int line_number_; 17176 std::string summary_; // The test failure summary. 17177 std::string message_; // The test failure message. 17178 }; 17179 17180 // Prints a TestPartResult object. 17181 std::ostream& operator<<(std::ostream& os, const TestPartResult& result); 17182 17183 // An array of TestPartResult objects. 17184 // 17185 // Don't inherit from TestPartResultArray as its destructor is not 17186 // virtual. 17187 class GTEST_API_ TestPartResultArray { 17188 public: 17189 TestPartResultArray() {} 17190 17191 // Appends the given TestPartResult to the array. 17192 void Append(const TestPartResult& result); 17193 17194 // Returns the TestPartResult at the given index (0-based). 17195 const TestPartResult& GetTestPartResult(int index) const; 17196 17197 // Returns the number of TestPartResult objects in the array. 17198 int size() const; 17199 17200 private: 17201 std::vector<TestPartResult> array_; 17202 17203 GTEST_DISALLOW_COPY_AND_ASSIGN_(TestPartResultArray); 17204 }; 17205 17206 // This interface knows how to report a test part result. 17207 class TestPartResultReporterInterface { 17208 public: 17209 virtual ~TestPartResultReporterInterface() {} 17210 17211 virtual void ReportTestPartResult(const TestPartResult& result) = 0; 17212 }; 17213 17214 namespace internal { 17215 17216 // This helper class is used by {ASSERT|EXPECT}_NO_FATAL_FAILURE to check if a 17217 // statement generates new fatal failures. To do so it registers itself as the 17218 // current test part result reporter. Besides checking if fatal failures were 17219 // reported, it only delegates the reporting to the former result reporter. 17220 // The original result reporter is restored in the destructor. 17221 // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. 17222 class GTEST_API_ HasNewFatalFailureHelper 17223 : public TestPartResultReporterInterface { 17224 public: 17225 HasNewFatalFailureHelper(); 17226 virtual ~HasNewFatalFailureHelper(); 17227 virtual void ReportTestPartResult(const TestPartResult& result); 17228 bool has_new_fatal_failure() const { return has_new_fatal_failure_; } 17229 private: 17230 bool has_new_fatal_failure_; 17231 TestPartResultReporterInterface* original_reporter_; 17232 17233 GTEST_DISALLOW_COPY_AND_ASSIGN_(HasNewFatalFailureHelper); 17234 }; 17235 17236 } // namespace internal 17237 17238 } // namespace testing 17239 17240 #endif // GTEST_INCLUDE_GTEST_GTEST_TEST_PART_H_ 17241 // Copyright 2008 Google Inc. 17242 // All Rights Reserved. 17243 // 17244 // Redistribution and use in source and binary forms, with or without 17245 // modification, are permitted provided that the following conditions are 17246 // met: 17247 // 17248 // * Redistributions of source code must retain the above copyright 17249 // notice, this list of conditions and the following disclaimer. 17250 // * Redistributions in binary form must reproduce the above 17251 // copyright notice, this list of conditions and the following disclaimer 17252 // in the documentation and/or other materials provided with the 17253 // distribution. 17254 // * Neither the name of Google Inc. nor the names of its 17255 // contributors may be used to endorse or promote products derived from 17256 // this software without specific prior written permission. 17257 // 17258 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 17259 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 17260 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 17261 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 17262 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 17263 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 17264 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 17265 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 17266 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 17267 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 17268 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 17269 // 17270 // Author: [email protected] (Zhanyong Wan) 17271 17272 #ifndef GTEST_INCLUDE_GTEST_GTEST_TYPED_TEST_H_ 17273 #define GTEST_INCLUDE_GTEST_GTEST_TYPED_TEST_H_ 17274 17275 // This header implements typed tests and type-parameterized tests. 17276 17277 // Typed (aka type-driven) tests repeat the same test for types in a 17278 // list. You must know which types you want to test with when writing 17279 // typed tests. Here's how you do it: 17280 17281 #if 0 17282 17283 // First, define a fixture class template. It should be parameterized 17284 // by a type. Remember to derive it from testing::Test. 17285 template <typename T> 17286 class FooTest : public testing::Test { 17287 public: 17288 ... 17289 typedef std::list<T> List; 17290 static T shared_; 17291 T value_; 17292 }; 17293 17294 // Next, associate a list of types with the test case, which will be 17295 // repeated for each type in the list. The typedef is necessary for 17296 // the macro to parse correctly. 17297 typedef testing::Types<char, int, unsigned int> MyTypes; 17298 TYPED_TEST_CASE(FooTest, MyTypes); 17299 17300 // If the type list contains only one type, you can write that type 17301 // directly without Types<...>: 17302 // TYPED_TEST_CASE(FooTest, int); 17303 17304 // Then, use TYPED_TEST() instead of TEST_F() to define as many typed 17305 // tests for this test case as you want. 17306 TYPED_TEST(FooTest, DoesBlah) { 17307 // Inside a test, refer to TypeParam to get the type parameter. 17308 // Since we are inside a derived class template, C++ requires use to 17309 // visit the members of FooTest via 'this'. 17310 TypeParam n = this->value_; 17311 17312 // To visit static members of the fixture, add the TestFixture:: 17313 // prefix. 17314 n += TestFixture::shared_; 17315 17316 // To refer to typedefs in the fixture, add the "typename 17317 // TestFixture::" prefix. 17318 typename TestFixture::List values; 17319 values.push_back(n); 17320 ... 17321 } 17322 17323 TYPED_TEST(FooTest, HasPropertyA) { ... } 17324 17325 #endif // 0 17326 17327 // Type-parameterized tests are abstract test patterns parameterized 17328 // by a type. Compared with typed tests, type-parameterized tests 17329 // allow you to define the test pattern without knowing what the type 17330 // parameters are. The defined pattern can be instantiated with 17331 // different types any number of times, in any number of translation 17332 // units. 17333 // 17334 // If you are designing an interface or concept, you can define a 17335 // suite of type-parameterized tests to verify properties that any 17336 // valid implementation of the interface/concept should have. Then, 17337 // each implementation can easily instantiate the test suite to verify 17338 // that it conforms to the requirements, without having to write 17339 // similar tests repeatedly. Here's an example: 17340 17341 #if 0 17342 17343 // First, define a fixture class template. It should be parameterized 17344 // by a type. Remember to derive it from testing::Test. 17345 template <typename T> 17346 class FooTest : public testing::Test { 17347 ... 17348 }; 17349 17350 // Next, declare that you will define a type-parameterized test case 17351 // (the _P suffix is for "parameterized" or "pattern", whichever you 17352 // prefer): 17353 TYPED_TEST_CASE_P(FooTest); 17354 17355 // Then, use TYPED_TEST_P() to define as many type-parameterized tests 17356 // for this type-parameterized test case as you want. 17357 TYPED_TEST_P(FooTest, DoesBlah) { 17358 // Inside a test, refer to TypeParam to get the type parameter. 17359 TypeParam n = 0; 17360 ... 17361 } 17362 17363 TYPED_TEST_P(FooTest, HasPropertyA) { ... } 17364 17365 // Now the tricky part: you need to register all test patterns before 17366 // you can instantiate them. The first argument of the macro is the 17367 // test case name; the rest are the names of the tests in this test 17368 // case. 17369 REGISTER_TYPED_TEST_CASE_P(FooTest, 17370 DoesBlah, HasPropertyA); 17371 17372 // Finally, you are free to instantiate the pattern with the types you 17373 // want. If you put the above code in a header file, you can #include 17374 // it in multiple C++ source files and instantiate it multiple times. 17375 // 17376 // To distinguish different instances of the pattern, the first 17377 // argument to the INSTANTIATE_* macro is a prefix that will be added 17378 // to the actual test case name. Remember to pick unique prefixes for 17379 // different instances. 17380 typedef testing::Types<char, int, unsigned int> MyTypes; 17381 INSTANTIATE_TYPED_TEST_CASE_P(My, FooTest, MyTypes); 17382 17383 // If the type list contains only one type, you can write that type 17384 // directly without Types<...>: 17385 // INSTANTIATE_TYPED_TEST_CASE_P(My, FooTest, int); 17386 17387 #endif // 0 17388 17389 17390 // Implements typed tests. 17391 17392 #if GTEST_HAS_TYPED_TEST 17393 17394 // INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. 17395 // 17396 // Expands to the name of the typedef for the type parameters of the 17397 // given test case. 17398 # define GTEST_TYPE_PARAMS_(TestCaseName) gtest_type_params_##TestCaseName##_ 17399 17400 // The 'Types' template argument below must have spaces around it 17401 // since some compilers may choke on '>>' when passing a template 17402 // instance (e.g. Types<int>) 17403 # define TYPED_TEST_CASE(CaseName, Types) \ 17404 typedef ::testing::internal::TypeList< Types >::type \ 17405 GTEST_TYPE_PARAMS_(CaseName) 17406 17407 # define TYPED_TEST(CaseName, TestName) \ 17408 template <typename gtest_TypeParam_> \ 17409 class GTEST_TEST_CLASS_NAME_(CaseName, TestName) \ 17410 : public CaseName<gtest_TypeParam_>{ \ 17411 private: \ 17412 typedef CaseName<gtest_TypeParam_> TestFixture; \ 17413 typedef gtest_TypeParam_ TypeParam; \ 17414 virtual void TestBody(); \ 17415 }; \ 17416 bool gtest_##CaseName##_##TestName##_registered_ GTEST_ATTRIBUTE_UNUSED_ = \ 17417 ::testing::internal::TypeParameterizedTest< \ 17418 CaseName, \ 17419 ::testing::internal::TemplateSel< \ 17420 GTEST_TEST_CLASS_NAME_(CaseName, TestName)>, \ 17421 GTEST_TYPE_PARAMS_(CaseName)>::Register(\ 17422 "", #CaseName, #TestName, 0); \ 17423 template <typename gtest_TypeParam_> \ 17424 void GTEST_TEST_CLASS_NAME_(CaseName, TestName)<gtest_TypeParam_>::TestBody() 17425 17426 #endif // GTEST_HAS_TYPED_TEST 17427 17428 // Implements type-parameterized tests. 17429 17430 #if GTEST_HAS_TYPED_TEST_P 17431 17432 // INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. 17433 // 17434 // Expands to the namespace name that the type-parameterized tests for 17435 // the given type-parameterized test case are defined in. The exact 17436 // name of the namespace is subject to change without notice. 17437 # define GTEST_CASE_NAMESPACE_(TestCaseName) \ 17438 gtest_case_##TestCaseName##_ 17439 17440 // INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. 17441 // 17442 // Expands to the name of the variable used to remember the names of 17443 // the defined tests in the given test case. 17444 # define GTEST_TYPED_TEST_CASE_P_STATE_(TestCaseName) \ 17445 gtest_typed_test_case_p_state_##TestCaseName##_ 17446 17447 // INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE DIRECTLY. 17448 // 17449 // Expands to the name of the variable used to remember the names of 17450 // the registered tests in the given test case. 17451 # define GTEST_REGISTERED_TEST_NAMES_(TestCaseName) \ 17452 gtest_registered_test_names_##TestCaseName##_ 17453 17454 // The variables defined in the type-parameterized test macros are 17455 // static as typically these macros are used in a .h file that can be 17456 // #included in multiple translation units linked together. 17457 # define TYPED_TEST_CASE_P(CaseName) \ 17458 static ::testing::internal::TypedTestCasePState \ 17459 GTEST_TYPED_TEST_CASE_P_STATE_(CaseName) 17460 17461 # define TYPED_TEST_P(CaseName, TestName) \ 17462 namespace GTEST_CASE_NAMESPACE_(CaseName) { \ 17463 template <typename gtest_TypeParam_> \ 17464 class TestName : public CaseName<gtest_TypeParam_> { \ 17465 private: \ 17466 typedef CaseName<gtest_TypeParam_> TestFixture; \ 17467 typedef gtest_TypeParam_ TypeParam; \ 17468 virtual void TestBody(); \ 17469 }; \ 17470 static bool gtest_##TestName##_defined_ GTEST_ATTRIBUTE_UNUSED_ = \ 17471 GTEST_TYPED_TEST_CASE_P_STATE_(CaseName).AddTestName(\ 17472 __FILE__, __LINE__, #CaseName, #TestName); \ 17473 } \ 17474 template <typename gtest_TypeParam_> \ 17475 void GTEST_CASE_NAMESPACE_(CaseName)::TestName<gtest_TypeParam_>::TestBody() 17476 17477 # define REGISTER_TYPED_TEST_CASE_P(CaseName, ...) \ 17478 namespace GTEST_CASE_NAMESPACE_(CaseName) { \ 17479 typedef ::testing::internal::Templates<__VA_ARGS__>::type gtest_AllTests_; \ 17480 } \ 17481 static const char* const GTEST_REGISTERED_TEST_NAMES_(CaseName) = \ 17482 GTEST_TYPED_TEST_CASE_P_STATE_(CaseName).VerifyRegisteredTestNames(\ 17483 __FILE__, __LINE__, #__VA_ARGS__) 17484 17485 // The 'Types' template argument below must have spaces around it 17486 // since some compilers may choke on '>>' when passing a template 17487 // instance (e.g. Types<int>) 17488 # define INSTANTIATE_TYPED_TEST_CASE_P(Prefix, CaseName, Types) \ 17489 bool gtest_##Prefix##_##CaseName GTEST_ATTRIBUTE_UNUSED_ = \ 17490 ::testing::internal::TypeParameterizedTestCase<CaseName, \ 17491 GTEST_CASE_NAMESPACE_(CaseName)::gtest_AllTests_, \ 17492 ::testing::internal::TypeList< Types >::type>::Register(\ 17493 #Prefix, #CaseName, GTEST_REGISTERED_TEST_NAMES_(CaseName)) 17494 17495 #endif // GTEST_HAS_TYPED_TEST_P 17496 17497 #endif // GTEST_INCLUDE_GTEST_GTEST_TYPED_TEST_H_ 17498 17499 // Depending on the platform, different string classes are available. 17500 // On Linux, in addition to ::std::string, Google also makes use of 17501 // class ::string, which has the same interface as ::std::string, but 17502 // has a different implementation. 17503 // 17504 // The user can define GTEST_HAS_GLOBAL_STRING to 1 to indicate that 17505 // ::string is available AND is a distinct type to ::std::string, or 17506 // define it to 0 to indicate otherwise. 17507 // 17508 // If the user's ::std::string and ::string are the same class due to 17509 // aliasing, he should define GTEST_HAS_GLOBAL_STRING to 0. 17510 // 17511 // If the user doesn't define GTEST_HAS_GLOBAL_STRING, it is defined 17512 // heuristically. 17513 17514 namespace testing { 17515 17516 // Declares the flags. 17517 17518 // This flag temporary enables the disabled tests. 17519 GTEST_DECLARE_bool_(also_run_disabled_tests); 17520 17521 // This flag brings the debugger on an assertion failure. 17522 GTEST_DECLARE_bool_(break_on_failure); 17523 17524 // This flag controls whether Google Test catches all test-thrown exceptions 17525 // and logs them as failures. 17526 GTEST_DECLARE_bool_(catch_exceptions); 17527 17528 // This flag enables using colors in terminal output. Available values are 17529 // "yes" to enable colors, "no" (disable colors), or "auto" (the default) 17530 // to let Google Test decide. 17531 GTEST_DECLARE_string_(color); 17532 17533 // This flag sets up the filter to select by name using a glob pattern 17534 // the tests to run. If the filter is not given all tests are executed. 17535 GTEST_DECLARE_string_(filter); 17536 17537 // This flag causes the Google Test to list tests. None of the tests listed 17538 // are actually run if the flag is provided. 17539 GTEST_DECLARE_bool_(list_tests); 17540 17541 // This flag controls whether Google Test emits a detailed XML report to a file 17542 // in addition to its normal textual output. 17543 GTEST_DECLARE_string_(output); 17544 17545 // This flags control whether Google Test prints the elapsed time for each 17546 // test. 17547 GTEST_DECLARE_bool_(print_time); 17548 17549 // This flag specifies the random number seed. 17550 GTEST_DECLARE_int32_(random_seed); 17551 17552 // This flag sets how many times the tests are repeated. The default value 17553 // is 1. If the value is -1 the tests are repeating forever. 17554 GTEST_DECLARE_int32_(repeat); 17555 17556 // This flag controls whether Google Test includes Google Test internal 17557 // stack frames in failure stack traces. 17558 GTEST_DECLARE_bool_(show_internal_stack_frames); 17559 17560 // When this flag is specified, tests' order is randomized on every iteration. 17561 GTEST_DECLARE_bool_(shuffle); 17562 17563 // This flag specifies the maximum number of stack frames to be 17564 // printed in a failure message. 17565 GTEST_DECLARE_int32_(stack_trace_depth); 17566 17567 // When this flag is specified, a failed assertion will throw an 17568 // exception if exceptions are enabled, or exit the program with a 17569 // non-zero code otherwise. 17570 GTEST_DECLARE_bool_(throw_on_failure); 17571 17572 // When this flag is set with a "host:port" string, on supported 17573 // platforms test results are streamed to the specified port on 17574 // the specified host machine. 17575 GTEST_DECLARE_string_(stream_result_to); 17576 17577 // The upper limit for valid stack trace depths. 17578 const int kMaxStackTraceDepth = 100; 17579 17580 namespace internal { 17581 17582 class AssertHelper; 17583 class DefaultGlobalTestPartResultReporter; 17584 class ExecDeathTest; 17585 class NoExecDeathTest; 17586 class FinalSuccessChecker; 17587 class GTestFlagSaver; 17588 class StreamingListenerTest; 17589 class TestResultAccessor; 17590 class TestEventListenersAccessor; 17591 class TestEventRepeater; 17592 class UnitTestRecordPropertyTestHelper; 17593 class WindowsDeathTest; 17594 class UnitTestImpl* GetUnitTestImpl(); 17595 void ReportFailureInUnknownLocation(TestPartResult::Type result_type, 17596 const std::string& message); 17597 17598 } // namespace internal 17599 17600 // The friend relationship of some of these classes is cyclic. 17601 // If we don't forward declare them the compiler might confuse the classes 17602 // in friendship clauses with same named classes on the scope. 17603 class Test; 17604 class TestCase; 17605 class TestInfo; 17606 class UnitTest; 17607 17608 // A class for indicating whether an assertion was successful. When 17609 // the assertion wasn't successful, the AssertionResult object 17610 // remembers a non-empty message that describes how it failed. 17611 // 17612 // To create an instance of this class, use one of the factory functions 17613 // (AssertionSuccess() and AssertionFailure()). 17614 // 17615 // This class is useful for two purposes: 17616 // 1. Defining predicate functions to be used with Boolean test assertions 17617 // EXPECT_TRUE/EXPECT_FALSE and their ASSERT_ counterparts 17618 // 2. Defining predicate-format functions to be 17619 // used with predicate assertions (ASSERT_PRED_FORMAT*, etc). 17620 // 17621 // For example, if you define IsEven predicate: 17622 // 17623 // testing::AssertionResult IsEven(int n) { 17624 // if ((n % 2) == 0) 17625 // return testing::AssertionSuccess(); 17626 // else 17627 // return testing::AssertionFailure() << n << " is odd"; 17628 // } 17629 // 17630 // Then the failed expectation EXPECT_TRUE(IsEven(Fib(5))) 17631 // will print the message 17632 // 17633 // Value of: IsEven(Fib(5)) 17634 // Actual: false (5 is odd) 17635 // Expected: true 17636 // 17637 // instead of a more opaque 17638 // 17639 // Value of: IsEven(Fib(5)) 17640 // Actual: false 17641 // Expected: true 17642 // 17643 // in case IsEven is a simple Boolean predicate. 17644 // 17645 // If you expect your predicate to be reused and want to support informative 17646 // messages in EXPECT_FALSE and ASSERT_FALSE (negative assertions show up 17647 // about half as often as positive ones in our tests), supply messages for 17648 // both success and failure cases: 17649 // 17650 // testing::AssertionResult IsEven(int n) { 17651 // if ((n % 2) == 0) 17652 // return testing::AssertionSuccess() << n << " is even"; 17653 // else 17654 // return testing::AssertionFailure() << n << " is odd"; 17655 // } 17656 // 17657 // Then a statement EXPECT_FALSE(IsEven(Fib(6))) will print 17658 // 17659 // Value of: IsEven(Fib(6)) 17660 // Actual: true (8 is even) 17661 // Expected: false 17662 // 17663 // NB: Predicates that support negative Boolean assertions have reduced 17664 // performance in positive ones so be careful not to use them in tests 17665 // that have lots (tens of thousands) of positive Boolean assertions. 17666 // 17667 // To use this class with EXPECT_PRED_FORMAT assertions such as: 17668 // 17669 // // Verifies that Foo() returns an even number. 17670 // EXPECT_PRED_FORMAT1(IsEven, Foo()); 17671 // 17672 // you need to define: 17673 // 17674 // testing::AssertionResult IsEven(const char* expr, int n) { 17675 // if ((n % 2) == 0) 17676 // return testing::AssertionSuccess(); 17677 // else 17678 // return testing::AssertionFailure() 17679 // << "Expected: " << expr << " is even\n Actual: it's " << n; 17680 // } 17681 // 17682 // If Foo() returns 5, you will see the following message: 17683 // 17684 // Expected: Foo() is even 17685 // Actual: it's 5 17686 // 17687 class GTEST_API_ AssertionResult { 17688 public: 17689 // Copy constructor. 17690 // Used in EXPECT_TRUE/FALSE(assertion_result). 17691 AssertionResult(const AssertionResult& other); 17692 // Used in the EXPECT_TRUE/FALSE(bool_expression). 17693 explicit AssertionResult(bool success) : success_(success) {} 17694 17695 // Returns true iff the assertion succeeded. 17696 operator bool() const { return success_; } // NOLINT 17697 17698 // Returns the assertion's negation. Used with EXPECT/ASSERT_FALSE. 17699 AssertionResult operator!() const; 17700 17701 // Returns the text streamed into this AssertionResult. Test assertions 17702 // use it when they fail (i.e., the predicate's outcome doesn't match the 17703 // assertion's expectation). When nothing has been streamed into the 17704 // object, returns an empty string. 17705 const char* message() const { 17706 return message_.get() != NULL ? message_->c_str() : ""; 17707 } 17708 // TODO([email protected]): Remove this after making sure no clients use it. 17709 // Deprecated; please use message() instead. 17710 const char* failure_message() const { return message(); } 17711 17712 // Streams a custom failure message into this object. 17713 template <typename T> AssertionResult& operator<<(const T& value) { 17714 AppendMessage(Message() << value); 17715 return *this; 17716 } 17717 17718 // Allows streaming basic output manipulators such as endl or flush into 17719 // this object. 17720 AssertionResult& operator<<( 17721 ::std::ostream& (*basic_manipulator)(::std::ostream& stream)) { 17722 AppendMessage(Message() << basic_manipulator); 17723 return *this; 17724 } 17725 17726 private: 17727 // Appends the contents of message to message_. 17728 void AppendMessage(const Message& a_message) { 17729 if (message_.get() == NULL) 17730 message_.reset(new ::std::string); 17731 message_->append(a_message.GetString().c_str()); 17732 } 17733 17734 // Stores result of the assertion predicate. 17735 bool success_; 17736 // Stores the message describing the condition in case the expectation 17737 // construct is not satisfied with the predicate's outcome. 17738 // Referenced via a pointer to avoid taking too much stack frame space 17739 // with test assertions. 17740 internal::scoped_ptr< ::std::string> message_; 17741 17742 GTEST_DISALLOW_ASSIGN_(AssertionResult); 17743 }; 17744 17745 // Makes a successful assertion result. 17746 GTEST_API_ AssertionResult AssertionSuccess(); 17747 17748 // Makes a failed assertion result. 17749 GTEST_API_ AssertionResult AssertionFailure(); 17750 17751 // Makes a failed assertion result with the given failure message. 17752 // Deprecated; use AssertionFailure() << msg. 17753 GTEST_API_ AssertionResult AssertionFailure(const Message& msg); 17754 17755 // The abstract class that all tests inherit from. 17756 // 17757 // In Google Test, a unit test program contains one or many TestCases, and 17758 // each TestCase contains one or many Tests. 17759 // 17760 // When you define a test using the TEST macro, you don't need to 17761 // explicitly derive from Test - the TEST macro automatically does 17762 // this for you. 17763 // 17764 // The only time you derive from Test is when defining a test fixture 17765 // to be used a TEST_F. For example: 17766 // 17767 // class FooTest : public testing::Test { 17768 // protected: 17769 // virtual void SetUp() { ... } 17770 // virtual void TearDown() { ... } 17771 // ... 17772 // }; 17773 // 17774 // TEST_F(FooTest, Bar) { ... } 17775 // TEST_F(FooTest, Baz) { ... } 17776 // 17777 // Test is not copyable. 17778 class GTEST_API_ Test { 17779 public: 17780 friend class TestInfo; 17781 17782 // Defines types for pointers to functions that set up and tear down 17783 // a test case. 17784 typedef internal::SetUpTestCaseFunc SetUpTestCaseFunc; 17785 typedef internal::TearDownTestCaseFunc TearDownTestCaseFunc; 17786 17787 // The d'tor is virtual as we intend to inherit from Test. 17788 virtual ~Test(); 17789 17790 // Sets up the stuff shared by all tests in this test case. 17791 // 17792 // Google Test will call Foo::SetUpTestCase() before running the first 17793 // test in test case Foo. Hence a sub-class can define its own 17794 // SetUpTestCase() method to shadow the one defined in the super 17795 // class. 17796 static void SetUpTestCase() {} 17797 17798 // Tears down the stuff shared by all tests in this test case. 17799 // 17800 // Google Test will call Foo::TearDownTestCase() after running the last 17801 // test in test case Foo. Hence a sub-class can define its own 17802 // TearDownTestCase() method to shadow the one defined in the super 17803 // class. 17804 static void TearDownTestCase() {} 17805 17806 // Returns true iff the current test has a fatal failure. 17807 static bool HasFatalFailure(); 17808 17809 // Returns true iff the current test has a non-fatal failure. 17810 static bool HasNonfatalFailure(); 17811 17812 // Returns true iff the current test has a (either fatal or 17813 // non-fatal) failure. 17814 static bool HasFailure() { return HasFatalFailure() || HasNonfatalFailure(); } 17815 17816 // Logs a property for the current test, test case, or for the entire 17817 // invocation of the test program when used outside of the context of a 17818 // test case. Only the last value for a given key is remembered. These 17819 // are public static so they can be called from utility functions that are 17820 // not members of the test fixture. Calls to RecordProperty made during 17821 // lifespan of the test (from the moment its constructor starts to the 17822 // moment its destructor finishes) will be output in XML as attributes of 17823 // the <testcase> element. Properties recorded from fixture's 17824 // SetUpTestCase or TearDownTestCase are logged as attributes of the 17825 // corresponding <testsuite> element. Calls to RecordProperty made in the 17826 // global context (before or after invocation of RUN_ALL_TESTS and from 17827 // SetUp/TearDown method of Environment objects registered with Google 17828 // Test) will be output as attributes of the <testsuites> element. 17829 static void RecordProperty(const std::string& key, const std::string& value); 17830 static void RecordProperty(const std::string& key, int value); 17831 17832 protected: 17833 // Creates a Test object. 17834 Test(); 17835 17836 // Sets up the test fixture. 17837 virtual void SetUp(); 17838 17839 // Tears down the test fixture. 17840 virtual void TearDown(); 17841 17842 private: 17843 // Returns true iff the current test has the same fixture class as 17844 // the first test in the current test case. 17845 static bool HasSameFixtureClass(); 17846 17847 // Runs the test after the test fixture has been set up. 17848 // 17849 // A sub-class must implement this to define the test logic. 17850 // 17851 // DO NOT OVERRIDE THIS FUNCTION DIRECTLY IN A USER PROGRAM. 17852 // Instead, use the TEST or TEST_F macro. 17853 virtual void TestBody() = 0; 17854 17855 // Sets up, executes, and tears down the test. 17856 void Run(); 17857 17858 // Deletes self. We deliberately pick an unusual name for this 17859 // internal method to avoid clashing with names used in user TESTs. 17860 void DeleteSelf_() { delete this; } 17861 17862 // Uses a GTestFlagSaver to save and restore all Google Test flags. 17863 const internal::GTestFlagSaver* const gtest_flag_saver_; 17864 17865 // Often a user mis-spells SetUp() as Setup() and spends a long time 17866 // wondering why it is never called by Google Test. The declaration of 17867 // the following method is solely for catching such an error at 17868 // compile time: 17869 // 17870 // - The return type is deliberately chosen to be not void, so it 17871 // will be a conflict if a user declares void Setup() in his test 17872 // fixture. 17873 // 17874 // - This method is private, so it will be another compiler error 17875 // if a user calls it from his test fixture. 17876 // 17877 // DO NOT OVERRIDE THIS FUNCTION. 17878 // 17879 // If you see an error about overriding the following function or 17880 // about it being private, you have mis-spelled SetUp() as Setup(). 17881 struct Setup_should_be_spelled_SetUp {}; 17882 virtual Setup_should_be_spelled_SetUp* Setup() { return NULL; } 17883 17884 // We disallow copying Tests. 17885 GTEST_DISALLOW_COPY_AND_ASSIGN_(Test); 17886 }; 17887 17888 typedef internal::TimeInMillis TimeInMillis; 17889 17890 // A copyable object representing a user specified test property which can be 17891 // output as a key/value string pair. 17892 // 17893 // Don't inherit from TestProperty as its destructor is not virtual. 17894 class TestProperty { 17895 public: 17896 // C'tor. TestProperty does NOT have a default constructor. 17897 // Always use this constructor (with parameters) to create a 17898 // TestProperty object. 17899 TestProperty(const std::string& a_key, const std::string& a_value) : 17900 key_(a_key), value_(a_value) { 17901 } 17902 17903 // Gets the user supplied key. 17904 const char* key() const { 17905 return key_.c_str(); 17906 } 17907 17908 // Gets the user supplied value. 17909 const char* value() const { 17910 return value_.c_str(); 17911 } 17912 17913 // Sets a new value, overriding the one supplied in the constructor. 17914 void SetValue(const std::string& new_value) { 17915 value_ = new_value; 17916 } 17917 17918 private: 17919 // The key supplied by the user. 17920 std::string key_; 17921 // The value supplied by the user. 17922 std::string value_; 17923 }; 17924 17925 // The result of a single Test. This includes a list of 17926 // TestPartResults, a list of TestProperties, a count of how many 17927 // death tests there are in the Test, and how much time it took to run 17928 // the Test. 17929 // 17930 // TestResult is not copyable. 17931 class GTEST_API_ TestResult { 17932 public: 17933 // Creates an empty TestResult. 17934 TestResult(); 17935 17936 // D'tor. Do not inherit from TestResult. 17937 ~TestResult(); 17938 17939 // Gets the number of all test parts. This is the sum of the number 17940 // of successful test parts and the number of failed test parts. 17941 int total_part_count() const; 17942 17943 // Returns the number of the test properties. 17944 int test_property_count() const; 17945 17946 // Returns true iff the test passed (i.e. no test part failed). 17947 bool Passed() const { return !Failed(); } 17948 17949 // Returns true iff the test failed. 17950 bool Failed() const; 17951 17952 // Returns true iff the test fatally failed. 17953 bool HasFatalFailure() const; 17954 17955 // Returns true iff the test has a non-fatal failure. 17956 bool HasNonfatalFailure() const; 17957 17958 // Returns the elapsed time, in milliseconds. 17959 TimeInMillis elapsed_time() const { return elapsed_time_; } 17960 17961 // Returns the i-th test part result among all the results. i can range 17962 // from 0 to test_property_count() - 1. If i is not in that range, aborts 17963 // the program. 17964 const TestPartResult& GetTestPartResult(int i) const; 17965 17966 // Returns the i-th test property. i can range from 0 to 17967 // test_property_count() - 1. If i is not in that range, aborts the 17968 // program. 17969 const TestProperty& GetTestProperty(int i) const; 17970 17971 private: 17972 friend class TestInfo; 17973 friend class TestCase; 17974 friend class UnitTest; 17975 friend class internal::DefaultGlobalTestPartResultReporter; 17976 friend class internal::ExecDeathTest; 17977 friend class internal::TestResultAccessor; 17978 friend class internal::UnitTestImpl; 17979 friend class internal::WindowsDeathTest; 17980 17981 // Gets the vector of TestPartResults. 17982 const std::vector<TestPartResult>& test_part_results() const { 17983 return test_part_results_; 17984 } 17985 17986 // Gets the vector of TestProperties. 17987 const std::vector<TestProperty>& test_properties() const { 17988 return test_properties_; 17989 } 17990 17991 // Sets the elapsed time. 17992 void set_elapsed_time(TimeInMillis elapsed) { elapsed_time_ = elapsed; } 17993 17994 // Adds a test property to the list. The property is validated and may add 17995 // a non-fatal failure if invalid (e.g., if it conflicts with reserved 17996 // key names). If a property is already recorded for the same key, the 17997 // value will be updated, rather than storing multiple values for the same 17998 // key. xml_element specifies the element for which the property is being 17999 // recorded and is used for validation. 18000 void RecordProperty(const std::string& xml_element, 18001 const TestProperty& test_property); 18002 18003 // Adds a failure if the key is a reserved attribute of Google Test 18004 // testcase tags. Returns true if the property is valid. 18005 // TODO(russr): Validate attribute names are legal and human readable. 18006 static bool ValidateTestProperty(const std::string& xml_element, 18007 const TestProperty& test_property); 18008 18009 // Adds a test part result to the list. 18010 void AddTestPartResult(const TestPartResult& test_part_result); 18011 18012 // Returns the death test count. 18013 int death_test_count() const { return death_test_count_; } 18014 18015 // Increments the death test count, returning the new count. 18016 int increment_death_test_count() { return ++death_test_count_; } 18017 18018 // Clears the test part results. 18019 void ClearTestPartResults(); 18020 18021 // Clears the object. 18022 void Clear(); 18023 18024 // Protects mutable state of the property vector and of owned 18025 // properties, whose values may be updated. 18026 internal::Mutex test_properites_mutex_; 18027 18028 // The vector of TestPartResults 18029 std::vector<TestPartResult> test_part_results_; 18030 // The vector of TestProperties 18031 std::vector<TestProperty> test_properties_; 18032 // Running count of death tests. 18033 int death_test_count_; 18034 // The elapsed time, in milliseconds. 18035 TimeInMillis elapsed_time_; 18036 18037 // We disallow copying TestResult. 18038 GTEST_DISALLOW_COPY_AND_ASSIGN_(TestResult); 18039 }; // class TestResult 18040 18041 // A TestInfo object stores the following information about a test: 18042 // 18043 // Test case name 18044 // Test name 18045 // Whether the test should be run 18046 // A function pointer that creates the test object when invoked 18047 // Test result 18048 // 18049 // The constructor of TestInfo registers itself with the UnitTest 18050 // singleton such that the RUN_ALL_TESTS() macro knows which tests to 18051 // run. 18052 class GTEST_API_ TestInfo { 18053 public: 18054 // Destructs a TestInfo object. This function is not virtual, so 18055 // don't inherit from TestInfo. 18056 ~TestInfo(); 18057 18058 // Returns the test case name. 18059 const char* test_case_name() const { return test_case_name_.c_str(); } 18060 18061 // Returns the test name. 18062 const char* name() const { return name_.c_str(); } 18063 18064 // Returns the name of the parameter type, or NULL if this is not a typed 18065 // or a type-parameterized test. 18066 const char* type_param() const { 18067 if (type_param_.get() != NULL) 18068 return type_param_->c_str(); 18069 return NULL; 18070 } 18071 18072 // Returns the text representation of the value parameter, or NULL if this 18073 // is not a value-parameterized test. 18074 const char* value_param() const { 18075 if (value_param_.get() != NULL) 18076 return value_param_->c_str(); 18077 return NULL; 18078 } 18079 18080 // Returns true if this test should run, that is if the test is not 18081 // disabled (or it is disabled but the also_run_disabled_tests flag has 18082 // been specified) and its full name matches the user-specified filter. 18083 // 18084 // Google Test allows the user to filter the tests by their full names. 18085 // The full name of a test Bar in test case Foo is defined as 18086 // "Foo.Bar". Only the tests that match the filter will run. 18087 // 18088 // A filter is a colon-separated list of glob (not regex) patterns, 18089 // optionally followed by a '-' and a colon-separated list of 18090 // negative patterns (tests to exclude). A test is run if it 18091 // matches one of the positive patterns and does not match any of 18092 // the negative patterns. 18093 // 18094 // For example, *A*:Foo.* is a filter that matches any string that 18095 // contains the character 'A' or starts with "Foo.". 18096 bool should_run() const { return should_run_; } 18097 18098 // Returns true iff this test will appear in the XML report. 18099 bool is_reportable() const { 18100 // For now, the XML report includes all tests matching the filter. 18101 // In the future, we may trim tests that are excluded because of 18102 // sharding. 18103 return matches_filter_; 18104 } 18105 18106 // Returns the result of the test. 18107 const TestResult* result() const { return &result_; } 18108 18109 private: 18110 #if GTEST_HAS_DEATH_TEST 18111 friend class internal::DefaultDeathTestFactory; 18112 #endif // GTEST_HAS_DEATH_TEST 18113 friend class Test; 18114 friend class TestCase; 18115 friend class internal::UnitTestImpl; 18116 friend class internal::StreamingListenerTest; 18117 friend TestInfo* internal::MakeAndRegisterTestInfo( 18118 const char* test_case_name, 18119 const char* name, 18120 const char* type_param, 18121 const char* value_param, 18122 internal::TypeId fixture_class_id, 18123 Test::SetUpTestCaseFunc set_up_tc, 18124 Test::TearDownTestCaseFunc tear_down_tc, 18125 internal::TestFactoryBase* factory); 18126 18127 // Constructs a TestInfo object. The newly constructed instance assumes 18128 // ownership of the factory object. 18129 TestInfo(const std::string& test_case_name, 18130 const std::string& name, 18131 const char* a_type_param, // NULL if not a type-parameterized test 18132 const char* a_value_param, // NULL if not a value-parameterized test 18133 internal::TypeId fixture_class_id, 18134 internal::TestFactoryBase* factory); 18135 18136 // Increments the number of death tests encountered in this test so 18137 // far. 18138 int increment_death_test_count() { 18139 return result_.increment_death_test_count(); 18140 } 18141 18142 // Creates the test object, runs it, records its result, and then 18143 // deletes it. 18144 void Run(); 18145 18146 static void ClearTestResult(TestInfo* test_info) { 18147 test_info->result_.Clear(); 18148 } 18149 18150 // These fields are immutable properties of the test. 18151 const std::string test_case_name_; // Test case name 18152 const std::string name_; // Test name 18153 // Name of the parameter type, or NULL if this is not a typed or a 18154 // type-parameterized test. 18155 const internal::scoped_ptr<const ::std::string> type_param_; 18156 // Text representation of the value parameter, or NULL if this is not a 18157 // value-parameterized test. 18158 const internal::scoped_ptr<const ::std::string> value_param_; 18159 const internal::TypeId fixture_class_id_; // ID of the test fixture class 18160 bool should_run_; // True iff this test should run 18161 bool is_disabled_; // True iff this test is disabled 18162 bool matches_filter_; // True if this test matches the 18163 // user-specified filter. 18164 internal::TestFactoryBase* const factory_; // The factory that creates 18165 // the test object 18166 18167 // This field is mutable and needs to be reset before running the 18168 // test for the second time. 18169 TestResult result_; 18170 18171 GTEST_DISALLOW_COPY_AND_ASSIGN_(TestInfo); 18172 }; 18173 18174 // A test case, which consists of a vector of TestInfos. 18175 // 18176 // TestCase is not copyable. 18177 class GTEST_API_ TestCase { 18178 public: 18179 // Creates a TestCase with the given name. 18180 // 18181 // TestCase does NOT have a default constructor. Always use this 18182 // constructor to create a TestCase object. 18183 // 18184 // Arguments: 18185 // 18186 // name: name of the test case 18187 // a_type_param: the name of the test's type parameter, or NULL if 18188 // this is not a type-parameterized test. 18189 // set_up_tc: pointer to the function that sets up the test case 18190 // tear_down_tc: pointer to the function that tears down the test case 18191 TestCase(const char* name, const char* a_type_param, 18192 Test::SetUpTestCaseFunc set_up_tc, 18193 Test::TearDownTestCaseFunc tear_down_tc); 18194 18195 // Destructor of TestCase. 18196 virtual ~TestCase(); 18197 18198 // Gets the name of the TestCase. 18199 const char* name() const { return name_.c_str(); } 18200 18201 // Returns the name of the parameter type, or NULL if this is not a 18202 // type-parameterized test case. 18203 const char* type_param() const { 18204 if (type_param_.get() != NULL) 18205 return type_param_->c_str(); 18206 return NULL; 18207 } 18208 18209 // Returns true if any test in this test case should run. 18210 bool should_run() const { return should_run_; } 18211 18212 // Gets the number of successful tests in this test case. 18213 int successful_test_count() const; 18214 18215 // Gets the number of failed tests in this test case. 18216 int failed_test_count() const; 18217 18218 // Gets the number of disabled tests that will be reported in the XML report. 18219 int reportable_disabled_test_count() const; 18220 18221 // Gets the number of disabled tests in this test case. 18222 int disabled_test_count() const; 18223 18224 // Gets the number of tests to be printed in the XML report. 18225 int reportable_test_count() const; 18226 18227 // Get the number of tests in this test case that should run. 18228 int test_to_run_count() const; 18229 18230 // Gets the number of all tests in this test case. 18231 int total_test_count() const; 18232 18233 // Returns true iff the test case passed. 18234 bool Passed() const { return !Failed(); } 18235 18236 // Returns true iff the test case failed. 18237 bool Failed() const { return failed_test_count() > 0; } 18238 18239 // Returns the elapsed time, in milliseconds. 18240 TimeInMillis elapsed_time() const { return elapsed_time_; } 18241 18242 // Returns the i-th test among all the tests. i can range from 0 to 18243 // total_test_count() - 1. If i is not in that range, returns NULL. 18244 const TestInfo* GetTestInfo(int i) const; 18245 18246 // Returns the TestResult that holds test properties recorded during 18247 // execution of SetUpTestCase and TearDownTestCase. 18248 const TestResult& ad_hoc_test_result() const { return ad_hoc_test_result_; } 18249 18250 private: 18251 friend class Test; 18252 friend class internal::UnitTestImpl; 18253 18254 // Gets the (mutable) vector of TestInfos in this TestCase. 18255 std::vector<TestInfo*>& test_info_list() { return test_info_list_; } 18256 18257 // Gets the (immutable) vector of TestInfos in this TestCase. 18258 const std::vector<TestInfo*>& test_info_list() const { 18259 return test_info_list_; 18260 } 18261 18262 // Returns the i-th test among all the tests. i can range from 0 to 18263 // total_test_count() - 1. If i is not in that range, returns NULL. 18264 TestInfo* GetMutableTestInfo(int i); 18265 18266 // Sets the should_run member. 18267 void set_should_run(bool should) { should_run_ = should; } 18268 18269 // Adds a TestInfo to this test case. Will delete the TestInfo upon 18270 // destruction of the TestCase object. 18271 void AddTestInfo(TestInfo * test_info); 18272 18273 // Clears the results of all tests in this test case. 18274 void ClearResult(); 18275 18276 // Clears the results of all tests in the given test case. 18277 static void ClearTestCaseResult(TestCase* test_case) { 18278 test_case->ClearResult(); 18279 } 18280 18281 // Runs every test in this TestCase. 18282 void Run(); 18283 18284 // Runs SetUpTestCase() for this TestCase. This wrapper is needed 18285 // for catching exceptions thrown from SetUpTestCase(). 18286 void RunSetUpTestCase() { (*set_up_tc_)(); } 18287 18288 // Runs TearDownTestCase() for this TestCase. This wrapper is 18289 // needed for catching exceptions thrown from TearDownTestCase(). 18290 void RunTearDownTestCase() { (*tear_down_tc_)(); } 18291 18292 // Returns true iff test passed. 18293 static bool TestPassed(const TestInfo* test_info) { 18294 return test_info->should_run() && test_info->result()->Passed(); 18295 } 18296 18297 // Returns true iff test failed. 18298 static bool TestFailed(const TestInfo* test_info) { 18299 return test_info->should_run() && test_info->result()->Failed(); 18300 } 18301 18302 // Returns true iff the test is disabled and will be reported in the XML 18303 // report. 18304 static bool TestReportableDisabled(const TestInfo* test_info) { 18305 return test_info->is_reportable() && test_info->is_disabled_; 18306 } 18307 18308 // Returns true iff test is disabled. 18309 static bool TestDisabled(const TestInfo* test_info) { 18310 return test_info->is_disabled_; 18311 } 18312 18313 // Returns true iff this test will appear in the XML report. 18314 static bool TestReportable(const TestInfo* test_info) { 18315 return test_info->is_reportable(); 18316 } 18317 18318 // Returns true if the given test should run. 18319 static bool ShouldRunTest(const TestInfo* test_info) { 18320 return test_info->should_run(); 18321 } 18322 18323 // Shuffles the tests in this test case. 18324 void ShuffleTests(internal::Random* random); 18325 18326 // Restores the test order to before the first shuffle. 18327 void UnshuffleTests(); 18328 18329 // Name of the test case. 18330 std::string name_; 18331 // Name of the parameter type, or NULL if this is not a typed or a 18332 // type-parameterized test. 18333 const internal::scoped_ptr<const ::std::string> type_param_; 18334 // The vector of TestInfos in their original order. It owns the 18335 // elements in the vector. 18336 std::vector<TestInfo*> test_info_list_; 18337 // Provides a level of indirection for the test list to allow easy 18338 // shuffling and restoring the test order. The i-th element in this 18339 // vector is the index of the i-th test in the shuffled test list. 18340 std::vector<int> test_indices_; 18341 // Pointer to the function that sets up the test case. 18342 Test::SetUpTestCaseFunc set_up_tc_; 18343 // Pointer to the function that tears down the test case. 18344 Test::TearDownTestCaseFunc tear_down_tc_; 18345 // True iff any test in this test case should run. 18346 bool should_run_; 18347 // Elapsed time, in milliseconds. 18348 TimeInMillis elapsed_time_; 18349 // Holds test properties recorded during execution of SetUpTestCase and 18350 // TearDownTestCase. 18351 TestResult ad_hoc_test_result_; 18352 18353 // We disallow copying TestCases. 18354 GTEST_DISALLOW_COPY_AND_ASSIGN_(TestCase); 18355 }; 18356 18357 // An Environment object is capable of setting up and tearing down an 18358 // environment. The user should subclass this to define his own 18359 // environment(s). 18360 // 18361 // An Environment object does the set-up and tear-down in virtual 18362 // methods SetUp() and TearDown() instead of the constructor and the 18363 // destructor, as: 18364 // 18365 // 1. You cannot safely throw from a destructor. This is a problem 18366 // as in some cases Google Test is used where exceptions are enabled, and 18367 // we may want to implement ASSERT_* using exceptions where they are 18368 // available. 18369 // 2. You cannot use ASSERT_* directly in a constructor or 18370 // destructor. 18371 class Environment { 18372 public: 18373 // The d'tor is virtual as we need to subclass Environment. 18374 virtual ~Environment() {} 18375 18376 // Override this to define how to set up the environment. 18377 virtual void SetUp() {} 18378 18379 // Override this to define how to tear down the environment. 18380 virtual void TearDown() {} 18381 private: 18382 // If you see an error about overriding the following function or 18383 // about it being private, you have mis-spelled SetUp() as Setup(). 18384 struct Setup_should_be_spelled_SetUp {}; 18385 virtual Setup_should_be_spelled_SetUp* Setup() { return NULL; } 18386 }; 18387 18388 // The interface for tracing execution of tests. The methods are organized in 18389 // the order the corresponding events are fired. 18390 class TestEventListener { 18391 public: 18392 virtual ~TestEventListener() {} 18393 18394 // Fired before any test activity starts. 18395 virtual void OnTestProgramStart(const UnitTest& unit_test) = 0; 18396 18397 // Fired before each iteration of tests starts. There may be more than 18398 // one iteration if GTEST_FLAG(repeat) is set. iteration is the iteration 18399 // index, starting from 0. 18400 virtual void OnTestIterationStart(const UnitTest& unit_test, 18401 int iteration) = 0; 18402 18403 // Fired before environment set-up for each iteration of tests starts. 18404 virtual void OnEnvironmentsSetUpStart(const UnitTest& unit_test) = 0; 18405 18406 // Fired after environment set-up for each iteration of tests ends. 18407 virtual void OnEnvironmentsSetUpEnd(const UnitTest& unit_test) = 0; 18408 18409 // Fired before the test case starts. 18410 virtual void OnTestCaseStart(const TestCase& test_case) = 0; 18411 18412 // Fired before the test starts. 18413 virtual void OnTestStart(const TestInfo& test_info) = 0; 18414 18415 // Fired after a failed assertion or a SUCCEED() invocation. 18416 virtual void OnTestPartResult(const TestPartResult& test_part_result) = 0; 18417 18418 // Fired after the test ends. 18419 virtual void OnTestEnd(const TestInfo& test_info) = 0; 18420 18421 // Fired after the test case ends. 18422 virtual void OnTestCaseEnd(const TestCase& test_case) = 0; 18423 18424 // Fired before environment tear-down for each iteration of tests starts. 18425 virtual void OnEnvironmentsTearDownStart(const UnitTest& unit_test) = 0; 18426 18427 // Fired after environment tear-down for each iteration of tests ends. 18428 virtual void OnEnvironmentsTearDownEnd(const UnitTest& unit_test) = 0; 18429 18430 // Fired after each iteration of tests finishes. 18431 virtual void OnTestIterationEnd(const UnitTest& unit_test, 18432 int iteration) = 0; 18433 18434 // Fired after all test activities have ended. 18435 virtual void OnTestProgramEnd(const UnitTest& unit_test) = 0; 18436 }; 18437 18438 // The convenience class for users who need to override just one or two 18439 // methods and are not concerned that a possible change to a signature of 18440 // the methods they override will not be caught during the build. For 18441 // comments about each method please see the definition of TestEventListener 18442 // above. 18443 class EmptyTestEventListener : public TestEventListener { 18444 public: 18445 virtual void OnTestProgramStart(const UnitTest& /*unit_test*/) {} 18446 virtual void OnTestIterationStart(const UnitTest& /*unit_test*/, 18447 int /*iteration*/) {} 18448 virtual void OnEnvironmentsSetUpStart(const UnitTest& /*unit_test*/) {} 18449 virtual void OnEnvironmentsSetUpEnd(const UnitTest& /*unit_test*/) {} 18450 virtual void OnTestCaseStart(const TestCase& /*test_case*/) {} 18451 virtual void OnTestStart(const TestInfo& /*test_info*/) {} 18452 virtual void OnTestPartResult(const TestPartResult& /*test_part_result*/) {} 18453 virtual void OnTestEnd(const TestInfo& /*test_info*/) {} 18454 virtual void OnTestCaseEnd(const TestCase& /*test_case*/) {} 18455 virtual void OnEnvironmentsTearDownStart(const UnitTest& /*unit_test*/) {} 18456 virtual void OnEnvironmentsTearDownEnd(const UnitTest& /*unit_test*/) {} 18457 virtual void OnTestIterationEnd(const UnitTest& /*unit_test*/, 18458 int /*iteration*/) {} 18459 virtual void OnTestProgramEnd(const UnitTest& /*unit_test*/) {} 18460 }; 18461 18462 // TestEventListeners lets users add listeners to track events in Google Test. 18463 class GTEST_API_ TestEventListeners { 18464 public: 18465 TestEventListeners(); 18466 ~TestEventListeners(); 18467 18468 // Appends an event listener to the end of the list. Google Test assumes 18469 // the ownership of the listener (i.e. it will delete the listener when 18470 // the test program finishes). 18471 void Append(TestEventListener* listener); 18472 18473 // Removes the given event listener from the list and returns it. It then 18474 // becomes the caller's responsibility to delete the listener. Returns 18475 // NULL if the listener is not found in the list. 18476 TestEventListener* Release(TestEventListener* listener); 18477 18478 // Returns the standard listener responsible for the default console 18479 // output. Can be removed from the listeners list to shut down default 18480 // console output. Note that removing this object from the listener list 18481 // with Release transfers its ownership to the caller and makes this 18482 // function return NULL the next time. 18483 TestEventListener* default_result_printer() const { 18484 return default_result_printer_; 18485 } 18486 18487 // Returns the standard listener responsible for the default XML output 18488 // controlled by the --gtest_output=xml flag. Can be removed from the 18489 // listeners list by users who want to shut down the default XML output 18490 // controlled by this flag and substitute it with custom one. Note that 18491 // removing this object from the listener list with Release transfers its 18492 // ownership to the caller and makes this function return NULL the next 18493 // time. 18494 TestEventListener* default_xml_generator() const { 18495 return default_xml_generator_; 18496 } 18497 18498 private: 18499 friend class TestCase; 18500 friend class TestInfo; 18501 friend class internal::DefaultGlobalTestPartResultReporter; 18502 friend class internal::NoExecDeathTest; 18503 friend class internal::TestEventListenersAccessor; 18504 friend class internal::UnitTestImpl; 18505 18506 // Returns repeater that broadcasts the TestEventListener events to all 18507 // subscribers. 18508 TestEventListener* repeater(); 18509 18510 // Sets the default_result_printer attribute to the provided listener. 18511 // The listener is also added to the listener list and previous 18512 // default_result_printer is removed from it and deleted. The listener can 18513 // also be NULL in which case it will not be added to the list. Does 18514 // nothing if the previous and the current listener objects are the same. 18515 void SetDefaultResultPrinter(TestEventListener* listener); 18516 18517 // Sets the default_xml_generator attribute to the provided listener. The 18518 // listener is also added to the listener list and previous 18519 // default_xml_generator is removed from it and deleted. The listener can 18520 // also be NULL in which case it will not be added to the list. Does 18521 // nothing if the previous and the current listener objects are the same. 18522 void SetDefaultXmlGenerator(TestEventListener* listener); 18523 18524 // Controls whether events will be forwarded by the repeater to the 18525 // listeners in the list. 18526 bool EventForwardingEnabled() const; 18527 void SuppressEventForwarding(); 18528 18529 // The actual list of listeners. 18530 internal::TestEventRepeater* repeater_; 18531 // Listener responsible for the standard result output. 18532 TestEventListener* default_result_printer_; 18533 // Listener responsible for the creation of the XML output file. 18534 TestEventListener* default_xml_generator_; 18535 18536 // We disallow copying TestEventListeners. 18537 GTEST_DISALLOW_COPY_AND_ASSIGN_(TestEventListeners); 18538 }; 18539 18540 // A UnitTest consists of a vector of TestCases. 18541 // 18542 // This is a singleton class. The only instance of UnitTest is 18543 // created when UnitTest::GetInstance() is first called. This 18544 // instance is never deleted. 18545 // 18546 // UnitTest is not copyable. 18547 // 18548 // This class is thread-safe as long as the methods are called 18549 // according to their specification. 18550 class GTEST_API_ UnitTest { 18551 public: 18552 // Gets the singleton UnitTest object. The first time this method 18553 // is called, a UnitTest object is constructed and returned. 18554 // Consecutive calls will return the same object. 18555 static UnitTest* GetInstance(); 18556 18557 // Runs all tests in this UnitTest object and prints the result. 18558 // Returns 0 if successful, or 1 otherwise. 18559 // 18560 // This method can only be called from the main thread. 18561 // 18562 // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. 18563 int Run() GTEST_MUST_USE_RESULT_; 18564 18565 // Returns the working directory when the first TEST() or TEST_F() 18566 // was executed. The UnitTest object owns the string. 18567 const char* original_working_dir() const; 18568 18569 // Returns the TestCase object for the test that's currently running, 18570 // or NULL if no test is running. 18571 const TestCase* current_test_case() const 18572 GTEST_LOCK_EXCLUDED_(mutex_); 18573 18574 // Returns the TestInfo object for the test that's currently running, 18575 // or NULL if no test is running. 18576 const TestInfo* current_test_info() const 18577 GTEST_LOCK_EXCLUDED_(mutex_); 18578 18579 // Returns the random seed used at the start of the current test run. 18580 int random_seed() const; 18581 18582 #if GTEST_HAS_PARAM_TEST 18583 // Returns the ParameterizedTestCaseRegistry object used to keep track of 18584 // value-parameterized tests and instantiate and register them. 18585 // 18586 // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. 18587 internal::ParameterizedTestCaseRegistry& parameterized_test_registry() 18588 GTEST_LOCK_EXCLUDED_(mutex_); 18589 #endif // GTEST_HAS_PARAM_TEST 18590 18591 // Gets the number of successful test cases. 18592 int successful_test_case_count() const; 18593 18594 // Gets the number of failed test cases. 18595 int failed_test_case_count() const; 18596 18597 // Gets the number of all test cases. 18598 int total_test_case_count() const; 18599 18600 // Gets the number of all test cases that contain at least one test 18601 // that should run. 18602 int test_case_to_run_count() const; 18603 18604 // Gets the number of successful tests. 18605 int successful_test_count() const; 18606 18607 // Gets the number of failed tests. 18608 int failed_test_count() const; 18609 18610 // Gets the number of disabled tests that will be reported in the XML report. 18611 int reportable_disabled_test_count() const; 18612 18613 // Gets the number of disabled tests. 18614 int disabled_test_count() const; 18615 18616 // Gets the number of tests to be printed in the XML report. 18617 int reportable_test_count() const; 18618 18619 // Gets the number of all tests. 18620 int total_test_count() const; 18621 18622 // Gets the number of tests that should run. 18623 int test_to_run_count() const; 18624 18625 // Gets the time of the test program start, in ms from the start of the 18626 // UNIX epoch. 18627 TimeInMillis start_timestamp() const; 18628 18629 // Gets the elapsed time, in milliseconds. 18630 TimeInMillis elapsed_time() const; 18631 18632 // Returns true iff the unit test passed (i.e. all test cases passed). 18633 bool Passed() const; 18634 18635 // Returns true iff the unit test failed (i.e. some test case failed 18636 // or something outside of all tests failed). 18637 bool Failed() const; 18638 18639 // Gets the i-th test case among all the test cases. i can range from 0 to 18640 // total_test_case_count() - 1. If i is not in that range, returns NULL. 18641 const TestCase* GetTestCase(int i) const; 18642 18643 // Returns the TestResult containing information on test failures and 18644 // properties logged outside of individual test cases. 18645 const TestResult& ad_hoc_test_result() const; 18646 18647 // Returns the list of event listeners that can be used to track events 18648 // inside Google Test. 18649 TestEventListeners& listeners(); 18650 18651 private: 18652 // Registers and returns a global test environment. When a test 18653 // program is run, all global test environments will be set-up in 18654 // the order they were registered. After all tests in the program 18655 // have finished, all global test environments will be torn-down in 18656 // the *reverse* order they were registered. 18657 // 18658 // The UnitTest object takes ownership of the given environment. 18659 // 18660 // This method can only be called from the main thread. 18661 Environment* AddEnvironment(Environment* env); 18662 18663 // Adds a TestPartResult to the current TestResult object. All 18664 // Google Test assertion macros (e.g. ASSERT_TRUE, EXPECT_EQ, etc) 18665 // eventually call this to report their results. The user code 18666 // should use the assertion macros instead of calling this directly. 18667 void AddTestPartResult(TestPartResult::Type result_type, 18668 const char* file_name, 18669 int line_number, 18670 const std::string& message, 18671 const std::string& os_stack_trace) 18672 GTEST_LOCK_EXCLUDED_(mutex_); 18673 18674 // Adds a TestProperty to the current TestResult object when invoked from 18675 // inside a test, to current TestCase's ad_hoc_test_result_ when invoked 18676 // from SetUpTestCase or TearDownTestCase, or to the global property set 18677 // when invoked elsewhere. If the result already contains a property with 18678 // the same key, the value will be updated. 18679 void RecordProperty(const std::string& key, const std::string& value); 18680 18681 // Gets the i-th test case among all the test cases. i can range from 0 to 18682 // total_test_case_count() - 1. If i is not in that range, returns NULL. 18683 TestCase* GetMutableTestCase(int i); 18684 18685 // Accessors for the implementation object. 18686 internal::UnitTestImpl* impl() { return impl_; } 18687 const internal::UnitTestImpl* impl() const { return impl_; } 18688 18689 // These classes and funcions are friends as they need to access private 18690 // members of UnitTest. 18691 friend class Test; 18692 friend class internal::AssertHelper; 18693 friend class internal::ScopedTrace; 18694 friend class internal::StreamingListenerTest; 18695 friend class internal::UnitTestRecordPropertyTestHelper; 18696 friend Environment* AddGlobalTestEnvironment(Environment* env); 18697 friend internal::UnitTestImpl* internal::GetUnitTestImpl(); 18698 friend void internal::ReportFailureInUnknownLocation( 18699 TestPartResult::Type result_type, 18700 const std::string& message); 18701 18702 // Creates an empty UnitTest. 18703 UnitTest(); 18704 18705 // D'tor 18706 virtual ~UnitTest(); 18707 18708 // Pushes a trace defined by SCOPED_TRACE() on to the per-thread 18709 // Google Test trace stack. 18710 void PushGTestTrace(const internal::TraceInfo& trace) 18711 GTEST_LOCK_EXCLUDED_(mutex_); 18712 18713 // Pops a trace from the per-thread Google Test trace stack. 18714 void PopGTestTrace() 18715 GTEST_LOCK_EXCLUDED_(mutex_); 18716 18717 // Protects mutable state in *impl_. This is mutable as some const 18718 // methods need to lock it too. 18719 mutable internal::Mutex mutex_; 18720 18721 // Opaque implementation object. This field is never changed once 18722 // the object is constructed. We don't mark it as const here, as 18723 // doing so will cause a warning in the constructor of UnitTest. 18724 // Mutable state in *impl_ is protected by mutex_. 18725 internal::UnitTestImpl* impl_; 18726 18727 // We disallow copying UnitTest. 18728 GTEST_DISALLOW_COPY_AND_ASSIGN_(UnitTest); 18729 }; 18730 18731 // A convenient wrapper for adding an environment for the test 18732 // program. 18733 // 18734 // You should call this before RUN_ALL_TESTS() is called, probably in 18735 // main(). If you use gtest_main, you need to call this before main() 18736 // starts for it to take effect. For example, you can define a global 18737 // variable like this: 18738 // 18739 // testing::Environment* const foo_env = 18740 // testing::AddGlobalTestEnvironment(new FooEnvironment); 18741 // 18742 // However, we strongly recommend you to write your own main() and 18743 // call AddGlobalTestEnvironment() there, as relying on initialization 18744 // of global variables makes the code harder to read and may cause 18745 // problems when you register multiple environments from different 18746 // translation units and the environments have dependencies among them 18747 // (remember that the compiler doesn't guarantee the order in which 18748 // global variables from different translation units are initialized). 18749 inline Environment* AddGlobalTestEnvironment(Environment* env) { 18750 return UnitTest::GetInstance()->AddEnvironment(env); 18751 } 18752 18753 // Initializes Google Test. This must be called before calling 18754 // RUN_ALL_TESTS(). In particular, it parses a command line for the 18755 // flags that Google Test recognizes. Whenever a Google Test flag is 18756 // seen, it is removed from argv, and *argc is decremented. 18757 // 18758 // No value is returned. Instead, the Google Test flag variables are 18759 // updated. 18760 // 18761 // Calling the function for the second time has no user-visible effect. 18762 GTEST_API_ void InitGoogleTest(int* argc, char** argv); 18763 18764 // This overloaded version can be used in Windows programs compiled in 18765 // UNICODE mode. 18766 GTEST_API_ void InitGoogleTest(int* argc, wchar_t** argv); 18767 18768 namespace internal { 18769 18770 // FormatForComparison<ToPrint, OtherOperand>::Format(value) formats a 18771 // value of type ToPrint that is an operand of a comparison assertion 18772 // (e.g. ASSERT_EQ). OtherOperand is the type of the other operand in 18773 // the comparison, and is used to help determine the best way to 18774 // format the value. In particular, when the value is a C string 18775 // (char pointer) and the other operand is an STL string object, we 18776 // want to format the C string as a string, since we know it is 18777 // compared by value with the string object. If the value is a char 18778 // pointer but the other operand is not an STL string object, we don't 18779 // know whether the pointer is supposed to point to a NUL-terminated 18780 // string, and thus want to print it as a pointer to be safe. 18781 // 18782 // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. 18783 18784 // The default case. 18785 template <typename ToPrint, typename OtherOperand> 18786 class FormatForComparison { 18787 public: 18788 static ::std::string Format(const ToPrint& value) { 18789 return ::testing::PrintToString(value); 18790 } 18791 }; 18792 18793 // Array. 18794 template <typename ToPrint, size_t N, typename OtherOperand> 18795 class FormatForComparison<ToPrint[N], OtherOperand> { 18796 public: 18797 static ::std::string Format(const ToPrint* value) { 18798 return FormatForComparison<const ToPrint*, OtherOperand>::Format(value); 18799 } 18800 }; 18801 18802 // By default, print C string as pointers to be safe, as we don't know 18803 // whether they actually point to a NUL-terminated string. 18804 18805 #define GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_(CharType) \ 18806 template <typename OtherOperand> \ 18807 class FormatForComparison<CharType*, OtherOperand> { \ 18808 public: \ 18809 static ::std::string Format(CharType* value) { \ 18810 return ::testing::PrintToString(static_cast<const void*>(value)); \ 18811 } \ 18812 } 18813 18814 GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_(char); 18815 GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_(const char); 18816 GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_(wchar_t); 18817 GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_(const wchar_t); 18818 18819 #undef GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_ 18820 18821 // If a C string is compared with an STL string object, we know it's meant 18822 // to point to a NUL-terminated string, and thus can print it as a string. 18823 18824 #define GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(CharType, OtherStringType) \ 18825 template <> \ 18826 class FormatForComparison<CharType*, OtherStringType> { \ 18827 public: \ 18828 static ::std::string Format(CharType* value) { \ 18829 return ::testing::PrintToString(value); \ 18830 } \ 18831 } 18832 18833 GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(char, ::std::string); 18834 GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(const char, ::std::string); 18835 18836 #if GTEST_HAS_GLOBAL_STRING 18837 GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(char, ::string); 18838 GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(const char, ::string); 18839 #endif 18840 18841 #if GTEST_HAS_GLOBAL_WSTRING 18842 GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(wchar_t, ::wstring); 18843 GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(const wchar_t, ::wstring); 18844 #endif 18845 18846 #if GTEST_HAS_STD_WSTRING 18847 GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(wchar_t, ::std::wstring); 18848 GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(const wchar_t, ::std::wstring); 18849 #endif 18850 18851 #undef GTEST_IMPL_FORMAT_C_STRING_AS_STRING_ 18852 18853 // Formats a comparison assertion (e.g. ASSERT_EQ, EXPECT_LT, and etc) 18854 // operand to be used in a failure message. The type (but not value) 18855 // of the other operand may affect the format. This allows us to 18856 // print a char* as a raw pointer when it is compared against another 18857 // char* or void*, and print it as a C string when it is compared 18858 // against an std::string object, for example. 18859 // 18860 // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. 18861 template <typename T1, typename T2> 18862 std::string FormatForComparisonFailureMessage( 18863 const T1& value, const T2& /* other_operand */) { 18864 return FormatForComparison<T1, T2>::Format(value); 18865 } 18866 18867 // The helper function for {ASSERT|EXPECT}_EQ. 18868 template <typename T1, typename T2> 18869 AssertionResult CmpHelperEQ(const char* expected_expression, 18870 const char* actual_expression, 18871 const T1& expected, 18872 const T2& actual) { 18873 #ifdef _MSC_VER 18874 # pragma warning(push) // Saves the current warning state. 18875 # pragma warning(disable:4389) // Temporarily disables warning on 18876 // signed/unsigned mismatch. 18877 #endif 18878 18879 if (expected == actual) { 18880 return AssertionSuccess(); 18881 } 18882 18883 #ifdef _MSC_VER 18884 # pragma warning(pop) // Restores the warning state. 18885 #endif 18886 18887 return EqFailure(expected_expression, 18888 actual_expression, 18889 FormatForComparisonFailureMessage(expected, actual), 18890 FormatForComparisonFailureMessage(actual, expected), 18891 false); 18892 } 18893 18894 // With this overloaded version, we allow anonymous enums to be used 18895 // in {ASSERT|EXPECT}_EQ when compiled with gcc 4, as anonymous enums 18896 // can be implicitly cast to BiggestInt. 18897 GTEST_API_ AssertionResult CmpHelperEQ(const char* expected_expression, 18898 const char* actual_expression, 18899 BiggestInt expected, 18900 BiggestInt actual); 18901 18902 // The helper class for {ASSERT|EXPECT}_EQ. The template argument 18903 // lhs_is_null_literal is true iff the first argument to ASSERT_EQ() 18904 // is a null pointer literal. The following default implementation is 18905 // for lhs_is_null_literal being false. 18906 template <bool lhs_is_null_literal> 18907 class EqHelper { 18908 public: 18909 // This templatized version is for the general case. 18910 template <typename T1, typename T2> 18911 static AssertionResult Compare(const char* expected_expression, 18912 const char* actual_expression, 18913 const T1& expected, 18914 const T2& actual) { 18915 return CmpHelperEQ(expected_expression, actual_expression, expected, 18916 actual); 18917 } 18918 18919 // With this overloaded version, we allow anonymous enums to be used 18920 // in {ASSERT|EXPECT}_EQ when compiled with gcc 4, as anonymous 18921 // enums can be implicitly cast to BiggestInt. 18922 // 18923 // Even though its body looks the same as the above version, we 18924 // cannot merge the two, as it will make anonymous enums unhappy. 18925 static AssertionResult Compare(const char* expected_expression, 18926 const char* actual_expression, 18927 BiggestInt expected, 18928 BiggestInt actual) { 18929 return CmpHelperEQ(expected_expression, actual_expression, expected, 18930 actual); 18931 } 18932 }; 18933 18934 // This specialization is used when the first argument to ASSERT_EQ() 18935 // is a null pointer literal, like NULL, false, or 0. 18936 template <> 18937 class EqHelper<true> { 18938 public: 18939 // We define two overloaded versions of Compare(). The first 18940 // version will be picked when the second argument to ASSERT_EQ() is 18941 // NOT a pointer, e.g. ASSERT_EQ(0, AnIntFunction()) or 18942 // EXPECT_EQ(false, a_bool). 18943 template <typename T1, typename T2> 18944 static AssertionResult Compare( 18945 const char* expected_expression, 18946 const char* actual_expression, 18947 const T1& expected, 18948 const T2& actual, 18949 // The following line prevents this overload from being considered if T2 18950 // is not a pointer type. We need this because ASSERT_EQ(NULL, my_ptr) 18951 // expands to Compare("", "", NULL, my_ptr), which requires a conversion 18952 // to match the Secret* in the other overload, which would otherwise make 18953 // this template match better. 18954 typename EnableIf<!is_pointer<T2>::value>::type* = 0) { 18955 return CmpHelperEQ(expected_expression, actual_expression, expected, 18956 actual); 18957 } 18958 18959 // This version will be picked when the second argument to ASSERT_EQ() is a 18960 // pointer, e.g. ASSERT_EQ(NULL, a_pointer). 18961 template <typename T> 18962 static AssertionResult Compare( 18963 const char* expected_expression, 18964 const char* actual_expression, 18965 // We used to have a second template parameter instead of Secret*. That 18966 // template parameter would deduce to 'long', making this a better match 18967 // than the first overload even without the first overload's EnableIf. 18968 // Unfortunately, gcc with -Wconversion-null warns when "passing NULL to 18969 // non-pointer argument" (even a deduced integral argument), so the old 18970 // implementation caused warnings in user code. 18971 Secret* /* expected (NULL) */, 18972 T* actual) { 18973 // We already know that 'expected' is a null pointer. 18974 return CmpHelperEQ(expected_expression, actual_expression, 18975 static_cast<T*>(NULL), actual); 18976 } 18977 }; 18978 18979 // A macro for implementing the helper functions needed to implement 18980 // ASSERT_?? and EXPECT_??. It is here just to avoid copy-and-paste 18981 // of similar code. 18982 // 18983 // For each templatized helper function, we also define an overloaded 18984 // version for BiggestInt in order to reduce code bloat and allow 18985 // anonymous enums to be used with {ASSERT|EXPECT}_?? when compiled 18986 // with gcc 4. 18987 // 18988 // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. 18989 #define GTEST_IMPL_CMP_HELPER_(op_name, op)\ 18990 template <typename T1, typename T2>\ 18991 AssertionResult CmpHelper##op_name(const char* expr1, const char* expr2, \ 18992 const T1& val1, const T2& val2) { \ 18993 if (val1 op val2) { return AssertionSuccess(); \ 18994 }else { return AssertionFailure() \ 18995 << "Expected: (" << expr1 << ") " #op " (" << expr2\ 18996 << "), actual: " << FormatForComparisonFailureMessage(val1, val2)\ 18997 << " vs " << FormatForComparisonFailureMessage(val2, val1); \ 18998 }\ 18999 }\ 19000 GTEST_API_ AssertionResult CmpHelper##op_name(\ 19001 const char* expr1, const char* expr2, BiggestInt val1, BiggestInt val2) 19002 19003 // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. 19004 19005 // Implements the helper function for {ASSERT|EXPECT}_NE 19006 GTEST_IMPL_CMP_HELPER_(NE, != ); 19007 // Implements the helper function for {ASSERT|EXPECT}_LE 19008 GTEST_IMPL_CMP_HELPER_(LE, <= ); 19009 // Implements the helper function for {ASSERT|EXPECT}_LT 19010 GTEST_IMPL_CMP_HELPER_(LT, <); 19011 // Implements the helper function for {ASSERT|EXPECT}_GE 19012 GTEST_IMPL_CMP_HELPER_(GE, >= ); 19013 // Implements the helper function for {ASSERT|EXPECT}_GT 19014 GTEST_IMPL_CMP_HELPER_(GT, >); 19015 19016 #undef GTEST_IMPL_CMP_HELPER_ 19017 19018 // The helper function for {ASSERT|EXPECT}_STREQ. 19019 // 19020 // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. 19021 GTEST_API_ AssertionResult CmpHelperSTREQ(const char* expected_expression, 19022 const char* actual_expression, 19023 const char* expected, 19024 const char* actual); 19025 19026 // The helper function for {ASSERT|EXPECT}_STRCASEEQ. 19027 // 19028 // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. 19029 GTEST_API_ AssertionResult CmpHelperSTRCASEEQ(const char* expected_expression, 19030 const char* actual_expression, 19031 const char* expected, 19032 const char* actual); 19033 19034 // The helper function for {ASSERT|EXPECT}_STRNE. 19035 // 19036 // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. 19037 GTEST_API_ AssertionResult CmpHelperSTRNE(const char* s1_expression, 19038 const char* s2_expression, 19039 const char* s1, 19040 const char* s2); 19041 19042 // The helper function for {ASSERT|EXPECT}_STRCASENE. 19043 // 19044 // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. 19045 GTEST_API_ AssertionResult CmpHelperSTRCASENE(const char* s1_expression, 19046 const char* s2_expression, 19047 const char* s1, 19048 const char* s2); 19049 19050 19051 // Helper function for *_STREQ on wide strings. 19052 // 19053 // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. 19054 GTEST_API_ AssertionResult CmpHelperSTREQ(const char* expected_expression, 19055 const char* actual_expression, 19056 const wchar_t* expected, 19057 const wchar_t* actual); 19058 19059 // Helper function for *_STRNE on wide strings. 19060 // 19061 // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. 19062 GTEST_API_ AssertionResult CmpHelperSTRNE(const char* s1_expression, 19063 const char* s2_expression, 19064 const wchar_t* s1, 19065 const wchar_t* s2); 19066 19067 } // namespace internal 19068 19069 // IsSubstring() and IsNotSubstring() are intended to be used as the 19070 // first argument to {EXPECT,ASSERT}_PRED_FORMAT2(), not by 19071 // themselves. They check whether needle is a substring of haystack 19072 // (NULL is considered a substring of itself only), and return an 19073 // appropriate error message when they fail. 19074 // 19075 // The {needle,haystack}_expr arguments are the stringified 19076 // expressions that generated the two real arguments. 19077 GTEST_API_ AssertionResult IsSubstring( 19078 const char* needle_expr, const char* haystack_expr, 19079 const char* needle, const char* haystack); 19080 GTEST_API_ AssertionResult IsSubstring( 19081 const char* needle_expr, const char* haystack_expr, 19082 const wchar_t* needle, const wchar_t* haystack); 19083 GTEST_API_ AssertionResult IsNotSubstring( 19084 const char* needle_expr, const char* haystack_expr, 19085 const char* needle, const char* haystack); 19086 GTEST_API_ AssertionResult IsNotSubstring( 19087 const char* needle_expr, const char* haystack_expr, 19088 const wchar_t* needle, const wchar_t* haystack); 19089 GTEST_API_ AssertionResult IsSubstring( 19090 const char* needle_expr, const char* haystack_expr, 19091 const ::std::string& needle, const ::std::string& haystack); 19092 GTEST_API_ AssertionResult IsNotSubstring( 19093 const char* needle_expr, const char* haystack_expr, 19094 const ::std::string& needle, const ::std::string& haystack); 19095 19096 #if GTEST_HAS_STD_WSTRING 19097 GTEST_API_ AssertionResult IsSubstring( 19098 const char* needle_expr, const char* haystack_expr, 19099 const ::std::wstring& needle, const ::std::wstring& haystack); 19100 GTEST_API_ AssertionResult IsNotSubstring( 19101 const char* needle_expr, const char* haystack_expr, 19102 const ::std::wstring& needle, const ::std::wstring& haystack); 19103 #endif // GTEST_HAS_STD_WSTRING 19104 19105 namespace internal { 19106 19107 // Helper template function for comparing floating-points. 19108 // 19109 // Template parameter: 19110 // 19111 // RawType: the raw floating-point type (either float or double) 19112 // 19113 // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. 19114 template <typename RawType> 19115 AssertionResult CmpHelperFloatingPointEQ(const char* expected_expression, 19116 const char* actual_expression, 19117 RawType expected, 19118 RawType actual) { 19119 const FloatingPoint<RawType> lhs(expected), rhs(actual); 19120 19121 if (lhs.AlmostEquals(rhs)) { 19122 return AssertionSuccess(); 19123 } 19124 19125 ::std::stringstream expected_ss; 19126 expected_ss << std::setprecision(std::numeric_limits<RawType>::digits10 + 2) 19127 << expected; 19128 19129 ::std::stringstream actual_ss; 19130 actual_ss << std::setprecision(std::numeric_limits<RawType>::digits10 + 2) 19131 << actual; 19132 19133 return EqFailure(expected_expression, 19134 actual_expression, 19135 StringStreamToString(&expected_ss), 19136 StringStreamToString(&actual_ss), 19137 false); 19138 } 19139 19140 // Helper function for implementing ASSERT_NEAR. 19141 // 19142 // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. 19143 GTEST_API_ AssertionResult DoubleNearPredFormat(const char* expr1, 19144 const char* expr2, 19145 const char* abs_error_expr, 19146 double val1, 19147 double val2, 19148 double abs_error); 19149 19150 // INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE. 19151 // A class that enables one to stream messages to assertion macros 19152 class GTEST_API_ AssertHelper { 19153 public: 19154 // Constructor. 19155 AssertHelper(TestPartResult::Type type, 19156 const char* file, 19157 int line, 19158 const char* message); 19159 ~AssertHelper(); 19160 19161 // Message assignment is a semantic trick to enable assertion 19162 // streaming; see the GTEST_MESSAGE_ macro below. 19163 void operator=(const Message& message) const; 19164 19165 private: 19166 // We put our data in a struct so that the size of the AssertHelper class can 19167 // be as small as possible. This is important because gcc is incapable of 19168 // re-using stack space even for temporary variables, so every EXPECT_EQ 19169 // reserves stack space for another AssertHelper. 19170 struct AssertHelperData { 19171 AssertHelperData(TestPartResult::Type t, 19172 const char* srcfile, 19173 int line_num, 19174 const char* msg) 19175 : type(t), file(srcfile), line(line_num), message(msg) { } 19176 19177 TestPartResult::Type const type; 19178 const char* const file; 19179 int const line; 19180 std::string const message; 19181 19182 private: 19183 GTEST_DISALLOW_COPY_AND_ASSIGN_(AssertHelperData); 19184 }; 19185 19186 AssertHelperData* const data_; 19187 19188 GTEST_DISALLOW_COPY_AND_ASSIGN_(AssertHelper); 19189 }; 19190 19191 } // namespace internal 19192 19193 #if GTEST_HAS_PARAM_TEST 19194 // The pure interface class that all value-parameterized tests inherit from. 19195 // A value-parameterized class must inherit from both ::testing::Test and 19196 // ::testing::WithParamInterface. In most cases that just means inheriting 19197 // from ::testing::TestWithParam, but more complicated test hierarchies 19198 // may need to inherit from Test and WithParamInterface at different levels. 19199 // 19200 // This interface has support for accessing the test parameter value via 19201 // the GetParam() method. 19202 // 19203 // Use it with one of the parameter generator defining functions, like Range(), 19204 // Values(), ValuesIn(), Bool(), and Combine(). 19205 // 19206 // class FooTest : public ::testing::TestWithParam<int> { 19207 // protected: 19208 // FooTest() { 19209 // // Can use GetParam() here. 19210 // } 19211 // virtual ~FooTest() { 19212 // // Can use GetParam() here. 19213 // } 19214 // virtual void SetUp() { 19215 // // Can use GetParam() here. 19216 // } 19217 // virtual void TearDown { 19218 // // Can use GetParam() here. 19219 // } 19220 // }; 19221 // TEST_P(FooTest, DoesBar) { 19222 // // Can use GetParam() method here. 19223 // Foo foo; 19224 // ASSERT_TRUE(foo.DoesBar(GetParam())); 19225 // } 19226 // INSTANTIATE_TEST_CASE_P(OneToTenRange, FooTest, ::testing::Range(1, 10)); 19227 19228 template <typename T> 19229 class WithParamInterface { 19230 public: 19231 typedef T ParamType; 19232 virtual ~WithParamInterface() {} 19233 19234 // The current parameter value. Is also available in the test fixture's 19235 // constructor. This member function is non-static, even though it only 19236 // references static data, to reduce the opportunity for incorrect uses 19237 // like writing 'WithParamInterface<bool>::GetParam()' for a test that 19238 // uses a fixture whose parameter type is int. 19239 const ParamType& GetParam() const { 19240 GTEST_CHECK_(parameter_ != NULL) 19241 << "GetParam() can only be called inside a value-parameterized test " 19242 << "-- did you intend to write TEST_P instead of TEST_F?"; 19243 return *parameter_; 19244 } 19245 19246 private: 19247 // Sets parameter value. The caller is responsible for making sure the value 19248 // remains alive and unchanged throughout the current test. 19249 static void SetParam(const ParamType* parameter) { 19250 parameter_ = parameter; 19251 } 19252 19253 // Static value used for accessing parameter during a test lifetime. 19254 static const ParamType* parameter_; 19255 19256 // TestClass must be a subclass of WithParamInterface<T> and Test. 19257 template <class TestClass> friend class internal::ParameterizedTestFactory; 19258 }; 19259 19260 template <typename T> 19261 const T* WithParamInterface<T>::parameter_ = NULL; 19262 19263 // Most value-parameterized classes can ignore the existence of 19264 // WithParamInterface, and can just inherit from ::testing::TestWithParam. 19265 19266 template <typename T> 19267 class TestWithParam : public Test, public WithParamInterface<T> { 19268 }; 19269 19270 #endif // GTEST_HAS_PARAM_TEST 19271 19272 // Macros for indicating success/failure in test code. 19273 19274 // ADD_FAILURE unconditionally adds a failure to the current test. 19275 // SUCCEED generates a success - it doesn't automatically make the 19276 // current test successful, as a test is only successful when it has 19277 // no failure. 19278 // 19279 // EXPECT_* verifies that a certain condition is satisfied. If not, 19280 // it behaves like ADD_FAILURE. In particular: 19281 // 19282 // EXPECT_TRUE verifies that a Boolean condition is true. 19283 // EXPECT_FALSE verifies that a Boolean condition is false. 19284 // 19285 // FAIL and ASSERT_* are similar to ADD_FAILURE and EXPECT_*, except 19286 // that they will also abort the current function on failure. People 19287 // usually want the fail-fast behavior of FAIL and ASSERT_*, but those 19288 // writing data-driven tests often find themselves using ADD_FAILURE 19289 // and EXPECT_* more. 19290 19291 // Generates a nonfatal failure with a generic message. 19292 #define ADD_FAILURE() GTEST_NONFATAL_FAILURE_("Failed") 19293 19294 // Generates a nonfatal failure at the given source file location with 19295 // a generic message. 19296 #define ADD_FAILURE_AT(file, line) \ 19297 GTEST_MESSAGE_AT_(file, line, "Failed", \ 19298 ::testing::TestPartResult::kNonFatalFailure) 19299 19300 // Generates a fatal failure with a generic message. 19301 #define GTEST_FAIL() GTEST_FATAL_FAILURE_("Failed") 19302 19303 // Define this macro to 1 to omit the definition of FAIL(), which is a 19304 // generic name and clashes with some other libraries. 19305 #if !GTEST_DONT_DEFINE_FAIL 19306 # define FAIL() GTEST_FAIL() 19307 #endif 19308 19309 // Generates a success with a generic message. 19310 #define GTEST_SUCCEED() GTEST_SUCCESS_("Succeeded") 19311 19312 // Define this macro to 1 to omit the definition of SUCCEED(), which 19313 // is a generic name and clashes with some other libraries. 19314 #if !GTEST_DONT_DEFINE_SUCCEED 19315 # define SUCCEED() GTEST_SUCCEED() 19316 #endif 19317 19318 // Macros for testing exceptions. 19319 // 19320 // * {ASSERT|EXPECT}_THROW(statement, expected_exception): 19321 // Tests that the statement throws the expected exception. 19322 // * {ASSERT|EXPECT}_NO_THROW(statement): 19323 // Tests that the statement doesn't throw any exception. 19324 // * {ASSERT|EXPECT}_ANY_THROW(statement): 19325 // Tests that the statement throws an exception. 19326 19327 #define EXPECT_THROW(statement, expected_exception) \ 19328 GTEST_TEST_THROW_(statement, expected_exception, GTEST_NONFATAL_FAILURE_) 19329 #define EXPECT_NO_THROW(statement) \ 19330 GTEST_TEST_NO_THROW_(statement, GTEST_NONFATAL_FAILURE_) 19331 #define EXPECT_ANY_THROW(statement) \ 19332 GTEST_TEST_ANY_THROW_(statement, GTEST_NONFATAL_FAILURE_) 19333 #define ASSERT_THROW(statement, expected_exception) \ 19334 GTEST_TEST_THROW_(statement, expected_exception, GTEST_FATAL_FAILURE_) 19335 #define ASSERT_NO_THROW(statement) \ 19336 GTEST_TEST_NO_THROW_(statement, GTEST_FATAL_FAILURE_) 19337 #define ASSERT_ANY_THROW(statement) \ 19338 GTEST_TEST_ANY_THROW_(statement, GTEST_FATAL_FAILURE_) 19339 19340 // Boolean assertions. Condition can be either a Boolean expression or an 19341 // AssertionResult. For more information on how to use AssertionResult with 19342 // these macros see comments on that class. 19343 #define EXPECT_TRUE(condition) \ 19344 GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \ 19345 GTEST_NONFATAL_FAILURE_) 19346 #define EXPECT_FALSE(condition) \ 19347 GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \ 19348 GTEST_NONFATAL_FAILURE_) 19349 #define ASSERT_TRUE(condition) \ 19350 GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \ 19351 GTEST_FATAL_FAILURE_) 19352 #define ASSERT_FALSE(condition) \ 19353 GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \ 19354 GTEST_FATAL_FAILURE_) 19355 19356 // Includes the auto-generated header that implements a family of 19357 // generic predicate assertion macros. 19358 // Copyright 2006, Google Inc. 19359 // All rights reserved. 19360 // 19361 // Redistribution and use in source and binary forms, with or without 19362 // modification, are permitted provided that the following conditions are 19363 // met: 19364 // 19365 // * Redistributions of source code must retain the above copyright 19366 // notice, this list of conditions and the following disclaimer. 19367 // * Redistributions in binary form must reproduce the above 19368 // copyright notice, this list of conditions and the following disclaimer 19369 // in the documentation and/or other materials provided with the 19370 // distribution. 19371 // * Neither the name of Google Inc. nor the names of its 19372 // contributors may be used to endorse or promote products derived from 19373 // this software without specific prior written permission. 19374 // 19375 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19376 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19377 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 19378 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19379 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 19380 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 19381 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 19382 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 19383 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 19384 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 19385 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 19386 19387 // This file is AUTOMATICALLY GENERATED on 10/31/2011 by command 19388 // 'gen_gtest_pred_impl.py 5'. DO NOT EDIT BY HAND! 19389 // 19390 // Implements a family of generic predicate assertion macros. 19391 19392 #ifndef GTEST_INCLUDE_GTEST_GTEST_PRED_IMPL_H_ 19393 #define GTEST_INCLUDE_GTEST_GTEST_PRED_IMPL_H_ 19394 19395 // Makes sure this header is not included before gtest.h. 19396 #ifndef GTEST_INCLUDE_GTEST_GTEST_H_ 19397 # error Do not include gtest_pred_impl.h directly. Include gtest.h instead. 19398 #endif // GTEST_INCLUDE_GTEST_GTEST_H_ 19399 19400 // This header implements a family of generic predicate assertion 19401 // macros: 19402 // 19403 // ASSERT_PRED_FORMAT1(pred_format, v1) 19404 // ASSERT_PRED_FORMAT2(pred_format, v1, v2) 19405 // ... 19406 // 19407 // where pred_format is a function or functor that takes n (in the 19408 // case of ASSERT_PRED_FORMATn) values and their source expression 19409 // text, and returns a testing::AssertionResult. See the definition 19410 // of ASSERT_EQ in gtest.h for an example. 19411 // 19412 // If you don't care about formatting, you can use the more 19413 // restrictive version: 19414 // 19415 // ASSERT_PRED1(pred, v1) 19416 // ASSERT_PRED2(pred, v1, v2) 19417 // ... 19418 // 19419 // where pred is an n-ary function or functor that returns bool, 19420 // and the values v1, v2, ..., must support the << operator for 19421 // streaming to std::ostream. 19422 // 19423 // We also define the EXPECT_* variations. 19424 // 19425 // For now we only support predicates whose arity is at most 5. 19426 // Please email [email protected] if you need 19427 // support for higher arities. 19428 19429 // GTEST_ASSERT_ is the basic statement to which all of the assertions 19430 // in this file reduce. Don't use this in your code. 19431 19432 #define GTEST_ASSERT_(expression, on_failure) \ 19433 GTEST_AMBIGUOUS_ELSE_BLOCKER_ \ 19434 if (const ::testing::AssertionResult gtest_ar = (expression)) \ 19435 ; \ 19436 else \ 19437 on_failure(gtest_ar.failure_message()) 19438 19439 19440 // Helper function for implementing {EXPECT|ASSERT}_PRED1. Don't use 19441 // this in your code. 19442 template <typename Pred, 19443 typename T1> 19444 AssertionResult AssertPred1Helper(const char* pred_text, 19445 const char* e1, 19446 Pred pred, 19447 const T1& v1) { 19448 if (pred(v1)) return AssertionSuccess(); 19449 19450 return AssertionFailure() << pred_text << "(" 19451 << e1 << ") evaluates to false, where" 19452 << "\n" << e1 << " evaluates to " << v1; 19453 } 19454 19455 // Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT1. 19456 // Don't use this in your code. 19457 #define GTEST_PRED_FORMAT1_(pred_format, v1, on_failure)\ 19458 GTEST_ASSERT_(pred_format(#v1, v1), \ 19459 on_failure) 19460 19461 // Internal macro for implementing {EXPECT|ASSERT}_PRED1. Don't use 19462 // this in your code. 19463 #define GTEST_PRED1_(pred, v1, on_failure)\ 19464 GTEST_ASSERT_(::testing::AssertPred1Helper(#pred, \ 19465 #v1, \ 19466 pred, \ 19467 v1), on_failure) 19468 19469 // Unary predicate assertion macros. 19470 #define EXPECT_PRED_FORMAT1(pred_format, v1) \ 19471 GTEST_PRED_FORMAT1_(pred_format, v1, GTEST_NONFATAL_FAILURE_) 19472 #define EXPECT_PRED1(pred, v1) \ 19473 GTEST_PRED1_(pred, v1, GTEST_NONFATAL_FAILURE_) 19474 #define ASSERT_PRED_FORMAT1(pred_format, v1) \ 19475 GTEST_PRED_FORMAT1_(pred_format, v1, GTEST_FATAL_FAILURE_) 19476 #define ASSERT_PRED1(pred, v1) \ 19477 GTEST_PRED1_(pred, v1, GTEST_FATAL_FAILURE_) 19478 19479 19480 19481 // Helper function for implementing {EXPECT|ASSERT}_PRED2. Don't use 19482 // this in your code. 19483 template <typename Pred, 19484 typename T1, 19485 typename T2> 19486 AssertionResult AssertPred2Helper(const char* pred_text, 19487 const char* e1, 19488 const char* e2, 19489 Pred pred, 19490 const T1& v1, 19491 const T2& v2) { 19492 if (pred(v1, v2)) return AssertionSuccess(); 19493 19494 return AssertionFailure() << pred_text << "(" 19495 << e1 << ", " 19496 << e2 << ") evaluates to false, where" 19497 << "\n" << e1 << " evaluates to " << v1 19498 << "\n" << e2 << " evaluates to " << v2; 19499 } 19500 19501 // Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT2. 19502 // Don't use this in your code. 19503 #define GTEST_PRED_FORMAT2_(pred_format, v1, v2, on_failure)\ 19504 GTEST_ASSERT_(pred_format(#v1, #v2, v1, v2), \ 19505 on_failure) 19506 19507 // Internal macro for implementing {EXPECT|ASSERT}_PRED2. Don't use 19508 // this in your code. 19509 #define GTEST_PRED2_(pred, v1, v2, on_failure)\ 19510 GTEST_ASSERT_(::testing::AssertPred2Helper(#pred, \ 19511 #v1, \ 19512 #v2, \ 19513 pred, \ 19514 v1, \ 19515 v2), on_failure) 19516 19517 // Binary predicate assertion macros. 19518 #define EXPECT_PRED_FORMAT2(pred_format, v1, v2) \ 19519 GTEST_PRED_FORMAT2_(pred_format, v1, v2, GTEST_NONFATAL_FAILURE_) 19520 #define EXPECT_PRED2(pred, v1, v2) \ 19521 GTEST_PRED2_(pred, v1, v2, GTEST_NONFATAL_FAILURE_) 19522 #define ASSERT_PRED_FORMAT2(pred_format, v1, v2) \ 19523 GTEST_PRED_FORMAT2_(pred_format, v1, v2, GTEST_FATAL_FAILURE_) 19524 #define ASSERT_PRED2(pred, v1, v2) \ 19525 GTEST_PRED2_(pred, v1, v2, GTEST_FATAL_FAILURE_) 19526 19527 19528 19529 // Helper function for implementing {EXPECT|ASSERT}_PRED3. Don't use 19530 // this in your code. 19531 template <typename Pred, 19532 typename T1, 19533 typename T2, 19534 typename T3> 19535 AssertionResult AssertPred3Helper(const char* pred_text, 19536 const char* e1, 19537 const char* e2, 19538 const char* e3, 19539 Pred pred, 19540 const T1& v1, 19541 const T2& v2, 19542 const T3& v3) { 19543 if (pred(v1, v2, v3)) return AssertionSuccess(); 19544 19545 return AssertionFailure() << pred_text << "(" 19546 << e1 << ", " 19547 << e2 << ", " 19548 << e3 << ") evaluates to false, where" 19549 << "\n" << e1 << " evaluates to " << v1 19550 << "\n" << e2 << " evaluates to " << v2 19551 << "\n" << e3 << " evaluates to " << v3; 19552 } 19553 19554 // Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT3. 19555 // Don't use this in your code. 19556 #define GTEST_PRED_FORMAT3_(pred_format, v1, v2, v3, on_failure)\ 19557 GTEST_ASSERT_(pred_format(#v1, #v2, #v3, v1, v2, v3), \ 19558 on_failure) 19559 19560 // Internal macro for implementing {EXPECT|ASSERT}_PRED3. Don't use 19561 // this in your code. 19562 #define GTEST_PRED3_(pred, v1, v2, v3, on_failure)\ 19563 GTEST_ASSERT_(::testing::AssertPred3Helper(#pred, \ 19564 #v1, \ 19565 #v2, \ 19566 #v3, \ 19567 pred, \ 19568 v1, \ 19569 v2, \ 19570 v3), on_failure) 19571 19572 // Ternary predicate assertion macros. 19573 #define EXPECT_PRED_FORMAT3(pred_format, v1, v2, v3) \ 19574 GTEST_PRED_FORMAT3_(pred_format, v1, v2, v3, GTEST_NONFATAL_FAILURE_) 19575 #define EXPECT_PRED3(pred, v1, v2, v3) \ 19576 GTEST_PRED3_(pred, v1, v2, v3, GTEST_NONFATAL_FAILURE_) 19577 #define ASSERT_PRED_FORMAT3(pred_format, v1, v2, v3) \ 19578 GTEST_PRED_FORMAT3_(pred_format, v1, v2, v3, GTEST_FATAL_FAILURE_) 19579 #define ASSERT_PRED3(pred, v1, v2, v3) \ 19580 GTEST_PRED3_(pred, v1, v2, v3, GTEST_FATAL_FAILURE_) 19581 19582 19583 19584 // Helper function for implementing {EXPECT|ASSERT}_PRED4. Don't use 19585 // this in your code. 19586 template <typename Pred, 19587 typename T1, 19588 typename T2, 19589 typename T3, 19590 typename T4> 19591 AssertionResult AssertPred4Helper(const char* pred_text, 19592 const char* e1, 19593 const char* e2, 19594 const char* e3, 19595 const char* e4, 19596 Pred pred, 19597 const T1& v1, 19598 const T2& v2, 19599 const T3& v3, 19600 const T4& v4) { 19601 if (pred(v1, v2, v3, v4)) return AssertionSuccess(); 19602 19603 return AssertionFailure() << pred_text << "(" 19604 << e1 << ", " 19605 << e2 << ", " 19606 << e3 << ", " 19607 << e4 << ") evaluates to false, where" 19608 << "\n" << e1 << " evaluates to " << v1 19609 << "\n" << e2 << " evaluates to " << v2 19610 << "\n" << e3 << " evaluates to " << v3 19611 << "\n" << e4 << " evaluates to " << v4; 19612 } 19613 19614 // Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT4. 19615 // Don't use this in your code. 19616 #define GTEST_PRED_FORMAT4_(pred_format, v1, v2, v3, v4, on_failure)\ 19617 GTEST_ASSERT_(pred_format(#v1, #v2, #v3, #v4, v1, v2, v3, v4), \ 19618 on_failure) 19619 19620 // Internal macro for implementing {EXPECT|ASSERT}_PRED4. Don't use 19621 // this in your code. 19622 #define GTEST_PRED4_(pred, v1, v2, v3, v4, on_failure)\ 19623 GTEST_ASSERT_(::testing::AssertPred4Helper(#pred, \ 19624 #v1, \ 19625 #v2, \ 19626 #v3, \ 19627 #v4, \ 19628 pred, \ 19629 v1, \ 19630 v2, \ 19631 v3, \ 19632 v4), on_failure) 19633 19634 // 4-ary predicate assertion macros. 19635 #define EXPECT_PRED_FORMAT4(pred_format, v1, v2, v3, v4) \ 19636 GTEST_PRED_FORMAT4_(pred_format, v1, v2, v3, v4, GTEST_NONFATAL_FAILURE_) 19637 #define EXPECT_PRED4(pred, v1, v2, v3, v4) \ 19638 GTEST_PRED4_(pred, v1, v2, v3, v4, GTEST_NONFATAL_FAILURE_) 19639 #define ASSERT_PRED_FORMAT4(pred_format, v1, v2, v3, v4) \ 19640 GTEST_PRED_FORMAT4_(pred_format, v1, v2, v3, v4, GTEST_FATAL_FAILURE_) 19641 #define ASSERT_PRED4(pred, v1, v2, v3, v4) \ 19642 GTEST_PRED4_(pred, v1, v2, v3, v4, GTEST_FATAL_FAILURE_) 19643 19644 19645 19646 // Helper function for implementing {EXPECT|ASSERT}_PRED5. Don't use 19647 // this in your code. 19648 template <typename Pred, 19649 typename T1, 19650 typename T2, 19651 typename T3, 19652 typename T4, 19653 typename T5> 19654 AssertionResult AssertPred5Helper(const char* pred_text, 19655 const char* e1, 19656 const char* e2, 19657 const char* e3, 19658 const char* e4, 19659 const char* e5, 19660 Pred pred, 19661 const T1& v1, 19662 const T2& v2, 19663 const T3& v3, 19664 const T4& v4, 19665 const T5& v5) { 19666 if (pred(v1, v2, v3, v4, v5)) return AssertionSuccess(); 19667 19668 return AssertionFailure() << pred_text << "(" 19669 << e1 << ", " 19670 << e2 << ", " 19671 << e3 << ", " 19672 << e4 << ", " 19673 << e5 << ") evaluates to false, where" 19674 << "\n" << e1 << " evaluates to " << v1 19675 << "\n" << e2 << " evaluates to " << v2 19676 << "\n" << e3 << " evaluates to " << v3 19677 << "\n" << e4 << " evaluates to " << v4 19678 << "\n" << e5 << " evaluates to " << v5; 19679 } 19680 19681 // Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT5. 19682 // Don't use this in your code. 19683 #define GTEST_PRED_FORMAT5_(pred_format, v1, v2, v3, v4, v5, on_failure)\ 19684 GTEST_ASSERT_(pred_format(#v1, #v2, #v3, #v4, #v5, v1, v2, v3, v4, v5), \ 19685 on_failure) 19686 19687 // Internal macro for implementing {EXPECT|ASSERT}_PRED5. Don't use 19688 // this in your code. 19689 #define GTEST_PRED5_(pred, v1, v2, v3, v4, v5, on_failure)\ 19690 GTEST_ASSERT_(::testing::AssertPred5Helper(#pred, \ 19691 #v1, \ 19692 #v2, \ 19693 #v3, \ 19694 #v4, \ 19695 #v5, \ 19696 pred, \ 19697 v1, \ 19698 v2, \ 19699 v3, \ 19700 v4, \ 19701 v5), on_failure) 19702 19703 // 5-ary predicate assertion macros. 19704 #define EXPECT_PRED_FORMAT5(pred_format, v1, v2, v3, v4, v5) \ 19705 GTEST_PRED_FORMAT5_(pred_format, v1, v2, v3, v4, v5, GTEST_NONFATAL_FAILURE_) 19706 #define EXPECT_PRED5(pred, v1, v2, v3, v4, v5) \ 19707 GTEST_PRED5_(pred, v1, v2, v3, v4, v5, GTEST_NONFATAL_FAILURE_) 19708 #define ASSERT_PRED_FORMAT5(pred_format, v1, v2, v3, v4, v5) \ 19709 GTEST_PRED_FORMAT5_(pred_format, v1, v2, v3, v4, v5, GTEST_FATAL_FAILURE_) 19710 #define ASSERT_PRED5(pred, v1, v2, v3, v4, v5) \ 19711 GTEST_PRED5_(pred, v1, v2, v3, v4, v5, GTEST_FATAL_FAILURE_) 19712 19713 19714 19715 #endif // GTEST_INCLUDE_GTEST_GTEST_PRED_IMPL_H_ 19716 19717 // Macros for testing equalities and inequalities. 19718 // 19719 // * {ASSERT|EXPECT}_EQ(expected, actual): Tests that expected == actual 19720 // * {ASSERT|EXPECT}_NE(v1, v2): Tests that v1 != v2 19721 // * {ASSERT|EXPECT}_LT(v1, v2): Tests that v1 < v2 19722 // * {ASSERT|EXPECT}_LE(v1, v2): Tests that v1 <= v2 19723 // * {ASSERT|EXPECT}_GT(v1, v2): Tests that v1 > v2 19724 // * {ASSERT|EXPECT}_GE(v1, v2): Tests that v1 >= v2 19725 // 19726 // When they are not, Google Test prints both the tested expressions and 19727 // their actual values. The values must be compatible built-in types, 19728 // or you will get a compiler error. By "compatible" we mean that the 19729 // values can be compared by the respective operator. 19730 // 19731 // Note: 19732 // 19733 // 1. It is possible to make a user-defined type work with 19734 // {ASSERT|EXPECT}_??(), but that requires overloading the 19735 // comparison operators and is thus discouraged by the Google C++ 19736 // Usage Guide. Therefore, you are advised to use the 19737 // {ASSERT|EXPECT}_TRUE() macro to assert that two objects are 19738 // equal. 19739 // 19740 // 2. The {ASSERT|EXPECT}_??() macros do pointer comparisons on 19741 // pointers (in particular, C strings). Therefore, if you use it 19742 // with two C strings, you are testing how their locations in memory 19743 // are related, not how their content is related. To compare two C 19744 // strings by content, use {ASSERT|EXPECT}_STR*(). 19745 // 19746 // 3. {ASSERT|EXPECT}_EQ(expected, actual) is preferred to 19747 // {ASSERT|EXPECT}_TRUE(expected == actual), as the former tells you 19748 // what the actual value is when it fails, and similarly for the 19749 // other comparisons. 19750 // 19751 // 4. Do not depend on the order in which {ASSERT|EXPECT}_??() 19752 // evaluate their arguments, which is undefined. 19753 // 19754 // 5. These macros evaluate their arguments exactly once. 19755 // 19756 // Examples: 19757 // 19758 // EXPECT_NE(5, Foo()); 19759 // EXPECT_EQ(NULL, a_pointer); 19760 // ASSERT_LT(i, array_size); 19761 // ASSERT_GT(records.size(), 0) << "There is no record left."; 19762 19763 #define EXPECT_EQ(expected, actual) \ 19764 EXPECT_PRED_FORMAT2(::testing::internal:: \ 19765 EqHelper<GTEST_IS_NULL_LITERAL_(expected)>::Compare, \ 19766 expected, actual) 19767 #define EXPECT_NE(expected, actual) \ 19768 EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperNE, expected, actual) 19769 #define EXPECT_LE(val1, val2) \ 19770 EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperLE, val1, val2) 19771 #define EXPECT_LT(val1, val2) \ 19772 EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperLT, val1, val2) 19773 #define EXPECT_GE(val1, val2) \ 19774 EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperGE, val1, val2) 19775 #define EXPECT_GT(val1, val2) \ 19776 EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperGT, val1, val2) 19777 19778 #define GTEST_ASSERT_EQ(expected, actual) \ 19779 ASSERT_PRED_FORMAT2(::testing::internal:: \ 19780 EqHelper<GTEST_IS_NULL_LITERAL_(expected)>::Compare, \ 19781 expected, actual) 19782 #define GTEST_ASSERT_NE(val1, val2) \ 19783 ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperNE, val1, val2) 19784 #define GTEST_ASSERT_LE(val1, val2) \ 19785 ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperLE, val1, val2) 19786 #define GTEST_ASSERT_LT(val1, val2) \ 19787 ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperLT, val1, val2) 19788 #define GTEST_ASSERT_GE(val1, val2) \ 19789 ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperGE, val1, val2) 19790 #define GTEST_ASSERT_GT(val1, val2) \ 19791 ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperGT, val1, val2) 19792 19793 // Define macro GTEST_DONT_DEFINE_ASSERT_XY to 1 to omit the definition of 19794 // ASSERT_XY(), which clashes with some users' own code. 19795 19796 #if !GTEST_DONT_DEFINE_ASSERT_EQ 19797 # define ASSERT_EQ(val1, val2) GTEST_ASSERT_EQ(val1, val2) 19798 #endif 19799 19800 #if !GTEST_DONT_DEFINE_ASSERT_NE 19801 # define ASSERT_NE(val1, val2) GTEST_ASSERT_NE(val1, val2) 19802 #endif 19803 19804 #if !GTEST_DONT_DEFINE_ASSERT_LE 19805 # define ASSERT_LE(val1, val2) GTEST_ASSERT_LE(val1, val2) 19806 #endif 19807 19808 #if !GTEST_DONT_DEFINE_ASSERT_LT 19809 # define ASSERT_LT(val1, val2) GTEST_ASSERT_LT(val1, val2) 19810 #endif 19811 19812 #if !GTEST_DONT_DEFINE_ASSERT_GE 19813 # define ASSERT_GE(val1, val2) GTEST_ASSERT_GE(val1, val2) 19814 #endif 19815 19816 #if !GTEST_DONT_DEFINE_ASSERT_GT 19817 # define ASSERT_GT(val1, val2) GTEST_ASSERT_GT(val1, val2) 19818 #endif 19819 19820 // C-string Comparisons. All tests treat NULL and any non-NULL string 19821 // as different. Two NULLs are equal. 19822 // 19823 // * {ASSERT|EXPECT}_STREQ(s1, s2): Tests that s1 == s2 19824 // * {ASSERT|EXPECT}_STRNE(s1, s2): Tests that s1 != s2 19825 // * {ASSERT|EXPECT}_STRCASEEQ(s1, s2): Tests that s1 == s2, ignoring case 19826 // * {ASSERT|EXPECT}_STRCASENE(s1, s2): Tests that s1 != s2, ignoring case 19827 // 19828 // For wide or narrow string objects, you can use the 19829 // {ASSERT|EXPECT}_??() macros. 19830 // 19831 // Don't depend on the order in which the arguments are evaluated, 19832 // which is undefined. 19833 // 19834 // These macros evaluate their arguments exactly once. 19835 19836 #define EXPECT_STREQ(expected, actual) \ 19837 EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperSTREQ, expected, actual) 19838 #define EXPECT_STRNE(s1, s2) \ 19839 EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperSTRNE, s1, s2) 19840 #define EXPECT_STRCASEEQ(expected, actual) \ 19841 EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperSTRCASEEQ, expected, actual) 19842 #define EXPECT_STRCASENE(s1, s2)\ 19843 EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperSTRCASENE, s1, s2) 19844 19845 #define ASSERT_STREQ(expected, actual) \ 19846 ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperSTREQ, expected, actual) 19847 #define ASSERT_STRNE(s1, s2) \ 19848 ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperSTRNE, s1, s2) 19849 #define ASSERT_STRCASEEQ(expected, actual) \ 19850 ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperSTRCASEEQ, expected, actual) 19851 #define ASSERT_STRCASENE(s1, s2)\ 19852 ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperSTRCASENE, s1, s2) 19853 19854 // Macros for comparing floating-point numbers. 19855 // 19856 // * {ASSERT|EXPECT}_FLOAT_EQ(expected, actual): 19857 // Tests that two float values are almost equal. 19858 // * {ASSERT|EXPECT}_DOUBLE_EQ(expected, actual): 19859 // Tests that two double values are almost equal. 19860 // * {ASSERT|EXPECT}_NEAR(v1, v2, abs_error): 19861 // Tests that v1 and v2 are within the given distance to each other. 19862 // 19863 // Google Test uses ULP-based comparison to automatically pick a default 19864 // error bound that is appropriate for the operands. See the 19865 // FloatingPoint template class in gtest-internal.h if you are 19866 // interested in the implementation details. 19867 19868 #define EXPECT_FLOAT_EQ(expected, actual)\ 19869 EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ<float>, \ 19870 expected, actual) 19871 19872 #define EXPECT_DOUBLE_EQ(expected, actual)\ 19873 EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ<double>, \ 19874 expected, actual) 19875 19876 #define ASSERT_FLOAT_EQ(expected, actual)\ 19877 ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ<float>, \ 19878 expected, actual) 19879 19880 #define ASSERT_DOUBLE_EQ(expected, actual)\ 19881 ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ<double>, \ 19882 expected, actual) 19883 19884 #define EXPECT_NEAR(val1, val2, abs_error)\ 19885 EXPECT_PRED_FORMAT3(::testing::internal::DoubleNearPredFormat, \ 19886 val1, val2, abs_error) 19887 19888 #define ASSERT_NEAR(val1, val2, abs_error)\ 19889 ASSERT_PRED_FORMAT3(::testing::internal::DoubleNearPredFormat, \ 19890 val1, val2, abs_error) 19891 19892 // These predicate format functions work on floating-point values, and 19893 // can be used in {ASSERT|EXPECT}_PRED_FORMAT2*(), e.g. 19894 // 19895 // EXPECT_PRED_FORMAT2(testing::DoubleLE, Foo(), 5.0); 19896 19897 // Asserts that val1 is less than, or almost equal to, val2. Fails 19898 // otherwise. In particular, it fails if either val1 or val2 is NaN. 19899 GTEST_API_ AssertionResult FloatLE(const char* expr1, const char* expr2, 19900 float val1, float val2); 19901 GTEST_API_ AssertionResult DoubleLE(const char* expr1, const char* expr2, 19902 double val1, double val2); 19903 19904 19905 #if GTEST_OS_WINDOWS 19906 19907 // Macros that test for HRESULT failure and success, these are only useful 19908 // on Windows, and rely on Windows SDK macros and APIs to compile. 19909 // 19910 // * {ASSERT|EXPECT}_HRESULT_{SUCCEEDED|FAILED}(expr) 19911 // 19912 // When expr unexpectedly fails or succeeds, Google Test prints the 19913 // expected result and the actual result with both a human-readable 19914 // string representation of the error, if available, as well as the 19915 // hex result code. 19916 # define EXPECT_HRESULT_SUCCEEDED(expr) \ 19917 EXPECT_PRED_FORMAT1(::testing::internal::IsHRESULTSuccess, (expr)) 19918 19919 # define ASSERT_HRESULT_SUCCEEDED(expr) \ 19920 ASSERT_PRED_FORMAT1(::testing::internal::IsHRESULTSuccess, (expr)) 19921 19922 # define EXPECT_HRESULT_FAILED(expr) \ 19923 EXPECT_PRED_FORMAT1(::testing::internal::IsHRESULTFailure, (expr)) 19924 19925 # define ASSERT_HRESULT_FAILED(expr) \ 19926 ASSERT_PRED_FORMAT1(::testing::internal::IsHRESULTFailure, (expr)) 19927 19928 #endif // GTEST_OS_WINDOWS 19929 19930 // Macros that execute statement and check that it doesn't generate new fatal 19931 // failures in the current thread. 19932 // 19933 // * {ASSERT|EXPECT}_NO_FATAL_FAILURE(statement); 19934 // 19935 // Examples: 19936 // 19937 // EXPECT_NO_FATAL_FAILURE(Process()); 19938 // ASSERT_NO_FATAL_FAILURE(Process()) << "Process() failed"; 19939 // 19940 #define ASSERT_NO_FATAL_FAILURE(statement) \ 19941 GTEST_TEST_NO_FATAL_FAILURE_(statement, GTEST_FATAL_FAILURE_) 19942 #define EXPECT_NO_FATAL_FAILURE(statement) \ 19943 GTEST_TEST_NO_FATAL_FAILURE_(statement, GTEST_NONFATAL_FAILURE_) 19944 19945 // Causes a trace (including the source file path, the current line 19946 // number, and the given message) to be included in every test failure 19947 // message generated by code in the current scope. The effect is 19948 // undone when the control leaves the current scope. 19949 // 19950 // The message argument can be anything streamable to std::ostream. 19951 // 19952 // In the implementation, we include the current line number as part 19953 // of the dummy variable name, thus allowing multiple SCOPED_TRACE()s 19954 // to appear in the same block - as long as they are on different 19955 // lines. 19956 #define SCOPED_TRACE(message) \ 19957 ::testing::internal::ScopedTrace GTEST_CONCAT_TOKEN_(gtest_trace_, __LINE__)(\ 19958 __FILE__, __LINE__, ::testing::Message() << (message)) 19959 19960 // Compile-time assertion for type equality. 19961 // StaticAssertTypeEq<type1, type2>() compiles iff type1 and type2 are 19962 // the same type. The value it returns is not interesting. 19963 // 19964 // Instead of making StaticAssertTypeEq a class template, we make it a 19965 // function template that invokes a helper class template. This 19966 // prevents a user from misusing StaticAssertTypeEq<T1, T2> by 19967 // defining objects of that type. 19968 // 19969 // CAVEAT: 19970 // 19971 // When used inside a method of a class template, 19972 // StaticAssertTypeEq<T1, T2>() is effective ONLY IF the method is 19973 // instantiated. For example, given: 19974 // 19975 // template <typename T> class Foo { 19976 // public: 19977 // void Bar() { testing::StaticAssertTypeEq<int, T>(); } 19978 // }; 19979 // 19980 // the code: 19981 // 19982 // void Test1() { Foo<bool> foo; } 19983 // 19984 // will NOT generate a compiler error, as Foo<bool>::Bar() is never 19985 // actually instantiated. Instead, you need: 19986 // 19987 // void Test2() { Foo<bool> foo; foo.Bar(); } 19988 // 19989 // to cause a compiler error. 19990 template <typename T1, typename T2> 19991 bool StaticAssertTypeEq() { 19992 (void)internal::StaticAssertTypeEqHelper<T1, T2>(); 19993 return true; 19994 } 19995 19996 // Defines a test. 19997 // 19998 // The first parameter is the name of the test case, and the second 19999 // parameter is the name of the test within the test case. 20000 // 20001 // The convention is to end the test case name with "Test". For 20002 // example, a test case for the Foo class can be named FooTest. 20003 // 20004 // The user should put his test code between braces after using this 20005 // macro. Example: 20006 // 20007 // TEST(FooTest, InitializesCorrectly) { 20008 // Foo foo; 20009 // EXPECT_TRUE(foo.StatusIsOK()); 20010 // } 20011 20012 // Note that we call GetTestTypeId() instead of GetTypeId< 20013 // ::testing::Test>() here to get the type ID of testing::Test. This 20014 // is to work around a suspected linker bug when using Google Test as 20015 // a framework on Mac OS X. The bug causes GetTypeId< 20016 // ::testing::Test>() to return different values depending on whether 20017 // the call is from the Google Test framework itself or from user test 20018 // code. GetTestTypeId() is guaranteed to always return the same 20019 // value, as it always calls GetTypeId<>() from the Google Test 20020 // framework. 20021 #define GTEST_TEST(test_case_name, test_name)\ 20022 GTEST_TEST_(test_case_name, test_name, \ 20023 ::testing::Test, ::testing::internal::GetTestTypeId()) 20024 20025 // Define this macro to 1 to omit the definition of TEST(), which 20026 // is a generic name and clashes with some other libraries. 20027 #if !GTEST_DONT_DEFINE_TEST 20028 # define TEST(test_case_name, test_name) GTEST_TEST(test_case_name, test_name) 20029 #endif 20030 20031 // Defines a test that uses a test fixture. 20032 // 20033 // The first parameter is the name of the test fixture class, which 20034 // also doubles as the test case name. The second parameter is the 20035 // name of the test within the test case. 20036 // 20037 // A test fixture class must be declared earlier. The user should put 20038 // his test code between braces after using this macro. Example: 20039 // 20040 // class FooTest : public testing::Test { 20041 // protected: 20042 // virtual void SetUp() { b_.AddElement(3); } 20043 // 20044 // Foo a_; 20045 // Foo b_; 20046 // }; 20047 // 20048 // TEST_F(FooTest, InitializesCorrectly) { 20049 // EXPECT_TRUE(a_.StatusIsOK()); 20050 // } 20051 // 20052 // TEST_F(FooTest, ReturnsElementCountCorrectly) { 20053 // EXPECT_EQ(0, a_.size()); 20054 // EXPECT_EQ(1, b_.size()); 20055 // } 20056 20057 #define TEST_F(test_fixture, test_name)\ 20058 GTEST_TEST_(test_fixture, test_name, test_fixture, \ 20059 ::testing::internal::GetTypeId<test_fixture>()) 20060 20061 } // namespace testing 20062 20063 // Use this function in main() to run all tests. It returns 0 if all 20064 // tests are successful, or 1 otherwise. 20065 // 20066 // RUN_ALL_TESTS() should be invoked after the command line has been 20067 // parsed by InitGoogleTest(). 20068 // 20069 // This function was formerly a macro; thus, it is in the global 20070 // namespace and has an all-caps name. 20071 int RUN_ALL_TESTS() GTEST_MUST_USE_RESULT_; 20072 20073 inline int RUN_ALL_TESTS() { 20074 return ::testing::UnitTest::GetInstance()->Run(); 20075 } 20076 20077 #endif // GTEST_INCLUDE_GTEST_GTEST_H_ 20078