订单计算相关
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.

30 lines
376 B

3 years ago
  1. package ordercalc
  2. import (
  3. "testing"
  4. "time"
  5. )
  6. func Test_NewNumber(t *testing.T) {
  7. t.Log(time.Now().UnixNano())
  8. var set map[string]int
  9. set = make(map[string]int)
  10. var i, reply int = 0, 0
  11. var num string
  12. for i < 100000 {
  13. i++
  14. num = VerifyNumber()
  15. if _, ok := set[num]; ok {
  16. reply++
  17. } else {
  18. set[num] = i
  19. }
  20. }
  21. t.Log("reply:", reply)
  22. // t.Log(set)
  23. }