Tag: table-driven

Zur Prüfung der Gleichwertigkeit von Karten in Golang?

Anzahl der Antworten 7 Antworten
Ich habe einen table-driven test Fall wie diesem: func CountWords(s string) map[string]int func TestCountWords(t *testing.T) { var tests = struct { input string want map[string]int }{ {"foo", map[string]int{"foo":1}}, {"foo bar foo", map[string]int{"foo":2,"bar":1}}, } for i, c :=

Was sind Table-Driven Methods

Anzahl der Antworten 3 Antworten
Was sind Table-Driven-Methoden wie bereits erwähnt, die von Bill Gates auf Vista Werbung auf http://www.youtube.com/watch?v=gBWPf1BWtkw Das video ist privat. Ist es eine Kopie irgendwo? InformationsquelleAutor Jonathan | 2008-09-19

Prüfung der Äquivalenz von Karten (Golang)

Anzahl der Antworten 4 Antworten
Ich habe einen table-driven test Fall wie diesem: func CountWords(s string) map[string]int func TestCountWords(t *testing.T) { var tests = struct { input string want map[string]int }{ {"foo", map[string]int{"foo":1}}, {"foo bar foo", map[string]int{"foo":2,"bar":1}}, } for i, c :=