1 // Copyright 2013 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 #![feature(managed_boxes)]
15 ETag(@Vec<~str> , @~str),
16 UTag(@Vec<~str> , @~str),
17 Section(@Vec<~str> , bool, @Vec<Token> , @~str, @~str, @~str, @~str, @~str),
18 IncompleteSection(@Vec<~str> , bool, @~str, bool),
19 Partial(@~str, @~str, @~str),
22 fn check_strs(actual: &str, expected: &str) -> bool
26 println!("Found {}, but expected {}", actual, expected);
34 // assert!(check_strs(fmt!("%?", Text(@~"foo")), "Text(@~\"foo\")"));
35 // assert!(check_strs(fmt!("%?", ETag(@~[~"foo"], @~"bar")), "ETag(@~[ ~\"foo\" ], @~\"bar\")"));
37 let t = Text(@~"foo");
38 let u = Section(@vec!(~"alpha"), true, @vec!(t), @~"foo", @~"foo", @~"foo", @~"foo", @~"foo");
39 let v = format!("{:?}", u); // this is the line that causes the seg fault