ソースを参照

Fix test case

Unknwon 10 年 前
コミット
35c75f06a0
1 ファイル変更3 行追加3 行削除
  1. 3 3
      modules/captcha/image_test.go

+ 3 - 3
modules/captcha/image_test.go

@@ -7,7 +7,7 @@ package captcha
 import (
 	"testing"
 
-	"github.com/astaxie/beego/utils"
+	"github.com/gogits/gogs/modules/base"
 )
 
 type byteCounter struct {
@@ -21,7 +21,7 @@ func (bc *byteCounter) Write(b []byte) (int, error) {
 
 func BenchmarkNewImage(b *testing.B) {
 	b.StopTimer()
-	d := utils.RandomCreateBytes(challengeNums, defaultChars...)
+	d := base.RandomCreateBytes(challengeNums, defaultChars...)
 	b.StartTimer()
 	for i := 0; i < b.N; i++ {
 		NewImage(d, stdWidth, stdHeight)
@@ -30,7 +30,7 @@ func BenchmarkNewImage(b *testing.B) {
 
 func BenchmarkImageWriteTo(b *testing.B) {
 	b.StopTimer()
-	d := utils.RandomCreateBytes(challengeNums, defaultChars...)
+	d := base.RandomCreateBytes(challengeNums, defaultChars...)
 	b.StartTimer()
 	counter := &byteCounter{}
 	for i := 0; i < b.N; i++ {