]>
git.proxmox.com Git - rustc.git/blob - src/test/debuginfo/borrowed-unique-basic.rs
1 // Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
11 // min-lldb-version: 310
13 // Gdb doesn't know about UTF-32 character encoding and will print a rust char as only
14 // its numerical value.
18 // === GDB TESTS ===================================================================================
22 // gdb-command:print *bool_ref
23 // gdb-check:$1 = true
25 // gdb-command:print *int_ref
28 // gdb-command:print *char_ref
30 // gdbr-check:$3 = 97 'a'
32 // gdb-command:print/d *i8_ref
35 // gdb-command:print *i16_ref
38 // gdb-command:print *i32_ref
41 // gdb-command:print *i64_ref
44 // gdb-command:print *uint_ref
47 // gdb-command:print/d *u8_ref
50 // gdb-command:print *u16_ref
53 // gdb-command:print *u32_ref
56 // gdb-command:print *u64_ref
59 // gdb-command:print *f32_ref
60 // gdb-check:$13 = 2.5
62 // gdb-command:print *f64_ref
63 // gdb-check:$14 = 3.5
66 // === LLDB TESTS ==================================================================================
68 // lldb-command:type format add -f decimal char
69 // lldb-command:type format add -f decimal 'unsigned char'
72 // lldb-command:print *bool_ref
73 // lldb-check:[...]$0 = true
75 // lldb-command:print *int_ref
76 // lldb-check:[...]$1 = -1
78 // d ebugger:print *char_ref
79 // c heck:[...]$3 = 97
81 // lldb-command:print *i8_ref
82 // lldb-check:[...]$2 = 68
84 // lldb-command:print *i16_ref
85 // lldb-check:[...]$3 = -16
87 // lldb-command:print *i32_ref
88 // lldb-check:[...]$4 = -32
90 // lldb-command:print *i64_ref
91 // lldb-check:[...]$5 = -64
93 // lldb-command:print *uint_ref
94 // lldb-check:[...]$6 = 1
96 // lldb-command:print *u8_ref
97 // lldb-check:[...]$7 = 100
99 // lldb-command:print *u16_ref
100 // lldb-check:[...]$8 = 16
102 // lldb-command:print *u32_ref
103 // lldb-check:[...]$9 = 32
105 // lldb-command:print *u64_ref
106 // lldb-check:[...]$10 = 64
108 // lldb-command:print *f32_ref
109 // lldb-check:[...]$11 = 2.5
111 // lldb-command:print *f64_ref
112 // lldb-check:[...]$12 = 3.5
114 #![allow(unused_variables)]
115 #![feature(box_syntax)]
116 #![feature(omit_gdb_pretty_printer_section)]
117 #![omit_gdb_pretty_printer_section]
120 let bool_box
: Box
<bool
> = box true;
121 let bool_ref
: &bool
= &*bool_box
;
123 let int_box
: Box
<isize> = box -1;
124 let int_ref
: &isize = &*int_box
;
126 let char_box
: Box
<char> = box 'a'
;
127 let char_ref
: &char = &*char_box
;
129 let i8_box
: Box
<i8> = box 68;
130 let i8_ref
: &i8 = &*i8_box
;
132 let i16_box
: Box
<i16> = box -16;
133 let i16_ref
: &i16 = &*i16_box
;
135 let i32_box
: Box
<i32> = box -32;
136 let i32_ref
: &i32 = &*i32_box
;
138 let i64_box
: Box
<i64> = box -64;
139 let i64_ref
: &i64 = &*i64_box
;
141 let uint_box
: Box
<usize> = box 1;
142 let uint_ref
: &usize = &*uint_box
;
144 let u8_box
: Box
<u8> = box 100;
145 let u8_ref
: &u8 = &*u8_box
;
147 let u16_box
: Box
<u16> = box 16;
148 let u16_ref
: &u16 = &*u16_box
;
150 let u32_box
: Box
<u32> = box 32;
151 let u32_ref
: &u32 = &*u32_box
;
153 let u64_box
: Box
<u64> = box 64;
154 let u64_ref
: &u64 = &*u64_box
;
156 let f32_box
: Box
<f32> = box 2.5;
157 let f32_ref
: &f32 = &*f32_box
;
159 let f64_box
: Box
<f64> = box 3.5;
160 let f64_ref
: &f64 = &*f64_box
;