rust-lang / rust-lang/rust-by-example
Test Functions Naming Scheme
Nobody has claimed this yet.
- Dominant language
- Handlebars
- Stars
- 8.1k
- Forks
- 1.6k
- PR merge metrics
- No merged PRs in 30d
Description
The naming scheme in (The Rust Programming Language)[https://doc.rust-lang.org/book/ch11-01-writing-tests.html] uses the follwoing naming scheme for tests:
#[cfg(test)]
mod tests {
#[test]
fn foo() {
assert!(true);
}
}
But within (Rust By Example)[https://doc.rust-lang.org/rust-by-example/testing/unit_testing.html] it uses the following naming scheme for tests:
#[cfg(test)]
mod tests {
#[test]
fn test_foo() {
assert!(true);
}
}
Rust By Example should use the same naming scheme for tests, as The Rust Programming Language website.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Rust By Example unit testing page mentioned in the issue and compare its test naming example with The Rust Programming Language example. Update the displayed test function name to use the same scheme, then verify the rendered documentation shows the consistent example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 90/100