1115
|
1 |
"{ Package: 'exept:regression' }"
|
|
2 |
|
|
3 |
"{ NameSpace: RegressionTests }"
|
|
4 |
|
|
5 |
TSTreeTests subclass:#TSMultiTreeTests
|
|
6 |
instanceVariableNames:''
|
|
7 |
classVariableNames:''
|
|
8 |
poolDictionaries:''
|
|
9 |
category:'tests-Regression-Collections'
|
|
10 |
!
|
|
11 |
|
|
12 |
|
|
13 |
!TSMultiTreeTests methodsFor:'as yet unclassified'!
|
|
14 |
|
|
15 |
tstreeClass
|
|
16 |
^ TSMultiTree
|
|
17 |
|
|
18 |
"Created: / 26-04-2014 / 11:46:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
19 |
! !
|
|
20 |
|
|
21 |
!TSMultiTreeTests methodsFor:'tests'!
|
|
22 |
|
|
23 |
test_multiple_01
|
|
24 |
|
|
25 |
| matches |
|
|
26 |
|
|
27 |
tree at: 'Object' put: 1.
|
|
28 |
tree at: 'Object' put: 2.
|
|
29 |
|
|
30 |
matches := tree matchesForPrefix: 'Obj'.
|
|
31 |
self assert: matches size == 2.
|
|
32 |
self assert: (matches includes: 1).
|
|
33 |
self assert: (matches includes: 2)
|
|
34 |
|
|
35 |
"Created: / 26-04-2014 / 11:39:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
36 |
!
|
|
37 |
|
|
38 |
test_multiple_02
|
|
39 |
|
|
40 |
| values |
|
|
41 |
|
|
42 |
tree := self tstreeClass new.
|
|
43 |
tree at: 'Object' put: 1.
|
|
44 |
tree at: 'Object' put: 2.
|
|
45 |
|
|
46 |
values := tree values.
|
|
47 |
self assert: values size == 2.
|
|
48 |
self assert: (values includes: 1).
|
|
49 |
self assert: (values includes: 2)
|
|
50 |
|
|
51 |
"Created: / 26-04-2014 / 11:41:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
52 |
!
|
|
53 |
|
|
54 |
test_multiple_03a
|
|
55 |
|
|
56 |
| values |
|
|
57 |
|
|
58 |
tree := self tstreeClass new.
|
|
59 |
tree at: 'Object' put: 1.
|
|
60 |
tree at: 'Object' put: 1.
|
|
61 |
|
|
62 |
values := tree values.
|
|
63 |
self assert: values size == 1.
|
|
64 |
self assert: (values includes: 1).
|
|
65 |
|
|
66 |
"Created: / 26-04-2014 / 12:09:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
67 |
!
|
|
68 |
|
|
69 |
test_multiple_03b
|
|
70 |
|
|
71 |
| values |
|
|
72 |
|
|
73 |
tree := self tstreeClass new.
|
|
74 |
tree at: 'Object' put: 1.
|
|
75 |
tree at: 'Object' put: 2.
|
|
76 |
tree at: 'Object' put: 1.
|
|
77 |
|
|
78 |
values := tree values.
|
|
79 |
self assert: values size == 2.
|
|
80 |
self assert: (values includes: 1).
|
|
81 |
self assert: (values includes: 2).
|
|
82 |
|
|
83 |
"Created: / 26-04-2014 / 12:09:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
84 |
! !
|
|
85 |
|
|
86 |
!TSMultiTreeTests class methodsFor:'documentation'!
|
|
87 |
|
|
88 |
version
|
|
89 |
^ '$Header$'
|
|
90 |
!
|
|
91 |
|
|
92 |
version_CVS
|
|
93 |
^ '$Header$'
|
|
94 |
! !
|
|
95 |
|