Skip to content

Commit

Permalink
#111 Formatting error.rs fixture test
Browse files Browse the repository at this point in the history
change all test references
  • Loading branch information
la10736 committed Apr 5, 2021
1 parent ae6fe4b commit 9d0af7b
Showing 1 changed file with 39 additions and 39 deletions.
78 changes: 39 additions & 39 deletions tests/rstest/mod.rs
Expand Up @@ -894,9 +894,9 @@ mod should_show_correct_errors {
output.stderr.str(),
format!(
"
--> {}/src/lib.rs:11:33
--> {}/src/lib.rs:13:33
|
11 | fn error_cannot_resolve_fixture(no_fixture: u32, f: u32) {{}}",
13 | fn error_cannot_resolve_fixture(no_fixture: u32, f: u32) {{}}",
name
)
.unindent()
Expand All @@ -912,9 +912,9 @@ mod should_show_correct_errors {
format!(
"
error: Missed argument: 'not_a_fixture' should be a test function argument.
--> {}/src/lib.rs:26:23
--> {}/src/lib.rs:28:23
|
26 | #[rstest(f, case(42), not_a_fixture(24))]
28 | #[rstest(f, case(42), not_a_fixture(24))]
| ^^^^^^^^^^^^^
",
name
Expand All @@ -932,9 +932,9 @@ mod should_show_correct_errors {
format!(
r#"
error[E0308]: mismatched types
--> {}/src/lib.rs:7:18
--> {}/src/lib.rs:9:18
|
7 | let a: u32 = "";
9 | let a: u32 = "";
"#,
name
)
Expand All @@ -951,9 +951,9 @@ mod should_show_correct_errors {
format!(
"
error[E0308]: mismatched types
--> {}/src/lib.rs:14:29
--> {}/src/lib.rs:16:29
|
14 | fn error_fixture_wrong_type(fixture: String, f: u32) {{}}
16 | fn error_fixture_wrong_type(fixture: String, f: u32) {{}}
| ^^^^^^^
| |
",
Expand All @@ -972,9 +972,9 @@ mod should_show_correct_errors {
format!(
"
error[E0308]: mismatched types
--> {}/src/lib.rs:17:26
--> {}/src/lib.rs:19:26
|
17 | fn error_case_wrong_type(f: &str) {{}}",
19 | fn error_case_wrong_type(f: &str) {{}}",
name
)
.unindent()
Expand All @@ -990,9 +990,9 @@ mod should_show_correct_errors {
format!(
"
error[E0308]: mismatched types
--> {}/src/lib.rs:53:28
--> {}/src/lib.rs:51:28
|
53 | fn error_matrix_wrong_type(f: &str) {{}}",
51 | fn error_matrix_wrong_type(f: &str) {{}}",
name
)
.unindent()
Expand All @@ -1008,9 +1008,9 @@ mod should_show_correct_errors {
format!(
"
error[E0308]: mismatched types
--> {}/src/lib.rs:20:31
--> {}/src/lib.rs:22:31
|
20 | case(vec![1,2,3].contains(2)))
22 | case(vec![1,2,3].contains(2)))
| ^
| |",
name
Expand All @@ -1023,9 +1023,9 @@ mod should_show_correct_errors {
format!(
"
error[E0308]: mismatched types
--> {}/src/lib.rs:55:45
--> {}/src/lib.rs:53:45
|
55 | #[rstest(condition => [vec![1,2,3].contains(2)] )]
53 | #[rstest(condition => [vec![1,2,3].contains(2)] )]
| ^
| |",
name
Expand All @@ -1043,9 +1043,9 @@ mod should_show_correct_errors {
format!(
"
error: Duplicate argument: 'f' is already defined.
--> {}/src/lib.rs:40:13
--> {}/src/lib.rs:41:13
|
40 | #[rstest(f, f(42), case(12))]
41 | #[rstest(f, f(42), case(12))]
| ^",
name
)
Expand Down Expand Up @@ -1081,9 +1081,9 @@ mod should_show_correct_errors {
format!(
"
error: Duplicate argument: 'f' is already defined.
--> {}/src/lib.rs:48:20
--> {}/src/lib.rs:47:20
|
48 | #[rstest(v, f(42), f(42), case(12))]
47 | #[rstest(v, f(42), f(42), case(12))]
| ^",
name
)
Expand All @@ -1100,9 +1100,9 @@ mod should_show_correct_errors {
format!(
"
error: Missed argument: 'not_exist_1' should be a test function argument.
--> {}/src/lib.rs:63:10
--> {}/src/lib.rs:61:10
|
63 | #[rstest(not_exist_1 => [42],
61 | #[rstest(not_exist_1 => [42],
| ^^^^^^^^^^^",
name
)
Expand All @@ -1114,9 +1114,9 @@ mod should_show_correct_errors {
format!(
"
error: Missed argument: 'not_exist_2' should be a test function argument.
--> {}/src/lib.rs:64:10
--> {}/src/lib.rs:62:10
|
64 | not_exist_2 => [42])]
62 | not_exist_2 => [42])]
| ^^^^^^^^^^^",
name
)
Expand All @@ -1133,9 +1133,9 @@ mod should_show_correct_errors {
format!(
"
error: Duplicate argument: 'f' is already defined.
--> {}/src/lib.rs:67:25
--> {}/src/lib.rs:65:25
|
67 | #[rstest(f => [41, 42], f(42))]
65 | #[rstest(f => [41, 42], f(42))]
| ^",
name
)
Expand All @@ -1152,9 +1152,9 @@ mod should_show_correct_errors {
format!(
"
error: Duplicate argument: 'a' is already defined.
--> {}/src/lib.rs:81:25
--> {}/src/lib.rs:77:25
|
81 | #[rstest(a => [42, 24], a => [24, 42])]
77 | #[rstest(a => [42, 24], a => [24, 42])]
| ^",
name
)
Expand All @@ -1171,9 +1171,9 @@ mod should_show_correct_errors {
format!(
"
error: Duplicate argument: 'f' is already defined.
--> {}/src/lib.rs:71:17
--> {}/src/lib.rs:68:17
|
71 | #[rstest(f(42), f => [41, 42])]
68 | #[rstest(f(42), f => [41, 42])]
| ^",
name
)
Expand All @@ -1190,9 +1190,9 @@ mod should_show_correct_errors {
format!(
"
error: Duplicate argument: 'a' is already defined.
--> {}/src/lib.rs:75:23
--> {}/src/lib.rs:71:23
|
75 | #[rstest(a, case(42), a => [42])]
71 | #[rstest(a, case(42), a => [42])]
| ^",
name
)
Expand All @@ -1209,9 +1209,9 @@ mod should_show_correct_errors {
format!(
"
error: Duplicate argument: 'a' is already defined.
--> {}/src/lib.rs:78:21
--> {}/src/lib.rs:74:21
|
78 | #[rstest(a => [42], a, case(42))]
74 | #[rstest(a => [42], a, case(42))]
| ^",
name
)
Expand All @@ -1228,9 +1228,9 @@ mod should_show_correct_errors {
format!(
"
error: Duplicate argument: 'a' is already defined.
--> {}/src/lib.rs:85:13
--> {}/src/lib.rs:80:13
|
85 | #[rstest(a, a, case(42))]
80 | #[rstest(a, a, case(42))]
| ^",
name
)
Expand All @@ -1247,16 +1247,16 @@ mod should_show_correct_errors {
format!(
"
error: Values list should not be empty
--> {}/src/lib.rs:60:19
--> {}/src/lib.rs:58:19
|
60 | #[rstest(empty => [])]
58 | #[rstest(empty => [])]
| ^^",
name
)
.unindent()
);
}

#[test]
fn if_try_to_convert_literal_string_to_a_type_that_not_implement_from_str() {
let (output, name) = execute();
Expand Down

0 comments on commit 9d0af7b

Please sign in to comment.