compiler/tests/extras/PPCJavaTests.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Wed, 26 Aug 2015 21:41:20 +0100
changeset 531 dc3d13c2837d
parent 524 f6f68d32de73
permissions -rw-r--r--
PPCConfiguration refactoring: [3/10]: Moved some sime instvars to context Move some context-related options from PPCConfiguration to PPCCompilationContext. PPCConfiguration now access them wia accessor methods.

"{ Package: 'stx:goodies/petitparser/compiler/tests/extras' }"

"{ NameSpace: Smalltalk }"

TestCase subclass:#PPCJavaTests
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'PetitCompiler-Extras-Tests-Java'
!

!PPCJavaTests methodsFor:'as yet unclassified'!

javaWsNode
    ^ PPCUnknownNode new
        parser: PPJavaWhitespaceParser new;
        yourself
!

testJavaWS
    | node1 node2 node visitor |
    node1 := self javaWsNode.
    node2 := self javaWsNode.
    
    node := PPCSequenceNode new
        children: { node1 . node2 }.

    visitor := PPCMergingVisitor new.
        
    self assert: (node children first == node children second) not.
    node := visitor visit: node.
    self assert: (node children first == node children second).
! !