Mojo struct
TestResult
struct TestResult
A test result code.
Implemented traits
AnyType,
Copyable,
EqualityComparable,
ImplicitlyCopyable,
Movable,
UnknownDestructibility,
Writable
Aliases
__copyinit__is_trivial
alias __copyinit__is_trivial = True
__del__is_trivial
alias __del__is_trivial = True
__moveinit__is_trivial
alias __moveinit__is_trivial = True
FAIL
alias FAIL = TestResult(1)
The test failed.
PASS
alias PASS = TestResult(0)
The test passed.
SKIP
alias SKIP = TestResult(2)
The test was skipped.
Methods
__eq__
__eq__(self, rhs: Self) -> Bool
Compare two test result codes for equality.
Args:
- rhs (
Self): The other test result code to compare against.
Returns:
Bool: True if the result codes are equal, False otherwise.
write_to
write_to(self, mut writer: T)
Write the result code to the writer.
Args:
- writer (
T): The writer to output the result code to.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!