- 22 Mar, 2021 1 commit
-
-
Abseil Team authored
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
-
- 16 Mar, 2021 1 commit
-
-
Abseil Team authored
gtest: Output a canned test suite for environment failures in XML/JSON This surfaces useful information about the environment failure in a structured form. As we can see from the updated test, previously unsurfaced information is now present. PiperOrigin-RevId: 362292322
-
- 25 Feb, 2021 1 commit
-
-
Niels Dekker authored
Included the string returned by their `name()` member function with the output of `PrintTo`. Typical use case: std::unique_ptr<AbstractProduct> product = FactoryMethod(); // Assert that the product is of type X: ASSERT_EQ(std::type_index{typeid(*product)}, std::type_index{typeid(ProductX)}); Possible output in case of a test assert failure, now including the names of the compared type indices: > error: Expected equality of these values: > std::type_index(typeid(*product)) > Which is: 8-byte object <D0-65 54-8C F6-7F 00-00> ("class ProductY") > std::type_index(typeid(ProductX)) > Which is: 8-byte object <40-64 54-8C F6-7F 00-00> ("class ProductX") With help from Krystian Kuzniarek.
-
- 18 Feb, 2021 2 commits
-
-
Abseil Team authored
Explicitly skip tests after fatal global environment setup errors Previously the tests were all skipped, but the resulting output claimed all tests passed. Before: ``` [----------] Global test environment set-up. <failure message> [----------] Global test environment tear-down [==========] 1 test from 1 test suite ran. (83 ms total) [ PASSED ] 1 test. [ FAILED ] 0 tests, listed below: ``` After: ``` [==========] Running 1 test from 1 test suite. [----------] Global test environment set-up. <failure message> [----------] 1 test from SomeTest [ RUN ] SomeTest.DoesFoo <...>: Skipped [ SKIPPED ] SomeTest.DoesFoo (0 ms) [----------] 1 test from SomeTest (0 ms total) [----------] Global test environment tear-down [==========] 1 test from 1 test suite ran. (68 ms total) [ PASSED ] 0 tests. [ SKIPPED ] 1 test, listed below: [ SKIPPED ] SomeTest.DoesFoo [ FAILED ] 0 tests, listed below: ``` PiperOrigin-RevId: 358026389
-
Abseil Team authored
Make include guards conform with https://google.github.io/styleguide/cppguide.html#The__define_Guard, attempt #2 PiperOrigin-RevId: 357056902
-
- 11 Feb, 2021 3 commits
-
-
Abseil Team authored
Revert include guard fix PiperOrigin-RevId: 356588893
-
Abseil Team authored
Fix #2987 Removing const before passing any types through UniversalPrinter. PiperOrigin-RevId: 356508875
-
Abseil Team authored
Make include guards conform with https://google.github.io/styleguide/cppguide.html#The__define_Guard PiperOrigin-RevId: 355882793
-
- 05 Feb, 2021 1 commit
-
-
Abseil Team authored
Remove uses of GTEST_HAS_TYPED_TEST_P and GTEST_HAS_TYPED_TEST. PiperOrigin-RevId: 353935996
-
- 14 Jan, 2021 2 commits
-
-
Abseil Team authored
Print unique_ptr/shared_ptr recursively. Given that they are smart pointers, it is unlikely that the inner object is invalid. PiperOrigin-RevId: 351586888
-
Abseil Team authored
Add support for printing incomplete types in the universal printer. PiperOrigin-RevId: 350154637
-
- 25 Dec, 2020 1 commit
-
-
Mattias Ellert authored
-
- 22 Dec, 2020 1 commit
-
-
dmauro authored
Internal Change PiperOrigin-RevId: 347631521
-
- 10 Dec, 2020 1 commit
-
-
dmauro authored
Fix a missing Bazel build dependency PiperOrigin-RevId: 346783462
-
- 02 Dec, 2020 2 commits
-
-
Abseil Team authored
Remove `status` from our internal Subprocess utility. This facility is unused, so better to just remove it than figure out what its cross-OS semantics should be. PiperOrigin-RevId: 345279290
-
Abseil Team authored
Check for a high bit to see if a return value is a signal or an error code in googletest/test. This is needed because for subprocess under python3 windows, a return value representing a C signal (such as 0x80000003) is represented as a large positive integer rather than a negative one. PiperOrigin-RevId: 345270460
-
- 12 Nov, 2020 3 commits
-
-
Abseil Team authored
Use a tagged constructor for FlatTuple instead. Some versions of MSVC are getting confused with that constructor and generating invalid code. PiperOrigin-RevId: 342050957
-
dmauro authored
Disable the wide character printing tests that were discovered to fail under MSVC. Created a bug to debug this. PiperOrigin-RevId: 341886318
-
dmauro authored
Fix *_THROW tests under MSVC, which produce slightly different type names from std::type_info (e.g. "class std::runtime_error" instead of "std::runtime_error") PiperOrigin-RevId: 341874178
-
- 20 Oct, 2020 1 commit
-
-
Arthur Sonzogni authored
Replace "definedin in" by "defined in" in files: - googletest/src/gtest.cc - googletest/test/googletest-output-test-golden-lin.txt
-
- 15 Oct, 2020 1 commit
-
-
dmauro authored
Fixes build warnings from previous CL Add CMake to internal presubmit to prevent these PiperOrigin-RevId: 337325504
-
- 14 Oct, 2020 3 commits
-
-
dmauro authored
Disable warnings on code that intentionally tests a suboptimal syntax PiperOrigin-RevId: 337138442
-
ofats authored
Add helper methos to internal FlatTuple. Refactor constructors. PiperOrigin-RevId: 336306681
-
Abseil Team authored
Improve lookup of operator<< for user types Without this fix, trying to use this class with googletest struct Foo {}; template <typename OutputStream> OutputStream& operator<<(OutputStream& os, const Foo&) { os << "TemplatedStreamableInFoo"; return os; } results in an ambiguity error between the class' operator<< and the operator<< in gtest-printers.h removed in this CL. This fix also enables implicit conversions to happen, so that e.g. we will find the base class operator<< if a subclass has no operator<< of its own. PiperOrigin-RevId: 336261221
-
- 24 Sep, 2020 1 commit
-
-
Abseil Team authored
Improve DoubleNearPredFormat output on bad epsilons DoubleNearPredFormat will happily accept epsilon values (abs_error) that are so small that they are meaningless. This turns EXPECT_NEAR into a complicated and non-obvious version of EXPECT_EQ. This change modifies DoubleNearPredFormat) so that when there is a failure it calculates the smallest meaningful epsilon value, given the input values, and then prints a message which explains what happened. If a true equality test is wanted either pass a literal 0.0 as abs_error or use EXPECT_EQ. If a check for being almost equal is wanted consider using EXPECT_DOUBLE_EQ which, contrary to its name, verifies that the two numbers are *almost* equal (within four ULPs). With this change the flaky test mentioned in crbug.com/786046 gives this output: The difference between 4.2934311416234112e+18 and 4.2934311416234107e+18 is 512, where 4.2934311416234112e+18 evaluates to 4.2934311416234112e+18, 4.2934311416234107e+18 evaluates to 4.2934311416234107e+18. The abs_error parameter 1.0 evaluates to 1 which is smaller than the minimum distance between doubles for numbers of this magnitude which is 512, thus making this EXPECT_NEAR check equivalent to EXPECT_EQUAL. Consider using EXPECT_DOUBLE_EQ instead. Tested: I confirmed that this change detects the bad epsilon value that caused crbug.com/786046 in Chromium and added a test for the desired output. PiperOrigin-RevId: 332946880
-
- 01 Sep, 2020 1 commit
-
-
Abseil Team authored
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
-
- 05 Aug, 2020 1 commit
-
-
srz_zumix authored
-
- 02 Aug, 2020 1 commit
-
-
srz_zumix authored
-
- 02 Jul, 2020 1 commit
-
-
Jun Jie authored
Test MatcherDeathTest.DoesNotBreakBareRegexMatching fails when googletest uses simple regex instead of posix regex. This partially fixes #2687
-
- 26 Jun, 2020 1 commit
-
-
Abseil Team authored
Add Bazel build rules for gtest_list_output_unittest.py and correct some off-by-one line number expectations. PiperOrigin-RevId: 318466071
-
- 20 Jun, 2020 1 commit
-
-
Vladimir Goncharov authored
EXPECT_THROW and EXPECT_NO_THROW will now print exception type and message when an unexpected std::exception-derived error is thrown. Fixes #2878
-
- 18 Jun, 2020 1 commit
-
-
Abseil Team authored
gtest.cc: fix a couple typos s/paramaterized/parameterized/ PiperOrigin-RevId: 316878900
-
- 12 Jun, 2020 1 commit
-
-
dmauro authored
Adds support for printing pointers of types char8_t, char16_t, and char32_t. PiperOrigin-RevId: 316112767
-
- 10 Jun, 2020 1 commit
-
-
Abseil Team authored
Fail TEST_Ps or TYPED_TEST_Ps that are defined but are not instantiated, as well as the opposite case, where INSTANTIATE_TEST_SUITE_P or INSTANTIATE_TYPED_TEST_SUITE_P is used but without any matching TEST_P or TYPED_TEST_P. PiperOrigin-RevId: 315255779
-
- 05 Jun, 2020 1 commit
-
-
dmauro authored
Adds support for printing the types char8_t, char16_t, and char32_t This changes prints these types as Unicode code points. It is possible that there is a better way of printing these types, but that change is more complex, and the format in which Googletest prints these types is subject to change if someone implements a better way of printing them. This fixes the C++20 build, which removed support for printing these types. https://en.cppreference.com/w/cpp/io/basic_ostream/operator_ltlt2 Fixes #2854 PiperOrigin-RevId: 314826912
-
- 29 May, 2020 4 commits
-
-
Krystian Kuzniarek authored
-
Krystian Kuzniarek authored
-
Krystian Kuzniarek authored
-
Krystian Kuzniarek authored
-
- 05 May, 2020 1 commit
-
-
Igor Nazarenko authored
-