本文整理匯總了Golang中andals/gobox/misc.PrintCallerFuncNameForTest函數的典型用法代碼示例。如果您正苦於以下問題:Golang PrintCallerFuncNameForTest函數的具體用法?Golang PrintCallerFuncNameForTest怎麽用?Golang PrintCallerFuncNameForTest使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了PrintCallerFuncNameForTest函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: TestDaoDeleteById
func TestDaoDeleteById(t *testing.T) {
misc.PrintCallerFuncNameForTest()
r, e := dao.DeleteById(TABLE_NAME, 1)
fmt.Println(r, e)
}
示例2: TestSQBUpdate
func TestSQBUpdate(t *testing.T) {
misc.PrintCallerFuncNameForTest()
sqb.Update(TABLE_NAME)
printQueryAndArgs()
}
示例3: TestSQBInsert
func TestSQBInsert(t *testing.T) {
misc.PrintCallerFuncNameForTest()
sqb.Insert(TABLE_NAME, "id", "add_time", "edit_time", "name")
printQueryAndArgs()
}
示例4: TestSQBHaving
func TestSQBHaving(t *testing.T) {
misc.PrintCallerFuncNameForTest()
sqb.HavingConditionAnd(
NewColQueryItem("id", COND_GREATER, 3),
)
printQueryAndArgs()
}
示例5: TestSQBSelect
func TestSQBSelect(t *testing.T) {
misc.PrintCallerFuncNameForTest()
sqb.Select("*", TABLE_NAME)
printQueryAndArgs()
sqb.Select("name, count(*)", TABLE_NAME)
printQueryAndArgs()
}
示例6: TestMd5
func TestMd5(t *testing.T) {
misc.PrintCallerFuncNameForTest()
md5 := Md5([]byte("abc"))
if len(md5) != 32 {
t.Error(string(md5))
}
t.Log(string(md5))
}
示例7: TestSQBValues
func TestSQBValues(t *testing.T) {
misc.PrintCallerFuncNameForTest()
sqb.Values(
[]interface{}{1, "2016-06-23 09:00:00", "2016-06-23 09:00:00", "a"},
[]interface{}{2, "2016-06-23 09:10:00", "2016-06-23 09:10:00", "b"},
)
printQueryAndArgs()
}
示例8: TestSQBSet
func TestSQBSet(t *testing.T) {
misc.PrintCallerFuncNameForTest()
sqb.Set(
NewColQueryItem("name", "", "d"),
NewColQueryItem("edit_time", "", "2016-06-24 09:00:00"),
)
printQueryAndArgs()
}
示例9: TestDaoSelectById
func TestDaoSelectById(t *testing.T) {
misc.PrintCallerFuncNameForTest()
r := dao.SelectById(
"*",
TABLE_NAME,
7,
)
fmt.Println(r)
}
示例10: TestDaoUpdateById
func TestDaoUpdateById(t *testing.T) {
misc.PrintCallerFuncNameForTest()
r, e := dao.UpdateById(
TABLE_NAME,
7,
NewColQueryItem("name", "", "e"),
)
fmt.Println(r, e)
}
示例11: TestSQBWhere
func TestSQBWhere(t *testing.T) {
misc.PrintCallerFuncNameForTest()
sqb.WhereConditionAnd(
NewColQueryItem("id", COND_IN, 1, 2),
NewColQueryItem("add_time", COND_BETWEEN, "2016-06-23 00:00:00", "2016-06-25 00:00:00"),
NewColQueryItem("edit_time", COND_EQUAL, "2016-06-24 09:00:00"),
NewColQueryItem("name", COND_LIKE, "%a%"),
)
printQueryAndArgs()
}
示例12: TestDaoInsert
func TestDaoInsert(t *testing.T) {
misc.PrintCallerFuncNameForTest()
r, e := dao.Insert(
TABLE_NAME,
[]string{"name"},
[]interface{}{"a"},
[]interface{}{"b"},
[]interface{}{"c"},
)
fmt.Println(r, e)
}
示例13: TestSetGet
func TestSetGet(t *testing.T) {
misc.PrintCallerFuncNameForTest()
for i := 0; i < 10000; i++ {
key := misc.Md5([]byte(strconv.Itoa(i)))
smap.Set(key, i)
v, ok := smap.Get(key)
if !ok || v != i {
t.Error(v, ok)
}
}
}
示例14: TestSetGet
func TestSetGet(t *testing.T) {
misc.PrintCallerFuncNameForTest()
for i := 0; i < 10000; i++ {
key := getIntMd5(i)
smap.Set(key, i)
v, ok := smap.Get(key)
if !ok || v != i {
t.Error(v, ok)
}
}
}
示例15: TestWalkDel
func TestWalkDel(t *testing.T) {
misc.PrintCallerFuncNameForTest()
smap.Walk(func(k string, v interface{}) {
//t.Log(k, v)
smap.Del(k)
_, ok := smap.Get(k)
if ok {
t.Error(v, ok)
}
})
}