diff options
author | Aleksey Kladov <[email protected]> | 2020-03-13 11:20:42 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-03-13 11:20:42 +0000 |
commit | 1e19847af361721f0f2b0e1a70cd58559d2ca196 (patch) | |
tree | a06c22209955033e3b13a0bfe22567a4561d7714 /crates/test_utils/src | |
parent | b0ed808266e346b0f9330822f874e930710df4ec (diff) |
Move verbose tests out of line
Diffstat (limited to 'crates/test_utils/src')
-rw-r--r-- | crates/test_utils/src/lib.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/test_utils/src/lib.rs b/crates/test_utils/src/lib.rs index a0d8f4d37..db03df1c4 100644 --- a/crates/test_utils/src/lib.rs +++ b/crates/test_utils/src/lib.rs | |||
@@ -397,6 +397,8 @@ pub fn skip_slow_tests() -> bool { | |||
397 | should_skip | 397 | should_skip |
398 | } | 398 | } |
399 | 399 | ||
400 | const REWRITE: bool = false; | ||
401 | |||
400 | /// Asserts that `expected` and `actual` strings are equal. If they differ only | 402 | /// Asserts that `expected` and `actual` strings are equal. If they differ only |
401 | /// in trailing or leading whitespace the test won't fail and | 403 | /// in trailing or leading whitespace the test won't fail and |
402 | /// the contents of `actual` will be written to the file located at `path`. | 404 | /// the contents of `actual` will be written to the file located at `path`. |
@@ -412,7 +414,6 @@ fn assert_equal_text(expected: &str, actual: &str, path: &Path) { | |||
412 | fs::write(path, actual).unwrap(); | 414 | fs::write(path, actual).unwrap(); |
413 | return; | 415 | return; |
414 | } | 416 | } |
415 | const REWRITE: bool = false; | ||
416 | if REWRITE { | 417 | if REWRITE { |
417 | println!("rewriting {}", pretty_path.display()); | 418 | println!("rewriting {}", pretty_path.display()); |
418 | fs::write(path, actual).unwrap(); | 419 | fs::write(path, actual).unwrap(); |