mirror of
https://github.com/opencv/opencv.git
synced 2026-07-31 00:03:03 +04:00
Merge pull request #18401 from smirnov-alexey:as/serialization_more_types
[G-API] Add support for more types serialization * Support more types * Add std::string support * Fix GOpaque and gin interaction * Fix tests on kind * Make map serialization support templates and add tests on kind
This commit is contained in:
@@ -215,6 +215,14 @@ TEST(GOpaque_OpaqueRef, TestMov)
|
||||
EXPECT_NE(test, mov.rref<I>()); // ref lost the data
|
||||
}
|
||||
|
||||
namespace {
|
||||
struct MyTestStruct {
|
||||
int i;
|
||||
float f;
|
||||
std::string name;
|
||||
};
|
||||
}
|
||||
|
||||
TEST(GOpaque_OpaqueRef, Kind)
|
||||
{
|
||||
cv::detail::OpaqueRef v1(cv::Rect{});
|
||||
@@ -233,7 +241,10 @@ TEST(GOpaque_OpaqueRef, Kind)
|
||||
EXPECT_EQ(cv::detail::OpaqueKind::CV_SIZE, v7.getKind());
|
||||
|
||||
cv::detail::OpaqueRef v8(std::string{});
|
||||
EXPECT_EQ(cv::detail::OpaqueKind::CV_UNKNOWN, v8.getKind());
|
||||
EXPECT_EQ(cv::detail::OpaqueKind::CV_STRING, v8.getKind());
|
||||
|
||||
cv::detail::OpaqueRef v9(MyTestStruct{});
|
||||
EXPECT_EQ(cv::detail::OpaqueKind::CV_UNKNOWN, v9.getKind());
|
||||
}
|
||||
|
||||
TEST(GOpaque_OpaqueRef, TestReset)
|
||||
|
||||
Reference in New Issue
Block a user