]> git.lizzy.rs Git - rust.git/commitdiff
macro-commas test cleanup
authorMichael Lamparski <diagonaldevice@gmail.com>
Wed, 14 Feb 2018 07:15:27 +0000 (02:15 -0500)
committerMichael Lamparski <diagonaldevice@gmail.com>
Wed, 14 Feb 2018 07:15:27 +0000 (02:15 -0500)
src/test/run-pass/macro-comma-behavior.rs
src/test/run-pass/macro-comma-support.rs

index f8065f0ff148b654071d9f7eedac0b47b5006665..2a434009e134faf612afaf554300062ba76ef935 100644 (file)
@@ -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
index f73dfb7b3b1d45726564b2eea9df3d96cf890d53..7d3f16728b27940bb9ea37f3bab540d67d9a90e5 100644 (file)
@@ -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