(t *testing.T)
| 95 | name string |
| 96 | length int32 |
| 97 | }{ |
| 98 | {"negative", -1}, |
| 99 | {"most_negative", -2147483648}, |
| 100 | {"zero", 0}, |
| 101 | {"below_length_field", 3}, |
| 102 | {"length_only_no_version", 4}, // would slice remaining[:4] out of range |
| 103 | {"partial_version", 7}, |
| 104 | {"just_over_cap", maxStartupMessageLength + 1}, |
| 105 | {"absurdly_large", 2147483647}, // would allocate ~2GiB |
| 106 | } |
| 107 | for _, tc := range cases { |
| 108 | t.Run(tc.name, func(t *testing.T) { |
nothing calls this directly
no test coverage detected