shithub: openh264

Download patch

ref: 00d0180f26f437319ac9f74b3c8a5777058e78d4
parent: 3aec3a2606abb2e28f0753aaec96292dd3f5c47e
parent: e8fafebd96ed31422a05d662c89da1090bfa76f6
author: dongzha <[email protected]>
date: Thu Aug 7 06:09:35 EDT 2014

Merge pull request #1248 from mstorsjo/silence-intentional-errors

Silence warnings and errors when running tests that intentionally produce errors

--- a/test/encoder/EncUT_InterfaceTest.cpp
+++ b/test/encoder/EncUT_InterfaceTest.cpp
@@ -18,6 +18,9 @@
 
 
 TEST_F (EncInterfaceCallTest, BaseParameterVerify) {
+  int uiTraceLevel = WELS_LOG_QUIET;
+  encoder_->SetOption (ENCODER_OPTION_TRACE_LEVEL, &uiTraceLevel);
+
   int ret = cmResultSuccess;
   SEncParamBase baseparam;
   memset (&baseparam, 0, sizeof (SEncParamBase));
@@ -27,4 +30,7 @@
 
   ret =  encoder_->Initialize (&baseparam);
   EXPECT_EQ (ret, static_cast<int> (cmInitParaError));
+
+  uiTraceLevel = WELS_LOG_ERROR;
+  encoder_->SetOption (ENCODER_OPTION_TRACE_LEVEL, &uiTraceLevel);
 }