Also some tests for demangle would be nice.


On Thu, Feb 6, 2014 at 7:06 PM, Huon Wilson <notifications@github.com>wrote:

> In src/test/run-pass/backtrace.rs:
>
> > @@ -0,0 +1,15 @@
> > +// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
> > +// file at the top-level directory of this distribution and at
> > +// http://rust-lang.org/COPYRIGHT.
> > +//
> > +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
> > +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
> > +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
> > +// option. This file may not be copied, modified, or distributed
> > +// except according to those terms.
> > +
> > +// exec-env:RUST_LOG=std::rt::backtrace
> > +
> > +fn main() {
> > +    fail!("test");
>
> Erm, based on the lack of filenames: it would probably have to be grep
> main ... I guess it would be better to be something like
>
> fn failure() { fail!() }
> fn intermediate() { failure() }
> fn main() { intermediate() }
>
> and at least grep for intermediate to make sure it's actually picking up
> the call stack. (Best case would be checking main, intermediate and
> failure.)
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/mozilla/rust/pull/12070/files#r9525116>
> .
>