You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
334 B
25 lines
334 B
package service
|
|
|
|
import (
|
|
"fmt"
|
|
"log"
|
|
"testing"
|
|
"time"
|
|
)
|
|
|
|
func TestJudgeTimeDiff(t *testing.T) {
|
|
curr := time.Now().Unix()
|
|
ok := JudgeTimeDiff(curr-86400, fmt.Sprint(curr), 8000)
|
|
|
|
if ok {
|
|
log.Panicln(ok)
|
|
}
|
|
}
|
|
|
|
func TestJudgeQuantityRatio(t *testing.T) {
|
|
ok := JudgeQuantityRatio(2, 3, 0.5)
|
|
|
|
if !ok {
|
|
log.Panicln(ok)
|
|
}
|
|
}
|
|
|