about summary refs log tree commit diff
path: root/src/libcore/macros.rs
diff options
context:
space:
mode:
authorSteven Fackler <sfackler@gmail.com>2014-06-28 13:57:36 -0700
committerSteven Fackler <sfackler@gmail.com>2014-06-29 15:57:21 -0700
commit1ed646eaf7d09455a086afa11bcd83a7d2a6b0f4 (patch)
tree3c7bc58191bc3b260c4522c115ddf869b986193f /src/libcore/macros.rs
parentff94f867d29a90ab59060c10a62f65994776a8c4 (diff)
downloadrust-1ed646eaf7d09455a086afa11bcd83a7d2a6b0f4.tar.gz
rust-1ed646eaf7d09455a086afa11bcd83a7d2a6b0f4.zip
Extract tests from libcore to a separate crate
Libcore's test infrastructure is complicated by the fact that many lang
items are defined in the crate. The current approach (realcore/realstd
imports) is hacky and hard to work with (tests inside of core::cmp
haven't been run for months!).

Moving tests to a separate crate does mean that they can only test the
public API of libcore, but I don't feel that that is too much of an
issue. The only tests that I had to get rid of were some checking the
various numeric formatters, but those are also exercised through normal
format! calls in other tests.
Diffstat (limited to 'src/libcore/macros.rs')
-rw-r--r--src/libcore/macros.rs10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/libcore/macros.rs b/src/libcore/macros.rs
index a62bc10d8ab..93c838198c5 100644
--- a/src/libcore/macros.rs
+++ b/src/libcore/macros.rs
@@ -112,16 +112,6 @@ macro_rules! writeln(
     )
 )
 
-#[cfg(test)]
-macro_rules! vec( ($($e:expr),*) => ({
-    let mut _v = ::std::vec::Vec::new();
-    $(_v.push($e);)*
-    _v
-}) )
-
-#[cfg(test)]
-macro_rules! format( ($($arg:tt)*) => (format_args!(::fmt::format, $($arg)*)) )
-
 /// Write some formatted data into a stream.
 ///
 /// Identical to the macro in `std::macros`