Address review comments, add tests

This commit is contained in:
Andrew Dunham 2014-08-30 23:48:31 -07:00
parent 1c49eaaa55
commit 5bb6196378
3 changed files with 35 additions and 2 deletions

View File

@ -545,8 +545,7 @@ fn mk_test_desc_and_fn_rec(cx: &TestCtxt, test: &Test) -> Gc<ast::Expr> {
let mut visible_path = match cx.toplevel_reexport {
Some(id) => vec![id],
None => {
cx.sess.span_bug(
DUMMY_SP,
cx.sess.bug(
"expected to find top-level re-export name, but found None"
);
}

View File

@ -0,0 +1,14 @@
// 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.
// compile-flags:--test
// This verifies that the test generation doesn't crash when we have
// no tests - for more information, see PR #16892.

View File

@ -0,0 +1,20 @@
// 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.
// compile-flags:--test
#![feature(globs)]
mod test {
use super::*;
#[test]
fn test(){}
}