author | mawalch |
Mon, 08 Aug 2016 20:13:59 +0200 | |
changeset 1011 | dff0d2ee184c |
parent 811 | daba83d6ef01 |
child 1121 | c5661215109c |
permissions | -rw-r--r-- |
20 | 1 |
"{ Package: 'stx:goodies/monticello/test' }" |
2 |
||
3 |
MCTestCase subclass:#MCStReaderTest |
|
4 |
instanceVariableNames:'' |
|
5 |
classVariableNames:'' |
|
6 |
poolDictionaries:'' |
|
811
daba83d6ef01
Tests moved to category SCM-Monticello-Tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
20
diff
changeset
|
7 |
category:'SCM-Monticello-Tests' |
20 | 8 |
! |
9 |
||
10 |
||
11 |
!MCStReaderTest methodsFor:'as yet unclassified'! |
|
12 |
||
13 |
commentWithStyle |
|
14 |
^ '!!AEDesc commentStamp: ''<historical>'' prior: 0!! |
|
15 |
I represent an Apple Event Descriptor. I am a low-level representation of Apple Event (and hence Applescript) information. For further Information, see Apple''s Inside Macintosh: Interapplication Communications, at |
|
16 |
||
17 |
http://developer.apple.com/techpubs/mac/IAC/IAC-2.html. |
|
18 |
||
19 |
Essentially, I represent a record comprising a one-word "string" (treating the word as fourbyte characters) representing a data type, followed by a pointer to a pointer (a handle) to the data I represent. Care must be taken to assure that the Handle data is disposed after use, or memory leaks result. At this time, I make no effort to do this automatically through finalization.!! |
|
20 |
]style[(218 54 384)f1,f1Rhttp://developer.apple.com/techpubs/mac/IAC/IAC-2.html;,f1!! |
|
21 |
' |
|
22 |
! |
|
23 |
||
24 |
commentWithoutStyle |
|
25 |
^ ' |
|
26 |
CharacterScanner subclass: #CanvasCharacterScanner |
|
27 |
instanceVariableNames: ''canvas fillBlt foregroundColor runX lineY '' |
|
28 |
classVariableNames: '''' |
|
29 |
poolDictionaries: '''' |
|
30 |
category: ''Morphic-Support''!! |
|
31 |
||
32 |
!!CanvasCharacterScanner commentStamp: ''<historical>'' prior: 0!! |
|
33 |
A displaying scanner which draws its output to a Morphic canvas.!! |
|
34 |
||
35 |
!!CanvasCharacterScanner methodsFor: ''stop conditions'' stamp: ''ar 12/15/2001 23:27''!! |
|
36 |
setStopConditions |
|
37 |
"Set the font and the stop conditions for the current run." |
|
38 |
||
39 |
self setFont. |
|
40 |
stopConditions |
|
41 |
at: Space asciiValue + 1 |
|
42 |
put: (alignment = Justified ifTrue: [#paddedSpace])!! !!' |
|
43 |
! |
|
44 |
||
45 |
methodWithStyle |
|
46 |
^ '!!EventHandler methodsFor: ''copying'' stamp: ''tk 1/22/2001 17:39''!! |
|
47 |
veryDeepInner: deepCopier |
|
48 |
"ALL fields are weakly copied. Can''t duplicate an object by duplicating a button that activates it. See DeepCopier." |
|
49 |
||
50 |
super veryDeepInner: deepCopier. |
|
51 |
"just keep old pointers to all fields" |
|
52 |
clickRecipient _ clickRecipient.!! |
|
53 |
]style[(25 108 10 111)f1b,f1,f1LDeepCopier Comment;,f1!! !! |
|
54 |
||
55 |
' |
|
56 |
! |
|
57 |
||
58 |
testCommentWithStyle |
|
59 |
| reader | |
|
60 |
reader _ MCStReader on: self commentWithStyle readStream. |
|
61 |
reader definitions |
|
62 |
! |
|
63 |
||
64 |
testCommentWithoutStyle |
|
65 |
| reader | |
|
66 |
reader _ MCStReader on: self commentWithoutStyle readStream. |
|
67 |
self assert: (reader definitions anySatisfy: [:ea | ea isMethodDefinition]). |
|
68 |
! |
|
69 |
||
70 |
testMethodWithStyle |
|
71 |
| reader | |
|
72 |
reader _ MCStReader on: self methodWithStyle readStream. |
|
73 |
self assert: reader definitions first isMethodDefinition. |
|
74 |
! ! |
|
75 |
||
76 |
!MCStReaderTest class methodsFor:'documentation'! |
|
77 |
||
78 |
version |
|
811
daba83d6ef01
Tests moved to category SCM-Monticello-Tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
20
diff
changeset
|
79 |
^ '$Header: /cvs/stx/stx/goodies/monticello/test/MCStReaderTest.st,v 1.2 2013-05-29 00:01:00 vrany Exp $' |
20 | 80 |
! ! |
811
daba83d6ef01
Tests moved to category SCM-Monticello-Tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
20
diff
changeset
|
81 |