summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRoy7Kim <myoungwoon.kim@samsung.com>2023-05-10 13:28:13 +0900
committerRoy7Kim <myoungwoon.kim@samsung.com>2023-05-10 13:28:13 +0900
commit650a5ccb2fb3e1294ef0a51c86a1aae9a6cca8b0 (patch)
tree5ad796c1e932e4be672c3ec205a10aec480b6997 /tests
downloadrust-assert_matches-650a5ccb2fb3e1294ef0a51c86a1aae9a6cca8b0.tar.gz
rust-assert_matches-650a5ccb2fb3e1294ef0a51c86a1aae9a6cca8b0.tar.bz2
rust-assert_matches-650a5ccb2fb3e1294ef0a51c86a1aae9a6cca8b0.zip
Import assert_matches 1.5.0upstream/1.5.0upstream
Diffstat (limited to 'tests')
-rw-r--r--tests/selective_import1.rs9
-rw-r--r--tests/selective_import2.rs9
2 files changed, 18 insertions, 0 deletions
diff --git a/tests/selective_import1.rs b/tests/selective_import1.rs
new file mode 100644
index 0000000..7d8f8b4
--- /dev/null
+++ b/tests/selective_import1.rs
@@ -0,0 +1,9 @@
+#[macro_use(assert_matches)]
+extern crate assert_matches;
+
+#[test]
+fn test_assert_succeed() {
+ let a = 42u32;
+
+ assert_matches!(a, 42);
+}
diff --git a/tests/selective_import2.rs b/tests/selective_import2.rs
new file mode 100644
index 0000000..b983e35
--- /dev/null
+++ b/tests/selective_import2.rs
@@ -0,0 +1,9 @@
+#[macro_use(debug_assert_matches)]
+extern crate assert_matches;
+
+#[test]
+fn test_assert_succeed() {
+ let a = 42u32;
+
+ debug_assert_matches!(a, 42);
+}