1
0
Fork 0
mirror of https://github.com/restic/restic.git synced 2024-12-23 08:16:36 +00:00

mem: Add benchmarks

This commit is contained in:
Alexander Neumann 2017-05-13 21:47:01 +02:00
parent e009c002ba
commit 13946e7db7

View file

@ -14,8 +14,8 @@ type memConfig struct {
be restic.Backend
}
func TestSuiteBackendMem(t *testing.T) {
suite := test.Suite{
func newTestSuite() *test.Suite {
return &test.Suite{
// NewConfig returns a config for a new temporary backend that will be used in tests.
NewConfig: func() (interface{}, error) {
return &memConfig{}, nil
@ -54,6 +54,12 @@ func TestSuiteBackendMem(t *testing.T) {
return nil
},
}
suite.RunTests(t)
}
func TestSuiteBackendMem(t *testing.T) {
newTestSuite().RunTests(t)
}
func BenchmarkSuiteBackendMem(t *testing.B) {
newTestSuite().RunBenchmarks(t)
}