(t *testing.T)
| 5 | ) |
| 6 | |
| 7 | func TestIsNumericValue(t *testing.T) { |
| 8 | tests := []struct { |
| 9 | name string |
| 10 | input string |
| 11 | expected bool |
| 12 | }{ |
| 13 | {"Integer", "123", true}, |
| 14 | {"Negative integer", "-456", true}, |
| 15 | {"Float", "123.456", true}, |
| 16 | {"Negative float", "-123.456", true}, |
| 17 | {"Scientific notation", "1.23e10", true}, |
| 18 | {"Scientific negative", "1.23e-10", true}, |
| 19 | {"With comma separator", "1,234.56", true}, |
| 20 | {"With underscore", "1_234_567", true}, |
| 21 | {"Empty string", "", false}, |
| 22 | {"Text", "abc", false}, |
| 23 | {"Mixed text and numbers", "123abc", false}, |
| 24 | {"Just dot", ".", false}, |
| 25 | {"Just sign", "-", false}, |
| 26 | {"Multiple dots", "1.2.3", false}, |
| 27 | } |
| 28 | |
| 29 | for _, tt := range tests { |
| 30 | t.Run(tt.name, func(t *testing.T) { |
| 31 | result := isNumericValue(tt.input) |
| 32 | if result != tt.expected { |
| 33 | t.Errorf("isNumericValue(%q) = %v, want %v", tt.input, result, tt.expected) |
| 34 | } |
| 35 | }) |
| 36 | } |
| 37 | } |
| 38 | |
| 39 | func TestIsDateValue(t *testing.T) { |
| 40 | tests := []struct { |
nothing calls this directly
no test coverage detected