Skip to content

Test Functions Naming Scheme #2031

Description

@LukasBauza

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions