aboutsummaryrefslogtreecommitdiffstats
path: root/utils_test.go
diff options
context:
space:
mode:
authorMarc Pervaz Boocha <marcpervaz@qburst.com>2025-02-21 18:24:35 +0530
committerMarc Pervaz Boocha <marcpervaz@qburst.com>2025-02-21 18:24:35 +0530
commita470aa89cbdabba813636b8a29be8ae3836c03a0 (patch)
tree2551bebaff980cc93bf8fcf60dd8ff50bd7efc48 /utils_test.go
parentAdd Tests and benchmarks (diff)
downloadcache-a470aa89cbdabba813636b8a29be8ae3836c03a0.tar
cache-a470aa89cbdabba813636b8a29be8ae3836c03a0.tar.gz
cache-a470aa89cbdabba813636b8a29be8ae3836c03a0.tar.bz2
cache-a470aa89cbdabba813636b8a29be8ae3836c03a0.tar.lz
cache-a470aa89cbdabba813636b8a29be8ae3836c03a0.tar.xz
cache-a470aa89cbdabba813636b8a29be8ae3836c03a0.tar.zst
cache-a470aa89cbdabba813636b8a29be8ae3836c03a0.zip
Added LTR Eviction
Diffstat (limited to 'utils_test.go')
-rw-r--r--utils_test.go36
1 files changed, 0 insertions, 36 deletions
diff --git a/utils_test.go b/utils_test.go
deleted file mode 100644
index 329b166..0000000
--- a/utils_test.go
+++ /dev/null
@@ -1,36 +0,0 @@
-package cache
-
-import (
- "testing"
- "time"
-
- "github.com/stretchr/testify/assert"
-)
-
-func TestNewPauseTimer(t *testing.T) {
- d := 1 * time.Second
- timer := newPauseTimer(d)
- assert.Equal(t, d, timer.duration)
- assert.NotNil(t, timer.Ticker)
-}
-
-func TestPauseTimerReset(t *testing.T) {
- d := 1 * time.Second
- timer := newPauseTimer(d)
- newD := 2 * time.Second
- timer.Reset(newD)
- assert.Equal(t, newD, timer.duration)
-}
-
-func TestPauseTimerResume(t *testing.T) {
- d := 1 * time.Second
- timer := newPauseTimerStopped(d)
- timer.Resume()
- assert.Equal(t, d, timer.duration)
-}
-
-func TestPauseTimerGetDuration(t *testing.T) {
- d := 1 * time.Second
- timer := newPauseTimer(d)
- assert.Equal(t, d, timer.GetDuration())
-}