Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
B
brpc
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
brpc
Commits
972731c5
Commit
972731c5
authored
Sep 29, 2018
by
gejun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Suppress warnings in UT
parent
f77d71fb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
iobuf_unittest.cpp
test/iobuf_unittest.cpp
+3
-3
temp_file_unittest.cpp
test/temp_file_unittest.cpp
+1
-1
No files found.
test/iobuf_unittest.cpp
View file @
972731c5
...
...
@@ -98,7 +98,7 @@ static void check_memory_leak() {
++
n
;
}
ASSERT_EQ
(
n
,
s_set
.
size
());
ASSERT_EQ
(
n
,
butil
::
iobuf
::
get_tls_block_count
());
ASSERT_EQ
(
n
,
(
size_t
)
butil
::
iobuf
::
get_tls_block_count
());
}
}
...
...
@@ -287,7 +287,7 @@ TEST_F(IOBufTest, reserve) {
b
.
append
(
"hello world"
);
ASSERT_EQ
(
0
,
b
.
unsafe_assign
(
a1
,
"prefix"
));
// `x' will not be copied
ASSERT_EQ
(
"prefihello world"
,
b
.
to_string
());
ASSERT_EQ
(
16
,
b
.
size
());
ASSERT_EQ
(
(
size_t
)
16
,
b
.
size
());
// pop/append sth. from back-side and assign again.
ASSERT_EQ
(
5
,
b
.
pop_back
(
5
));
...
...
@@ -1309,7 +1309,7 @@ TEST_F(IOBufTest, append_from_fd_with_offset) {
butil
::
IOPortal
buf
;
char
dummy
[
10
*
1024
];
buf
.
append
(
dummy
,
sizeof
(
dummy
));
ASSERT_EQ
(
sizeof
(
dummy
),
buf
.
cut_into_file_descriptor
(
fd
));
ASSERT_EQ
(
(
ssize_t
)
sizeof
(
dummy
),
buf
.
cut_into_file_descriptor
(
fd
));
for
(
size_t
i
=
0
;
i
<
sizeof
(
dummy
);
++
i
)
{
butil
::
IOPortal
b0
;
ASSERT_EQ
(
sizeof
(
dummy
)
-
i
,
b0
.
pappend_from_file_descriptor
(
fd
,
i
,
sizeof
(
dummy
)))
<<
berror
();
...
...
test/temp_file_unittest.cpp
View file @
972731c5
...
...
@@ -127,7 +127,7 @@ TEST_F(TempFileTest, save_binary_twice)
ASSERT_NE
((
void
*
)
0
,
fp
);
test_t
act_data
;
bzero
(
&
act_data
,
sizeof
(
act_data
));
ASSERT_EQ
(
1
,
fread
(
&
act_data
,
sizeof
(
act_data
),
1
,
fp
));
ASSERT_EQ
(
(
size_t
)
1
,
fread
(
&
act_data
,
sizeof
(
act_data
),
1
,
fp
));
fclose
(
fp
);
ASSERT_EQ
(
0
,
memcmp
(
&
data
,
&
act_data
,
sizeof
(
data
)));
...
...
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