Address review comments, add tests
This commit is contained in:
parent
1c49eaaa55
commit
5bb6196378
@ -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"
|
||||
);
|
||||
}
|
||||
|
14
src/test/run-pass/issue-16597-empty.rs
Normal file
14
src/test/run-pass/issue-16597-empty.rs
Normal 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.
|
20
src/test/run-pass/issue-16597.rs
Normal file
20
src/test/run-pass/issue-16597.rs
Normal 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(){}
|
||||
}
|
Loading…
Reference in New Issue
Block a user