Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
e9be482e
Commit
e9be482e
authored
Sep 18, 2013
by
John Esmet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix this test - did not get built or tested properly on my end due to
BUILD_TESTING=Off in the cmake config.
parent
387523dc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
locktree/tests/range_buffer_test.cc
locktree/tests/range_buffer_test.cc
+7
-3
No files found.
locktree/tests/range_buffer_test.cc
View file @
e9be482e
...
...
@@ -90,6 +90,10 @@ PATENT RIGHTS GRANT:
#include "test.h"
#include <string.h>
#include <toku_include/memory.h>
#include <locktree/range_buffer.h>
namespace
toku
{
...
...
@@ -215,8 +219,8 @@ static void test_small_and_large_points(void) {
// a subsequent large append.
const
size_t
small_size
=
32
;
const
size_t
large_size
=
16
*
1024
;
char
*
small_buf
=
toku_xmalloc
(
small_size
);
char
*
large_buf
=
toku_xmalloc
(
large_size
);
char
*
small_buf
=
(
char
*
)
toku_xmalloc
(
small_size
);
char
*
large_buf
=
(
char
*
)
toku_xmalloc
(
large_size
);
DBT
small_dbt
,
large_dbt
;
memset
(
&
small_dbt
,
0
,
sizeof
(
DBT
));
memset
(
&
large_dbt
,
0
,
sizeof
(
DBT
));
...
...
@@ -229,7 +233,7 @@ static void test_small_and_large_points(void) {
buffer
.
append
(
&
small_dbt
,
&
small_dbt
);
invariant
(
buffer
.
m_buf_size
>=
small_dbt
.
size
);
// Append a large dbt, the buf should be able to fit it.
buffer
.
append
(
&
small_dbt
,
&
small
_dbt
);
buffer
.
append
(
&
large_dbt
,
&
large
_dbt
);
invariant
(
buffer
.
m_buf_size
>=
(
small_dbt
.
size
+
large_dbt
.
size
));
toku_free
(
small_buf
);
...
...
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