| // Copyright 2023 The Fuchsia Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| library fuchsia.testing.harness; |
| |
| /// Fuchsia test harness operation error type. |
| /// |
| /// A harness is responsible for maintaining the state for a particular test run. |
| /// This type is returned when an operation fails. |
| type OperationError = flexible enum { |
| /// The requested operation is invalid. |
| /// |
| /// This is returned when a test case asked the harness to do |
| /// something incompatible with the harness' current state. This |
| /// error signifies a bug in the test code itself. |
| /// |
| /// Returning this value MUST fail the corresponding test. |
| /// |
| /// Example: Test asked for the size of a file before it was created. |
| INVALID = 0; |
| |
| /// The requested operation failed. |
| /// |
| /// This is returned when the test harness failed to complete |
| /// an operation, even though the current state should have permitted |
| /// the operation to work. This error signifies a bug in a |
| /// dependency of the harness. |
| /// |
| /// Returning this value MUST fail the corresponding test. |
| /// |
| /// Example: Test asked for the size of a file after it was |
| /// created, but the query failed. |
| FAILED = 1; |
| |
| /// The requested operation is not supported by this harness. |
| /// |
| /// This is returned when the test harness does not support the |
| /// requested operation. This is not necessarily a fatal error, it |
| /// is used to signify that the harness has knowledge of what was |
| /// requested, but it does not implement the behavior. |
| /// |
| /// Returning this value MAY fail the corresponding test, but |
| /// it does not need to. This return value is useful to determine |
| /// compatibility with different feature sets or versions. |
| /// |
| /// Example: Test asked for the size of a file, but the ability |
| /// to check file sizes was removed in the previous component |
| /// version. |
| UNSUPPORTED = 2; |
| }; |