Skip to content

Commit a4324cb

Browse files
committed
consistent formatting
1 parent fabaecb commit a4324cb

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

tests/hello_world.rs

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,5 @@
11
use formality::test_program_ok;
22

3-
const PROGRAM_BROKEN: &str = "[
4-
crate Foo {
5-
trait Foo<ty T> where [T: Bar<Self>] {}
6-
7-
trait Bar<ty T> where [T: Baz<>] {}
8-
9-
trait Baz<> where [] {}
10-
}
11-
]";
12-
13-
const PROGRAM_OK: &str = "[
14-
crate Foo {
15-
trait Foo<ty T> where [T: Bar<Self>, Self: Baz<>] {}
16-
17-
trait Bar<ty T> where [T: Baz<>] {}
18-
19-
trait Baz<> where [] {}
20-
}
21-
]";
22-
233
#[test]
244
fn test_broken() {
255
expect_test::expect![[r#"
@@ -29,7 +9,17 @@ fn test_broken() {
299
source: "failed to prove {@ WellFormedTraitRef(Bar(!ty_2, !ty_1))} given {Bar(!ty_2, !ty_1)}, got {}",
3010
},
3111
)
32-
"#]].assert_debug_eq(&test_program_ok(PROGRAM_BROKEN));
12+
"#]].assert_debug_eq(&test_program_ok(
13+
"[
14+
crate Foo {
15+
trait Foo<ty T> where [T: Bar<Self>] {}
16+
17+
trait Bar<ty T> where [T: Baz<>] {}
18+
19+
trait Baz<> where [] {}
20+
}
21+
]",
22+
));
3323
}
3424

3525
#[test]
@@ -39,5 +29,15 @@ fn test_ok() {
3929
(),
4030
)
4131
"#]]
42-
.assert_debug_eq(&test_program_ok(PROGRAM_OK));
32+
.assert_debug_eq(&test_program_ok(
33+
"[
34+
crate Foo {
35+
trait Foo<ty T> where [T: Bar<Self>, Self: Baz<>] {}
36+
37+
trait Bar<ty T> where [T: Baz<>] {}
38+
39+
trait Baz<> where [] {}
40+
}
41+
]",
42+
));
4343
}

0 commit comments

Comments
 (0)