]> git.lizzy.rs Git - rust.git/blob - src/test/ui/methods/method-self-arg-aux2.rs
move an `assert!` to the right place
[rust.git] / src / test / ui / methods / method-self-arg-aux2.rs
1 // run-pass
2 // Test method calls with self as an argument (cross-crate)
3
4 // aux-build:method_self_arg2.rs
5 extern crate method_self_arg2;
6 use method_self_arg2::{Foo, Bar};
7
8 fn main() {
9     let x = Foo;
10     // Test external call.
11     Bar::foo1(&x);
12     Bar::foo2(x);
13     Bar::foo3(Box::new(x));
14
15     Bar::bar1(&x);
16     Bar::bar2(x);
17     Bar::bar3(Box::new(x));
18
19     x.run_trait();
20
21     assert_eq!(method_self_arg2::get_count(), 2*2*3*3*5*5*7*7*11*11*13*13*17);
22 }