shithub: openh264

Download patch

ref: 0ee2562004925215fa945322f5137eb28fca3ceb
parent: 140a67dfc9f888ec0ab1a604974c70fc34986bb9
author: Martin Storsjö <[email protected]>
date: Fri Jul 11 07:52:15 EDT 2014

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

The errors in the test log are distracting, making it look like
a test actually failed.

--- a/test/encoder/EncUT_EncoderExt.cpp
+++ b/test/encoder/EncUT_EncoderExt.cpp
@@ -198,7 +198,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);
@@ -254,6 +256,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) {