]> git.lizzy.rs Git - rust.git/commitdiff
Fix a warning when generating tests
authorAlex Crichton <alex@alexcrichton.com>
Thu, 4 Jul 2013 21:58:02 +0000 (14:58 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Mon, 8 Jul 2013 02:03:57 +0000 (19:03 -0700)
src/librustc/front/test.rs
src/test/run-pass/test-ignore-cfg.rs

index f2670a663ea0c4ce14d5ee0dac007da1ea930c5a..f4d89f559f23ea841a45cc68f6f57394b07dc6c8 100644 (file)
@@ -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();
 
@@ -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()
index e7a23244c06bcfd1ca4d41ae70d03112baf7da2a..e54bc7404b4403547edb57360fd59a060f041700 100644 (file)
@@ -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));