diff options
author | Marc Pervaz Boocha <marcpervaz@qburst.com> | 2025-02-21 18:24:35 +0530 |
---|---|---|
committer | Marc Pervaz Boocha <marcpervaz@qburst.com> | 2025-02-21 18:24:35 +0530 |
commit | a470aa89cbdabba813636b8a29be8ae3836c03a0 (patch) | |
tree | 2551bebaff980cc93bf8fcf60dd8ff50bd7efc48 /internal/pausedtimer/timer_test.go | |
parent | Add Tests and benchmarks (diff) | |
download | cache-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 '')
-rw-r--r-- | internal/pausedtimer/timer_test.go (renamed from utils_test.go) | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/utils_test.go b/internal/pausedtimer/timer_test.go index 329b166..6e15001 100644 --- a/utils_test.go +++ b/internal/pausedtimer/timer_test.go @@ -1,4 +1,4 @@ -package cache +package pausedtimer import ( "testing" @@ -7,16 +7,16 @@ import ( "github.com/stretchr/testify/assert" ) -func TestNewPauseTimer(t *testing.T) { +func TestNew(t *testing.T) { d := 1 * time.Second - timer := newPauseTimer(d) + timer := New(d) assert.Equal(t, d, timer.duration) assert.NotNil(t, timer.Ticker) } func TestPauseTimerReset(t *testing.T) { d := 1 * time.Second - timer := newPauseTimer(d) + timer := New(d) newD := 2 * time.Second timer.Reset(newD) assert.Equal(t, newD, timer.duration) @@ -24,13 +24,13 @@ func TestPauseTimerReset(t *testing.T) { func TestPauseTimerResume(t *testing.T) { d := 1 * time.Second - timer := newPauseTimerStopped(d) + timer := NewStopped(d) timer.Resume() assert.Equal(t, d, timer.duration) } func TestPauseTimerGetDuration(t *testing.T) { d := 1 * time.Second - timer := newPauseTimer(d) + timer := New(d) assert.Equal(t, d, timer.GetDuration()) } |