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
b888e23f
Commit
b888e23f
authored
Aug 01, 2018
by
Gennadiy Civil
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
googletest list tests unitest
parent
35aa4fe9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
12 deletions
+12
-12
BUILD.bazel
googletest/test/BUILD.bazel
+5
-5
googletest-list-tests-unittest.py
googletest/test/googletest-list-tests-unittest.py
+7
-7
googletest-list-tests-unittest_.cc
googletest/test/googletest-list-tests-unittest_.cc
+0
-0
No files found.
googletest/test/BUILD.bazel
View file @
b888e23f
...
...
@@ -282,17 +282,17 @@ py_test(
cc_binary(
name = "g
test_list_tests_
unittest_",
name = "g
oogletest-list-tests-
unittest_",
testonly = 1,
srcs = ["g
test_list_tests_
unittest_.cc"],
srcs = ["g
oogletest-list-tests-
unittest_.cc"],
deps = ["//:gtest"],
)
py_test(
name = "g
test_list_tests_
unittest",
name = "g
oogletest-list-tests-
unittest",
size = "small",
srcs = ["g
test_list_tests_
unittest.py"],
data = [":g
test_list_tests_
unittest_"],
srcs = ["g
oogletest-list-tests-
unittest.py"],
data = [":g
oogletest-list-tests-
unittest_"],
deps = [":gtest_test_utils"],
)
...
...
googletest/test/g
test_list_tests_
unittest.py
→
googletest/test/g
oogletest-list-tests-
unittest.py
View file @
b888e23f
...
...
@@ -33,7 +33,7 @@
A user can ask Google Test to list all tests by specifying the
--gtest_list_tests flag. This script tests such functionality
by invoking g
test_list_tests_
unittest_ (a program written with
by invoking g
oogletest-list-tests-
unittest_ (a program written with
Google Test) the command line flags.
"""
...
...
@@ -47,10 +47,10 @@ import gtest_test_utils
# The command line flag for enabling/disabling listing all tests.
LIST_TESTS_FLAG
=
'gtest_list_tests'
# Path to the g
test_list_tests_
unittest_ program.
EXE_PATH
=
gtest_test_utils
.
GetTestExecutablePath
(
'g
test_list_tests_
unittest_'
)
# Path to the g
oogletest-list-tests-
unittest_ program.
EXE_PATH
=
gtest_test_utils
.
GetTestExecutablePath
(
'g
oogletest-list-tests-
unittest_'
)
# The expected output when running g
test_list_tests_
unittest_ with
# The expected output when running g
oogletest-list-tests-
unittest_ with
# --gtest_list_tests
EXPECTED_OUTPUT_NO_FILTER_RE
=
re
.
compile
(
r"""FooDeathTest\.
Test1
...
...
@@ -94,7 +94,7 @@ MyInstantiation/ValueParamTest\.
TestB/2 # GetParam\(\) = a very\\nlo{241}\.\.\.
"""
)
# The expected output when running g
test_list_tests_
unittest_ with
# The expected output when running g
oogletest-list-tests-
unittest_ with
# --gtest_list_tests and --gtest_filter=Foo*.
EXPECTED_OUTPUT_FILTER_FOO_RE
=
re
.
compile
(
r"""FooDeathTest\.
Test1
...
...
@@ -114,7 +114,7 @@ FooTest\.
def
Run
(
args
):
"""Runs g
test_list_tests_
unittest_ and returns the list of tests printed."""
"""Runs g
oogletest-list-tests-
unittest_ and returns the list of tests printed."""
return
gtest_test_utils
.
Subprocess
([
EXE_PATH
]
+
args
,
capture_stderr
=
False
)
.
output
...
...
@@ -127,7 +127,7 @@ class GTestListTestsUnitTest(gtest_test_utils.TestCase):
"""Tests using the --gtest_list_tests flag to list all tests."""
def
RunAndVerify
(
self
,
flag_value
,
expected_output_re
,
other_flag
):
"""Runs g
test_list_tests_
unittest_ and verifies that it prints
"""Runs g
oogletest-list-tests-
unittest_ and verifies that it prints
the correct tests.
Args:
...
...
googletest/test/g
test_list_tests_
unittest_.cc
→
googletest/test/g
oogletest-list-tests-
unittest_.cc
View file @
b888e23f
File moved
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