equal
deleted
inserted
replaced
20 |
20 |
21 "{ NameSpace: SmallSense }" |
21 "{ NameSpace: SmallSense }" |
22 |
22 |
23 AbstractTestCase subclass:#EditSupportTests |
23 AbstractTestCase subclass:#EditSupportTests |
24 instanceVariableNames:'codeView codeViewInteractor editService editSupport' |
24 instanceVariableNames:'codeView codeViewInteractor editService editSupport' |
25 classVariableNames:'' |
25 classVariableNames:'TriedOpenDisplay' |
26 poolDictionaries:'' |
26 poolDictionaries:'' |
27 category:'SmallSense-Tests' |
27 category:'SmallSense-Tests' |
28 ! |
28 ! |
29 |
29 |
30 !EditSupportTests class methodsFor:'documentation'! |
30 !EditSupportTests class methodsFor:'documentation'! |
48 License along with this library; if not, write to the Free Software |
48 License along with this library; if not, write to the Free Software |
49 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
49 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
50 " |
50 " |
51 ! ! |
51 ! ! |
52 |
52 |
|
53 !EditSupportTests class methodsFor:'initialization'! |
|
54 |
|
55 initialize |
|
56 "Invoked at system start or when the class is dynamically loaded." |
|
57 |
|
58 "/ please change as required (and remove this comment) |
|
59 |
|
60 TriedOpenDisplay := false. |
|
61 |
|
62 "Modified: / 17-10-2017 / 23:24:09 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
63 ! ! |
|
64 |
|
65 !EditSupportTests class methodsFor:'queries'! |
|
66 |
|
67 isAbstract |
|
68 "Return if this class is an abstract class. |
|
69 True is returned here for myself only; false for subclasses. |
|
70 Abstract subclasses must redefine this again." |
|
71 |
|
72 ^ self == SmallSense::EditSupportTests. |
|
73 ! ! |
|
74 |
53 !EditSupportTests methodsFor:'accessing-classes'! |
75 !EditSupportTests methodsFor:'accessing-classes'! |
54 |
76 |
55 editSupportClass |
77 editSupportClass |
56 self subclassResponsibility |
78 self subclassResponsibility |
57 |
79 |
63 setUp |
85 setUp |
64 | topView | |
86 | topView | |
65 |
87 |
66 super setUp. |
88 super setUp. |
67 |
89 |
68 Smalltalk loadPackage: 'stx:goodies/sunitext/ui'. |
90 TriedOpenDisplay ifFalse:[ |
|
91 TriedOpenDisplay := true. |
|
92 Screen current isNil ifTrue:[ |
|
93 Smalltalk openDisplay |
|
94 ]. |
|
95 ]. |
|
96 self skipIf: Screen current isNil description:'No display connection'. |
|
97 |
|
98 Smalltalk loadPackage: 'stx:goodies/sunit/ext/ui'. |
69 |
99 |
70 topView := StandardSystemView new. |
100 topView := StandardSystemView new. |
71 topView extent: 320 @ 200. |
101 topView extent: 320 @ 200. |
72 topView label: self printString. |
102 topView label: self printString. |
73 codeView := Tools::CodeView2 origin: 0.0@0.0 extent: 1.0@1.0 in: topView. |
103 codeView := Tools::CodeView2 origin: 0.0@0.0 extent: 1.0@1.0 in: topView. |
81 |
111 |
82 topView open. |
112 topView open. |
83 topView waitUntilVisible. |
113 topView waitUntilVisible. |
84 |
114 |
85 "Created: / 23-07-2014 / 07:15:05 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
115 "Created: / 23-07-2014 / 07:15:05 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
86 "Modified (format): / 04-03-2015 / 09:42:45 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
116 "Modified: / 17-10-2017 / 23:25:50 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
87 ! |
117 ! |
88 |
118 |
89 tearDown |
119 tearDown |
90 |
120 |
91 editService := nil. |
121 editService := nil. |
103 version_HG |
133 version_HG |
104 |
134 |
105 ^ '$Changeset: <not expanded> $' |
135 ^ '$Changeset: <not expanded> $' |
106 ! ! |
136 ! ! |
107 |
137 |
|
138 |
|
139 EditSupportTests initialize! |