Use glReadnPixels only if KHR_robustness is supported am: d99ba132d9 am: 875d3c2990...
[platform/upstream/VK-GL-CTS.git] / framework / common / tcuTestContext.cpp
index bfa6d88..965d918 100644 (file)
@@ -58,77 +58,4 @@ void TestContext::setTestResult (qpTestResult testResult, const char* descriptio
        m_testResultDesc        = description;
 }
 
-static int testResultSeverity (qpTestResult testResult)
-{
-       switch (testResult)
-       {
-               case QP_TEST_RESULT_LAST:                                       return -1;
-               case QP_TEST_RESULT_PASS:                                       return 0;
-               case QP_TEST_RESULT_PENDING:                            return 10;
-               case QP_TEST_RESULT_NOT_SUPPORTED:                      return 20;
-               case QP_TEST_RESULT_QUALITY_WARNING:            return 30;
-               case QP_TEST_RESULT_COMPATIBILITY_WARNING:      return 40;
-               case QP_TEST_RESULT_TIMEOUT:                            return 50;
-               case QP_TEST_RESULT_FAIL:                                       return 100;
-               case QP_TEST_RESULT_RESOURCE_ERROR:                     return 110;
-               case QP_TEST_RESULT_INTERNAL_ERROR:                     return 120;
-               case QP_TEST_RESULT_CRASH:                                      return 150;
-               default:                                                                        DE_ASSERT(!"Impossible case");
-       }
-       return 0;
-}
-
-ResultCollector::ResultCollector (void)
-       : m_log         (DE_NULL)
-       , m_prefix      ("")
-       , m_result      (QP_TEST_RESULT_LAST)
-       , m_message ("Pass")
-{
-}
-
-ResultCollector::ResultCollector (TestLog& log, const std::string& prefix)
-       : m_log         (&log)
-       , m_prefix      (prefix)
-       , m_result      (QP_TEST_RESULT_LAST)
-       , m_message ("Pass")
-{
-}
-
-void ResultCollector::addResult (qpTestResult result, const std::string& msg)
-{
-       if (m_log != DE_NULL)
-               (*m_log) << TestLog::Message << m_prefix << msg << TestLog::EndMessage;
-
-       if (testResultSeverity(result) > testResultSeverity(m_result))
-       {
-               m_result = result;
-               m_message = msg;
-       }
-}
-
-bool ResultCollector::checkResult (bool condition, qpTestResult result, const std::string& msg)
-{
-       if (!condition)
-               addResult(result, msg);
-       return condition;
-}
-
-void ResultCollector::fail (const std::string& msg)
-{
-       addResult(QP_TEST_RESULT_FAIL, msg);
-}
-
-bool ResultCollector::check (bool condition, const std::string& msg)
-{
-       return checkResult(condition, QP_TEST_RESULT_FAIL, msg);
-}
-
-void ResultCollector::setTestContextResult (TestContext& testCtx)
-{
-       if (m_result == QP_TEST_RESULT_LAST)
-               testCtx.setTestResult(QP_TEST_RESULT_PASS, m_message.c_str());
-       else
-               testCtx.setTestResult(m_result, m_message.c_str());
-}
-
 } // tcu