Close LogSection properly in fence_sync tests.
authorJarkko Pöyry <jpoyry@google.com>
Tue, 7 Apr 2015 03:38:36 +0000 (20:38 -0700)
committerJarkko Pöyry <jpoyry@google.com>
Tue, 7 Apr 2015 03:38:36 +0000 (20:38 -0700)
Bug: 20095021
Change-Id: Iaf8879ff5a9c4c92efdc6f442d0878ca3a3202e3

modules/gles3/functional/es3fSyncTests.cpp

index 11b10e09b509c9d135985eb83d2c471ada9d4c63..8f9c0d0828b3831fec86c14f431e806e794a389e 100644 (file)
@@ -170,12 +170,12 @@ void FenceSyncCase::deinit (void)
 
 FenceSyncCase::IterateResult FenceSyncCase::iterate (void)
 {
-       TestLog&                        log             = m_testCtx.getLog();
-       std::vector<float>      vertices;
-       bool                            testOk  = true;
+       TestLog&                                        log                     = m_testCtx.getLog();
+       std::vector<float>                      vertices;
+       bool                                            testOk          = true;
 
-       std::string header = "Case iteration " + de::toString(m_iterNdx+1) + " / " + de::toString(NUM_CASE_ITERATIONS);
-       log << TestLog::Section(header, header);
+       std::string                                     header          = "Case iteration " + de::toString(m_iterNdx+1) + " / " + de::toString(NUM_CASE_ITERATIONS);
+       const tcu::ScopedLogSection     section         (log, header, header);
 
        enableLogging(true);
 
@@ -231,7 +231,7 @@ FenceSyncCase::IterateResult FenceSyncCase::iterate (void)
                        case GL_TIMEOUT_EXPIRED:         log << TestLog::Message << "// GL_TIMEOUT_EXPIRED"             << TestLog::EndMessage; break;
                        case GL_CONDITION_SATISFIED: log << TestLog::Message << "// GL_CONDITION_SATISFIED"     << TestLog::EndMessage; break;
                        case GL_WAIT_FAILED:             log << TestLog::Message << "// GL_WAIT_FAILED"                 << TestLog::EndMessage; testOk = false; break;
-                       default:                                         log << TestLog::EndSection; TCU_FAIL("// Illegal return value!");
+                       default:                                         TCU_FAIL("// Illegal return value!");
                }
        }
 
@@ -260,11 +260,10 @@ FenceSyncCase::IterateResult FenceSyncCase::iterate (void)
        if (!testOk)
        {
                m_testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Fail");
-               log << TestLog::EndSection;
                return STOP;
        }
 
-       log << TestLog::Message << "// Sync objects created and deleted successfully." << TestLog::EndMessage << TestLog::EndSection;
+       log << TestLog::Message << "// Sync objects created and deleted successfully." << TestLog::EndMessage;
 
        return (++m_iterNdx < NUM_CASE_ITERATIONS) ? CONTINUE : STOP;
 }