(t *testing.T)
| 27 | } |
| 28 | |
| 29 | func TestAutoMemoryLimitFormat(t *testing.T) { |
| 30 | // Reset cached value so test is independent |
| 31 | autoMemoryLimitOnce = sync.Once{} |
| 32 | autoMemoryLimitValue = "" |
| 33 | |
| 34 | result := AutoMemoryLimit() |
| 35 | // Should end with GB or MB |
| 36 | validSuffix := false |
| 37 | for _, suffix := range []string{"GB", "MB"} { |
| 38 | if len(result) > len(suffix) && result[len(result)-len(suffix):] == suffix { |
| 39 | validSuffix = true |
| 40 | break |
| 41 | } |
| 42 | } |
| 43 | if !validSuffix { |
| 44 | t.Fatalf("AutoMemoryLimit returned %q, expected suffix GB or MB", result) |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | func TestAutoMemoryLimitCached(t *testing.T) { |
| 49 | // Reset and call twice — should return same value |
nothing calls this directly
no test coverage detected