-
Notifications
You must be signed in to change notification settings - Fork 39
/
dump_debug_compact.rs
63 lines (55 loc) · 1.13 KB
/
dump_debug_compact.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
use rstest::*;
#[derive(Debug)]
struct A {}
#[fixture]
fn fu32() -> u32 {
42
}
#[fixture]
fn fstring() -> String {
"A String".to_string()
}
#[fixture]
fn ftuple() -> (A, String, i32) {
(A {}, "A String".to_string(), -12)
}
#[rstest(::trace)]
fn single_fail(fu32: u32, fstring: String, ftuple: (A, String, i32)) {
assert!(false);
}
#[rstest]
fn no_trace_single_fail(fu32: u32, fstring: String, ftuple: (A, String, i32)) {
assert!(false);
}
#[rstest(u, s, t,
case(42, "str", ("ss", -12)),
case(24, "trs", ("tt", -24))
::trace
)]
fn cases_fail(u: u32, s: &str, t: (&str, i32)) {
assert!(false);
}
#[rstest(u, s, t,
case(42, "str", ("ss", -12)),
case(24, "trs", ("tt", -24))
)]
fn no_trace_cases_fail(u: u32, s: &str, t: (&str, i32)) {
assert!(false);
}
#[rstest(
u => [1, 2],
s => ["rst", "srt"],
t => [("SS", -12), ("TT", -24)]
::trace
)]
fn matrix_fail(u: u32, s: &str, t: (&str, i32)) {
assert!(false);
}
#[rstest(
u => [1, 2],
s => ["rst", "srt"],
t => [("SS", -12), ("TT", -24)]
)]
fn no_trace_matrix_fail(u: u32, s: &str, t: (&str, i32)) {
assert!(false);
}