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
d88da49d
Commit
d88da49d
authored
Jul 25, 2008
by
shiqian
Browse files
Adds a test for the GTEST_PRINT_TIME env var. By Balazs.Dan@gmail.com.
parent
15cbe5f7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
test/gtest_env_var_test.py
test/gtest_env_var_test.py
+1
-0
test/gtest_env_var_test_.cc
test/gtest_env_var_test_.cc
+5
-0
No files found.
test/gtest_env_var_test.py
View file @
d88da49d
...
@@ -101,6 +101,7 @@ def TestEnvVarAffectsFlag(command):
...
@@ -101,6 +101,7 @@ def TestEnvVarAffectsFlag(command):
TestFlag
(
command
,
'color'
,
'yes'
,
'auto'
)
TestFlag
(
command
,
'color'
,
'yes'
,
'auto'
)
TestFlag
(
command
,
'filter'
,
'FooTest.Bar'
,
'*'
)
TestFlag
(
command
,
'filter'
,
'FooTest.Bar'
,
'*'
)
TestFlag
(
command
,
'output'
,
'tmp/foo.xml'
,
''
)
TestFlag
(
command
,
'output'
,
'tmp/foo.xml'
,
''
)
TestFlag
(
command
,
'print_time'
,
'1'
,
'0'
)
TestFlag
(
command
,
'repeat'
,
'999'
,
'1'
)
TestFlag
(
command
,
'repeat'
,
'999'
,
'1'
)
if
IS_WINDOWS
:
if
IS_WINDOWS
:
...
...
test/gtest_env_var_test_.cc
View file @
d88da49d
...
@@ -81,6 +81,11 @@ void PrintFlag(const char* flag) {
...
@@ -81,6 +81,11 @@ void PrintFlag(const char* flag) {
return
;
return
;
}
}
if
(
strcmp
(
flag
,
"print_time"
)
==
0
)
{
cout
<<
GTEST_FLAG
(
print_time
);
return
;
}
if
(
strcmp
(
flag
,
"repeat"
)
==
0
)
{
if
(
strcmp
(
flag
,
"repeat"
)
==
0
)
{
cout
<<
GTEST_FLAG
(
repeat
);
cout
<<
GTEST_FLAG
(
repeat
);
return
;
return
;
...
...
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