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:
Alexey Smirnov
2020-09-28 21:20:04 +03:00
committed by GitHub
parent 19f4cc57c1
commit 8da1b9aafa
8 changed files with 328 additions and 23 deletions
+12 -1
View File
@@ -240,6 +240,14 @@ TEST(GArray_VectorRef, TestMov)
EXPECT_EQ(V{}, vtest);
}
namespace {
struct MyTestStruct {
int i;
float f;
std::string name;
};
}
TEST(GArray_VectorRef, Kind)
{
cv::detail::VectorRef v1(std::vector<cv::Rect>{});
@@ -264,7 +272,10 @@ TEST(GArray_VectorRef, Kind)
EXPECT_EQ(cv::detail::OpaqueKind::CV_SIZE, v7.getKind());
cv::detail::VectorRef v8(std::vector<std::string>{});
EXPECT_EQ(cv::detail::OpaqueKind::CV_UNKNOWN, v8.getKind());
EXPECT_EQ(cv::detail::OpaqueKind::CV_STRING, v8.getKind());
cv::detail::VectorRef v9(std::vector<MyTestStruct>{});
EXPECT_EQ(cv::detail::OpaqueKind::CV_UNKNOWN, v9.getKind());
}
TEST(GArray_VectorRef, TestRvalue)