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
06b97592
Unverified
Commit
06b97592
authored
Aug 15, 2018
by
Gennadiy Civil
Committed by
GitHub
Aug 15, 2018
Browse files
Merge branch 'master' into ignore-cmake-generated-files
parents
51b65058
997d343d
Changes
178
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
34 additions
and
77 deletions
+34
-77
googletest/test/googletest-env-var-test_.cc
googletest/test/googletest-env-var-test_.cc
+2
-4
googletest/test/googletest-filepath-test.cc
googletest/test/googletest-filepath-test.cc
+1
-2
googletest/test/googletest-filter-unittest.py
googletest/test/googletest-filter-unittest.py
+0
-2
googletest/test/googletest-filter-unittest_.cc
googletest/test/googletest-filter-unittest_.cc
+1
-2
googletest/test/googletest-json-outfiles-test.py
googletest/test/googletest-json-outfiles-test.py
+2
-2
googletest/test/googletest-linked-ptr-test.cc
googletest/test/googletest-linked-ptr-test.cc
+2
-5
googletest/test/googletest-list-tests-unittest.py
googletest/test/googletest-list-tests-unittest.py
+0
-2
googletest/test/googletest-list-tests-unittest_.cc
googletest/test/googletest-list-tests-unittest_.cc
+1
-2
googletest/test/googletest-listener-test.cc
googletest/test/googletest-listener-test.cc
+3
-3
googletest/test/googletest-message-test.cc
googletest/test/googletest-message-test.cc
+1
-2
googletest/test/googletest-options-test.cc
googletest/test/googletest-options-test.cc
+1
-3
googletest/test/googletest-output-test.py
googletest/test/googletest-output-test.py
+6
-9
googletest/test/googletest-output-test_.cc
googletest/test/googletest-output-test_.cc
+0
-2
googletest/test/googletest-param-test-invalid-name1-test.py
googletest/test/googletest-param-test-invalid-name1-test.py
+1
-10
googletest/test/googletest-param-test-invalid-name1-test_.cc
googletest/test/googletest-param-test-invalid-name1-test_.cc
+1
-2
googletest/test/googletest-param-test-invalid-name2-test.py
googletest/test/googletest-param-test-invalid-name2-test.py
+1
-10
googletest/test/googletest-param-test-invalid-name2-test_.cc
googletest/test/googletest-param-test-invalid-name2-test_.cc
+1
-2
googletest/test/googletest-param-test-test.cc
googletest/test/googletest-param-test-test.cc
+2
-3
googletest/test/googletest-param-test-test.h
googletest/test/googletest-param-test-test.h
+0
-2
googletest/test/googletest-param-test2-test.cc
googletest/test/googletest-param-test2-test.cc
+8
-8
No files found.
googletest/test/googletest-env-var-test_.cc
View file @
06b97592
...
...
@@ -26,16 +26,14 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: wan@google.com (Zhanyong Wan)
// A helper program for testing that Google Test parses the environment
// variables correctly.
#include "gtest/gtest.h"
#include <iostream>
#include "gtest/gtest.h"
#include "src/gtest-internal-inl.h"
using
::
std
::
cout
;
...
...
googletest/test/googletest-filepath-test.cc
View file @
06b97592
...
...
@@ -27,7 +27,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
//
// Google Test filepath utilities
//
// This file tests classes and functions used internally by
...
...
@@ -51,7 +50,7 @@ namespace internal {
namespace
{
#if GTEST_OS_WINDOWS_MOBILE
//
TODO(wan@google.com)
: Move these to the POSIX adapter section in
//
FIXME
: Move these to the POSIX adapter section in
// gtest-port.h.
// Windows CE doesn't have the remove C function.
...
...
googletest/test/googletest-filter-unittest.py
View file @
06b97592
...
...
@@ -40,8 +40,6 @@ Note that test sharding may also influence which tests are filtered. Therefore,
we test that here also.
"""
__author__
=
'wan@google.com (Zhanyong Wan)'
import
os
import
re
import
sets
...
...
googletest/test/googletest-filter-unittest_.cc
View file @
06b97592
...
...
@@ -26,8 +26,7 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: wan@google.com (Zhanyong Wan)
// Unit test for Google Test test filters.
//
...
...
googletest/test/googletest-json-outfiles-test.py
View file @
06b97592
...
...
@@ -136,11 +136,11 @@ class GTestJsonOutFilesTest(gtest_test_utils.TestCase):
self
.
assert_
(
p
.
exited
)
self
.
assertEquals
(
0
,
p
.
exit_code
)
#
TODO(wan@google.com)
: libtool causes the built test binary to be
#
FIXME
: libtool causes the built test binary to be
# named lt-gtest_xml_outfiles_test_ instead of
# gtest_xml_outfiles_test_. To account for this possibility, we
# allow both names in the following code. We should remove this
#
hack when Chandler Carruth's
libtool replacement tool is ready.
#
when
libtool replacement tool is ready.
output_file_name1
=
test_name
+
'.json'
output_file1
=
os
.
path
.
join
(
self
.
output_dir_
,
output_file_name1
)
output_file_name2
=
'lt-'
+
output_file_name1
...
...
googletest/test/googletest-linked-ptr-test.cc
View file @
06b97592
...
...
@@ -26,13 +26,10 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Authors: Dan Egnor (egnor@google.com)
// Ported to Windows: Vadim Berman (vadimb@google.com)
#include "gtest/internal/gtest-linked_ptr.h"
#include <stdlib.h>
#include "gtest/internal/gtest-linked_ptr.h"
#include "gtest/gtest.h"
namespace
{
...
...
googletest/test/googletest-list-tests-unittest.py
View file @
06b97592
...
...
@@ -37,8 +37,6 @@ by invoking googletest-list-tests-unittest_ (a program written with
Google Test) the command line flags.
"""
__author__
=
'phanna@google.com (Patrick Hanna)'
import
re
import
gtest_test_utils
...
...
googletest/test/googletest-list-tests-unittest_.cc
View file @
06b97592
...
...
@@ -26,8 +26,7 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: phanna@google.com (Patrick Hanna)
// Unit test for Google Test's --gtest_list_tests flag.
//
...
...
googletest/test/googletest-listener-test.cc
View file @
06b97592
...
...
@@ -25,17 +25,17 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: vladl@google.com (Vlad Losev)
//
// The Google C++ Testing and Mocking Framework (Google Test)
//
// This file verifies Google Test event listeners receive events at the
// right times.
#include "gtest/gtest.h"
#include <vector>
#include "gtest/gtest.h"
using
::
testing
::
AddGlobalTestEnvironment
;
using
::
testing
::
Environment
;
using
::
testing
::
InitGoogleTest
;
...
...
googletest/test/googletest-message-test.cc
View file @
06b97592
...
...
@@ -26,8 +26,7 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: wan@google.com (Zhanyong Wan)
//
// Tests for the Message class.
...
...
googletest/test/googletest-options-test.cc
View file @
06b97592
...
...
@@ -27,7 +27,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
//
// Google Test UnitTestOptions tests
//
// This file tests classes and functions used internally by
...
...
@@ -106,8 +105,7 @@ TEST(OutputFileHelpersTest, GetCurrentExecutableName) {
#elif GTEST_OS_FUCHSIA
const
bool
success
=
exe_str
==
"app"
;
#else
// TODO(wan@google.com): remove the hard-coded "lt-" prefix when
// Chandler Carruth's libtool replacement is ready.
// FIXME: remove the hard-coded "lt-" prefix when libtool replacement is ready
const
bool
success
=
exe_str
==
"googletest-options-test"
||
exe_str
==
"gtest_all_test"
||
...
...
googletest/test/googletest-output-test.py
View file @
06b97592
...
...
@@ -31,16 +31,13 @@
"""Tests the text output of Google C++ Testing and Mocking Framework.
SYNOPSIS
googletest_output_test.py --build_dir=BUILD/DIR --gengolden
# where BUILD/DIR contains the built googletest-output-test_ file.
googletest_output_test.py --gengolden
googletest_output_test.py
To update the golden file:
googletest_output_test.py --build_dir=BUILD/DIR --gengolden
where BUILD/DIR contains the built googletest-output-test_ file.
googletest_output_test.py --gengolden
googletest_output_test.py
"""
__author__
=
'wan@google.com (Zhanyong Wan)'
import
difflib
import
os
import
re
...
...
@@ -58,7 +55,7 @@ NO_STACKTRACE_SUPPORT_FLAG = '--no_stacktrace_support'
IS_LINUX
=
os
.
name
==
'posix'
and
os
.
uname
()[
0
]
==
'Linux'
IS_WINDOWS
=
os
.
name
==
'nt'
#
TODO(vladl@google.com)
: remove the _lin suffix.
#
FIXME
: remove the _lin suffix.
GOLDEN_NAME
=
'googletest-output-test-golden-lin.txt'
PROGRAM_PATH
=
gtest_test_utils
.
GetTestExecutablePath
(
'googletest-output-test_'
)
...
...
googletest/test/googletest-output-test_.cc
View file @
06b97592
...
...
@@ -32,8 +32,6 @@
// googletest-output-test.py to ensure that Google Test generates the
// desired messages. Therefore, most tests in this file are MEANT TO
// FAIL.
//
// Author: wan@google.com (Zhanyong Wan)
#include "gtest/gtest-spi.h"
#include "gtest/gtest.h"
...
...
googletest/test/googletest-param-test-invalid-name1-test.py
View file @
06b97592
...
...
@@ -30,16 +30,7 @@
"""Verifies that Google Test warns the user when not initialized properly."""
__author__
=
'jmadill@google.com (Jamie Madill)'
import
os
IS_LINUX
=
os
.
name
==
'posix'
and
os
.
uname
()[
0
]
==
'Linux'
if
IS_LINUX
:
import
gtest_test_utils
else
:
import
gtest_test_utils
import
gtest_test_utils
binary_name
=
'googletest-param-test-invalid-name1-test_'
COMMAND
=
gtest_test_utils
.
GetTestExecutablePath
(
binary_name
)
...
...
googletest/test/googletest-param-test-invalid-name1-test_.cc
View file @
06b97592
...
...
@@ -26,8 +26,7 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: jmadill@google.com (Jamie Madill)
#include "gtest/gtest.h"
...
...
googletest/test/googletest-param-test-invalid-name2-test.py
View file @
06b97592
...
...
@@ -30,16 +30,7 @@
"""Verifies that Google Test warns the user when not initialized properly."""
__author__
=
'jmadill@google.com (Jamie Madill)'
import
os
IS_LINUX
=
os
.
name
==
'posix'
and
os
.
uname
()[
0
]
==
'Linux'
if
IS_LINUX
:
import
gtest_test_utils
else
:
import
gtest_test_utils
import
gtest_test_utils
binary_name
=
'googletest-param-test-invalid-name2-test_'
COMMAND
=
gtest_test_utils
.
GetTestExecutablePath
(
binary_name
)
...
...
googletest/test/googletest-param-test-invalid-name2-test_.cc
View file @
06b97592
...
...
@@ -26,8 +26,7 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: jmadill@google.com (Jamie Madill)
#include "gtest/gtest.h"
...
...
googletest/test/googletest-param-test-test.cc
View file @
06b97592
...
...
@@ -26,8 +26,7 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: vladl@google.com (Vlad Losev)
//
// Tests for Google Test itself. This file verifies that the parameter
// generators objects produce correct parameter sequences and that
...
...
@@ -68,7 +67,7 @@ using ::testing::internal::UnitTestOptions;
// Prints a value to a string.
//
//
TODO(wan@google.com)
: remove PrintValue() when we move matchers and
//
FIXME
: remove PrintValue() when we move matchers and
// EXPECT_THAT() from Google Mock to Google Test. At that time, we
// can write EXPECT_THAT(x, Eq(y)) to compare two tuples x and y, as
// EXPECT_THAT() and the matchers know how to print tuples.
...
...
googletest/test/googletest-param-test-test.h
View file @
06b97592
...
...
@@ -27,8 +27,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Authors: vladl@google.com (Vlad Losev)
//
// The Google C++ Testing and Mocking Framework (Google Test)
//
// This header file provides classes and functions used internally
...
...
googletest/test/googletest-param-test2-test.cc
View file @
06b97592
...
...
@@ -26,14 +26,13 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: vladl@google.com (Vlad Losev)
//
// Tests for Google Test itself. This verifies that the basic constructs of
// Google Test work.
#include "gtest/gtest.h"
#include "googletest-param-test-test.h"
#include "
test/
googletest-param-test-test.h"
using
::
testing
::
Values
;
using
::
testing
::
internal
::
ParamGenerator
;
...
...
@@ -44,17 +43,18 @@ using ::testing::internal::ParamGenerator;
ParamGenerator
<
int
>
extern_gen
=
Values
(
33
);
// Tests that a parameterized test case can be defined in one translation unit
// and instantiated in another. The test is defined in
googletest-param-test-test.cc
// and ExternalInstantiationTest fixture class is
defined in
// gtest-param-test_test.h.
// and instantiated in another. The test is defined in
//
googletest-param-test-test.cc
and ExternalInstantiationTest fixture class is
//
defined in
gtest-param-test_test.h.
INSTANTIATE_TEST_CASE_P
(
MultiplesOf33
,
ExternalInstantiationTest
,
Values
(
33
,
66
));
// Tests that a parameterized test case can be instantiated
// in multiple translation units. Another instantiation is defined
// in googletest-param-test-test.cc and InstantiationInMultipleTranslaionUnitsTest
// fixture is defined in gtest-param-test_test.h
// in googletest-param-test-test.cc and
// InstantiationInMultipleTranslaionUnitsTest fixture is defined in
// gtest-param-test_test.h
INSTANTIATE_TEST_CASE_P
(
Sequence2
,
InstantiationInMultipleTranslaionUnitsTest
,
Values
(
42
*
3
,
42
*
4
,
42
*
5
));
...
...
Prev
1
…
3
4
5
6
7
8
9
Next
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