Exemplo n.º 1
0
func runStorageTest(f func(test.TestStorageDriver, *testing.T), t *testing.T) {
	maxSize := 200

	var driver storage.StorageDriver
	var testDriver test.TestStorageDriver
	testDriver.StatsEq = test.DefaultStatsEq
	for N := 10; N < maxSize; N += 10 {
		driver = New(N, N)
		testDriver.Driver = driver
		f(testDriver, t)
	}

}
Exemplo n.º 2
0
func runStorageTest(f func(test.TestStorageDriver, *testing.T), t *testing.T) {
	maxSize := 200

	var driver storage.StorageDriver
	var testDriver test.TestStorageDriver
	testDriver.StatsEq = test.DefaultStatsEq
	for N := 10; N < maxSize; N += 10 {
		backend := memory.New(N*2, N*2)
		driver = MemoryCache(N, N, backend)
		testDriver.Driver = driver
		f(testDriver, t)
	}

}