summaryrefslogtreecommitdiffstats
path: root/googletest/include/gtest/internal
Commit message (Collapse)AuthorAgeFilesLines
* chore: fix spellingJohn Bampton2021-04-152-2/+2
|
* Googletest exportAbseil Team2021-04-132-5/+12
| | | | | | | | | | | Add support to run gtest on Xtensa platform. This add support to run GTest base test suits on Xtensa (https://ip.cadence.com/ipportfolio/tensilica-ip) base simulator. Xtensa only provides libc and some basic operations and does not run an operating system by default. PiperOrigin-RevId: 368162205
* Googletest exportAbseil Team2021-03-221-0/+13
| | | | | | | | | | | | | | | | | | | | Print std::u8string, std::u16string, and std::u32string as string literals Previously, these types were printed as "{ U+123, U+456, U+789 }". However, printed output in that form is difficult to compare against any literals that might be defined in code. Instead, just treat these types like std::string and std::wstring, escaping non-ASCII characters with a hexadecimal escape sequence. The tests have also been updated to cover the new functionality: as a bonus, the tests now also pass with the MSVC toolchain. Internally, the code has been reorganized to primarily operate in terms of char32_t, under the assumption that char32_t will always be at least as big as wchar_t. While that assumption is currently true, perhaps it won't be in the future... PiperOrigin-RevId: 364033132
* Internal changeAbseil Team2021-03-161-4/+4
| | | | PiperOrigin-RevId: 362216935
* Googletest exportAbseil Team2021-02-1811-33/+33
| | | | | | Make include guards conform with https://google.github.io/styleguide/cppguide.html#The__define_Guard, attempt #2 PiperOrigin-RevId: 357056902
* Googletest exportAbseil Team2021-02-1111-33/+33
| | | | | | Revert include guard fix PiperOrigin-RevId: 356588893
* Googletest exportAbseil Team2021-02-1111-33/+33
| | | | | | Make include guards conform with https://google.github.io/styleguide/cppguide.html#The__define_Guard PiperOrigin-RevId: 355882793
* Googletest exportAbseil Team2021-02-052-8/+0
| | | | | | Remove uses of GTEST_HAS_TYPED_TEST_P and GTEST_HAS_TYPED_TEST. PiperOrigin-RevId: 353935996
* Googletest exportAbseil Team2021-01-263-344/+0
| | | | | | Stop using pump for generating internal/custom/gmock-generated-actions.h PiperOrigin-RevId: 352660735
* Googletest exportAbseil Team2021-01-263-0/+344
| | | | | | Merge CONTRIBUTORS, delete LICENSEs in googletest/ and googlemock/ PiperOrigin-RevId: 352558822
* Googletest exportAbseil Team2020-12-021-0/+1
| | | | | | | | Include TargetConditionals.h before checking TARGET_OS_IPHONE New versions of Clang require that you include TargetConditionals.h before checking the TARGET_OS_* macros. Include it where appropriate to keep the compiler happy. PiperOrigin-RevId: 345106443
* Googletest exportAbseil Team2020-11-122-9/+4
| | | | | | | Use a tagged constructor for FlatTuple instead. Some versions of MSVC are getting confused with that constructor and generating invalid code. PiperOrigin-RevId: 342050957
* fix typosHyuk Myeong2020-11-082-6/+6
|
* Googletest exportdmauro2020-10-151-1/+1
| | | | | | | Fixes build warnings from previous CL Add CMake to internal presubmit to prevent these PiperOrigin-RevId: 337325504
* Googletest exportAbseil Team2020-10-141-3/+9
| | | | | Add ::testing::FieldsAre matcher for objects that support get<> and structured bindings. PiperOrigin-RevId: 337165285
* Googletest exportdmauro2020-10-141-4/+12
| | | | | | Disable -Wmismatched-tags warning for struct/class tuple_size PiperOrigin-RevId: 337087493
* Googletest exportdmauro2020-10-141-2/+2
| | | | | | Fix -Wmismatched-tags error with struct tuple_size vs class tuple_size PiperOrigin-RevId: 336930166
* Googletest exportofats2020-10-142-15/+58
| | | | | | Add helper methos to internal FlatTuple. Refactor constructors. PiperOrigin-RevId: 336306681
* Merge pull request #2837 from inazarenko:duck_type_protosDerek Mauro2020-10-141-4/+27
|\ | | | | | | PiperOrigin-RevId: 336087297
| * Detect proto messages based on presense of DebugString.Igor Nazarenko2020-05-051-4/+27
| |
* | Googletest exportAbseil Team2020-09-011-0/+3
| | | | | | | | | | | | | | | | | | Add millisecond precision to start timestamp in XML/JSON output - Previous timestamp had format YYYY-MM-DDThh:mm:ss, now YYYY-MM-DDThh:mm:ss.sss - This conforms to the ISO 8601 standard PiperOrigin-RevId: 329503623
* | Merge pull request #2972 from srz-zumix:fix/remove_legacy_testcase_api_Derek Mauro2020-08-071-0/+12
|\ \ | | | | | | | | | PiperOrigin-RevId: 325220934
| * | fix testssrz_zumix2020-08-021-0/+12
| | |
* | | fix clang tidy modernize-use-equals-default warningsjasjuang2020-07-191-1/+1
|/ /
* | Merge pull request #2903 from AmatanHead:informative-exception-assertsvslashg2020-07-151-32/+81
|\ \ | | | | | | | | | PiperOrigin-RevId: 320425648
| * | Make EXPECT_THROW and EXPECT_NO_THROW macros more informativeVladimir Goncharov2020-06-201-5/+38
| | | | | | | | | | | | | | | | | | EXPECT_THROW and EXPECT_NO_THROW will now print exception type and message when an unexpected std::exception-derived error is thrown. Fixes #2878
* | | Merge pull request #2718 from NINI1988:masterMark Barolak2020-06-261-6/+10
|\ \ \ | | | | | | | | | | | | PiperOrigin-RevId: 317696457
| * | | Add missing call for gtest_list_output_unittest_ unitTest.NINI19882020-02-211-6/+6
| | | | | | | | | | | | | | | | | | | | Add unitTest for fixed TEST_P line number. Use CodeLocation TestInfo struct.
| * | | Fix: shadow memberNINI19882020-02-181-2/+2
| | | |
| * | | Add correct line number to TEST_P test cases for gtest_output.NINI19882020-02-181-5/+7
| | | |
* | | | Merge pull request #2891 from zoddicus:fixMinGWMark Barolak2020-06-261-3/+3
|\ \ \ \ | |_|/ / |/| | | | | | | PiperOrigin-RevId: 317666280
| * | | Fix build issue for MinGWRyan Harrison2020-06-101-1/+1
| | | | | | | | | | | | | | | | Fixes #2885
* | | | Googletest exportAbseil Team2020-06-101-1/+2
|/ / / | | | | | | | | | | | | | | | | | | | | | Make visible ParseInt32 in case users have separate gmock/gtest libraries and hidden-by-default symbols. This function is still considered an internal implementation detail and is subject to change without notice. It is still unsafe/unsupported to link together libraries built at different commits. PiperOrigin-RevId: 315405429
* | | Merge pull request #2742 from kuzkry:c++17-type-printersGennadiy Rozental2020-06-052-17/+117
|\ \ \ | | | | | | | | | | | | PiperOrigin-RevId: 314593695
| * | | make UniversalPrinter<std::any> support RTTIKrystian Kuzniarek2020-05-291-17/+21
| | | |
| * | | specialize UniversalPrinter<> for std::any (without support for RTTI)Krystian Kuzniarek2020-05-291-0/+30
| | | |
| * | | specialize UniversalPrinter<> for std::optionalKrystian Kuzniarek2020-05-291-0/+32
| | | |
| * | | specialize UniversalPrinter<> for std::variantKrystian Kuzniarek2020-05-291-0/+32
| |/ /
* | | Googletest exportdmauro2020-05-281-1/+2
| | | | | | | | | | | | | | | | | | Fix compile error from protected destructor of std::codecvt PiperOrigin-RevId: 313584603
* | | Googletest exportAbseil Team2020-05-281-0/+8
| | | | | | | | | | | | | | | | | | Addresses https://github.com/google/googletest/issues/2848 by using `_wfopen(...)` on Windows PiperOrigin-RevId: 312198825
* | | Googletest exportAbseil Team2020-05-131-1/+6
| |/ |/| | | | | | | | | | | | | Fixed #2823 - Make it so that a semicolon appearing after an invocation of GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_ does not trigger a redundant semicolon warning. This works by introducing an else block with a statement that intentionally does not end with a semicolon, forcing users to place the semicolon after the expansion. The approach here is preferred as opposed to removing semicolons that appear after each invocation because complete statements that do not have a visible semicolon or braces confuse users and code formatters, since the macro invocation looks superficially like an expression. PiperOrigin-RevId: 311327491
* | Merge pull request #2818 from inazarenko:masterGennadiy Rozental2020-05-011-13/+2
|\ \ | | | | | | | | | PiperOrigin-RevId: 308711492
* \ \ Merge pull request #2818 from inazarenko:masterGennadiy Rozental2020-05-011-2/+13
|\ \ \ | |/ / | | | | | | PiperOrigin-RevId: 308650221
| * | Enable protobuf printing for open-source proto messages.Igor Nazarenko2020-04-191-2/+13
| | |
* | | Merge pull request #2815 from Quuxplusone:simpleGennadiy Rozental2020-05-012-8/+4
|\ \ \ | |/ / |/| | | | | PiperOrigin-RevId: 308625388
| * | Remove all uses of GTEST_DISALLOW_{MOVE_,}ASSIGN_.Arthur O'Dwyer2020-04-232-6/+2
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | None of these are strictly needed for correctness. A large number of them (maybe all of them?) trigger `-Wdeprecated` warnings on Clang trunk as soon as you try to use the implicitly defaulted (but deprecated) copy constructor of a class that has deleted its copy assignment operator. By declaring a deleted copy assignment operator, the old code also caused the move constructor and move assignment operator to be non-declared. This means that the old code never got move semantics -- "move-construction" would simply call the defaulted (but deprecated) copy constructor instead. With the new code, "move-construction" calls the defaulted move constructor, which I believe is what we want to happen. So this is a runtime performance optimization. Unfortunately we can't yet physically remove the definitions of these macros from gtest-port.h, because they are being used by other code internally at Google (according to zhangxy988). But no new uses should be added going forward.
* | Googletest exportAbseil Team2020-04-041-3/+5
| | | | | | | | | | | | | | | | This change updates testing::internal::IsAProtocolMessage to return true not just for full proto messages but also for lite ones (i.e. those inheriting directly from MessageLite). PiperOrigin-RevId: 304286535
* | Merge pull request #2746 from Romain-Geissler-1A:mastervslashg2020-03-201-5/+18
|\ \ | |/ |/| | | PiperOrigin-RevId: 302045808
| * Make sure IsATTY does not clobber errno.Romain Geissler2020-03-111-5/+18
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Exposition of the problem: > cat main.cpp TEST(errnoTest, errnoTest) { ASSERT_EQ(errno, 0); } int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); } Compiled with gcc 10 like this: > g++ -pthread -o runtest main.cpp -Wl,-Bstatic -lgtest -Wl,-Bdynamic Before patch: > ./runtest [==========] Running 1 test from 1 test suite. [----------] Global test environment set-up. [----------] 1 test from errnoTest [ RUN ] errnoTest.errnoTest [ OK ] errnoTest.errnoTest (0 ms) [----------] 1 test from errnoTest (0 ms total) [----------] Global test environment tear-down [==========] 1 test from 1 test suite ran. (0 ms total) [ PASSED ] 1 test. (output is colored, I run this inside an interactive terminal). > ./runtest | cat [==========] Running 1 test from 1 test suite. [----------] Global test environment set-up. [----------] 1 test from errnoTest [ RUN ] errnoTest.errnoTest main.cpp:5: Failure Expected equality of these values: (*__errno_location ()) Which is: 25 0 [ FAILED ] errnoTest.errnoTest (0 ms) [----------] 1 test from errnoTest (0 ms total) [----------] Global test environment tear-down [==========] 1 test from 1 test suite ran. (0 ms total) [ PASSED ] 0 tests. [ FAILED ] 1 test, listed below: [ FAILED ] errnoTest.errnoTest 1 FAILED TEST (output is not colored, since IsTTY return false, because of the pipe, however it also clobbered errno for the tests). After the patch, both cases are working fine: > ./runtest [==========] Running 1 test from 1 test suite. [----------] Global test environment set-up. [----------] 1 test from errnoTest [ RUN ] errnoTest.errnoTest [ OK ] errnoTest.errnoTest (0 ms) [----------] 1 test from errnoTest (0 ms total) [----------] Global test environment tear-down [==========] 1 test from 1 test suite ran. (0 ms total) [ PASSED ] 1 test. > ./runtest | cat [==========] Running 1 test from 1 test suite. [----------] Global test environment set-up. [----------] 1 test from errnoTest [ RUN ] errnoTest.errnoTest [ OK ] errnoTest.errnoTest (0 ms) [----------] 1 test from errnoTest (0 ms total) [----------] Global test environment tear-down [==========] 1 test from 1 test suite ran. (0 ms total) [ PASSED ] 1 test.
* Googletest exportAbseil Team2020-02-111-0/+31
| | | | | | Add gmock Matcher<std::string_view> specialization. PiperOrigin-RevId: 294443240
OpenPOWER on IntegriCloud