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
9f5fcff3
Commit
9f5fcff3
authored
Nov 13, 2012
by
Alexander Smorkalov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More common way of test case disabling implemented.
parent
e06c5b6f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
52 deletions
+8
-52
OpenCVTestCase.java
...java/android_test/src/org/opencv/test/OpenCVTestCase.java
+8
-0
VideoCaptureTest.java
...id_test/src/org/opencv/test/highgui/VideoCaptureTest.java
+0
-52
No files found.
modules/java/android_test/src/org/opencv/test/OpenCVTestCase.java
View file @
9f5fcff3
...
@@ -175,6 +175,14 @@ public class OpenCVTestCase extends TestCase {
...
@@ -175,6 +175,14 @@ public class OpenCVTestCase extends TestCase {
super
.
tearDown
();
super
.
tearDown
();
}
}
@Override
protected
void
runTest
()
throws
Throwable
{
// Do nothing if the precondition does not hold.
if
(
isTestCaseEnabled
)
{
super
.
runTest
();
}
}
protected
Mat
getMat
(
int
type
,
double
...
vals
)
protected
Mat
getMat
(
int
type
,
double
...
vals
)
{
{
return
new
Mat
(
matSize
,
matSize
,
type
,
new
Scalar
(
vals
));
return
new
Mat
(
matSize
,
matSize
,
type
,
new
Scalar
(
vals
));
...
...
modules/java/android_test/src/org/opencv/test/highgui/VideoCaptureTest.java
View file @
9f5fcff3
...
@@ -25,10 +25,6 @@ public class VideoCaptureTest extends OpenCVTestCase {
...
@@ -25,10 +25,6 @@ public class VideoCaptureTest extends OpenCVTestCase {
}
}
public
void
testGet
()
{
public
void
testGet
()
{
if
(!
isTestCaseEnabled
)
{
fail
(
"Not yet implemented"
);
}
try
{
try
{
capture
=
new
VideoCapture
(
Highgui
.
CV_CAP_ANDROID
);
capture
=
new
VideoCapture
(
Highgui
.
CV_CAP_ANDROID
);
double
frameWidth
=
capture
.
get
(
Highgui
.
CV_CAP_PROP_FRAME_WIDTH
);
double
frameWidth
=
capture
.
get
(
Highgui
.
CV_CAP_PROP_FRAME_WIDTH
);
...
@@ -39,10 +35,6 @@ public class VideoCaptureTest extends OpenCVTestCase {
...
@@ -39,10 +35,6 @@ public class VideoCaptureTest extends OpenCVTestCase {
}
}
public
void
testGetSupportedPreviewSizes
()
{
public
void
testGetSupportedPreviewSizes
()
{
if
(!
isTestCaseEnabled
)
{
fail
(
"Not yet implemented"
);
}
try
{
try
{
capture
=
new
VideoCapture
(
Highgui
.
CV_CAP_ANDROID
);
capture
=
new
VideoCapture
(
Highgui
.
CV_CAP_ANDROID
);
List
<
Size
>
sizes
=
capture
.
getSupportedPreviewSizes
();
List
<
Size
>
sizes
=
capture
.
getSupportedPreviewSizes
();
...
@@ -54,20 +46,12 @@ public class VideoCaptureTest extends OpenCVTestCase {
...
@@ -54,20 +46,12 @@ public class VideoCaptureTest extends OpenCVTestCase {
}
}
public
void
testGrab
()
{
public
void
testGrab
()
{
if
(!
isTestCaseEnabled
)
{
fail
(
"Not yet implemented"
);
}
capture
=
new
VideoCapture
();
capture
=
new
VideoCapture
();
isSucceed
=
capture
.
grab
();
isSucceed
=
capture
.
grab
();
assertFalse
(
isSucceed
);
assertFalse
(
isSucceed
);
}
}
public
void
testGrabFromRealCamera
()
{
public
void
testGrabFromRealCamera
()
{
if
(!
isTestCaseEnabled
)
{
fail
(
"Not yet implemented"
);
}
try
{
try
{
capture
=
new
VideoCapture
(
Highgui
.
CV_CAP_ANDROID
);
capture
=
new
VideoCapture
(
Highgui
.
CV_CAP_ANDROID
);
isSucceed
=
capture
.
grab
();
isSucceed
=
capture
.
grab
();
...
@@ -78,19 +62,11 @@ public class VideoCaptureTest extends OpenCVTestCase {
...
@@ -78,19 +62,11 @@ public class VideoCaptureTest extends OpenCVTestCase {
}
}
public
void
testIsOpened
()
{
public
void
testIsOpened
()
{
if
(!
isTestCaseEnabled
)
{
fail
(
"Not yet implemented"
);
}
capture
=
new
VideoCapture
();
capture
=
new
VideoCapture
();
assertFalse
(
capture
.
isOpened
());
assertFalse
(
capture
.
isOpened
());
}
}
public
void
testIsOpenedRealCamera
()
{
public
void
testIsOpenedRealCamera
()
{
if
(!
isTestCaseEnabled
)
{
fail
(
"Not yet implemented"
);
}
try
{
try
{
capture
=
new
VideoCapture
(
Highgui
.
CV_CAP_ANDROID
);
capture
=
new
VideoCapture
(
Highgui
.
CV_CAP_ANDROID
);
isOpened
=
capture
.
isOpened
();
isOpened
=
capture
.
isOpened
();
...
@@ -101,10 +77,6 @@ public class VideoCaptureTest extends OpenCVTestCase {
...
@@ -101,10 +77,6 @@ public class VideoCaptureTest extends OpenCVTestCase {
}
}
public
void
testOpen
()
{
public
void
testOpen
()
{
if
(!
isTestCaseEnabled
)
{
fail
(
"Not yet implemented"
);
}
try
{
try
{
capture
=
new
VideoCapture
();
capture
=
new
VideoCapture
();
capture
.
open
(
Highgui
.
CV_CAP_ANDROID
);
capture
.
open
(
Highgui
.
CV_CAP_ANDROID
);
...
@@ -116,10 +88,6 @@ public class VideoCaptureTest extends OpenCVTestCase {
...
@@ -116,10 +88,6 @@ public class VideoCaptureTest extends OpenCVTestCase {
}
}
public
void
testRead
()
{
public
void
testRead
()
{
if
(!
isTestCaseEnabled
)
{
fail
(
"Not yet implemented"
);
}
try
{
try
{
capture
=
new
VideoCapture
(
Highgui
.
CV_CAP_ANDROID
);
capture
=
new
VideoCapture
(
Highgui
.
CV_CAP_ANDROID
);
isSucceed
=
capture
.
read
(
dst
);
isSucceed
=
capture
.
read
(
dst
);
...
@@ -132,10 +100,6 @@ public class VideoCaptureTest extends OpenCVTestCase {
...
@@ -132,10 +100,6 @@ public class VideoCaptureTest extends OpenCVTestCase {
}
}
public
void
testRelease
()
{
public
void
testRelease
()
{
if
(!
isTestCaseEnabled
)
{
fail
(
"Not yet implemented"
);
}
try
{
try
{
capture
=
new
VideoCapture
(
Highgui
.
CV_CAP_ANDROID
);
capture
=
new
VideoCapture
(
Highgui
.
CV_CAP_ANDROID
);
capture
.
release
();
capture
.
release
();
...
@@ -147,10 +111,6 @@ public class VideoCaptureTest extends OpenCVTestCase {
...
@@ -147,10 +111,6 @@ public class VideoCaptureTest extends OpenCVTestCase {
}
}
public
void
testRetrieveMat
()
{
public
void
testRetrieveMat
()
{
if
(!
isTestCaseEnabled
)
{
fail
(
"Not yet implemented"
);
}
try
{
try
{
capture
=
new
VideoCapture
(
Highgui
.
CV_CAP_ANDROID
);
capture
=
new
VideoCapture
(
Highgui
.
CV_CAP_ANDROID
);
capture
.
grab
();
capture
.
grab
();
...
@@ -164,10 +124,6 @@ public class VideoCaptureTest extends OpenCVTestCase {
...
@@ -164,10 +124,6 @@ public class VideoCaptureTest extends OpenCVTestCase {
}
}
public
void
testRetrieveMatInt
()
{
public
void
testRetrieveMatInt
()
{
if
(!
isTestCaseEnabled
)
{
fail
(
"Not yet implemented"
);
}
try
{
try
{
capture
=
new
VideoCapture
(
Highgui
.
CV_CAP_ANDROID
);
capture
=
new
VideoCapture
(
Highgui
.
CV_CAP_ANDROID
);
capture
.
grab
();
capture
.
grab
();
...
@@ -181,10 +137,6 @@ public class VideoCaptureTest extends OpenCVTestCase {
...
@@ -181,10 +137,6 @@ public class VideoCaptureTest extends OpenCVTestCase {
}
}
public
void
testSet
()
{
public
void
testSet
()
{
if
(!
isTestCaseEnabled
)
{
fail
(
"Not yet implemented"
);
}
try
{
try
{
capture
=
new
VideoCapture
(
Highgui
.
CV_CAP_ANDROID
);
capture
=
new
VideoCapture
(
Highgui
.
CV_CAP_ANDROID
);
capture
.
set
(
Highgui
.
CV_CAP_PROP_FRAME_WIDTH
,
640
);
capture
.
set
(
Highgui
.
CV_CAP_PROP_FRAME_WIDTH
,
640
);
...
@@ -205,10 +157,6 @@ public class VideoCaptureTest extends OpenCVTestCase {
...
@@ -205,10 +157,6 @@ public class VideoCaptureTest extends OpenCVTestCase {
}
}
public
void
testVideoCaptureInt
()
{
public
void
testVideoCaptureInt
()
{
if
(!
isTestCaseEnabled
)
{
fail
(
"Not yet implemented"
);
}
try
{
try
{
capture
=
new
VideoCapture
(
Highgui
.
CV_CAP_ANDROID
);
capture
=
new
VideoCapture
(
Highgui
.
CV_CAP_ANDROID
);
assertNotNull
(
capture
);
assertNotNull
(
capture
);
...
...
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