Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
googletest
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
googletest
Commits
0980b4bd
Commit
0980b4bd
authored
Feb 12, 2011
by
vladlosev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes off-by-one error in a message about test sharding (by David Glasser).
parent
6642ca8c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
gtest.cc
src/gtest.cc
+3
-2
gtest_output_test_golden_lin.txt
test/gtest_output_test_golden_lin.txt
+1
-1
No files found.
src/gtest.cc
View file @
0980b4bd
...
@@ -2716,9 +2716,10 @@ void PrettyUnitTestResultPrinter::OnTestIterationStart(
...
@@ -2716,9 +2716,10 @@ void PrettyUnitTestResultPrinter::OnTestIterationStart(
}
}
if
(
internal
::
ShouldShard
(
kTestTotalShards
,
kTestShardIndex
,
false
))
{
if
(
internal
::
ShouldShard
(
kTestTotalShards
,
kTestShardIndex
,
false
))
{
const
Int32
shard_index
=
Int32FromEnvOrDie
(
kTestShardIndex
,
-
1
);
ColoredPrintf
(
COLOR_YELLOW
,
ColoredPrintf
(
COLOR_YELLOW
,
"Note: This is test shard %
s
of %s.
\n
"
,
"Note: This is test shard %
d
of %s.
\n
"
,
internal
::
posix
::
GetEnv
(
kTestShardIndex
)
,
static_cast
<
int
>
(
shard_index
)
+
1
,
internal
::
posix
::
GetEnv
(
kTestTotalShards
));
internal
::
posix
::
GetEnv
(
kTestTotalShards
));
}
}
...
...
test/gtest_output_test_golden_lin.txt
View file @
0980b4bd
...
@@ -697,7 +697,7 @@ Note: Google Test filter = *DISABLED_*
...
@@ -697,7 +697,7 @@ Note: Google Test filter = *DISABLED_*
[==========] 1 test from 1 test case ran.
[==========] 1 test from 1 test case ran.
[ PASSED ] 1 test.
[ PASSED ] 1 test.
Note: Google Test filter = PassingTest.*
Note: Google Test filter = PassingTest.*
Note: This is test shard
1
of 2.
Note: This is test shard
2
of 2.
[==========] Running 1 test from 1 test case.
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] Global test environment set-up.
[----------] 1 test from PassingTest
[----------] 1 test from PassingTest
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment