mirror of
https://github.com/google/googletest.git
synced 2026-07-30 16:26:24 +08:00
Compare commits
4 Commits
e91c388a3d
...
aa9cfd1b60
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aa9cfd1b60 | ||
|
|
3ff51c3e80 | ||
|
|
1269db9643 | ||
|
|
aaebbb24f6 |
@ -587,7 +587,7 @@ class GTEST_API_ UnitTestImpl {
|
||||
// total_test_suite_count() - 1. If i is not in that range, returns NULL.
|
||||
const TestSuite* GetTestSuite(int i) const {
|
||||
const int index = GetElementOr(test_suite_indices_, i, -1);
|
||||
return index < 0 ? nullptr : test_suites_[static_cast<size_t>(i)];
|
||||
return index < 0 ? nullptr : test_suites_[static_cast<size_t>(index)];
|
||||
}
|
||||
|
||||
// Legacy API is deprecated but still available
|
||||
@ -1193,7 +1193,8 @@ class StreamingListener : public EmptyTestEventListener {
|
||||
|
||||
void OnTestEnd(const TestInfo& test_info) override {
|
||||
SendLn("event=TestEnd&passed=" +
|
||||
FormatBool((test_info.result())->Passed()) + "&elapsed_time=" +
|
||||
FormatBool((test_info.result())->Passed()) + "&skipped=" +
|
||||
FormatBool((test_info.result())->Skipped()) + "&elapsed_time=" +
|
||||
StreamableToString((test_info.result())->elapsed_time()) + "ms");
|
||||
}
|
||||
|
||||
|
||||
@ -167,7 +167,7 @@ TEST_F(StreamingListenerTest, OnTestStart) {
|
||||
TEST_F(StreamingListenerTest, OnTestEnd) {
|
||||
*output() = "";
|
||||
streamer_.OnTestEnd(test_info_obj_);
|
||||
EXPECT_EQ("event=TestEnd&passed=1&elapsed_time=0ms\n", *output());
|
||||
EXPECT_EQ("event=TestEnd&passed=1&skipped=0&elapsed_time=0ms\n", *output());
|
||||
}
|
||||
|
||||
TEST_F(StreamingListenerTest, OnTestPartResult) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user