Added two tests for pretty printing optimized enums

This commit is contained in:
Kelvin Ly 2015-01-05 13:49:33 -05:00
parent 22cae7e034
commit 7e42338dc5

View File

@ -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
}