OSDN Git Service

test: move ASSERT_NO_FAILURE macro to test.h
authorU. Artie Eoff <ullysses.a.eoff@intel.com>
Wed, 28 Sep 2016 20:36:01 +0000 (13:36 -0700)
committerXiang, Haihao <haihao.xiang@intel.com>
Mon, 31 Oct 2016 02:00:08 +0000 (10:00 +0800)
Both jpeg decode and encode test files use this macro.
So move it to the common test.h header to avoid duplicating
it.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
(cherry picked from commit 8b876d6cd7ae8911bef38de673731556e300999f)

test/i965_jpeg_decode_test.cpp
test/i965_jpeg_encode_test.cpp
test/test.h

index b022c2e..6b84625 100644 (file)
@@ -194,10 +194,6 @@ protected:
     PictureData::SharedConst pd;
 };
 
-#define ASSERT_NO_FAILURE(statement) \
-    statement; \
-    ASSERT_FALSE(HasFailure());
-
 TEST_P(FourCCTest, Decode)
 {
     struct i965_driver_data *i965(*this);
index 08d80c4..80ca1fd 100644 (file)
@@ -157,10 +157,6 @@ const TestInput::Shared NV12toI420(const TestInput::SharedConst& nv12)
     return i420;
 }
 
-#define ASSERT_NO_FAILURE(statement) \
-    statement; \
-    ASSERT_FALSE(HasFailure());
-
 class JPEGEncodeInputTest
     : public JPEGEncodeTest
     , public ::testing::WithParamInterface<
index afca9a5..000284a 100644 (file)
 #define ASSERT_PTR_NULL(ptr) \
     ASSERT_TRUE(NULL == (ptr))
 
+#define ASSERT_NO_FAILURE(statement) \
+    statement; \
+    ASSERT_FALSE(HasFailure());
+
 class VaapiStatus
 {
 public: