1
Fork 0

rustdoc: remove redundant test

This commit is contained in:
Simon Mazur 2015-09-18 21:39:05 +03:00
parent d539f451c4
commit d6f0a21e20

View file

@ -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() {
@ -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");
}
}