1 Star 0 Fork 0

大地缸 / migrate

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
util_test.go 571 Bytes
一键复制 编辑 原始数据 按行查看 历史
package migrate
import (
nurl "net/url"
"testing"
)
func TestSuintPanicsWithNegativeInput(t *testing.T) {
defer func() {
if r := recover(); r == nil {
t.Fatal("expected suint to panic for -1")
}
}()
suint(-1)
}
func TestSuint(t *testing.T) {
if u := suint(0); u != 0 {
t.Fatalf("expected 0, got %v", u)
}
}
func TestFilterCustomQuery(t *testing.T) {
n, err := nurl.Parse("foo://host?a=b&x-custom=foo&c=d")
if err != nil {
t.Fatal(err)
}
nx := FilterCustomQuery(n).Query()
if nx.Get("x-custom") != "" {
t.Fatalf("didn't expect x-custom")
}
}
1
https://gitee.com/54dg/migrate.git
git@gitee.com:54dg/migrate.git
54dg
migrate
migrate
master

搜索帮助