tests/PPTokenTest.st
changeset 427 a7f5e6de19d2
parent 405 0470a5e6e712
equal deleted inserted replaced
426:2a65c972b937 427:a7f5e6de19d2
     1 "{ Package: 'stx:goodies/petitparser/tests' }"
     1 "{ Package: 'stx:goodies/petitparser/tests' }"
       
     2 
       
     3 "{ NameSpace: Smalltalk }"
     2 
     4 
     3 PPAbstractParserTest subclass:#PPTokenTest
     5 PPAbstractParserTest subclass:#PPTokenTest
     4 	instanceVariableNames:''
     6 	instanceVariableNames:''
     5 	classVariableNames:''
     7 	classVariableNames:''
     6 	poolDictionaries:''
     8 	poolDictionaries:''
    34 !
    36 !
    35 
    37 
    36 testPrinting
    38 testPrinting
    37 	| result |
    39 	| result |
    38 	result := PPToken on: 'var'.
    40 	result := PPToken on: 'var'.
    39 	self assert: (result printString includesSubstring: 'PPToken[1,3]')
    41 	self assert: result printString includesSubstring: 'PPToken[1,3]'
    40 !
    42 !
    41 
    43 
    42 testSize
    44 testSize
    43 	| result |
    45 	| result |
    44 	result := self parse: 'foo' using: self identifier.
    46 	result := self parse: 'foo' using: self identifier.