Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
9f15daf0
O
Opencv
项目概览
Greenplum
/
Opencv
11 个月 前同步成功
通知
7
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
Opencv
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
9f15daf0
编写于
2月 25, 2013
作者:
A
Andrey Kamaev
提交者:
OpenCV Buildbot
2月 25, 2013
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #542 from asmorkalov:manager_2.4.4_filter
上级
6082f351
bb7af3f7
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
61 addition
and
1 deletion
+61
-1
android/service/engine/jni/BinderComponent/OpenCVEngine.cpp
android/service/engine/jni/BinderComponent/OpenCVEngine.cpp
+1
-1
android/service/engine/jni/Tests/OpenCVEngineTest.cpp
android/service/engine/jni/Tests/OpenCVEngineTest.cpp
+60
-0
未找到文件。
android/service/engine/jni/BinderComponent/OpenCVEngine.cpp
浏览文件 @
9f15daf0
...
...
@@ -15,7 +15,7 @@ using namespace android;
const
int
OpenCVEngine
::
Platform
=
DetectKnownPlatforms
();
const
int
OpenCVEngine
::
CpuID
=
GetCpuID
();
const
int
OpenCVEngine
::
KnownVersions
[]
=
{
2040000
,
2040100
,
2040200
,
2040300
,
2040301
,
2040302
};
const
int
OpenCVEngine
::
KnownVersions
[]
=
{
2040000
,
2040100
,
2040200
,
2040300
,
2040301
,
2040302
,
2040400
};
bool
OpenCVEngine
::
ValidateVersion
(
int
version
)
{
...
...
android/service/engine/jni/Tests/OpenCVEngineTest.cpp
浏览文件 @
9f15daf0
...
...
@@ -218,6 +218,66 @@ TEST(OpenCVEngineTest, InstallAndGetVersion)
#endif
#endif
}
TEST
(
OpenCVEngineTest
,
GetPathFor2_4_2
)
{
sp
<
IOpenCVEngine
>
Engine
=
InitConnect
();
Starter
.
PackageManager
->
InstalledPackages
.
clear
();
Starter
.
PackageManager
->
InstallVersion
(
2040200
,
PLATFORM_UNKNOWN
,
ARCH_ARMv7
);
EXPECT_FALSE
(
NULL
==
Engine
.
get
());
String16
result
=
Engine
->
GetLibPathByVersion
(
String16
(
"2.4.2"
));
EXPECT_STREQ
(
"/data/data/org.opencv.lib_v24_armv7a/lib"
,
String8
(
result
).
string
());
}
TEST
(
OpenCVEngineTest
,
GetPathFor2_4_3
)
{
sp
<
IOpenCVEngine
>
Engine
=
InitConnect
();
Starter
.
PackageManager
->
InstalledPackages
.
clear
();
Starter
.
PackageManager
->
InstallVersion
(
2040300
,
PLATFORM_UNKNOWN
,
ARCH_ARMv7
);
EXPECT_FALSE
(
NULL
==
Engine
.
get
());
String16
result
=
Engine
->
GetLibPathByVersion
(
String16
(
"2.4.3"
));
EXPECT_STREQ
(
"/data/data/org.opencv.lib_v24_armv7a/lib"
,
String8
(
result
).
string
());
}
TEST
(
OpenCVEngineTest
,
GetPathFor2_4_3_1
)
{
sp
<
IOpenCVEngine
>
Engine
=
InitConnect
();
Starter
.
PackageManager
->
InstalledPackages
.
clear
();
Starter
.
PackageManager
->
InstallVersion
(
2040301
,
PLATFORM_UNKNOWN
,
ARCH_ARMv7
);
EXPECT_FALSE
(
NULL
==
Engine
.
get
());
String16
result
=
Engine
->
GetLibPathByVersion
(
String16
(
"2.4.3.1"
));
EXPECT_STREQ
(
"/data/data/org.opencv.lib_v24_armv7a/lib"
,
String8
(
result
).
string
());
}
TEST
(
OpenCVEngineTest
,
GetPathFor2_4_3_2
)
{
sp
<
IOpenCVEngine
>
Engine
=
InitConnect
();
Starter
.
PackageManager
->
InstalledPackages
.
clear
();
Starter
.
PackageManager
->
InstallVersion
(
2040302
,
PLATFORM_UNKNOWN
,
ARCH_ARMv7
);
EXPECT_FALSE
(
NULL
==
Engine
.
get
());
String16
result
=
Engine
->
GetLibPathByVersion
(
String16
(
"2.4.3.2"
));
EXPECT_STREQ
(
"/data/data/org.opencv.lib_v24_armv7a/lib"
,
String8
(
result
).
string
());
}
TEST
(
OpenCVEngineTest
,
GetPathFor2_4_4
)
{
sp
<
IOpenCVEngine
>
Engine
=
InitConnect
();
Starter
.
PackageManager
->
InstalledPackages
.
clear
();
Starter
.
PackageManager
->
InstallVersion
(
2040400
,
PLATFORM_UNKNOWN
,
ARCH_ARMv7
);
EXPECT_FALSE
(
NULL
==
Engine
.
get
());
String16
result
=
Engine
->
GetLibPathByVersion
(
String16
(
"2.4.4"
));
EXPECT_STREQ
(
"/data/data/org.opencv.lib_v24_armv7a/lib"
,
String8
(
result
).
string
());
}
TEST
(
OpenCVEngineTest
,
GetPathFor2_4_5
)
{
sp
<
IOpenCVEngine
>
Engine
=
InitConnect
();
Starter
.
PackageManager
->
InstalledPackages
.
clear
();
Starter
.
PackageManager
->
InstallVersion
(
2040500
,
PLATFORM_UNKNOWN
,
ARCH_ARMv7
);
EXPECT_FALSE
(
NULL
==
Engine
.
get
());
String16
result
=
Engine
->
GetLibPathByVersion
(
String16
(
"2.4.5"
));
EXPECT_EQ
(
0
,
result
.
size
());
// 2.4.5 is not published yet
}
#endif
#ifndef __i386__
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录