diff options
| author | Kelvin Ly <kelvin.ly1618@gmail.com> | 2015-01-05 13:49:33 -0500 |
|---|---|---|
| committer | Kelvin Ly <kelvin.ly1618@gmail.com> | 2015-01-05 13:49:33 -0500 |
| commit | 7e42338dc5e67a85821831b4f34bfb6f52c157d3 (patch) | |
| tree | 85e1a1254e69ddcf13ba54957ad3eb8603386319 /src/test/debuginfo | |
| parent | 22cae7e034254d4c21438f464741d8ede236a23f (diff) | |
| download | rust-7e42338dc5e67a85821831b4f34bfb6f52c157d3.tar.gz rust-7e42338dc5e67a85821831b4f34bfb6f52c157d3.zip | |
Added two tests for pretty printing optimized enums
Diffstat (limited to 'src/test/debuginfo')
| -rw-r--r-- | src/test/debuginfo/gdb-pretty-struct-and-enums.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/debuginfo/gdb-pretty-struct-and-enums.rs b/src/test/debuginfo/gdb-pretty-struct-and-enums.rs index 64c120e1ab3..9b791fe1275 100644 --- a/src/test/debuginfo/gdb-pretty-struct-and-enums.rs +++ b/src/test/debuginfo/gdb-pretty-struct-and-enums.rs @@ -69,6 +69,13 @@ // gdb-command: print nested_variant2 // gdb-check:$16 = NestedVariant2 = {abc = NestedStruct = {regular_struct = RegularStruct = {the_first_field = 117, the_second_field = 118.5, the_third_field = false, the_fourth_field = "NestedStructString10"}, tuple_struct = TupleStruct = {119.5, 120}, empty_struct = EmptyStruct, c_style_enum = CStyleEnumVar3, mixed_enum = MixedEnumStructVar = {field1 = 121.5, field2 = -122}}} +// gdb-command: print none_check1 +// gdb-check:$16 = None + +// gdb-command: print none_check2 +// gdb-check:$17 = None + +use self::CStyleEnum::{CStyleEnumVar1, CStyleEnumVar2, CStyleEnumVar3}; use self::CStyleEnum::{CStyleEnumVar1, CStyleEnumVar2, CStyleEnumVar3}; use self::MixedEnum::{MixedEnumCStyleVar, MixedEnumTupleVar, MixedEnumStructVar}; use self::NestedEnum::{NestedVariant1, NestedVariant2}; @@ -170,6 +177,9 @@ fn main() { } }; + let none_check1: Option<(uint, Vec<uint>)> = None; + let none_check2: Option<String> = None; + zzz(); // #break } |
