diff options
Diffstat (limited to 'src/test/debuginfo/generic-method-on-generic-struct.rs')
| -rw-r--r-- | src/test/debuginfo/generic-method-on-generic-struct.rs | 66 |
1 files changed, 60 insertions, 6 deletions
diff --git a/src/test/debuginfo/generic-method-on-generic-struct.rs b/src/test/debuginfo/generic-method-on-generic-struct.rs index 9ed1c0175a9..0f05eea6282 100644 --- a/src/test/debuginfo/generic-method-on-generic-struct.rs +++ b/src/test/debuginfo/generic-method-on-generic-struct.rs @@ -11,6 +11,9 @@ // ignore-android: FIXME(#10381) // compile-flags:-g + +// === GDB TESTS =================================================================================== + // gdb-command:rbreak zzz // gdb-command:run @@ -20,8 +23,8 @@ // gdb-check:$1 = {x = {8888, -8888}} // gdb-command:print arg1 // gdb-check:$2 = -1 -// gdb-command:print/d arg2 -// gdb-check:$3 = -2 +// gdb-command:print arg2 +// gdb-check:$3 = 2 // gdb-command:continue // STACK BY VAL @@ -64,6 +67,57 @@ // gdb-check:$15 = -10.5 // gdb-command:continue + +// === LLDB TESTS ================================================================================== + +// lldb-command:run + +// STACK BY REF +// lldb-command:print *self +// lldb-check:[...]$0 = Struct<(u32, i32)> { x: (8888, -8888) } +// lldb-command:print arg1 +// lldb-check:[...]$1 = -1 +// lldb-command:print arg2 +// lldb-check:[...]$2 = 2 +// lldb-command:continue + +// STACK BY VAL +// lldb-command:print self +// lldb-check:[...]$3 = Struct<(u32, i32)> { x: (8888, -8888) } +// lldb-command:print arg1 +// lldb-check:[...]$4 = -3 +// lldb-command:print arg2 +// lldb-check:[...]$5 = -4 +// lldb-command:continue + +// OWNED BY REF +// lldb-command:print *self +// lldb-check:[...]$6 = Struct<f64> { x: 1234.5 } +// lldb-command:print arg1 +// lldb-check:[...]$7 = -5 +// lldb-command:print arg2 +// lldb-check:[...]$8 = -6 +// lldb-command:continue + +// OWNED BY VAL +// lldb-command:print self +// lldb-check:[...]$9 = Struct<f64> { x: 1234.5 } +// lldb-command:print arg1 +// lldb-check:[...]$10 = -7 +// lldb-command:print arg2 +// lldb-check:[...]$11 = -8 +// lldb-command:continue + +// OWNED MOVED +// lldb-command:print *self +// lldb-check:[...]$12 = Struct<f64> { x: 1234.5 } +// lldb-command:print arg1 +// lldb-check:[...]$13 = -9 +// lldb-command:print arg2 +// lldb-check:[...]$14 = -10.5 +// lldb-command:continue + + struct Struct<T> { x: T } @@ -71,24 +125,24 @@ struct Struct<T> { impl<T1> Struct<T1> { fn self_by_ref<T2>(&self, arg1: int, arg2: T2) -> int { - zzz(); + zzz(); // #break arg1 } fn self_by_val<T2>(self, arg1: int, arg2: T2) -> int { - zzz(); + zzz(); // #break arg1 } fn self_owned<T2>(~self, arg1: int, arg2: T2) -> int { - zzz(); + zzz(); // #break arg1 } } fn main() { let stack = Struct { x: (8888_u32, -8888_i32) }; - let _ = stack.self_by_ref(-1, -2_i8); + let _ = stack.self_by_ref(-1, 2_u16); let _ = stack.self_by_val(-3, -4_i16); let owned = box Struct { x: 1234.5f64 }; |
