[][src]Module syntax::test

🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

Structs

EntryPointCleaner [
Experimental
]

A folder used to remove any entry points (like fn main) because the harness generator will provide its own

Test [
Experimental
]
TestCtxt [
Experimental
]
TestHarnessGenerator [
Experimental
]

Enums

BadTestSignature [
Experimental
]
HasTestSignature [
Experimental
]

Functions

generate_test_harness [
Experimental
]

Crawl over the crate, inserting test reexports and the test main function

get_test_runner [
Experimental
]
ignored_span [
Experimental
]

Craft a span that will be ignored by the stability lint's call to source_map's is_internal check. The expanded code calls some unstable functions in the test crate.

is_test_case [
Experimental
]
mk_main [
Experimental
]

Creates a function item for use as the main function of a test build. This function will call the test_runner as specified by the crate attribute

mk_reexport_mod [
Experimental
]

Creates an item (specifically a module) that "pub use"s the tests passed in. Each tested submodule will contain a similar reexport module that we will export under the name of the original module. That is, submod::__test_reexports is reexported like so pub use submod::__test_reexports as submod.

mk_tests_slice [
Experimental
]

Creates a slice containing every test like so: &[path::to::test1, path::to::test2]

modify_for_testing [
Experimental
]
path_name_i [
Experimental
]
visible_path [
Experimental
]

Creates a path from the top-level __test module to the test via __test_reexports