| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
PiperOrigin-RevId: 362216935
|
|
|
|
|
|
| |
Make include guards conform with https://google.github.io/styleguide/cppguide.html#The__define_Guard, attempt #2
PiperOrigin-RevId: 357056902
|
|
|
|
|
|
| |
Revert include guard fix
PiperOrigin-RevId: 356588893
|
|
|
|
|
|
| |
Make include guards conform with https://google.github.io/styleguide/cppguide.html#The__define_Guard
PiperOrigin-RevId: 355882793
|
|
|
|
|
|
| |
Remove uses of GTEST_HAS_TYPED_TEST_P and GTEST_HAS_TYPED_TEST.
PiperOrigin-RevId: 353935996
|
|
|
|
|
|
| |
Stop using pump for generating internal/custom/gmock-generated-actions.h
PiperOrigin-RevId: 352660735
|
|
|
|
|
|
| |
Merge CONTRIBUTORS, delete LICENSEs in googletest/ and googlemock/
PiperOrigin-RevId: 352558822
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
Use a tagged constructor for FlatTuple instead.
Some versions of MSVC are getting confused with that constructor and generating invalid code.
PiperOrigin-RevId: 342050957
|
| |
|
|
|
|
|
|
|
| |
Fixes build warnings from previous CL
Add CMake to internal presubmit to prevent these
PiperOrigin-RevId: 337325504
|
|
|
|
|
| |
Add ::testing::FieldsAre matcher for objects that support get<> and structured bindings.
PiperOrigin-RevId: 337165285
|
|
|
|
|
|
| |
Disable -Wmismatched-tags warning for struct/class tuple_size
PiperOrigin-RevId: 337087493
|
|
|
|
|
|
| |
Fix -Wmismatched-tags error with struct tuple_size vs class tuple_size
PiperOrigin-RevId: 336930166
|
|
|
|
|
|
| |
Add helper methos to internal FlatTuple. Refactor constructors.
PiperOrigin-RevId: 336306681
|
|\
| |
| |
| | |
PiperOrigin-RevId: 336087297
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|\ \
| | |
| | |
| | | |
PiperOrigin-RevId: 325220934
|
| | | |
|
|/ / |
|
|\ \
| | |
| | |
| | | |
PiperOrigin-RevId: 320425648
|
| | |
| | |
| | |
| | |
| | |
| | | |
EXPECT_THROW and EXPECT_NO_THROW will now print exception type and message when an unexpected std::exception-derived error is thrown.
Fixes #2878
|
|\ \ \
| | | |
| | | |
| | | | |
PiperOrigin-RevId: 317696457
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Add unitTest for fixed TEST_P line number.
Use CodeLocation TestInfo struct.
|
| | | | |
|
| | | | |
|
|\ \ \ \
| |_|/ /
|/| | |
| | | | |
PiperOrigin-RevId: 317666280
|
| | | |
| | | |
| | | |
| | | | |
Fixes #2885
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
|\ \ \
| | | |
| | | |
| | | | |
PiperOrigin-RevId: 314593695
|
| | | | |
|
| | | | |
|
| | | | |
|
| |/ / |
|
| | |
| | |
| | |
| | |
| | |
| | | |
Fix compile error from protected destructor of std::codecvt
PiperOrigin-RevId: 313584603
|
| | |
| | |
| | |
| | |
| | |
| | | |
Addresses https://github.com/google/googletest/issues/2848 by using `_wfopen(...)` on Windows
PiperOrigin-RevId: 312198825
|
| |/
|/|
| |
| |
| |
| |
| |
| | |
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
|
|\ \
| | |
| | |
| | | |
PiperOrigin-RevId: 308711492
|
|\ \ \
| |/ /
| | |
| | | |
PiperOrigin-RevId: 308650221
|
| | | |
|
|\ \ \
| |/ /
|/| |
| | | |
PiperOrigin-RevId: 308625388
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|\ \
| |/
|/|
| | |
PiperOrigin-RevId: 302045808
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Add gmock Matcher<std::string_view> specialization.
PiperOrigin-RevId: 294443240
|