about summary refs log tree commit diff
path: root/src/test/debuginfo/function-arg-initialization.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/debuginfo/function-arg-initialization.rs')
-rw-r--r--src/test/debuginfo/function-arg-initialization.rs152
1 files changed, 128 insertions, 24 deletions
diff --git a/src/test/debuginfo/function-arg-initialization.rs b/src/test/debuginfo/function-arg-initialization.rs
index 535efa0b84e..640e04cf71c 100644
--- a/src/test/debuginfo/function-arg-initialization.rs
+++ b/src/test/debuginfo/function-arg-initialization.rs
@@ -18,18 +18,19 @@
 
 // compile-flags:-g
 // gdb-command:set print pretty off
-// gdb-command:break function-arg-initialization.rs:139
-// gdb-command:break function-arg-initialization.rs:154
-// gdb-command:break function-arg-initialization.rs:158
-// gdb-command:break function-arg-initialization.rs:162
-// gdb-command:break function-arg-initialization.rs:166
-// gdb-command:break function-arg-initialization.rs:170
-// gdb-command:break function-arg-initialization.rs:174
-// gdb-command:break function-arg-initialization.rs:178
-// gdb-command:break function-arg-initialization.rs:182
-// gdb-command:break function-arg-initialization.rs:190
-// gdb-command:break function-arg-initialization.rs:197
-
+// gdb-command:break function-arg-initialization.rs:243
+// gdb-command:break function-arg-initialization.rs:258
+// gdb-command:break function-arg-initialization.rs:262
+// gdb-command:break function-arg-initialization.rs:266
+// gdb-command:break function-arg-initialization.rs:270
+// gdb-command:break function-arg-initialization.rs:274
+// gdb-command:break function-arg-initialization.rs:278
+// gdb-command:break function-arg-initialization.rs:282
+// gdb-command:break function-arg-initialization.rs:286
+// gdb-command:break function-arg-initialization.rs:294
+// gdb-command:break function-arg-initialization.rs:301
+
+// === GDB TESTS ===================================================================================
 
 // gdb-command:run
 
@@ -130,13 +131,116 @@
 // gdb-check:$32 = 45
 // gdb-command:continue
 
-#![allow(unused_variable)]
 
+// === LLDB TESTS ==================================================================================
+
+// lldb-command:run
+
+// IMMEDIATE ARGS
+// lldb-command:print a
+// lldb-check:[...]$0 = 1
+// lldb-command:print b
+// lldb-check:[...]$1 = true
+// lldb-command:print c
+// lldb-check:[...]$2 = 2.5
+// lldb-command:continue
+
+// NON IMMEDIATE ARGS
+// lldb-command:print a
+// lldb-check:[...]$3 = BigStruct { a: 3, b: 4, c: 5, d: 6, e: 7, f: 8, g: 9, h: 10 }
+// lldb-command:print b
+// lldb-check:[...]$4 = BigStruct { a: 11, b: 12, c: 13, d: 14, e: 15, f: 16, g: 17, h: 18 }
+// lldb-command:continue
+
+// BINDING
+// lldb-command:print a
+// lldb-check:[...]$5 = 19
+// lldb-command:print b
+// lldb-check:[...]$6 = 20
+// lldb-command:print c
+// lldb-check:[...]$7 = 21.5
+// lldb-command:continue
+
+// ASSIGNMENT
+// lldb-command:print a
+// lldb-check:[...]$8 = 22
+// lldb-command:print b
+// lldb-check:[...]$9 = 23
+// lldb-command:print c
+// lldb-check:[...]$10 = 24.5
+// lldb-command:continue
+
+// FUNCTION CALL
+// lldb-command:print x
+// lldb-check:[...]$11 = 25
+// lldb-command:print y
+// lldb-check:[...]$12 = 26
+// lldb-command:print z
+// lldb-check:[...]$13 = 27.5
+// lldb-command:continue
+
+// EXPR
+// lldb-command:print x
+// lldb-check:[...]$14 = 28
+// lldb-command:print y
+// lldb-check:[...]$15 = 29
+// lldb-command:print z
+// lldb-check:[...]$16 = 30.5
+// lldb-command:continue
+
+// RETURN EXPR
+// lldb-command:print x
+// lldb-check:[...]$17 = 31
+// lldb-command:print y
+// lldb-check:[...]$18 = 32
+// lldb-command:print z
+// lldb-check:[...]$19 = 33.5
+// lldb-command:continue
+
+// ARITHMETIC EXPR
+// lldb-command:print x
+// lldb-check:[...]$20 = 34
+// lldb-command:print y
+// lldb-check:[...]$21 = 35
+// lldb-command:print z
+// lldb-check:[...]$22 = 36.5
+// lldb-command:continue
+
+// IF EXPR
+// lldb-command:print x
+// lldb-check:[...]$23 = 37
+// lldb-command:print y
+// lldb-check:[...]$24 = 38
+// lldb-command:print z
+// lldb-check:[...]$25 = 39.5
+// lldb-command:continue
+
+// WHILE EXPR
+// lldb-command:print x
+// lldb-check:[...]$26 = 40
+// lldb-command:print y
+// lldb-check:[...]$27 = 41
+// lldb-command:print z
+// lldb-check:[...]$28 = 42
+// lldb-command:continue
+
+// LOOP EXPR
+// lldb-command:print x
+// lldb-check:[...]$29 = 43
+// lldb-command:print y
+// lldb-check:[...]$30 = 44
+// lldb-command:print z
+// lldb-check:[...]$31 = 45
+// lldb-command:continue
+
+
+
+#![allow(unused_variable)]
 
 
 
 fn immediate_args(a: int, b: bool, c: f64) {
-    ()
+    () // #break
 }
 
 struct BigStruct {
@@ -151,35 +255,35 @@ struct BigStruct {
 }
 
 fn non_immediate_args(a: BigStruct, b: BigStruct) {
-    ()
+    () // #break
 }
 
 fn binding(a: i64, b: u64, c: f64) {
-    let x = 0i;
+    let x = 0i; // #break
 }
 
 fn assignment(mut a: u64, b: u64, c: f64) {
-    a = b;
+    a = b; // #break
 }
 
 fn function_call(x: u64, y: u64, z: f64) {
-    std::io::stdio::print("Hi!")
+    std::io::stdio::print("Hi!") // #break
 }
 
 fn identifier(x: u64, y: u64, z: f64) -> u64 {
-    x
+    x // #break
 }
 
 fn return_expr(x: u64, y: u64, z: f64) -> u64 {
-    return x;
+    return x; // #break
 }
 
 fn arithmetic_expr(x: u64, y: u64, z: f64) -> u64 {
-    x + y
+    x + y // #break
 }
 
 fn if_expr(x: u64, y: u64, z: f64) -> u64 {
-    if x + y < 1000 {
+    if x + y < 1000 { // #break
         x
     } else {
         y
@@ -187,14 +291,14 @@ fn if_expr(x: u64, y: u64, z: f64) -> u64 {
 }
 
 fn while_expr(mut x: u64, y: u64, z: u64) -> u64 {
-    while x + y < 1000 {
+    while x + y > 1000 { // #break
         x += z
     }
     return x;
 }
 
 fn loop_expr(mut x: u64, y: u64, z: u64) -> u64 {
-    loop {
+    loop { // #break
         x += z;
 
         if x + y > 1000 {