Testing.TestResult
(in ./Carbon/Testing/TestResult.lua)
An object to signal success and failure conditions to the test engine.
Methods
unknown public TestResult:New(Test test
)
Returns TestResult
- required
test
: The test that will use this TestResult.
Creates a new TestResult object for unit tests to fill.
unknown public TestResult:Assert(bool condition, string message
)
Returns bool
- required
condition
: Condition to check. - required
message
: Message to report on failure.
Checks the given condition and adds a pass if it is true, or fails with the given message.
unknown public TestResult:Fail(string message
)
Returns self
- required
message
: The error message to store.
Marks the test as a failure and increments the failure counter.
unknown public TestResult:Message(string message
)
Returns self
- required
message
: A message to record.
Records a message about the test without failing the test.
unknown public TestResult:Pass()
Returns self
Marks that a component of the TestResult has passed.
unknown public TestResult:Warn(string message
)
Returns self
- required
message
: A warning to issue.
Issues a warning without failing the test.
Properties
[none]