about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDan Callahan <dan.callahan@gmail.com>2015-04-03 22:38:30 -0500
committerDan Callahan <dan.callahan@gmail.com>2015-04-03 22:48:00 -0500
commitcb1e6a2dc4f5ceba68b52f7d088a9e571948f765 (patch)
tree646ef3715873421105624b9046d0256b79951c55
parent80def6c2447d23a624e611417f24cf0ab2a5a676 (diff)
downloadrust-cb1e6a2dc4f5ceba68b52f7d088a9e571948f765.tar.gz
rust-cb1e6a2dc4f5ceba68b52f7d088a9e571948f765.zip
book: use `mod test` consistently
Fixes #24030

Of the four code samples with modules in TRPL:

    - 2 use `mod test`
    - 2 use `mod tests`

We should be consistent here, but which is right? The stdlib is split:

    $ grep -r 'mod tests {' src/lib* | wc -l
          63
    $ grep -r 'mod test {'  src/lib* | wc -l
          58

Subjectively, I like the plural, but both the language reference and the
style guide recommend the singular. So we'll go with that here, for now.
-rw-r--r--src/doc/trpl/benchmark-tests.md2
-rw-r--r--src/doc/trpl/testing.md2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/doc/trpl/benchmark-tests.md b/src/doc/trpl/benchmark-tests.md
index 88796537593..890a2f8ae7d 100644
--- a/src/doc/trpl/benchmark-tests.md
+++ b/src/doc/trpl/benchmark-tests.md
@@ -13,7 +13,7 @@ pub fn add_two(a: i32) -> i32 {
 }
 
 #[cfg(test)]
-mod tests {
+mod test {
     use super::*;
     use test::Bencher;
 
diff --git a/src/doc/trpl/testing.md b/src/doc/trpl/testing.md
index fddb4c19031..8cf126cad95 100644
--- a/src/doc/trpl/testing.md
+++ b/src/doc/trpl/testing.md
@@ -382,7 +382,7 @@ pub fn add_two(a: i32) -> i32 {
 }
 
 #[cfg(test)]
-mod tests {
+mod test {
     use super::*;
 
     #[test]