--- a/compiler/tests/PPCCodeGeneratorTest.st Fri Jul 24 15:06:54 2015 +0100
+++ b/compiler/tests/PPCCodeGeneratorTest.st Mon Aug 17 12:13:16 2015 +0100
@@ -28,7 +28,7 @@
configuration arguments: arguments.
- compiler := PPCCompiler new.
+ compiler := PPCCodeGen new.
compiler arguments: arguments.
visitor := PPCCodeGenerator new.
@@ -142,6 +142,20 @@
"Created: / 16-06-2015 / 07:22:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
+testActionNode7
+ node := ((#letter asParser , #letter asParser)
+ ==> [:nodes | self createStringFromCharacters: nodes ]) asCompilerTree.
+ node child markForInline.
+
+ self compileTree:node.
+
+ self assert:parser parse:'ab' to:'ab'.
+ self assert:parser parse:'cz' to:'cz'.
+ self assert:parser fail:''.
+
+ "Created: / 27-07-2015 / 15:48:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
testAnyNode
node := PPCForwardNode new
child: PPCAnyNode new;
@@ -460,7 +474,7 @@
self compileTree: node.
self assert: parser class methodDictionary size = 1.
- self assert: (parser class methodDictionary includesKey: #lit_0).
+ self assert: (parser class methodDictionary includesKey: #lit).
self assert: parser parse: 'foo' to: 'foo'.
self assert: parser parse: 'foobar' to: 'foo' end: 3.
self assert: parser fail: 'boo'.
@@ -1108,3 +1122,11 @@
self assert: parser parse: '' to: nil.
! !
+!PPCCodeGeneratorTest methodsFor:'utilities'!
+
+createStringFromCharacters: characters
+ ^ String withAll: characters
+
+ "Created: / 27-07-2015 / 15:47:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+