1 /*-------------------------------------------------------------------------
2 * drawElements Quality Program Test Executor
3 * ------------------------------------------
5 * Copyright 2014 The Android Open Source Project
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
21 * \brief Test case result models.
22 *//*--------------------------------------------------------------------*/
24 #include "xeTestCaseResult.hpp"
32 const char* getTestStatusCodeName (TestStatusCode code)
36 case TESTSTATUSCODE_PASS: return "Pass";
37 case TESTSTATUSCODE_FAIL: return "Fail";
38 case TESTSTATUSCODE_QUALITY_WARNING: return "QualityWarning";
39 case TESTSTATUSCODE_COMPATIBILITY_WARNING: return "CompatibilityWarning";
40 case TESTSTATUSCODE_PENDING: return "Pending";
41 case TESTSTATUSCODE_RUNNING: return "Running";
42 case TESTSTATUSCODE_NOT_SUPPORTED: return "NotSupported";
43 case TESTSTATUSCODE_RESOURCE_ERROR: return "ResourceError";
44 case TESTSTATUSCODE_INTERNAL_ERROR: return "InternalError";
45 case TESTSTATUSCODE_CANCELED: return "Canceled";
46 case TESTSTATUSCODE_TIMEOUT: return "Timeout";
47 case TESTSTATUSCODE_CRASH: return "Crash";
48 case TESTSTATUSCODE_DISABLED: return "Disabled";
49 case TESTSTATUSCODE_TERMINATED: return "Terminated";
50 case TESTSTATUSCODE_WAIVER: return "Waived";
66 for (std::vector<Item*>::iterator i = m_items.begin(); i != m_items.end(); i++)
71 std::ostream& operator<< (std::ostream& str, const NumericValue& value)
73 switch (value.getType())
75 case NumericValue::NUMVALTYPE_FLOAT64:
76 return str << std::setprecision(std::numeric_limits<double>::digits10 + 2) << value.getFloat64();
78 case NumericValue::NUMVALTYPE_INT64:
79 return str << value.getInt64();
82 DE_ASSERT(value.getType() == NumericValue::NUMVALTYPE_EMPTY);