Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
yangql
googletest
Commits
0980b4bd
Commit
0980b4bd
authored
Feb 12, 2011
by
vladlosev
Browse files
Fixes off-by-one error in a message about test sharding (by David Glasser).
parent
6642ca8c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
src/gtest.cc
src/gtest.cc
+3
-2
test/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(
}
if
(
internal
::
ShouldShard
(
kTestTotalShards
,
kTestShardIndex
,
false
))
{
const
Int32
shard_index
=
Int32FromEnvOrDie
(
kTestShardIndex
,
-
1
);
ColoredPrintf
(
COLOR_YELLOW
,
"Note: This is test shard %
s
of %s.
\n
"
,
internal
::
posix
::
GetEnv
(
kTestS
hard
I
ndex
),
"Note: This is test shard %
d
of %s.
\n
"
,
static_cast
<
int
>
(
s
hard
_i
ndex
)
+
1
,
internal
::
posix
::
GetEnv
(
kTestTotalShards
));
}
...
...
test/gtest_output_test_golden_lin.txt
View file @
0980b4bd
...
...
@@ -697,7 +697,7 @@ Note: Google Test filter = *DISABLED_*
[==========] 1 test from 1 test case ran.
[ PASSED ] 1 test.
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.
[----------] Global test environment set-up.
[----------] 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