Add integration test
authorMartin Pitt <martin@piware.de>
Tue, 24 Aug 2021 07:56:13 +0000 (09:56 +0200)
committerMartin Pitt <martin@piware.de>
Tue, 24 Aug 2021 07:56:13 +0000 (09:56 +0200)
tests/test_lib.rs [new file with mode: 0644]

diff --git a/tests/test_lib.rs b/tests/test_lib.rs
new file mode 100644 (file)
index 0000000..44d7f87
--- /dev/null
@@ -0,0 +1,8 @@
+use learning::*;
+
+#[test]
+fn test_longest() {
+    assert_eq!(longest("abc", "de"), "abc");
+    assert_eq!(longest("abc", "def"), "def");
+    assert_eq!(longest("abc", "defg"), "defg");
+}