A lot of tables tests don't have names associated with each test case, which makes it difficult to know exactly why that test case is expected to do whatever it's meant to do. A good example is TestInterviewCommandErrors:
func TestInterviewAddErrors(t *testing.T) {
inputs := []string{
"!interview add",
"!interview add NAME",
"!interview add NAME 03/15/2006",
"!interview add NAME 03/15/2006 09:00am",
"!interview add NAME 03/15/2006 09:00am uname",
"!interview add NAME 03/15/2006 09:00am @uname",
"!interview add NAME 15/03/2006 09:00am <@uid>",
"!interview add NAME 3/15/2006 09:00am <@uid>",
"!interview add NAME 03/15/06 09:00am <@uid>",
"!interview add NAME 03/15/2006 9 <@uid>",
"!interview add NAME 03/15/2006 9am <@uid>",
"!interview add NAME 03/15/2006 9:00am <@uid>",
"!interview add NAME 03/15/2006 09:00 <@uid>",
}
It would be better to have something like:
inputs := map[string]string{
"missing NAME argument": "!interview add",
...
}
I think we should standardize on requiring all table tests to have a name associated with each case.
A lot of tables tests don't have names associated with each test case, which makes it difficult to know exactly why that test case is expected to do whatever it's meant to do. A good example is TestInterviewCommandErrors:
It would be better to have something like:
I think we should standardize on requiring all table tests to have a name associated with each case.