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
0e6da4ce
Unverified
Commit
0e6da4ce
authored
Jan 09, 2018
by
Gennadiy Civil
Committed by
GitHub
Jan 09, 2018
Browse files
Merge branch 'master' into fix-core-dump-shared
parents
cdedd189
e194f521
Changes
70
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
1 addition
and
56 deletions
+1
-56
googletest/test/gtest_env_var_test_.cc
googletest/test/gtest_env_var_test_.cc
+0
-3
googletest/test/gtest_environment_test.cc
googletest/test/gtest_environment_test.cc
+0
-3
googletest/test/gtest_filter_unittest_.cc
googletest/test/gtest_filter_unittest_.cc
+0
-2
googletest/test/gtest_output_test_.cc
googletest/test/gtest_output_test_.cc
+0
-12
googletest/test/gtest_repeat_test.cc
googletest/test/gtest_repeat_test.cc
+1
-18
googletest/test/gtest_stress_test.cc
googletest/test/gtest_stress_test.cc
+0
-6
googletest/test/gtest_unittest.cc
googletest/test/gtest_unittest.cc
+0
-8
googletest/test/gtest_xml_outfile1_test_.cc
googletest/test/gtest_xml_outfile1_test_.cc
+0
-1
googletest/test/gtest_xml_outfile2_test_.cc
googletest/test/gtest_xml_outfile2_test_.cc
+0
-1
googletest/test/gtest_xml_output_unittest_.cc
googletest/test/gtest_xml_output_unittest_.cc
+0
-2
No files found.
googletest/test/gtest_env_var_test_.cc
View file @
0e6da4ce
...
...
@@ -35,10 +35,7 @@
#include "gtest/gtest.h"
#include <iostream>
#define GTEST_IMPLEMENTATION_ 1
#include "src/gtest-internal-inl.h"
#undef GTEST_IMPLEMENTATION_
using
::
std
::
cout
;
...
...
googletest/test/gtest_environment_test.cc
View file @
0e6da4ce
...
...
@@ -34,10 +34,7 @@
#include <stdlib.h>
#include <stdio.h>
#include "gtest/gtest.h"
#define GTEST_IMPLEMENTATION_ 1 // Required for the next #include.
#include "src/gtest-internal-inl.h"
#undef GTEST_IMPLEMENTATION_
namespace
testing
{
GTEST_DECLARE_string_
(
filter
);
...
...
googletest/test/gtest_filter_unittest_.cc
View file @
0e6da4ce
...
...
@@ -117,7 +117,6 @@ TEST(DISABLED_FoobarbazTest, TestA) {
FAIL
()
<<
"Expected failure."
;
}
#if GTEST_HAS_PARAM_TEST
class
ParamTest
:
public
testing
::
TestWithParam
<
int
>
{
};
...
...
@@ -129,7 +128,6 @@ TEST_P(ParamTest, TestY) {
INSTANTIATE_TEST_CASE_P
(
SeqP
,
ParamTest
,
testing
::
Values
(
1
,
2
));
INSTANTIATE_TEST_CASE_P
(
SeqQ
,
ParamTest
,
testing
::
Values
(
5
,
6
));
#endif // GTEST_HAS_PARAM_TEST
}
// namespace
...
...
googletest/test/gtest_output_test_.cc
View file @
0e6da4ce
...
...
@@ -37,15 +37,7 @@
#include "gtest/gtest-spi.h"
#include "gtest/gtest.h"
// Indicates that this translation unit is part of Google Test's
// implementation. It must come before gtest-internal-inl.h is
// included, or there will be a compiler error. This trick is to
// prevent a user from accidentally including gtest-internal-inl.h in
// their code.
#define GTEST_IMPLEMENTATION_ 1
#include "src/gtest-internal-inl.h"
#undef GTEST_IMPLEMENTATION_
#include <stdlib.h>
...
...
@@ -757,8 +749,6 @@ TEST(ExpectFatalFailureTest, FailsWhenStatementThrows) {
// This #ifdef block tests the output of value-parameterized tests.
#if GTEST_HAS_PARAM_TEST
std
::
string
ParamNameFunc
(
const
testing
::
TestParamInfo
<
std
::
string
>&
info
)
{
return
info
.
param
;
}
...
...
@@ -779,8 +769,6 @@ INSTANTIATE_TEST_CASE_P(PrintingStrings,
testing
::
Values
(
std
::
string
(
"a"
)),
ParamNameFunc
);
#endif // GTEST_HAS_PARAM_TEST
// This #ifdef block tests the output of typed tests.
#if GTEST_HAS_TYPED_TEST
...
...
googletest/test/gtest_repeat_test.cc
View file @
0e6da4ce
...
...
@@ -34,15 +34,7 @@
#include <stdlib.h>
#include <iostream>
#include "gtest/gtest.h"
// Indicates that this translation unit is part of Google Test's
// implementation. It must come before gtest-internal-inl.h is
// included, or there will be a compiler error. This trick is to
// prevent a user from accidentally including gtest-internal-inl.h in
// their code.
#define GTEST_IMPLEMENTATION_ 1
#include "src/gtest-internal-inl.h"
#undef GTEST_IMPLEMENTATION_
namespace
testing
{
...
...
@@ -119,7 +111,6 @@ TEST(BarDeathTest, ThreadSafeAndFast) {
EXPECT_DEATH_IF_SUPPORTED
(
::
testing
::
internal
::
posix
::
Abort
(),
""
);
}
#if GTEST_HAS_PARAM_TEST
int
g_param_test_count
=
0
;
const
int
kNumberOfParamTests
=
10
;
...
...
@@ -135,7 +126,6 @@ TEST_P(MyParamTest, ShouldPass) {
INSTANTIATE_TEST_CASE_P
(
MyParamSequence
,
MyParamTest
,
testing
::
Range
(
0
,
kNumberOfParamTests
));
#endif // GTEST_HAS_PARAM_TEST
// Resets the count for each test.
void
ResetCounts
()
{
...
...
@@ -144,9 +134,7 @@ void ResetCounts() {
g_should_fail_count
=
0
;
g_should_pass_count
=
0
;
g_death_test_count
=
0
;
#if GTEST_HAS_PARAM_TEST
g_param_test_count
=
0
;
#endif // GTEST_HAS_PARAM_TEST
}
// Checks that the count for each test is expected.
...
...
@@ -156,9 +144,7 @@ void CheckCounts(int expected) {
GTEST_CHECK_INT_EQ_
(
expected
,
g_should_fail_count
);
GTEST_CHECK_INT_EQ_
(
expected
,
g_should_pass_count
);
GTEST_CHECK_INT_EQ_
(
expected
,
g_death_test_count
);
#if GTEST_HAS_PARAM_TEST
GTEST_CHECK_INT_EQ_
(
expected
*
kNumberOfParamTests
,
g_param_test_count
);
#endif // GTEST_HAS_PARAM_TEST
}
// Tests the behavior of Google Test when --gtest_repeat is not specified.
...
...
@@ -201,9 +187,7 @@ void TestRepeatWithFilterForSuccessfulTests(int repeat) {
GTEST_CHECK_INT_EQ_
(
0
,
g_should_fail_count
);
GTEST_CHECK_INT_EQ_
(
repeat
,
g_should_pass_count
);
GTEST_CHECK_INT_EQ_
(
repeat
,
g_death_test_count
);
#if GTEST_HAS_PARAM_TEST
GTEST_CHECK_INT_EQ_
(
repeat
*
kNumberOfParamTests
,
g_param_test_count
);
#endif // GTEST_HAS_PARAM_TEST
}
// Tests using --gtest_repeat when --gtest_filter specifies a set of
...
...
@@ -219,15 +203,14 @@ void TestRepeatWithFilterForFailedTests(int repeat) {
GTEST_CHECK_INT_EQ_
(
repeat
,
g_should_fail_count
);
GTEST_CHECK_INT_EQ_
(
0
,
g_should_pass_count
);
GTEST_CHECK_INT_EQ_
(
0
,
g_death_test_count
);
#if GTEST_HAS_PARAM_TEST
GTEST_CHECK_INT_EQ_
(
0
,
g_param_test_count
);
#endif // GTEST_HAS_PARAM_TEST
}
}
// namespace
int
main
(
int
argc
,
char
**
argv
)
{
testing
::
InitGoogleTest
(
&
argc
,
argv
);
testing
::
AddGlobalTestEnvironment
(
new
MyEnvironment
);
TestRepeatUnspecified
();
...
...
googletest/test/gtest_stress_test.cc
View file @
0e6da4ce
...
...
@@ -34,15 +34,9 @@
#include "gtest/gtest.h"
#include <iostream>
#include <vector>
// We must define this macro in order to #include
// gtest-internal-inl.h. This is how Google Test prevents a user from
// accidentally depending on its internal implementation.
#define GTEST_IMPLEMENTATION_ 1
#include "src/gtest-internal-inl.h"
#undef GTEST_IMPLEMENTATION_
#if GTEST_IS_THREADSAFE
...
...
googletest/test/gtest_unittest.cc
View file @
0e6da4ce
...
...
@@ -66,15 +66,7 @@ TEST(CommandLineFlagsTest, CanBeAccessedInCodeOnceGTestHIsIncluded) {
#include <ostream>
#include "gtest/gtest-spi.h"
// Indicates that this translation unit is part of Google Test's
// implementation. It must come before gtest-internal-inl.h is
// included, or there will be a compiler error. This trick is to
// prevent a user from accidentally including gtest-internal-inl.h in
// their code.
#define GTEST_IMPLEMENTATION_ 1
#include "src/gtest-internal-inl.h"
#undef GTEST_IMPLEMENTATION_
namespace
testing
{
namespace
internal
{
...
...
googletest/test/gtest_xml_outfile1_test_.cc
View file @
0e6da4ce
...
...
@@ -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.
//
// Author: keith.ray@gmail.com (Keith Ray)
//
// gtest_xml_outfile1_test_ writes some xml via TestProperty used by
// gtest_xml_outfiles_test.py
...
...
googletest/test/gtest_xml_outfile2_test_.cc
View file @
0e6da4ce
...
...
@@ -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.
//
// Author: keith.ray@gmail.com (Keith Ray)
//
// gtest_xml_outfile2_test_ writes some xml via TestProperty used by
// gtest_xml_outfiles_test.py
...
...
googletest/test/gtest_xml_output_unittest_.cc
View file @
0e6da4ce
...
...
@@ -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.
// Author: eefacm@gmail.com (Sean Mcafee)
// Unit test for Google Test XML output.
//
// A user can specify XML output in a Google Test program to run via
...
...
Prev
1
2
3
4
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