Skip to content

Commit 2a54f58

Browse files
author
Mingshen Sun
committed
tests: delete tests framework and unused macros
1 parent 3de2bf7 commit 2a54f58

File tree

3 files changed

+0
-857
lines changed

3 files changed

+0
-857
lines changed

tests/macros.rs

Lines changed: 0 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -5,82 +5,6 @@
55
// This work is licensed under the terms of the BSD 3-Clause License.
66
// For a copy, see the LICENSE file.
77
//
8-
// This file incorporates work covered by the following copyright and
9-
// permission notice:
10-
//
11-
// Copyright (c) 2013-2018, Jordi Boggiano
12-
// Copyright (c) 2013-2018, Alex Lyon
13-
// Copyright (c) 2015, Joseph Crail
14-
// Copyright (c) 2015-2016, Nathan Ross
15-
//
16-
// Permission is hereby granted, free of charge, to any person obtaining a
17-
// copy of this software and associated documentation files (the
18-
// "Software"), to deal in the Software without restriction, including
19-
// without limitation the rights to use, copy, modify, merge, publish,
20-
// distribute, sublicense, and/or sell copies of the Software, and to
21-
// permit persons to whom the Software is furnished to do so, subject to
22-
// the following conditions:
23-
//
24-
// The above copyright notice and this permission notice shall be included
25-
// in all copies or substantial portions of the Software.
26-
//
27-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
28-
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
29-
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
30-
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
31-
// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
32-
// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
33-
// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
34-
//
35-
36-
#[macro_export]
37-
macro_rules! assert_empty_stderr(
38-
($cond:expr) => (
39-
if $cond.stderr.len() > 0 {
40-
panic!(format!("stderr: {}", $cond.stderr))
41-
}
42-
);
43-
);
44-
45-
#[macro_export]
46-
macro_rules! assert_empty_stdout(
47-
($cond:expr) => (
48-
if $cond.stdout.len() > 0 {
49-
panic!(format!("stdout: {}", $cond.stdout))
50-
}
51-
);
52-
);
53-
54-
#[macro_export]
55-
macro_rules! assert_no_error(
56-
($cond:expr) => (
57-
assert!($cond.success);
58-
if $cond.stderr.len() > 0 {
59-
panic!(format!("stderr: {}", $cond.stderr))
60-
}
61-
);
62-
);
63-
64-
#[macro_export]
65-
macro_rules! path_concat {
66-
($e:expr, ..$n:expr) => {{
67-
use std::path::PathBuf;
68-
let n = $n;
69-
let mut pb = PathBuf::new();
70-
for _ in 0..n {
71-
pb.push($e);
72-
}
73-
pb.to_str().unwrap().to_owned()
74-
}};
75-
($($e:expr),*) => {{
76-
use std::path::PathBuf;
77-
let mut pb = PathBuf::new();
78-
$(
79-
pb.push($e);
80-
)*
81-
pb.to_str().unwrap().to_owned()
82-
}};
83-
}
848

859
#[macro_export]
8610
macro_rules! util_name {
@@ -107,21 +31,6 @@ macro_rules! fixtures_dir {
10731
}};
10832
}
10933

110-
#[macro_export]
111-
macro_rules! new_ucmd {
112-
() => {
113-
TestScenario::new(util_name!()).ucmd()
114-
};
115-
}
116-
117-
#[macro_export]
118-
macro_rules! at_and_ucmd {
119-
() => {{
120-
let ts = TestScenario::new(util_name!());
121-
(ts.fixtures.clone(), ts.ucmd())
122-
}};
123-
}
124-
12534
#[macro_export]
12635
macro_rules! fixtures_path {
12736
($filename:expr) => {{

tests/tests.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ extern crate assert_cmd;
1515
extern crate assert_fs;
1616
extern crate predicates;
1717

18-
mod util;
1918
#[macro_use]
2019
mod macros;
2120

0 commit comments

Comments
 (0)