]> git.lizzy.rs Git - rust.git/blob - src/test/ui/methods/method-self-arg-aux2.rs
Merge commit '3e7c6dec244539970b593824334876f8b6ed0b18' into clippyup
[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 #![feature(box_syntax)]
5
6 // aux-build:method_self_arg2.rs
7 extern crate method_self_arg2;
8 use method_self_arg2::{Foo, Bar};
9
10 fn main() {
11     let x = Foo;
12     // Test external call.
13     Bar::foo1(&x);
14     Bar::foo2(x);
15     Bar::foo3(box x);
16
17     Bar::bar1(&x);
18     Bar::bar2(x);
19     Bar::bar3(box x);
20
21     x.run_trait();
22
23     assert_eq!(method_self_arg2::get_count(), 2*2*3*3*5*5*7*7*11*11*13*13*17);
24 }