|
|
|
@ -1111,7 +1111,11 @@ TEST(Core_InputOutput, FileStorage_DMatch) |
|
|
|
|
|
|
|
|
|
EXPECT_NO_THROW(fs << "d" << d); |
|
|
|
|
cv::String fs_result = fs.releaseAndGetString(); |
|
|
|
|
#if defined _MSC_VER && _MSC_VER <= 1700 /* MSVC 2012 and older */ |
|
|
|
|
EXPECT_STREQ(fs_result.c_str(), "%YAML:1.0\n---\nd: [ 1, 2, 3, -1.5000000000000000e+000 ]\n"); |
|
|
|
|
#else |
|
|
|
|
EXPECT_STREQ(fs_result.c_str(), "%YAML:1.0\n---\nd: [ 1, 2, 3, -1.5000000000000000e+00 ]\n"); |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
cv::FileStorage fs_read(fs_result, cv::FileStorage::READ | cv::FileStorage::MEMORY); |
|
|
|
|
|
|
|
|
@ -1138,12 +1142,21 @@ TEST(Core_InputOutput, FileStorage_DMatch_vector) |
|
|
|
|
|
|
|
|
|
EXPECT_NO_THROW(fs << "dv" << dv); |
|
|
|
|
cv::String fs_result = fs.releaseAndGetString(); |
|
|
|
|
#if defined _MSC_VER && _MSC_VER <= 1700 /* MSVC 2012 and older */ |
|
|
|
|
EXPECT_STREQ(fs_result.c_str(), |
|
|
|
|
"%YAML:1.0\n" |
|
|
|
|
"---\n" |
|
|
|
|
"dv: [ 1, 2, 3, -1.5000000000000000e+000, 2, 3, 4,\n" |
|
|
|
|
" 1.5000000000000000e+000, 3, 2, 1, 5.0000000000000000e-001 ]\n" |
|
|
|
|
); |
|
|
|
|
#else |
|
|
|
|
EXPECT_STREQ(fs_result.c_str(), |
|
|
|
|
"%YAML:1.0\n" |
|
|
|
|
"---\n" |
|
|
|
|
"dv: [ 1, 2, 3, -1.5000000000000000e+00, 2, 3, 4, 1.5000000000000000e+00,\n" |
|
|
|
|
" 3, 2, 1, 5.0000000000000000e-01 ]\n" |
|
|
|
|
); |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
cv::FileStorage fs_read(fs_result, cv::FileStorage::READ | cv::FileStorage::MEMORY); |
|
|
|
|
|
|
|
|
@ -1182,6 +1195,17 @@ TEST(Core_InputOutput, FileStorage_DMatch_vector_vector) |
|
|
|
|
|
|
|
|
|
EXPECT_NO_THROW(fs << "dvv" << dvv); |
|
|
|
|
cv::String fs_result = fs.releaseAndGetString(); |
|
|
|
|
#if defined _MSC_VER && _MSC_VER <= 1700 /* MSVC 2012 and older */ |
|
|
|
|
EXPECT_STREQ(fs_result.c_str(), |
|
|
|
|
"%YAML:1.0\n" |
|
|
|
|
"---\n" |
|
|
|
|
"dvv:\n" |
|
|
|
|
" - [ 1, 2, 3, -1.5000000000000000e+000, 2, 3, 4,\n" |
|
|
|
|
" 1.5000000000000000e+000, 3, 2, 1, 5.0000000000000000e-001 ]\n" |
|
|
|
|
" - [ 3, 2, 1, 5.0000000000000000e-001, 1, 2, 3,\n" |
|
|
|
|
" -1.5000000000000000e+000 ]\n" |
|
|
|
|
); |
|
|
|
|
#else |
|
|
|
|
EXPECT_STREQ(fs_result.c_str(), |
|
|
|
|
"%YAML:1.0\n" |
|
|
|
|
"---\n" |
|
|
|
@ -1190,6 +1214,7 @@ TEST(Core_InputOutput, FileStorage_DMatch_vector_vector) |
|
|
|
|
" 3, 2, 1, 5.0000000000000000e-01 ]\n" |
|
|
|
|
" - [ 3, 2, 1, 5.0000000000000000e-01, 1, 2, 3, -1.5000000000000000e+00 ]\n" |
|
|
|
|
); |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
cv::FileStorage fs_read(fs_result, cv::FileStorage::READ | cv::FileStorage::MEMORY); |
|
|
|
|
|
|
|
|
|