diff options
| author | Michael Lamparski <diagonaldevice@gmail.com> | 2018-02-14 02:15:27 -0500 |
|---|---|---|
| committer | Michael Lamparski <diagonaldevice@gmail.com> | 2018-02-14 02:15:27 -0500 |
| commit | 9205f3d8e33fab70c89d0e283442c4b4d8b63b35 (patch) | |
| tree | b2303dcb11442d6d09221046cd2d3f4f119253d7 | |
| parent | b7c6dc6c0600eaee4d149c63dd3cf1faa00a098f (diff) | |
| download | rust-9205f3d8e33fab70c89d0e283442c4b4d8b63b35.tar.gz rust-9205f3d8e33fab70c89d0e283442c4b4d8b63b35.zip | |
macro-commas test cleanup
| -rw-r--r-- | src/test/run-pass/macro-comma-behavior.rs | 6 | ||||
| -rw-r--r-- | src/test/run-pass/macro-comma-support.rs | 18 |
2 files changed, 5 insertions, 19 deletions
diff --git a/src/test/run-pass/macro-comma-behavior.rs b/src/test/run-pass/macro-comma-behavior.rs index f8065f0ff14..2a434009e13 100644 --- a/src/test/run-pass/macro-comma-behavior.rs +++ b/src/test/run-pass/macro-comma-behavior.rs @@ -44,12 +44,12 @@ fn debug_assert_1arg() { // make sure we don't accidentally forward to `write!("text")` #[cfg(std)] #[test] -fn writeln_2arg() { +fn writeln_1arg() { use fmt::Write; let mut s = String::new(); - writeln!(&mut s, "hi",).unwrap(); - assert_eq!(&s, "hi\n"); + writeln!(&mut s,).unwrap(); + assert_eq!(&s, "\n"); } // A number of format_args-like macros have special-case treatment diff --git a/src/test/run-pass/macro-comma-support.rs b/src/test/run-pass/macro-comma-support.rs index f73dfb7b3b1..7d3f16728b2 100644 --- a/src/test/run-pass/macro-comma-support.rs +++ b/src/test/run-pass/macro-comma-support.rs @@ -8,15 +8,10 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// This is a comprehensive test of invocations with and without +// This is meant to be a comprehensive test of invocations with/without // trailing commas (or other, similar optionally-trailing separators). // Every macro is accounted for, even those not tested in this file. // (There will be a note indicating why). -// -// The expectation is for this to be updated as new macros are added, -// or as functionality is added to existing macros. -// -// (FIXME: (please discuss in PR) is the above expectation reasonable?) // std and core are both tested because they may contain separate // implementations for some macro_rules! macros as an implementation @@ -245,16 +240,7 @@ fn println() { println!("hello {}", "world",); } -// FIXME: select! (please discuss in PR) -// -// Test cases for select! are obnoxiously large, see here: -// -// https://github.com/ExpHP/rust-macro-comma-test/blob/0062e75e01ab/src/main.rs#L190-L250 -// -// and due to other usability issues described there, it is unclear to me that it is -// going anywhere in its current state. This is a job far too big for a macro_rules! macro, -// and for as long as it exists in this form it will have many many problems far worse than -// just lack of trailing comma support. +// select! is too troublesome and unlikely to be stabilized // stringify! is N/A |
