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
e4f8b069
Commit
e4f8b069
authored
May 03, 2014
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Too young to die.
parent
590490f3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
test/gtest-extra-test.cc
test/gtest-extra-test.cc
+5
-2
No files found.
test/gtest-extra-test.cc
View file @
e4f8b069
...
...
@@ -336,6 +336,7 @@ TEST(FileTest, ReadError) {
File
read_end
,
write_end
;
File
::
pipe
(
read_end
,
write_end
);
char
buf
;
// We intentionally read from write_end to cause error.
EXPECT_SYSTEM_ERROR
(
write_end
.
read
(
&
buf
,
1
),
EBADF
,
"cannot read from file"
);
}
...
...
@@ -348,8 +349,10 @@ TEST(FileTest, Write) {
}
TEST
(
FileTest
,
WriteError
)
{
File
f
;
EXPECT_SYSTEM_ERROR_OR_DEATH
(
f
.
write
(
" "
,
1
),
EBADF
,
"cannot write to file"
);
File
read_end
,
write_end
;
File
::
pipe
(
read_end
,
write_end
);
// We intentionally write to read_end to cause error.
EXPECT_SYSTEM_ERROR
(
read_end
.
write
(
" "
,
1
),
EBADF
,
"cannot write to file"
);
}
TEST
(
FileTest
,
Dup
)
{
...
...
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