Skip to content

Fix a warning when generating tests #7591

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 8, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/librustc/front/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ fn mk_test_module(cx: &TestCtxt) -> @ast::item {
let mainfn = (quote_item!(
pub fn main() {
#[main];
extra::test::test_main_static(::std::os::args(), tests);
extra::test::test_main_static(::std::os::args(), TESTS);
}
)).get();

Expand Down Expand Up @@ -366,7 +366,7 @@ fn mk_tests(cx: &TestCtxt) -> @ast::item {
let test_descs = mk_test_descs(cx);

(quote_item!(
pub static tests : &'static [self::extra::test::TestDescAndFn] =
pub static TESTS : &'static [self::extra::test::TestDescAndFn] =
$test_descs
;
)).get()
Expand Down
2 changes: 1 addition & 1 deletion src/test/run-pass/test-ignore-cfg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ fn shouldnotignore() {
#[test]
fn checktests() {
// Pull the tests out of the secreturn test module
let tests = __test::tests;
let tests = __test::TESTS;

assert!(
tests.iter().any_(|t| t.desc.name.to_str() == ~"shouldignore" && t.desc.ignore));
Expand Down