Skip to content

Commit b668d3f

Browse files
Modification of the related tests in core/tests/ocl
1 parent 0629add commit b668d3f

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

modules/core/test/ocl/test_matrix_operation.cpp

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ PARAM_TEST_CASE(ConvertTo, MatDepth, MatDepth, Channels, bool)
8585
}
8686
};
8787

88-
OCL_TEST_P(ConvertTo, Accuracy)
88+
OCL_TEST_P(ConvertTo, WithScale_Accuracy)
8989
{
9090
for (int j = 0; j < test_loop_times; j++)
9191
{
@@ -101,6 +101,20 @@ OCL_TEST_P(ConvertTo, Accuracy)
101101
}
102102
}
103103

104+
OCL_TEST_P(ConvertTo, NoScale_Accuracy)
105+
{
106+
for (int j = 0; j < test_loop_times; j++)
107+
{
108+
generateTestData();
109+
110+
OCL_OFF(src_roi.convertTo(dst_roi, dstType, 1, 0));
111+
OCL_ON(usrc_roi.convertTo(udst_roi, dstType, 1, 0));
112+
113+
double eps = CV_MAT_DEPTH(dstType) >= CV_32F ? 2e-4 : 1;
114+
OCL_EXPECT_MATS_NEAR(dst, eps);
115+
}
116+
}
117+
104118
//////////////////////////////// CopyTo /////////////////////////////////////////////////
105119

106120
PARAM_TEST_CASE(CopyTo, MatDepth, Channels, bool, bool)

0 commit comments

Comments
 (0)