Search results

There are no results.

std.test.Failure

class pub Failure

A test failure produced by an assertion.

Fields

got

let pub @got: String

A description of what happened.

expected

let pub @expected: String

A description of what was expected to happen.

path

let pub @path: Path

The path to the source file in which the failure occurred.

line

let pub @line: Int

The line on which the failure occurred.

Static methods

new

Show source code
Hide source code
fn pub static new(got: String, expected: String) -> Failure {
  match unit_test_stack_frame {
    case { @path = path, @line = line } -> {
      Failure(got: got, expected: expected, path: path, line: line)
    }
  }
}
fn pub static new(got: String, expected: String) -> Failure

Returns a new failure for the given reason.

The source location is determined automatically based on the call stack.