summaryrefslogtreecommitdiffstats
path: root/src/util_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/util_test.go')
-rw-r--r--src/util_test.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/util_test.go b/src/util_test.go
new file mode 100644
index 00000000..814b42ce
--- /dev/null
+++ b/src/util_test.go
@@ -0,0 +1,18 @@
+package fzf
+
+import "testing"
+
+func TestMax(t *testing.T) {
+ if Max(-2, 5, 1, 4, 3) != 5 {
+ t.Error("Invalid result")
+ }
+}
+
+func TestMin(t *testing.T) {
+ if Min(2, -3) != -3 {
+ t.Error("Invalid result")
+ }
+ if Min(-2, 5, 1, 4, 3) != -2 {
+ t.Error("Invalid result")
+ }
+}