92 goTo:3; |
92 goTo:3; |
93 goTo:2. |
93 goTo:2. |
94 self |
94 self |
95 assert:history currentItem = 2; |
95 assert:history currentItem = 2; |
96 assert:history canGoBack; |
96 assert:history canGoBack; |
97 assert:history goBackItems asArray = #( 1 ); |
97 assert:history goBackItems asArray = #( 3 2 1); |
98 assert:history canGoForward; |
98 assert:history canGoForward not; |
99 assert:history goForwardItems asArray = #( 3 ). |
99 assert:history goForwardItems asArray = #( ). |
100 |
100 |
101 "Created: / 21-02-2008 / 16:57:58 / janfrog" |
101 "Created: / 21-02-2008 / 16:57:58 / janfrog" |
102 "Modified: / 27-02-2008 / 11:52:26 / janfrog" |
102 "Modified: / 27-02-2008 / 11:52:26 / janfrog" |
103 "Modified: / 06-06-2008 / 09:31:32 / Jan Vrany <vranyj1@fel.cvut.cz>" |
103 "Modified: / 06-06-2008 / 09:31:32 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
104 "Modified: / 04-09-2015 / 06:56:17 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
104 ! |
105 ! |
105 |
106 |
106 test_05 |
107 test_05 |
107 history |
108 history |
108 goTo:1; |
109 goTo:1; |
118 assert:history canGoForward not. |
119 assert:history canGoForward not. |
119 |
120 |
120 "Created: / 21-02-2008 / 16:59:11 / janfrog" |
121 "Created: / 21-02-2008 / 16:59:11 / janfrog" |
121 "Modified: / 27-02-2008 / 11:52:12 / janfrog" |
122 "Modified: / 27-02-2008 / 11:52:12 / janfrog" |
122 "Modified: / 06-06-2008 / 09:31:40 / Jan Vrany <vranyj1@fel.cvut.cz>" |
123 "Modified: / 06-06-2008 / 09:31:40 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
124 ! |
|
125 |
|
126 test_06 |
|
127 history goTo:1. |
|
128 self assert: history currentItem = 1. |
|
129 self assert: history canGoBack not. |
|
130 self assert: history goBackItems asArray = #( ). |
|
131 self assert: history canGoForward not. |
|
132 self assert: history goForwardItems asArray = #( ). |
|
133 |
|
134 history goTo:2. |
|
135 self assert: history currentItem = 2. |
|
136 self assert: history canGoBack . |
|
137 self assert: history goBackItems asArray = #( 1 ). |
|
138 self assert: history canGoForward not. |
|
139 self assert: history goForwardItems asArray = #( ). |
|
140 |
|
141 history goTo:3. |
|
142 self assert: history currentItem = 3. |
|
143 self assert: history canGoBack . |
|
144 self assert: history goBackItems asArray = #( 2 1 ). |
|
145 self assert: history canGoForward not. |
|
146 self assert: history goForwardItems asArray = #( ). |
|
147 |
|
148 history goTo:2. |
|
149 self assert: history currentItem = 2. |
|
150 self assert: history canGoBack . |
|
151 self assert: history goBackItems asArray = #( 3 2 1 ). |
|
152 self assert: history canGoForward not. |
|
153 self assert: history goForwardItems asArray = #( ). |
|
154 |
|
155 history goBack. |
|
156 self assert: history currentItem = 3. |
|
157 self assert: history canGoBack . |
|
158 self assert: history goBackItems asArray = #( 2 1 ). |
|
159 self assert: history canGoForward. |
|
160 self assert: history goForwardItems asArray = #( 2 ). |
|
161 |
|
162 history goBack. |
|
163 self assert: history currentItem = 2. |
|
164 self assert: history canGoBack . |
|
165 self assert: history goBackItems asArray = #( 1 ). |
|
166 self assert: history canGoForward. |
|
167 self assert: history goForwardItems asArray = #( 3 2 ). |
|
168 |
|
169 history goBack. |
|
170 self assert: history currentItem = 1. |
|
171 self assert: history canGoBack not. |
|
172 self assert: history goBackItems asArray = #( ). |
|
173 self assert: history canGoForward. |
|
174 self assert: history goForwardItems asArray = #( 2 3 2 ). |
|
175 |
|
176 history goForward. |
|
177 self assert: history currentItem = 2. |
|
178 self assert: history canGoBack. |
|
179 self assert: history goBackItems asArray = #( 1 ). |
|
180 self assert: history canGoForward. |
|
181 self assert: history goForwardItems asArray = #( 3 2 ). |
|
182 |
|
183 history goForward. |
|
184 self assert: history currentItem = 3. |
|
185 self assert: history canGoBack. |
|
186 self assert: history goBackItems asArray = #( 2 1 ). |
|
187 self assert: history canGoForward. |
|
188 self assert: history goForwardItems asArray = #( 2 ). |
|
189 |
|
190 "Created: / 04-09-2015 / 06:59:57 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
123 ! ! |
191 ! ! |
124 |
192 |
125 !NavigationHistoryTests class methodsFor:'documentation'! |
193 !NavigationHistoryTests class methodsFor:'documentation'! |
126 |
194 |
127 version_CVS |
195 version_CVS |