@@ -257,15 +257,16 @@ func TestValidateFormType(t *testing.T) {
257
257
return
258
258
}
259
259
260
- // AssumeErrorCases assumes any uncovered test will return an error.
261
- // This ensures all valid test case paths are covered.
260
+ // AssumeErrorCases assumes any uncovered test will return an error. Not covered
261
+ // cases in the truth table are assumed to be invalid. So if the tests above
262
+ // cover all valid cases, this asserts all the invalid cases.
263
+ //
264
+ // This test consequentially ensures all valid cases are covered manually above.
262
265
t .Run ("AssumeErrorCases" , func (t * testing.T ) {
263
266
// requiredChecks loops through all possible form_type and option_type
264
267
// combinations.
265
268
requiredChecks := make ([]formTypeCheck , 0 )
266
- //requiredChecks := make(map[provider.ParameterFormType][]provider.OptionType)
267
269
for _ , ft := range append (provider .ParameterFormTypes (), "" ) {
268
- //requiredChecks[ft] = make([]provider.OptionType, 0)
269
270
for _ , ot := range provider .OptionTypes () {
270
271
requiredChecks = append (requiredChecks , formTypeCheck {
271
272
formType : ft ,
@@ -304,14 +305,15 @@ func TestValidateFormType(t *testing.T) {
304
305
t .Run (fc .name , func (t * testing.T ) {
305
306
t .Parallel ()
306
307
308
+ // This is just helpful log output to give the boilerplate
309
+ // to write the manual test.
307
310
tcText := fmt .Sprintf (`
308
311
obvious(%s, ezconfigOpts{
309
312
Options: %t,
310
313
OptionType: %q,
311
314
FormType: %q,
312
315
}),
313
316
//` , "<expected_form_type>" , check .options , check .optionType , check .formType )
314
- var _ = tcText
315
317
316
318
probablyPassed := formTypeTest (t , fc )
317
319
if ! probablyPassed {
0 commit comments