Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
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
opencv
Commits
e98c1bfb
Commit
e98c1bfb
authored
Jun 30, 2016
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6747 from ludv1x:master
parents
69bd6dad
930d96f6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletion
+15
-1
utility.hpp
modules/core/include/opencv2/core/utility.hpp
+1
-1
test_utils.cpp
modules/core/test/test_utils.cpp
+14
-0
No files found.
modules/core/include/opencv2/core/utility.hpp
View file @
e98c1bfb
...
...
@@ -817,10 +817,10 @@ AutoBuffer<_Tp, fixed_size>::allocate(size_t _size)
return
;
}
deallocate
();
sz
=
_size
;
if
(
_size
>
fixed_size
)
{
ptr
=
new
_Tp
[
_size
];
sz
=
_size
;
}
}
...
...
modules/core/test/test_utils.cpp
View file @
e98c1bfb
...
...
@@ -27,6 +27,7 @@ TEST(CommandLineParser, testFailure)
parser
.
get
<
bool
>
(
"h"
);
EXPECT_FALSE
(
parser
.
check
());
}
TEST
(
CommandLineParser
,
testHas_noValues
)
{
const
char
*
argv
[]
=
{
"<bin>"
,
"-h"
,
"--info"
};
...
...
@@ -218,4 +219,17 @@ TEST(CommandLineParser, positional_regression_5074_equal_sign)
EXPECT_TRUE
(
parser
.
check
());
}
TEST
(
AutoBuffer
,
allocate_test
)
{
AutoBuffer
<
int
,
5
>
abuf
(
2
);
EXPECT_EQ
(
2
,
abuf
.
size
());
abuf
.
allocate
(
4
);
EXPECT_EQ
(
4
,
abuf
.
size
());
abuf
.
allocate
(
6
);
EXPECT_EQ
(
6
,
abuf
.
size
());
}
}
// namespace
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