2013-07-11 19:07:57 -05:00
|
|
|
// xfail-fast
|
|
|
|
// aux-build:trait_default_method_xc_aux.rs
|
|
|
|
// aux-build:trait_default_method_xc_aux_2.rs
|
|
|
|
|
|
|
|
|
2013-12-09 15:56:53 -06:00
|
|
|
extern mod aux = "trait_default_method_xc_aux";
|
|
|
|
extern mod aux2 = "trait_default_method_xc_aux_2";
|
2013-07-11 19:07:57 -05:00
|
|
|
use aux::A;
|
|
|
|
use aux2::{a_struct, welp};
|
|
|
|
|
|
|
|
|
2014-01-03 17:30:54 -06:00
|
|
|
pub fn main () {
|
2013-07-11 19:07:57 -05:00
|
|
|
|
|
|
|
let a = a_struct { x: 0 };
|
|
|
|
let b = a_struct { x: 1 };
|
|
|
|
|
|
|
|
assert_eq!(0i.g(), 10);
|
|
|
|
assert_eq!(a.g(), 10);
|
|
|
|
assert_eq!(a.h(), 11);
|
|
|
|
assert_eq!(b.g(), 10);
|
|
|
|
assert_eq!(b.h(), 11);
|
|
|
|
assert_eq!(A::lurr(&a, &b), 21);
|
|
|
|
|
|
|
|
welp(&0);
|
|
|
|
}
|