initial checkin
authorClaus Gittinger <cg@exept.de>
Wed, 22 Nov 2006 14:02:19 +0100
changeset 20 5a87e5e6da56
parent 19 17ff4ce04f1f
child 21 b263d80be43d
initial checkin
test/MCStReaderTest.st
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/MCStReaderTest.st	Wed Nov 22 14:02:19 2006 +0100
@@ -0,0 +1,80 @@
+"{ Package: 'stx:goodies/monticello/test' }"
+
+MCTestCase subclass:#MCStReaderTest
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Monticello-Tests'
+!
+
+
+!MCStReaderTest methodsFor:'as yet unclassified'!
+
+commentWithStyle
+	^ '!!AEDesc commentStamp: ''<historical>'' prior: 0!!
+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
+
+	http://developer.apple.com/techpubs/mac/IAC/IAC-2.html.
+
+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.!!
+]style[(218 54 384)f1,f1Rhttp://developer.apple.com/techpubs/mac/IAC/IAC-2.html;,f1!!
+'
+!
+
+commentWithoutStyle
+	^ '
+CharacterScanner subclass: #CanvasCharacterScanner
+	instanceVariableNames: ''canvas fillBlt foregroundColor runX lineY ''
+	classVariableNames: ''''
+	poolDictionaries: ''''
+	category: ''Morphic-Support''!!
+
+!!CanvasCharacterScanner commentStamp: ''<historical>'' prior: 0!!
+A displaying scanner which draws its output to a Morphic canvas.!!
+
+!!CanvasCharacterScanner methodsFor: ''stop conditions'' stamp: ''ar 12/15/2001 23:27''!!
+setStopConditions
+	"Set the font and the stop conditions for the current run."
+
+	self setFont.
+	stopConditions
+		at: Space asciiValue + 1
+		put: (alignment = Justified ifTrue: [#paddedSpace])!! !!'
+!
+
+methodWithStyle
+	^ '!!EventHandler methodsFor: ''copying'' stamp: ''tk 1/22/2001 17:39''!!
+veryDeepInner: deepCopier
+	"ALL fields are weakly copied.  Can''t duplicate an object by duplicating a button that activates it.  See DeepCopier."
+
+	super veryDeepInner: deepCopier.
+	"just keep old pointers to all fields"
+	clickRecipient _ clickRecipient.!!
+]style[(25 108 10 111)f1b,f1,f1LDeepCopier Comment;,f1!! !!
+
+'
+!
+
+testCommentWithStyle
+	| reader |
+	reader _ MCStReader on: self commentWithStyle readStream.
+	reader definitions
+!
+
+testCommentWithoutStyle
+	| reader |
+	reader _ MCStReader on: self commentWithoutStyle readStream.
+	self assert: (reader definitions anySatisfy: [:ea | ea isMethodDefinition]).
+!
+
+testMethodWithStyle
+	| reader |
+	reader _ MCStReader on: self methodWithStyle readStream.
+	self assert: reader definitions first isMethodDefinition.
+! !
+
+!MCStReaderTest class methodsFor:'documentation'!
+
+version
+    ^ '$Header: /cvs/stx/stx/goodies/monticello/test/MCStReaderTest.st,v 1.1 2006-11-22 13:02:19 cg Exp $'
+! !