From 49a4e727fd864da271c72ee6a53f1b315a959efd Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Wed, 20 Nov 2024 10:55:24 +0300 Subject: [PATCH] [#1507] timer/test: Use const for constants Make it easy to see what the test is about. Signed-off-by: Evgenii Stratonikov --- pkg/morph/timer/block_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/morph/timer/block_test.go b/pkg/morph/timer/block_test.go index 615631dcb..a144b3db6 100644 --- a/pkg/morph/timer/block_test.go +++ b/pkg/morph/timer/block_test.go @@ -18,7 +18,7 @@ func tickN(t *timer.BlockTimer, n uint32) { // "resetting" consists of ticking the current height as well and invoking `Reset`. func TestIRBlockTimer_Reset(t *testing.T) { var baseCounter [2]int - blockDur := uint32(3) + const blockDur = uint32(3) bt1 := timer.NewBlockTimer( func() (uint32, error) { return blockDur, nil }, @@ -82,7 +82,7 @@ func TestBlockTimer_ResetChangeDuration(t *testing.T) { } func TestBlockTimer(t *testing.T) { - blockDur := uint32(10) + const blockDur = uint32(10) baseCallCounter := uint32(0) bt := timer.NewBlockTimer(timer.StaticBlockMeter(blockDur), func() {