]> git.lizzy.rs Git - rust.git/blob - src/test/debuginfo/basic-types-globals.rs
Add verbose option to rustdoc in order to fix problem with --version
[rust.git] / src / test / debuginfo / basic-types-globals.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.
4 //
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.
10
11 // Caveats - gdb prints any 8-bit value (meaning rust I8 and u8 values)
12 // as its numerical value along with its associated ASCII char, there
13 // doesn't seem to be any way around this. Also, gdb doesn't know
14 // about UTF-32 character encoding and will print a rust char as only
15 // its numerical value.
16
17 // ignore-android: FIXME(#10381)
18 // min-lldb-version: 310
19
20 // compile-flags:-g
21 // gdb-command:run
22 // gdb-command:print 'basic-types-globals::B'
23 // gdb-check:$1 = false
24 // gdb-command:print 'basic-types-globals::I'
25 // gdb-check:$2 = -1
26 // gdb-command:print 'basic-types-globals::C'
27 // gdb-check:$3 = 97
28 // gdb-command:print/d 'basic-types-globals::I8'
29 // gdb-check:$4 = 68
30 // gdb-command:print 'basic-types-globals::I16'
31 // gdb-check:$5 = -16
32 // gdb-command:print 'basic-types-globals::I32'
33 // gdb-check:$6 = -32
34 // gdb-command:print 'basic-types-globals::I64'
35 // gdb-check:$7 = -64
36 // gdb-command:print 'basic-types-globals::U'
37 // gdb-check:$8 = 1
38 // gdb-command:print/d 'basic-types-globals::U8'
39 // gdb-check:$9 = 100
40 // gdb-command:print 'basic-types-globals::U16'
41 // gdb-check:$10 = 16
42 // gdb-command:print 'basic-types-globals::U32'
43 // gdb-check:$11 = 32
44 // gdb-command:print 'basic-types-globals::U64'
45 // gdb-check:$12 = 64
46 // gdb-command:print 'basic-types-globals::F32'
47 // gdb-check:$13 = 2.5
48 // gdb-command:print 'basic-types-globals::F64'
49 // gdb-check:$14 = 3.5
50 // gdb-command:continue
51
52 #![allow(unused_variables)]
53
54 static B: bool = false;
55 static I: int = -1;
56 static C: char = 'a';
57 static I8: i8 = 68;
58 static I16: i16 = -16;
59 static I32: i32 = -32;
60 static I64: i64 = -64;
61 static U: uint = 1;
62 static U8: u8 = 100;
63 static U16: u16 = 16;
64 static U32: u32 = 32;
65 static U64: u64 = 64;
66 static F32: f32 = 2.5;
67 static F64: f64 = 3.5;
68
69 fn main() {
70     _zzz(); // #break
71
72     let a = (B, I, C, I8, I16, I32, I64, U, U8, U16, U32, U64, F32, F64);
73 }
74
75 fn _zzz() {()}