summaryrefslogtreecommitdiffstats
path: root/library/core/tests/macros.rs
diff options
context:
space:
mode:
Diffstat (limited to 'library/core/tests/macros.rs')
-rw-r--r--library/core/tests/macros.rs20
1 files changed, 20 insertions, 0 deletions
diff --git a/library/core/tests/macros.rs b/library/core/tests/macros.rs
new file mode 100644
index 000000000..ff3632e35
--- /dev/null
+++ b/library/core/tests/macros.rs
@@ -0,0 +1,20 @@
+#[test]
+fn assert_eq_trailing_comma() {
+ assert_eq!(1, 1,);
+}
+
+#[test]
+fn assert_escape() {
+ assert!(r#"☃\backslash"#.contains("\\"));
+}
+
+#[test]
+fn assert_ne_trailing_comma() {
+ assert_ne!(1, 2,);
+}
+
+#[rustfmt::skip]
+#[test]
+fn matches_leading_pipe() {
+ matches!(1, | 1 | 2 | 3);
+}