Skip to content

Commit 7360bbd

Browse files
committed
Simplify ObjectSafe tests
1 parent 6c15a42 commit 7360bbd

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

tests/test/object_safe.rs

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,15 @@
11
use super::*;
22

3-
/// The current implementation of RustIrDatabase::is_object_safe only checks for
4-
/// the #[object_safe] flag. This test will start failing once it performs a
5-
/// proper test because Foo should be object safe.
6-
#[test]
7-
fn by_default_not_object_safe() {
8-
test! {
9-
program {
10-
trait Foo {}
11-
}
12-
13-
goal { ObjectSafe(Foo) } yields { "No possible solution" }
14-
goal { not { ObjectSafe(Foo) } } yields { "Unique" }
15-
}
16-
}
17-
183
#[test]
194
fn object_safe_flag() {
205
test! {
216
program {
227
#[object_safe]
238
trait Foo {}
9+
trait Bar {}
2410
}
2511

2612
goal { ObjectSafe(Foo) } yields { "Unique" }
27-
goal { not { ObjectSafe(Foo) } } yields { "No possible solution" }
13+
goal { not { ObjectSafe(Bar) } } yields { "Unique" }
2814
}
2915
}

0 commit comments

Comments
 (0)