tests/PPParserResource.st
author sr
Wed, 04 Jul 2018 15:30:19 +0200
changeset 611 38338f2de417
parent 581 4bce53337088
permissions -rw-r--r--
build order was wrong
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
579
dce11b1e76c9 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     1
"{ Package: 'stx:goodies/petitparser/tests' }"
dce11b1e76c9 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     2
dce11b1e76c9 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     3
"{ NameSpace: Smalltalk }"
dce11b1e76c9 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     4
dce11b1e76c9 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     5
TestResource subclass:#PPParserResource
dce11b1e76c9 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     6
	instanceVariableNames:'parsers'
dce11b1e76c9 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     7
	classVariableNames:''
dce11b1e76c9 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     8
	poolDictionaries:''
581
4bce53337088 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 579
diff changeset
     9
	category:'PetitTests-Tests'
579
dce11b1e76c9 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    10
!
dce11b1e76c9 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    11
dce11b1e76c9 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    12
dce11b1e76c9 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    13
!PPParserResource methodsFor:'accessing'!
dce11b1e76c9 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    14
dce11b1e76c9 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    15
parserAt: aParserClass
dce11b1e76c9 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    16
	"Answer a cached instance of aParserClass."
dce11b1e76c9 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    17
	
dce11b1e76c9 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
	^ parsers at: aParserClass name ifAbsentPut: [ aParserClass new ]
dce11b1e76c9 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    19
! !
dce11b1e76c9 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
dce11b1e76c9 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
!PPParserResource methodsFor:'running'!
dce11b1e76c9 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
dce11b1e76c9 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    23
setUp
dce11b1e76c9 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
	super setUp.
dce11b1e76c9 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
	parsers := Dictionary new
dce11b1e76c9 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    26
! !
dce11b1e76c9 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    27
dce11b1e76c9 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    28
!PPParserResource class methodsFor:'documentation'!
dce11b1e76c9 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
dce11b1e76c9 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
version
dce11b1e76c9 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    31
    ^ '$Header$'
dce11b1e76c9 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
!
dce11b1e76c9 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    33
dce11b1e76c9 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    34
version_CVS
dce11b1e76c9 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    35
    ^ '$Header$'
dce11b1e76c9 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    36
! !
dce11b1e76c9 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    37