From 2b72e3377a4177ed3d1153c0a4ff4120f2ac12c0 Mon Sep 17 00:00:00 2001 From: ValarDragon Date: Mon, 16 Jul 2018 17:24:07 -0700 Subject: [PATCH] Clarify when to use table driven tests --- CONTRIBUTING.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c04382391c..b18ef2ea95 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -69,9 +69,9 @@ includes its continuous integration status using a badge in the `README.md`. We expect tests to use `require` or `assert` rather than `t.Skip` or `t.Fail`, unless there is a reason to do otherwise. -We prefer to use [table driven tests](https://github.com/golang/go/wiki/TableDrivenTests) -where applicable. -Error messages should follow the following format +When testing a function under a variety of different inputs, we prefer to use +[table driven tests](https://github.com/golang/go/wiki/TableDrivenTests). +Table driven test error messages should follow the following format `, tc #, i #`. `` is an optional short description of whats failing, `tc` is the index within the table of the testcase that is failing, and `i` is when there