From c1f27e3d9e6f18280ffd07edfac0dc0287b3ad9c Mon Sep 17 00:00:00 2001
From: kirbylife <kirbylife@protonmail.com>
Date: Fri, 20 May 2022 00:31:43 -0500
Subject: [PATCH] add some basic tests

---
 tests/unit_tests.rs | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 tests/unit_tests.rs

diff --git a/tests/unit_tests.rs b/tests/unit_tests.rs
new file mode 100644
index 0000000..a2bdf8c
--- /dev/null
+++ b/tests/unit_tests.rs
@@ -0,0 +1,25 @@
+use inflate_nostd::inflate_bytes;
+
+#[test]
+fn sample_example() {
+    let encoded = [203, 72, 205, 201, 201, 87, 40, 207, 47, 202, 73, 1, 0];
+    let decoded = inflate_bytes(&encoded[..]).unwrap();
+    assert_eq!(decoded, "hello world".as_bytes());
+}
+
+#[test]
+fn sample_example2() {
+    let encoded = [203, 72, 205, 201, 201, 87, 40, 207, 47, 202, 73, 1, 0];
+    let decoded = inflate_bytes(&encoded[..]);
+    assert_eq!(decoded.unwrap(), "hello world".as_bytes());
+}
+
+#[test]
+fn another_sample_example() {
+    let encoded = [
+        203, 201, 207, 207, 86, 200, 205, 207, 213, 81, 40, 207, 44, 201, 200, 47, 45, 81, 40, 46,
+        73, 1, 0,
+    ];
+    let decoded = inflate_bytes(&encoded[..]);
+    assert_eq!(decoded.unwrap(), "look mom, without std".as_bytes());
+}