mirror of
https://github.com/gomods/athens
synced 2026-02-03 11:00:32 +00:00
21 lines
330 B
Go
21 lines
330 B
Go
package mem
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/gomods/athens/pkg/index"
|
|
"github.com/gomods/athens/pkg/index/compliance"
|
|
)
|
|
|
|
func TestMem(t *testing.T) {
|
|
indexer := &indexer{}
|
|
compliance.RunTests(t, indexer, indexer.clear)
|
|
}
|
|
|
|
func (i *indexer) clear() error {
|
|
i.mu.Lock()
|
|
i.lines = []*index.Line{}
|
|
i.mu.Unlock()
|
|
return nil
|
|
}
|