shithub: openh264

Download patch

ref: b6b7bb76808307a7fa49e024e685e395f924dc88
parent: 3a375869703696df8d0e16d709c6d4a56b2cfd2d
parent: 0ee2562004925215fa945322f5137eb28fca3ceb
author: Ethan Hugg <ethanhugg@gmail.com>
date: Mon Jul 14 03:53:45 EDT 2014

Merge pull request #1153 from mstorsjo/silence-error-testing

Silence error logging while running tests that are intended to produce errors

--- a/test/encoder/EncUT_EncoderExt.cpp
+++ b/test/encoder/EncUT_EncoderExt.cpp
@@ -205,7 +205,9 @@
 TEST_F (EncoderInterfaceTest, BasicInitializeTestFalse) {
   int iResult;
   SEncParamBase sEncParamBase;
+  int uiTraceLevel = WELS_LOG_QUIET;
 
+  pPtrEnc->SetOption (ENCODER_OPTION_TRACE_LEVEL, &uiTraceLevel);
   //iUsageType
   GetValidEncParamBase (&sEncParamBase);
   sEncParamBase.iUsageType = static_cast<EUsageType> (2);
@@ -261,6 +263,9 @@
   sEncParamBase.iRCMode = static_cast<RC_MODES> (3);
   iResult = pPtrEnc->Initialize (&sEncParamBase);
   EXPECT_EQ (iResult, static_cast<int> (cmInitParaError));
+
+  uiTraceLevel = WELS_LOG_ERROR;
+  pPtrEnc->SetOption (ENCODER_OPTION_TRACE_LEVEL, &uiTraceLevel);
 }
 
 TEST_F (EncoderInterfaceTest, BasicInitializeTestAutoAdjustment) {