Skip to content

Commit

Permalink
Document UninitResult
Browse files Browse the repository at this point in the history
  • Loading branch information
jedel1043 committed Mar 17, 2023
1 parent e146c73 commit 99800de
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions boa_tester/src/exec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,15 @@ fn register_print_fn(context: &mut Context<'_>, async_result: AsyncResult) {
);
}

/// A `Result` value that is possibly uninitialized.
///
/// This is mainly used to check if an async test did call `print` to signal the termination of
/// a test. Otherwise, all async tests that result in `UninitResult::Uninit` are considered
/// as failed.
///
/// The Test262 [interpreting guide][guide] contains more information about how to run async tests.
///
/// [guide]: https://github.com/tc39/test262/blob/main/INTERPRETING.md#flags
#[derive(Debug, Clone, Copy, Default)]
enum UninitResult<T, E> {
#[default]
Expand Down

0 comments on commit 99800de

Please sign in to comment.