Tests refactoring - use generated test cases to make sure all posibilities are tested.
Do not generate resource for all combinations, use PPCSetUpBeforeTearDownAfterResource
instead that delegates parser compilation to the testcase itself (it calls it's #setUpBefore
method).
"{ Package: 'stx:goodies/petitparser/compiler' }"
"{ NameSpace: Smalltalk }"
Object subclass:#PEGFsaPair
instanceVariableNames:'first second'
classVariableNames:''
poolDictionaries:''
category:'PetitCompiler-FSA'
!
!PEGFsaPair class methodsFor:'instance creation'!
with: a with: b
^ PEGFsaPair new
first: a;
second: b;
yourself
! !
!PEGFsaPair methodsFor:'accessing'!
first
^ first
!
first: anObject
first := anObject
!
second
^ second
!
second: anObject
second := anObject
! !
!PEGFsaPair methodsFor:'comparing'!
= anObject
(anObject == self) ifTrue: [ ^ true ].
(anObject class == self class) ifFalse: [ ^ false ].
((anObject first == first) and: [anObject second == second]) ifTrue: [ ^ true ].
((anObject first == second) and: [anObject second == first]) ifTrue: [ ^ true ].
^ false
!
hash
^ first hash bitXor: second hash
! !