Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
yangql
googletest
Commits
f13bbe29
Commit
f13bbe29
authored
Oct 04, 2018
by
misterg
Committed by
Gennadiy Civil
Oct 04, 2018
Browse files
Remove checking for C++ 11 and a pre-C++11 test from googletest tests
PiperOrigin-RevId: 215789971
parent
bea3d619
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 addition
and
33 deletions
+1
-33
googletest/test/googletest-catch-exceptions-test_.cc
googletest/test/googletest-catch-exceptions-test_.cc
+0
-19
googletest/test/googletest-param-test-test.cc
googletest/test/googletest-param-test-test.cc
+0
-9
googletest/test/googletest-printers-test.cc
googletest/test/googletest-printers-test.cc
+1
-5
No files found.
googletest/test/googletest-catch-exceptions-test_.cc
View file @
f13bbe29
...
@@ -137,25 +137,6 @@ TEST_F(CxxExceptionInConstructorTest, ThrowsExceptionInConstructor) {
...
@@ -137,25 +137,6 @@ TEST_F(CxxExceptionInConstructorTest, ThrowsExceptionInConstructor) {
<<
"called unexpectedly."
;
<<
"called unexpectedly."
;
}
}
// Exceptions in destructors are not supported in C++11.
#if !GTEST_LANG_CXX11
class
CxxExceptionInDestructorTest
:
public
Test
{
public:
static
void
TearDownTestCase
()
{
printf
(
"%s"
,
"CxxExceptionInDestructorTest::TearDownTestCase() "
"called as expected.
\n
"
);
}
protected:
~
CxxExceptionInDestructorTest
()
{
GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_
(
throw
std
::
runtime_error
(
"Standard C++ exception"
));
}
};
TEST_F
(
CxxExceptionInDestructorTest
,
ThrowsExceptionInDestructor
)
{}
#endif // C++11 mode
class
CxxExceptionInSetUpTestCaseTest
:
public
Test
{
class
CxxExceptionInSetUpTestCaseTest
:
public
Test
{
public:
public:
...
...
googletest/test/googletest-param-test-test.cc
View file @
f13bbe29
...
@@ -535,8 +535,6 @@ TEST(CombineTest, CombineWithMaxNumberOfParameters) {
...
@@ -535,8 +535,6 @@ TEST(CombineTest, CombineWithMaxNumberOfParameters) {
VerifyGenerator
(
gen
,
expected_values
);
VerifyGenerator
(
gen
,
expected_values
);
}
}
#if GTEST_LANG_CXX11
class
NonDefaultConstructAssignString
{
class
NonDefaultConstructAssignString
{
public:
public:
NonDefaultConstructAssignString
(
const
std
::
string
&
s
)
:
str_
(
s
)
{}
NonDefaultConstructAssignString
(
const
std
::
string
&
s
)
:
str_
(
s
)
{}
...
@@ -579,7 +577,6 @@ TEST(CombineTest, NonDefaultConstructAssign) {
...
@@ -579,7 +577,6 @@ TEST(CombineTest, NonDefaultConstructAssign) {
EXPECT_TRUE
(
it
==
gen
.
end
());
EXPECT_TRUE
(
it
==
gen
.
end
());
}
}
#endif // GTEST_LANG_CXX11
# endif // GTEST_HAS_COMBINE
# endif // GTEST_HAS_COMBINE
// Tests that an generator produces correct sequence after being
// Tests that an generator produces correct sequence after being
...
@@ -913,8 +910,6 @@ INSTANTIATE_TEST_CASE_P(CustomParamNameFunction,
...
@@ -913,8 +910,6 @@ INSTANTIATE_TEST_CASE_P(CustomParamNameFunction,
Values
(
std
::
string
(
"FunctionName"
)),
Values
(
std
::
string
(
"FunctionName"
)),
CustomParamNameFunction
);
CustomParamNameFunction
);
#if GTEST_LANG_CXX11
// Test custom naming with a lambda
// Test custom naming with a lambda
class
CustomLambdaNamingTest
:
public
TestWithParam
<
std
::
string
>
{};
class
CustomLambdaNamingTest
:
public
TestWithParam
<
std
::
string
>
{};
...
@@ -926,8 +921,6 @@ INSTANTIATE_TEST_CASE_P(CustomParamNameLambda, CustomLambdaNamingTest,
...
@@ -926,8 +921,6 @@ INSTANTIATE_TEST_CASE_P(CustomParamNameLambda, CustomLambdaNamingTest,
return
inf
.
param
;
return
inf
.
param
;
});
});
#endif // GTEST_LANG_CXX11
TEST
(
CustomNamingTest
,
CheckNameRegistry
)
{
TEST
(
CustomNamingTest
,
CheckNameRegistry
)
{
::
testing
::
UnitTest
*
unit_test
=
::
testing
::
UnitTest
::
GetInstance
();
::
testing
::
UnitTest
*
unit_test
=
::
testing
::
UnitTest
::
GetInstance
();
std
::
set
<
std
::
string
>
test_names
;
std
::
set
<
std
::
string
>
test_names
;
...
@@ -944,9 +937,7 @@ TEST(CustomNamingTest, CheckNameRegistry) {
...
@@ -944,9 +937,7 @@ TEST(CustomNamingTest, CheckNameRegistry) {
}
}
EXPECT_EQ
(
1u
,
test_names
.
count
(
"CustomTestNames/FunctorName"
));
EXPECT_EQ
(
1u
,
test_names
.
count
(
"CustomTestNames/FunctorName"
));
EXPECT_EQ
(
1u
,
test_names
.
count
(
"CustomTestNames/FunctionName"
));
EXPECT_EQ
(
1u
,
test_names
.
count
(
"CustomTestNames/FunctionName"
));
#if GTEST_LANG_CXX11
EXPECT_EQ
(
1u
,
test_names
.
count
(
"CustomTestNames/LambdaName"
));
EXPECT_EQ
(
1u
,
test_names
.
count
(
"CustomTestNames/LambdaName"
));
#endif // GTEST_LANG_CXX11
}
}
// Test a numeric name to ensure PrintToStringParamName works correctly.
// Test a numeric name to ensure PrintToStringParamName works correctly.
...
...
googletest/test/googletest-printers-test.cc
View file @
f13bbe29
...
@@ -1109,9 +1109,7 @@ TEST(PrintStdTupleTest, NestedTuple) {
...
@@ -1109,9 +1109,7 @@ TEST(PrintStdTupleTest, NestedTuple) {
EXPECT_EQ
(
"((5, true), 'a' (97, 0x61))"
,
Print
(
nested
));
EXPECT_EQ
(
"((5, true), 'a' (97, 0x61))"
,
Print
(
nested
));
}
}
#endif // GTEST_LANG_CXX11
#endif // GTEST_HAS_TR1_TUPLE
#if GTEST_LANG_CXX11
TEST
(
PrintNullptrT
,
Basic
)
{
TEST
(
PrintNullptrT
,
Basic
)
{
EXPECT_EQ
(
"(nullptr)"
,
Print
(
nullptr
));
EXPECT_EQ
(
"(nullptr)"
,
Print
(
nullptr
));
...
@@ -1131,8 +1129,6 @@ TEST(PrintReferenceWrapper, Unprintable) {
...
@@ -1131,8 +1129,6 @@ TEST(PrintReferenceWrapper, Unprintable) {
Print
(
std
::
cref
(
up
)));
Print
(
std
::
cref
(
up
)));
}
}
#endif // GTEST_LANG_CXX11
// Tests printing user-defined unprintable types.
// Tests printing user-defined unprintable types.
// Unprintable types in the global namespace.
// Unprintable types in the global namespace.
...
...
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