File size: 403 Bytes
7107f0b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
package common
import "testing"
func TestIsApply(t *testing.T) {
datas := []struct {
metaPath string
reqPath string
applySub bool
result bool
}{
{
metaPath: "/",
reqPath: "/test",
applySub: true,
result: true,
},
}
for i, data := range datas {
if IsApply(data.metaPath, data.reqPath, data.applySub) != data.result {
t.Errorf("TestIsApply %d failed", i)
}
}
}
|