update unit test cases

This commit is contained in:
John
2019-03-12 23:47:27 +08:00
parent e71c837472
commit bd0baceeca

View File

@ -1,37 +0,0 @@
// Copyright 2017 gf Author(https://github.com/gogf/gf). All Rights Reserved.
//
// This Source Code Form is subject to the terms of the MIT License.
// If a copy of the MIT was not distributed with this file,
// You can obtain one at https://github.com/gogf/gf.
package gspath
import (
"testing"
)
var (
sp = New()
)
func init() {
sp.Add("/Users/john/Temp")
}
func Benchmark_Search(b *testing.B) {
for i := 0; i < b.N; i++ {
sp.Search("1")
}
}
func Benchmark_Search_None(b *testing.B) {
for i := 0; i < b.N; i++ {
sp.Search("1000")
}
}
func Benchmark_Search_IndexFiles(b *testing.B) {
for i := 0; i < b.N; i++ {
sp.Search("1", "index.html")
}
}