mirror of
https://github.com/restic/restic.git
synced 2026-09-22 03:58:31 +00:00
19 lines
274 B
Go
19 lines
274 B
Go
package restic_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/restic/restic/internal/restic"
|
|
)
|
|
|
|
func TestNoopCounter(_ *testing.T) {
|
|
c := restic.NoopCounter
|
|
c.Add(1)
|
|
c.SetMax(42)
|
|
c.Done()
|
|
v, max := c.Get()
|
|
if v != 0 || max != 0 {
|
|
panic("noop counter must not change")
|
|
}
|
|
}
|