Crate xtp_test

Source

Macros§

assert
assert_eq
assert_gt
assert_gte
assert_lt
assert_lte
assert_ne

Functions§

assert
Assert that the outcome is true, naming the assertion with name, which will be used as a label in the CLI runner. The reason argument will be used to print a message when the assertion fails, this should contain some additional information about values being compared.
assert_eq
Assert that x and y are equal, naming the assertion with msg, which will be used as a label in the CLI runner.
assert_gt
Assert that x is greater than y, naming the assertion with msg, which will be used as a label in the CLI runner.
assert_gte
Assert that x is greater than or equal to y, naming the assertion with msg, which will be used as a label in the CLI runner.
assert_lt
Assert that x is less than y, naming the assertion with msg, which will be used as a label in the CLI runner.
assert_lte
Assert that x is less than or equal to y, naming the assertion with msg, which will be used as a label in the CLI runner.
assert_ne
Assert that x and y are not equal, naming the assertion with msg, which will be used as a label in the CLI runner.
call
Call a function from the Extism plugin being tested, passing input and returning its output.
call_memory
Call a function from the Extism plugin being tested, passing input and returning its output Memory.
group
Run a test group, resetting the plugin before and after the group is run.
mock_input
reset
Reset the loaded plugin, clearing all state.
time_ns
Call a function from the Extism plugin being tested, passing input and returning the time in nanoseconds spent in the fuction.
time_sec
Call a function from the Extism plugin being tested, passing input and returning the time in seconds spent in the fuction.