shithub: openh264

Download patch

ref: e8fafebd96ed31422a05d662c89da1090bfa76f6
parent: 3aec3a2606abb2e28f0753aaec96292dd3f5c47e
author: Martin Storsjö <[email protected]>
date: Wed Aug 6 17:32:08 EDT 2014

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);
 }