Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
capnproto
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
capnproto
Commits
f34b88ff
Commit
f34b88ff
authored
Apr 24, 2017
by
Kenton Varda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add David's overflow test (it passes). Fixes #195
parent
9ada015e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
1 deletion
+21
-1
encoding-test.c++
c++/src/capnp/encoding-test.c++
+19
-0
super-test.sh
super-test.sh
+2
-1
No files found.
c++/src/capnp/encoding-test.c++
View file @
f34b88ff
...
...
@@ -591,6 +591,25 @@ TEST(Encoding, SetListToEmpty) {
#undef CHECK_EMPTY_NONNULL
}
#if CAPNP_EXPENSIVE_TESTS
TEST
(
Encoding
,
LongList
)
{
// This test allocates 512MB of contiguous memory and takes several seconds, so we usually don't
// run it. It is run before release, though.
MallocMessageBuilder
builder
;
auto
root
=
builder
.
initRoot
<
TestAllTypes
>
();
uint
length
=
1
<<
27
;
auto
list
=
root
.
initUInt64List
(
length
);
for
(
uint
ii
=
0
;
ii
<
length
;
++
ii
)
{
list
.
set
(
ii
,
ii
);
}
for
(
uint
ii
=
0
;
ii
<
length
;
++
ii
)
{
ASSERT_EQ
(
list
[
ii
],
ii
);
}
}
#endif
// =======================================================================================
TEST
(
Encoding
,
ListUpgrade
)
{
...
...
super-test.sh
View file @
f34b88ff
...
...
@@ -219,7 +219,8 @@ done
# because GCC warns about code that I know is OK. Disable sign-compare because I've fixed more
# sign-compare warnings than probably all other warnings combined and I've never seen it flag a
# real problem. Disable unused parameters because it's stupidly noisy and never a real problem.
export
CXXFLAGS
=
"-O2 -DDEBUG -Wall -Wextra -Werror -Wno-strict-aliasing -Wno-sign-compare -Wno-unused-parameter"
# Enable expensive release-gating tests.
export
CXXFLAGS
=
"-O2 -DDEBUG -Wall -Wextra -Werror -Wno-strict-aliasing -Wno-sign-compare -Wno-unused-parameter -DCAPNP_EXPENSIVE_TESTS=1"
STAGING
=
$PWD
/tmp-staging
...
...
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