Stdlibtest
descriptor
import std::test::descriptor; · source
TestDescriptor
type struct TestDescriptor {
name: Str;
func: () -> Result<(), TestError>;
ignored: boolean;
should_panic: boolean;
}
One record per discovered test: its fully qualified name, the function pointer to call, and the ![ignore] and ![should_panic] flags. The compiler-synthesised test main builds an array of these and hands it to run_all, so the field order is part of the contract between the compiler and the runner - reordering them breaks every test binary.
func returns Result<(), TestError>: an Err is a failure, a panic is a failure unless should_panic is set, and a normal Ok return under should_panic is the DidNotPanic outcome.