1
0

inbound_traffic_reset_test.go 337 B

123456789101112131415161718
  1. package service
  2. import "testing"
  3. func TestNormalizeTrafficResetDay(t *testing.T) {
  4. tests := map[int]int{
  5. 0: 1,
  6. 1: 1,
  7. 15: 15,
  8. 31: 31,
  9. 32: 31,
  10. }
  11. for input, want := range tests {
  12. if got := normalizeTrafficResetDay(input); got != want {
  13. t.Errorf("normalizeTrafficResetDay(%d) = %d, want %d", input, got, want)
  14. }
  15. }
  16. }