Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
fmt
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
fmt
Commits
758283f7
Commit
758283f7
authored
May 05, 2014
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tests.
parent
03ca48f3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
test/gtest-extra-test.cc
test/gtest-extra-test.cc
+9
-2
No files found.
test/gtest-extra-test.cc
View file @
758283f7
...
...
@@ -33,6 +33,10 @@
#include <stdexcept>
#include <gtest/gtest-spi.h>
#ifdef _WIN32
# include <crtdbg.h> // for _CrtSetReportMode
#endif // _WIN32
namespace
{
std
::
string
FormatSystemErrorMessage
(
int
error_code
,
fmt
::
StringRef
message
)
{
...
...
@@ -99,7 +103,7 @@ void ThrowException() {
// Tests that when EXPECT_THROW_MSG fails, it evaluates its message argument
// exactly once.
TEST_F
(
SingleEvaluationTest
,
Failed
ASSER
T_THROW_MSG
)
{
TEST_F
(
SingleEvaluationTest
,
Failed
EXPEC
T_THROW_MSG
)
{
EXPECT_NONFATAL_FAILURE
(
EXPECT_THROW_MSG
(
ThrowException
(),
std
::
exception
,
p_
++
),
"01234"
);
EXPECT_EQ
(
s_
+
1
,
p_
);
...
...
@@ -193,16 +197,19 @@ class BufferedFileTest : public ::testing::Test {
#ifdef _WIN32
private:
_invalid_parameter_handler
original_handler_
;
int
original_report_mode_
;
static
void
InvalidParameterHandler
(
const
wchar_t
*
,
const
wchar_t
*
,
const
wchar_t
*
,
unsigned
,
uintptr_t
)
{}
public:
BufferedFileTest
()
:
original_handler_
(
_set_invalid_parameter_handler
(
InvalidParameterHandler
))
{
:
original_handler_
(
_set_invalid_parameter_handler
(
InvalidParameterHandler
)),
original_report_mode_
(
_CrtSetReportMode
(
_CRT_ASSERT
,
0
))
{
}
~
BufferedFileTest
()
{
_set_invalid_parameter_handler
(
original_handler_
);
_CrtSetReportMode
(
_CRT_ASSERT
,
original_report_mode_
);
}
#endif // _WIN32
};
...
...
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