當前位置: 首頁>>代碼示例>>Golang>>正文


Golang misc.PrintCallerFuncNameForTest函數代碼示例

本文整理匯總了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)
}
開發者ID:Andals,項目名稱:gobox,代碼行數:7,代碼來源:dao_test.go

示例2: TestSQBUpdate

func TestSQBUpdate(t *testing.T) {
	misc.PrintCallerFuncNameForTest()

	sqb.Update(TABLE_NAME)

	printQueryAndArgs()
}
開發者ID:Andals,項目名稱:gpm,代碼行數:7,代碼來源:simple_query_builder_test.go

示例3: TestSQBInsert

func TestSQBInsert(t *testing.T) {
	misc.PrintCallerFuncNameForTest()

	sqb.Insert(TABLE_NAME, "id", "add_time", "edit_time", "name")

	printQueryAndArgs()
}
開發者ID:Andals,項目名稱:gpm,代碼行數:7,代碼來源:simple_query_builder_test.go

示例4: TestSQBHaving

func TestSQBHaving(t *testing.T) {
	misc.PrintCallerFuncNameForTest()

	sqb.HavingConditionAnd(
		NewColQueryItem("id", COND_GREATER, 3),
	)
	printQueryAndArgs()
}
開發者ID:Andals,項目名稱:gpm,代碼行數:8,代碼來源:simple_query_builder_test.go

示例5: TestSQBSelect

func TestSQBSelect(t *testing.T) {
	misc.PrintCallerFuncNameForTest()

	sqb.Select("*", TABLE_NAME)
	printQueryAndArgs()

	sqb.Select("name, count(*)", TABLE_NAME)
	printQueryAndArgs()
}
開發者ID:Andals,項目名稱:gpm,代碼行數:9,代碼來源:simple_query_builder_test.go

示例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))
}
開發者ID:Andals,項目名稱:gobox,代碼行數:10,代碼來源:md5_test.go

示例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()
}
開發者ID:Andals,項目名稱:gpm,代碼行數:10,代碼來源:simple_query_builder_test.go

示例8: TestSQBSet

func TestSQBSet(t *testing.T) {
	misc.PrintCallerFuncNameForTest()

	sqb.Set(
		NewColQueryItem("name", "", "d"),
		NewColQueryItem("edit_time", "", "2016-06-24 09:00:00"),
	)

	printQueryAndArgs()
}
開發者ID:Andals,項目名稱:gpm,代碼行數:10,代碼來源:simple_query_builder_test.go

示例9: TestDaoSelectById

func TestDaoSelectById(t *testing.T) {
	misc.PrintCallerFuncNameForTest()

	r := dao.SelectById(
		"*",
		TABLE_NAME,
		7,
	)

	fmt.Println(r)
}
開發者ID:Andals,項目名稱:gobox,代碼行數:11,代碼來源:dao_test.go

示例10: TestDaoUpdateById

func TestDaoUpdateById(t *testing.T) {
	misc.PrintCallerFuncNameForTest()

	r, e := dao.UpdateById(
		TABLE_NAME,
		7,
		NewColQueryItem("name", "", "e"),
	)

	fmt.Println(r, e)
}
開發者ID:Andals,項目名稱:gobox,代碼行數:11,代碼來源:dao_test.go

示例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()
}
開發者ID:Andals,項目名稱:gpm,代碼行數:11,代碼來源:simple_query_builder_test.go

示例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)
}
開發者ID:Andals,項目名稱:gobox,代碼行數:13,代碼來源:dao_test.go

示例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)
		}
	}
}
開發者ID:Andals,項目名稱:gpm,代碼行數:13,代碼來源:shardmap_test.go

示例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)
		}
	}
}
開發者ID:Andals,項目名稱:gobox,代碼行數:13,代碼來源:shardmap_test.go

示例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)
		}
	})
}
開發者ID:Andals,項目名稱:gobox,代碼行數:14,代碼來源:shardmap_test.go


注:本文中的andals/gobox/misc.PrintCallerFuncNameForTest函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。