mirror of
https://github.com/opencv/opencv.git
synced 2025-08-06 14:36:36 +08:00
Merge pull request #17017 from VadimLevin:dev/vlevin/header-parser-explicit-support
This commit is contained in:
commit
98e38b2a41
@ -430,9 +430,10 @@ class CppHeaderParser(object):
|
||||
# filter off some common prefixes, which are meaningless for Python wrappers.
|
||||
# note that we do not strip "static" prefix, which does matter;
|
||||
# it means class methods, not instance methods
|
||||
decl_str = self.batch_replace(decl_str, [("static inline", ""), ("inline", ""),\
|
||||
("CV_EXPORTS_W", ""), ("CV_EXPORTS", ""), ("CV_CDECL", ""), ("CV_WRAP ", " "), ("CV_INLINE", ""),
|
||||
("CV_DEPRECATED", ""), ("CV_DEPRECATED_EXTERNAL", "")]).strip()
|
||||
decl_str = self.batch_replace(decl_str, [("static inline", ""), ("inline", ""), ("explicit ", ""),
|
||||
("CV_EXPORTS_W", ""), ("CV_EXPORTS", ""), ("CV_CDECL", ""),
|
||||
("CV_WRAP ", " "), ("CV_INLINE", ""),
|
||||
("CV_DEPRECATED", ""), ("CV_DEPRECATED_EXTERNAL", "")]).strip()
|
||||
|
||||
|
||||
if decl_str.strip().startswith('virtual'):
|
||||
|
@ -35,10 +35,30 @@ public class VideoCaptureTest extends OpenCVTestCase {
|
||||
assertFalse(capture.isOpened());
|
||||
}
|
||||
|
||||
public void testVideoCapture() {
|
||||
public void testDefaultConstructor() {
|
||||
capture = new VideoCapture();
|
||||
assertNotNull(capture);
|
||||
assertFalse(capture.isOpened());
|
||||
}
|
||||
|
||||
public void testConstructorWithFilename() {
|
||||
capture = new VideoCapture("some_file.avi");
|
||||
assertNotNull(capture);
|
||||
}
|
||||
|
||||
public void testConstructorWithFilenameAndExplicitlySpecifiedAPI() {
|
||||
capture = new VideoCapture("some_file.avi", Videoio.CAP_ANY);
|
||||
assertNotNull(capture);
|
||||
}
|
||||
|
||||
public void testConstructorWithIndex() {
|
||||
capture = new VideoCapture(0);
|
||||
assertNotNull(capture);
|
||||
}
|
||||
|
||||
public void testConstructorWithIndexAndExplicitlySpecifiedAPI() {
|
||||
capture = new VideoCapture(0, Videoio.CAP_ANY);
|
||||
assertNotNull(capture);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user