tests/PPPredicateTest.st
changeset 379 451b5ae38b72
parent 377 6112a403a52d
child 380 8fe3cb4e607f
equal deleted inserted replaced
378:53d66ecfeb1b 379:451b5ae38b72
   295 				or: [ positive not and: [ negative ] ])
   295 				or: [ positive not and: [ negative ] ])
   296 			description: char printString , ' should be in exactly one set' ]
   296 			description: char printString , ' should be in exactly one set' ]
   297 !
   297 !
   298 
   298 
   299 parsedCharacterSet: aParser
   299 parsedCharacterSet: aParser
   300 	| result |
   300         | result |
   301 	result := WriteStream on: String new.
   301 
   302 	self charactersDo: [ :char |
   302         ((Smalltalk respondsTo: #isSmalltalkX) and:[ Smalltalk isSmalltalkX ]) ifTrue:[ 
   303 		(aParser matches: (String with: char))
   303             result := String new writeStream
   304 			ifTrue: [ result nextPut: char ] ].
   304         ] ifFalse:[ 
   305 	^ result contents
   305             result := WriteStream on: String new.
       
   306         ].
       
   307         self charactersDo: [ :char |
       
   308                 (aParser matches: (char asString))
       
   309                         ifTrue: [ result nextPut: char ] ].
       
   310         ^ result contents
       
   311 
       
   312     "Modified: / 03-10-2014 / 03:01:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   306 ! !
   313 ! !
   307 
   314 
   308 !PPPredicateTest class methodsFor:'documentation'!
   315 !PPPredicateTest class methodsFor:'documentation'!
   309 
   316 
   310 version
   317 version