Support checking for Rust test functions.

Without the --test flag, functions marked as #[test] are not checked for
errors.