[][src]Crate fungus

Modules

assert

All essential symbols for testing in a simple consumable way

core
enc
errors
net
prelude

All essential symbols in a simple consumable way

sys

Macros

assert_dir

Assert that a directory exists

assert_exists

Assert that a file or directory exists

assert_file

Assert that a file exists

assert_no_dir

Assert that a directory doesn't exists

assert_no_exists

Assert that a file or directory doesn't exists

assert_no_file

Assert that a file doesn't exists

assert_remove

Wraps sys::remove in an assertion that the file no longer exists and provides some nice output if something fails.

assert_remove_all

Wraps sys::remove_all in an assertion that the directory no longer exists and provides some nice output if something fails.

assert_setup

Call the setup function created by create_test_setup_func! with default root and func_name or optionally override those values. root will default to TEST_TEMP_DIR and func_name defaults to the function name using function!. However since doc tests always have a default function name of rust_out::main its useful to override the function name in those cases.

cfgblock

Provides the ability to define #[cfg] statements for multiple items

create_test_setup_func

Create the test setup function to be called in tests to disable RUST_BACKTRACE and create a directory to work in for testing that depends on modifying files on disk. The intent is to provide a thread safe space from which to manipulate files during a test.

defer

Ensure the given closure is executed once the surrounding scope closes despite panics. Inspired by Golang's defer, Java's finally and Ruby's ensure.

function

Expands to a string literal of the current function's name similar to the venerable file! or line! https://github.com/rust-lang/rfcs/pull/1719.

Enums

FuError

Define common error wrapper type

Type Definitions

FuResult

Result<T> provides a simplified result type with a common error type