summaryrefslogtreecommitdiff
path: root/ds/integer_test.go
diff options
context:
space:
mode:
authorPaul Buetow <pbuetow@mimecast.com>2020-08-08 13:27:43 +0100
committerPaul Buetow <pbuetow@mimecast.com>2020-08-08 13:27:43 +0100
commit44e930b71107310eae55060cf0aa2cac7089d239 (patch)
tree2b5c1cc62bc51a87d75393a80053ffe85db043cb /ds/integer_test.go
parent390333bb314f6cb25adc5716ea383112860ed342 (diff)
fortune not found
Quick commit
Diffstat (limited to 'ds/integer_test.go')
-rw-r--r--ds/integer_test.go42
1 files changed, 0 insertions, 42 deletions
diff --git a/ds/integer_test.go b/ds/integer_test.go
deleted file mode 100644
index fe9cb90..0000000
--- a/ds/integer_test.go
+++ /dev/null
@@ -1,42 +0,0 @@
-package ds
-
-import "testing"
-
-func TestCompare(t *testing.T) {
- i := Integer{1}
- j := Integer{10}
- res := i.Compare(j)
- if res != -1 {
- t.Errorf("%v must be lower than %v, but got %v", i, j, res)
- }
-
- res = j.Compare(i)
- if res != 1 {
- t.Errorf("%v must be higher than %v, but got %v", j, i, res)
- }
-
- i = Integer{2}
- j = Integer{2}
- res = i.Compare(j)
- if res != 0 {
- t.Errorf("%v must be equal to %v, but got %v", i, j, res)
- }
-
- i = Integer{23}
- j = Integer{23}
- if !i.HigherEqual(j) {
- t.Errorf("Unpexpected %v.HigherEqual(%v) == false",
- i,j)
- }
-
- i = Integer{23}
- j = Integer{42}
- if i.HigherEqual(j) {
- t.Errorf("Unpexpected %v.HigherEqual(%v) == true",
- i,j)
- }
- if !j.HigherEqual(i) {
- t.Errorf("Unpexpected %v.HigherEqual(%v) == false",
- j,i)
- }
-}