dao_test.go 409 B

12345678910111213141516171819202122
  1. package app
  2. import (
  3. "github.com/gogf/gf/frame/g"
  4. "testing"
  5. "youngmini_server/app/dao"
  6. )
  7. func TestGetProductDataList(t *testing.T) {
  8. recordJson, err := dao.Product.GetProductDataList(0, 10)
  9. if err != nil {
  10. t.Error("测试失败")
  11. }
  12. g.Log(recordJson)
  13. }
  14. func BenchmarkGetProductDataList(b *testing.B) {
  15. for i := 0; i < b.N; i++ {
  16. dao.Product.GetProductDataList(0, 10)
  17. }
  18. }