Skip to content

Commit f21c732

Browse files
committed
add comment
1 parent 5d485d6 commit f21c732

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

provider/formtype_test.go

+7-5
Original file line numberDiff line numberDiff line change
@@ -257,15 +257,16 @@ func TestValidateFormType(t *testing.T) {
257257
return
258258
}
259259

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.
262265
t.Run("AssumeErrorCases", func(t *testing.T) {
263266
// requiredChecks loops through all possible form_type and option_type
264267
// combinations.
265268
requiredChecks := make([]formTypeCheck, 0)
266-
//requiredChecks := make(map[provider.ParameterFormType][]provider.OptionType)
267269
for _, ft := range append(provider.ParameterFormTypes(), "") {
268-
//requiredChecks[ft] = make([]provider.OptionType, 0)
269270
for _, ot := range provider.OptionTypes() {
270271
requiredChecks = append(requiredChecks, formTypeCheck{
271272
formType: ft,
@@ -304,14 +305,15 @@ func TestValidateFormType(t *testing.T) {
304305
t.Run(fc.name, func(t *testing.T) {
305306
t.Parallel()
306307

308+
// This is just helpful log output to give the boilerplate
309+
// to write the manual test.
307310
tcText := fmt.Sprintf(`
308311
obvious(%s, ezconfigOpts{
309312
Options: %t,
310313
OptionType: %q,
311314
FormType: %q,
312315
}),
313316
//`, "<expected_form_type>", check.options, check.optionType, check.formType)
314-
var _ = tcText
315317

316318
probablyPassed := formTypeTest(t, fc)
317319
if !probablyPassed {

0 commit comments

Comments
 (0)