Skip to content

Commit

Permalink
rustdoc: remove redundant test
Browse files Browse the repository at this point in the history
  • Loading branch information
semmaz committed Sep 20, 2015
1 parent d539f45 commit d6f0a21
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions src/librustdoc/html/markdown.rs
Expand Up @@ -577,7 +577,7 @@ pub fn plain_summary_line(md: &str) -> String {
#[cfg(test)]
mod tests {
use super::{LangString, Markdown};
use super::{collapse_whitespace, plain_summary_line};
use super::plain_summary_line;

#[test]
fn test_lang_string_parse() {
Expand Down Expand Up @@ -625,18 +625,4 @@ mod tests {
t("# top header", "top header");
t("## header", "header");
}

#[test]
fn test_collapse_whitespace() {
fn t(input: &str, expected: &str) {
let actual = collapse_whitespace(input);
assert_eq!(actual, expected);
}

t("foo", "foo");
t("foo bar baz", "foo bar baz");
t(" foo bar", "foo bar");
t("\tfoo bar\nbaz", "foo bar baz");
t("foo bar \n baz\t\tqux\n", "foo bar baz qux");
}
}

0 comments on commit d6f0a21

Please sign in to comment.