1 // Copyright 2018 The Fuchsia 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. 4 5 #pragma once 6 7 #include <cstdint> 8 9 namespace zxtest { 10 namespace internal { 11 12 // Teest Status. 13 enum class TestStatus : std::uint8_t { 14 kRunning, 15 kPassed, 16 kFailed, 17 kSkipped, 18 }; 19 20 // Interface for driving the test, and propagating failures. 21 class TestDriver { 22 public: 23 virtual ~TestDriver() = default; 24 25 // Called when a test is skipped.. 26 virtual void Skip() = 0; 27 28 // Return true if the is allowed to continue execution. 29 virtual bool Continue() const = 0; 30 31 // Returns the current status of the test. 32 virtual TestStatus Status() const = 0; 33 34 protected: 35 TestDriver() = default; 36 }; 37 38 } // namespace internal 39 } // namespace zxtest 40