Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(611)

Unified Diff: media/base/yuv_convert_unittest.cc

Issue 12213029: Lift MEDIA_MMX_INTRINSICS_AVAILABLE definition to header and use it to condition media_unittests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix lint errors Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/base/yuv_convert.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/yuv_convert_unittest.cc
diff --git a/media/base/yuv_convert_unittest.cc b/media/base/yuv_convert_unittest.cc
index c57f71521534c363cdee231c004d84bd1281a15b..f51e6d5d1f4c56fe2b74c7183e0c25e8cd87bde7 100644
--- a/media/base/yuv_convert_unittest.cc
+++ b/media/base/yuv_convert_unittest.cc
@@ -776,6 +776,7 @@ TEST(YUVConvertTest, FilterYUVRows_C_OutOfBounds) {
}
TEST(YUVConvertTest, FilterYUVRows_MMX_OutOfBounds) {
scherkus (not reviewing) 2013/02/06 08:09:01 gtest supports disabling tests by prepending the t
wolenetz 2013/02/06 19:03:10 Sorry about being pedantic here. Please help me u
+#if defined(MEDIA_MMX_INTRINSICS_AVAILABLE)
base::CPU cpu;
if (!cpu.has_mmx()) {
LOG(WARNING) << "System not supported. Test skipped.";
@@ -795,6 +796,10 @@ TEST(YUVConvertTest, FilterYUVRows_MMX_OutOfBounds) {
for (int i = 1; i < 16; ++i) {
EXPECT_EQ(0u, dst[i]);
}
+#else
+ LOG(WARNING) << "System not supported. Test skipped.";
+ return;
+#endif // defined(MEDIA_MMX_INTRINSICS_AVAILABLE)
}
TEST(YUVConvertTest, FilterYUVRows_SSE2_OutOfBounds) {
@@ -819,6 +824,7 @@ TEST(YUVConvertTest, FilterYUVRows_SSE2_OutOfBounds) {
}
TEST(YUVConvertTest, FilterYUVRows_MMX_UnalignedDestination) {
+#if defined(MEDIA_MMX_INTRINSICS_AVAILABLE)
scherkus (not reviewing) 2013/02/06 08:09:01 ditto
wolenetz 2013/02/06 19:03:10 See reply for similar comment, above.
base::CPU cpu;
if (!cpu.has_mmx()) {
LOG(WARNING) << "System not supported. Test skipped.";
@@ -846,6 +852,10 @@ TEST(YUVConvertTest, FilterYUVRows_MMX_UnalignedDestination) {
media::EmptyRegisterState();
EXPECT_EQ(0, memcmp(dst_sample.get(), dst_ptr, 17));
+#else
+ LOG(WARNING) << "System not supported. Test skipped.";
+ return;
+#endif // defined(MEDIA_MMX_INTRINSICS_AVAILABLE)
}
TEST(YUVConvertTest, FilterYUVRows_SSE2_UnalignedDestination) {
« no previous file with comments | « media/base/yuv_convert.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698