1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "base/test/launcher/test_result.h"
7 #include "base/logging.h"
11 TestResult::TestResult() : status(TEST_UNKNOWN) {
14 TestResult::~TestResult() {
17 std::string TestResult::StatusAsString() const {
31 // Rely on compiler warnings to ensure all possible values are handled.
38 std::string TestResult::GetTestName() const {
39 size_t dot_pos = full_name.find('.');
40 CHECK_NE(dot_pos, std::string::npos);
41 return full_name.substr(dot_pos + 1);
44 std::string TestResult::GetTestCaseName() const {
45 size_t dot_pos = full_name.find('.');
46 CHECK_NE(dot_pos, std::string::npos);
47 return full_name.substr(0, dot_pos);