diff options
author | Michaël Ball <michael.ball@gmail.com> | 2017-01-07 18:07:51 +0000 |
---|---|---|
committer | Michaël Ball <michael.ball@gmail.com> | 2017-01-07 18:07:51 +0000 |
commit | b57ee0ffc26098560202c751de9142c88d80bcc6 (patch) | |
tree | 5ed722cfc8d9a262821e5c14cc687b7fd6f6b5ab /generator/generator_test.go | |
parent | 6068ab484fa377917514753becf61d2211460218 (diff) | |
parent | 7e0c7250e1a9afd9930fbb200c5cbd9a8095404e (diff) |
Merge branch 'release/0.2.0'0.2.0
Diffstat (limited to 'generator/generator_test.go')
-rw-r--r-- | generator/generator_test.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/generator/generator_test.go b/generator/generator_test.go new file mode 100644 index 0000000..4cda593 --- /dev/null +++ b/generator/generator_test.go @@ -0,0 +1,15 @@ +package generator + +import "testing" + +func TestRandomWords(t *testing.T) { + words, err := RandomWords("/usr/share/dict/words", 4) + + if err != nil { + t.Errorf("%s", err) + } + + if len(words) != 4 { + t.Errorf("RandomWords does not return the correct number of words") + } +} |