Define operator<< for the TestVideoParam struct.
This improves the error message if a test fails. For example,
Before:
[ FAILED ] AV1/HorzSuperresFixedEndToEndTest.HorzSuperresFixedTestParam/6, where GetParam() = (0x5583d359c0f0, 40-byte object <77-AA 27-D3 83-55 00-00 02-01 00-00 08-00 00-00 00-00 00-00 05-00 00-00 00-00 00-00 00-00 00-00 66-66 66-66 66-E6 39-40>, (16, 8))
After:
[ FAILED ] AV1/HorzSuperresFixedEndToEndTest.HorzSuperresFixedTestParam/6, where GetParam() = (0x55b0de2df0f0, TestVideoParam { filename:park_joy_90p_8_420.y4m fmt:258 bit_depth:8 profile:0 limit:5 screen_content:0 psnr_threshold:25.9 }, (16, 8))
BUG=aomedia:2571
Change-Id: I80e46c240032202c3bc52a386800b64f4380dcfa
diff --git a/test/end_to_end_test.cc b/test/end_to_end_test.cc
index 13d349f..77328b6 100644
--- a/test/end_to_end_test.cc
+++ b/test/end_to_end_test.cc
@@ -57,7 +57,7 @@
return os << "TestVideoParam { filename:" << test_arg.filename
<< " input_bit_depth:" << test_arg.input_bit_depth
<< " fmt:" << test_arg.fmt << " bit_depth:" << test_arg.bit_depth
- << " profile:" << test_arg.profile << "}";
+ << " profile:" << test_arg.profile << " }";
}
const TestVideoParam kTestVectors[] = {
diff --git a/test/horz_superres_test.cc b/test/horz_superres_test.cc
index c97cefb..d731ab5 100644
--- a/test/horz_superres_test.cc
+++ b/test/horz_superres_test.cc
@@ -40,6 +40,14 @@
double psnr_threshold;
} TestVideoParam;
+std::ostream &operator<<(std::ostream &os, const TestVideoParam &test_arg) {
+ return os << "TestVideoParam { filename:" << test_arg.filename
+ << " fmt:" << test_arg.fmt << " bit_depth:" << test_arg.bit_depth
+ << " profile:" << test_arg.profile << " limit:" << test_arg.limit
+ << " screen_content:" << test_arg.screen_content
+ << " psnr_threshold:" << test_arg.psnr_threshold << " }";
+}
+
const TestVideoParam kTestVideoVectors[] = {
{ "park_joy_90p_8_420.y4m", AOM_IMG_FMT_I420, AOM_BITS_8, 0, 5, 0, 25.5 },
#if CONFIG_AV1_HIGHBITDEPTH
diff --git a/test/rt_end_to_end_test.cc b/test/rt_end_to_end_test.cc
index 8490efe..90f7ccb 100644
--- a/test/rt_end_to_end_test.cc
+++ b/test/rt_end_to_end_test.cc
@@ -55,7 +55,7 @@
return os << "TestVideoParam { filename:" << test_arg.filename
<< " input_bit_depth:" << test_arg.input_bit_depth
<< " fmt:" << test_arg.fmt << " bit_depth:" << test_arg.bit_depth
- << " profile:" << test_arg.profile << "}";
+ << " profile:" << test_arg.profile << " }";
}
const TestVideoParam kTestVectors[] = {