(t *testing.T)
| 205 | } |
| 206 | |
| 207 | func TestIsAllDigits(t *testing.T) { |
| 208 | tests := []struct { |
| 209 | s string |
| 210 | want bool |
| 211 | }{ |
| 212 | {"007", true}, |
| 213 | {"0", true}, |
| 214 | {"", false}, |
| 215 | {"+1", false}, |
| 216 | {" 1", false}, |
| 217 | {"1.0", false}, |
| 218 | {"abc", false}, |
| 219 | } |
| 220 | |
| 221 | for _, tt := range tests { |
| 222 | t.Run(tt.s, func(t *testing.T) { |
| 223 | if got := isAllDigits(tt.s); got != tt.want { |
| 224 | t.Errorf("isAllDigits(%q) = %v, want %v", tt.s, got, tt.want) |
| 225 | } |
| 226 | }) |
| 227 | } |
| 228 | } |
| 229 | |
| 230 | func TestHandleEnvelope(t *testing.T) { |
| 231 | h := &handler{} // no db — structured storage silently skipped |
nothing calls this directly
no test coverage detected