@@ -32,72 +32,6 @@ func TestNewDictionary(t *testing.T) {
3232 t .Error ("\t \t Should be able to load the verb file." )
3333 }
3434
35- adj , err := d .Adjective (0 )
36- if err != nil {
37- t .Error ("\t \t Should be able to get an adjective from the dictionary." )
38- }
39- t .Log ("\t \t Should be able to get an adjective from the dictionary." )
40- if adj != "able" {
41- t .Error ("\t \t Should be able to get the first adjective from the dictionary." )
42- }
43- t .Log ("\t \t Should be able to get the first adjective from the dictionary." )
44-
45- _ , err = d .Adjective (- 1 )
46- if err == nil {
47- t .Error ("\t \t Should not be able to get an adjective from the dictionary with a negative index." )
48- }
49- t .Log ("\t \t Should not be able to get an adjective from the dictionary with a negative index." )
50-
51- adv , err := d .Adverb (0 )
52- if err != nil {
53- t .Error ("\t \t Should be able to get an adverb from the dictionary." )
54- }
55- t .Log ("\t \t Should be able to get an adverb from the dictionary." )
56- if adv != "abnormally" {
57- t .Error ("\t \t Should be able to get the first adverb from the dictionary." )
58- }
59- t .Log ("\t \t Should be able to get the first adverb from the dictionary." )
60-
61- _ , err = d .Adverb (- 1 )
62- if err == nil {
63- t .Error ("\t \t Should not be able to get an adverb from the dictionary with a negative index." )
64- }
65- t .Log ("\t \t Should not be able to get an adverb from the dictionary with a negative index." )
66-
67- noun , err := d .Noun (0 )
68- if err != nil {
69- t .Error ("\t \t Should be able to get a noun from the dictionary." )
70- }
71- t .Log ("\t \t Should be able to get a noun from the dictionary." )
72-
73- if noun != "aardvark" {
74- t .Error ("\t \t Should be able to get the first noun from the dictionary." )
75- }
76- t .Log ("\t \t Should be able to get the first noun from the dictionary." )
77-
78- _ , err = d .Noun (- 1 )
79- if err == nil {
80- t .Error ("\t \t Should not be able to get a noun from the dictionary with a negative index." )
81- }
82- t .Log ("\t \t Should not be able to get a noun from the dictionary with a negative index." )
83-
84- verb , err := d .Verb (0 )
85- if err != nil {
86- t .Error ("\t \t Should be able to get a verb from the dictionary." )
87- }
88- t .Log ("\t \t Should be able to get a verb from the dictionary." )
89-
90- if verb != "abandoned" {
91- t .Error ("\t \t Should be able to get the first verb from the dictionary." )
92- }
93- t .Log ("\t \t Should be able to get the first verb from the dictionary." )
94-
95- _ , err = d .Verb (- 1 )
96- if err == nil {
97- t .Error ("\t \t Should not be able to get a verb from the dictionary with a negative index." )
98- }
99- t .Log ("\t \t Should not be able to get a verb from the dictionary with a negative index." )
100-
10135 if len (d .adectives ) != d .LengthAdjective () {
10236 t .Error ("\t \t Should be able to get the length of the adjective file." )
10337 }
0 commit comments