Run rustfmt on lib/filecheck/tests/basic.rs

This commit is contained in:
Aleksey Kuznetsov
2017-06-03 16:20:41 +05:00
committed by Jakob Stoklund Olesen
parent 026ed7a470
commit c1d095de18

View File

@@ -28,7 +28,10 @@ fn no_directives() {
#[test] #[test]
fn no_matches() { fn no_matches() {
let c = CheckerBuilder::new().text("regex: FOO=bar").unwrap().finish(); let c = CheckerBuilder::new()
.text("regex: FOO=bar")
.unwrap()
.finish();
assert!(!c.is_empty()); assert!(!c.is_empty());
// An empty checker matches anything. // An empty checker matches anything.
@@ -260,14 +263,22 @@ fn unordered() {
.unwrap() .unwrap()
.finish(); .finish();
assert_eq!(c.check("one two three four", NO_VARIABLES).map_err(e2s), Ok(true)); assert_eq!(c.check("one two three four", NO_VARIABLES).map_err(e2s),
assert_eq!(c.check("one three two four", NO_VARIABLES).map_err(e2s), Ok(true)); Ok(true));
assert_eq!(c.check("one three two four", NO_VARIABLES).map_err(e2s),
Ok(true));
assert_eq!(c.check("one two four three four", NO_VARIABLES).map_err(e2s), Ok(true)); assert_eq!(c.check("one two four three four", NO_VARIABLES)
assert_eq!(c.check("one three four two four", NO_VARIABLES).map_err(e2s), Ok(true)); .map_err(e2s),
Ok(true));
assert_eq!(c.check("one three four two four", NO_VARIABLES)
.map_err(e2s),
Ok(true));
assert_eq!(c.check("one two four three", NO_VARIABLES).map_err(e2s), Ok(false)); assert_eq!(c.check("one two four three", NO_VARIABLES).map_err(e2s),
assert_eq!(c.check("one three four two", NO_VARIABLES).map_err(e2s), Ok(false)); Ok(false));
assert_eq!(c.check("one three four two", NO_VARIABLES).map_err(e2s),
Ok(false));
} }
#[test] #[test]
@@ -281,14 +292,22 @@ fn leading_unordered() {
.unwrap() .unwrap()
.finish(); .finish();
assert_eq!(c.check("one two three four", NO_VARIABLES).map_err(e2s), Ok(true)); assert_eq!(c.check("one two three four", NO_VARIABLES).map_err(e2s),
assert_eq!(c.check("one three two four", NO_VARIABLES).map_err(e2s), Ok(true)); Ok(true));
assert_eq!(c.check("one three two four", NO_VARIABLES).map_err(e2s),
Ok(true));
assert_eq!(c.check("one two four three four", NO_VARIABLES).map_err(e2s), Ok(true)); assert_eq!(c.check("one two four three four", NO_VARIABLES)
assert_eq!(c.check("one three four two four", NO_VARIABLES).map_err(e2s), Ok(true)); .map_err(e2s),
Ok(true));
assert_eq!(c.check("one three four two four", NO_VARIABLES)
.map_err(e2s),
Ok(true));
assert_eq!(c.check("one two four three", NO_VARIABLES).map_err(e2s), Ok(false)); assert_eq!(c.check("one two four three", NO_VARIABLES).map_err(e2s),
assert_eq!(c.check("one three four two", NO_VARIABLES).map_err(e2s), Ok(false)); Ok(false));
assert_eq!(c.check("one three four two", NO_VARIABLES).map_err(e2s),
Ok(false));
} }
#[test] #[test]
@@ -302,12 +321,20 @@ fn trailing_unordered() {
.unwrap() .unwrap()
.finish(); .finish();
assert_eq!(c.check("one two three four", NO_VARIABLES).map_err(e2s), Ok(true)); assert_eq!(c.check("one two three four", NO_VARIABLES).map_err(e2s),
assert_eq!(c.check("one three two four", NO_VARIABLES).map_err(e2s), Ok(true)); Ok(true));
assert_eq!(c.check("one three two four", NO_VARIABLES).map_err(e2s),
Ok(true));
assert_eq!(c.check("one two four three four", NO_VARIABLES).map_err(e2s), Ok(true)); assert_eq!(c.check("one two four three four", NO_VARIABLES)
assert_eq!(c.check("one three four two four", NO_VARIABLES).map_err(e2s), Ok(true)); .map_err(e2s),
Ok(true));
assert_eq!(c.check("one three four two four", NO_VARIABLES)
.map_err(e2s),
Ok(true));
assert_eq!(c.check("one two four three", NO_VARIABLES).map_err(e2s), Ok(true)); assert_eq!(c.check("one two four three", NO_VARIABLES).map_err(e2s),
assert_eq!(c.check("one three four two", NO_VARIABLES).map_err(e2s), Ok(true)); Ok(true));
assert_eq!(c.check("one three four two", NO_VARIABLES).map_err(e2s),
Ok(true));
} }