Test a
Source location: tests/basic_tests.rs:356
fn a() -> () { trusted }
}])
p_execute()
);
}
#[test]
_impl_dup() {
alityTest::new(crates![crate core {
trait MyTrait {}
struct MyStruct {}
impl MyTrait for MyStruct {}
impl MyTrait for MyStruct {}
}])
(expect_test::expect![[r#"
the rule "check crate" at (mod.rs) failed because
`impl MyTrait for MyStruct { }` is defined multiple times"#]]);
}
#[test]
_neg_impl_dup() {
alityTest::new(crates![crate core {
trait MyTrait {}
struct MyStruct {}
impl !MyTrait for MyStruct {}
impl !MyTrait for MyStruct {}
}])
(expect_test::expect![[r#"
the rule "check crate" at (mod.rs) failed because
`impl ! MyTrait for MyStruct {}` is defined multiple times"#]]);
}
#[test]
items_with_duplicate_fn_names() {
alityTest::new(crates![crate core {
trait Foo {
fn bar(self_: u32) -> u32;
}
Rules proved (14)
Premises failed (0)
This test records no negative coverage.
Proof trees
Proof tree
check_all_crates (check all prefixes)mod.rs:55args
for_allmod.rs:42for_allmod.rs:52args
check_crate (check crate)mod.rs:76args
for_allmod.rs:61for_allmod.rs:73args
check_crate_item (trait)mod.rs:189args
check_trait (check trait)traits.rs:25args
scopetraits.rs:9prove_predicate_list (none)prove_predicate_list.rs:21args
for_allmod.rs:73args
check_crate_item (free fn)mod.rs:208args
check_free_fn (check free fn)fns.rs:25args
check_fn (check fn)fns.rs:55args
scopefns.rs:31prove_predicate_list (none)prove_predicate_list.rs:21args
prove_predicate_list (some)prove_predicate_list.rs:28args
prove_predicate (parameter well formed)prove_predicate.rs:150args
prove_wf (tuples)prove_wf.rs:50args
prove_after (prove_after)prove_after.rs:20args
prove_predicate_list (none)prove_predicate_list.rs:21args
check_fn_body (trusted fn body)fns.rs:81args
check_coherence (check_coherence)coherence.rs:23args