about summary refs log tree commit diff
path: root/src/test/debuginfo/generic-function.rs
diff options
context:
space:
mode:
authorMichael Woerister <michaelwoerister@posteo>2014-07-09 14:46:09 +0200
committerMichael Woerister <michaelwoerister@posteo>2014-07-16 09:46:31 +0200
commitc7f45a9458967f9acec23c40941c285b58790c0b (patch)
treef777a945d0e650c308fa38f63478f6ebcad62d8a /src/test/debuginfo/generic-function.rs
parentb56ef794a0690d29757d3934d3611018bb4f7b66 (diff)
downloadrust-c7f45a9458967f9acec23c40941c285b58790c0b.tar.gz
rust-c7f45a9458967f9acec23c40941c285b58790c0b.zip
debuginfo: Add LLDB autotests to debuginfo test suite.
This commit adds LLDB autotests to the test suite but does not activate them by default yet.
Diffstat (limited to 'src/test/debuginfo/generic-function.rs')
-rw-r--r--src/test/debuginfo/generic-function.rs35
1 files changed, 34 insertions, 1 deletions
diff --git a/src/test/debuginfo/generic-function.rs b/src/test/debuginfo/generic-function.rs
index 1777c168d9b..c3996929e7c 100644
--- a/src/test/debuginfo/generic-function.rs
+++ b/src/test/debuginfo/generic-function.rs
@@ -11,6 +11,9 @@
 // ignore-android: FIXME(#10381)
 
 // compile-flags:-g
+
+// === GDB TESTS ===================================================================================
+
 // gdb-command:rbreak zzz
 // gdb-command:run
 
@@ -41,6 +44,36 @@
 // gdb-check:$9 = {{5, {a = 6, b = 7.5}}, {{a = 6, b = 7.5}, 5}}
 // gdb-command:continue
 
+
+// === LLDB TESTS ==================================================================================
+
+// lldb-command:run
+
+// lldb-command:print *t0
+// lldb-check:[...]$0 = 1
+// lldb-command:print *t1
+// lldb-check:[...]$1 = 2.5
+// lldb-command:print ret
+// lldb-check:[...]$2 = ((1, 2.5), (2.5, 1))
+// lldb-command:continue
+
+// lldb-command:print *t0
+// lldb-check:[...]$3 = 3.5
+// lldb-command:print *t1
+// lldb-check:[...]$4 = 4
+// lldb-command:print ret
+// lldb-check:[...]$5 = ((3.5, 4), (4, 3.5))
+// lldb-command:continue
+
+// lldb-command:print *t0
+// lldb-check:[...]$6 = 5
+// lldb-command:print *t1
+// lldb-check:[...]$7 = Struct { a: 6, b: 7.5 }
+// lldb-command:print ret
+// lldb-check:[...]$8 = ((5, Struct { a: 6, b: 7.5 }), (Struct { a: 6, b: 7.5 }, 5))
+// lldb-command:continue
+
+
 #[deriving(Clone)]
 struct Struct {
     a: int,
@@ -49,7 +82,7 @@ struct Struct {
 
 fn dup_tup<T0: Clone, T1: Clone>(t0: &T0, t1: &T1) -> ((T0, T1), (T1, T0)) {
     let ret = ((t0.clone(), t1.clone()), (t1.clone(), t0.clone()));
-    zzz();
+    zzz(); // #break
     ret
 }