compiler/tests/PPCCodeGeneratorTest.st
changeset 484 e829f3860745
parent 481 34ee0d3c72e7
child 488 19a9c25960ef
equal deleted inserted replaced
483:3fe67c1fc040 484:e829f3860745
   433     self 
   433     self 
   434         assert:parser
   434         assert:parser
   435         parse:'cz'
   435         parse:'cz'
   436         to:'cz'.
   436         to:'cz'.
   437     self assert:parser fail:''.
   437     self assert:parser fail:''.
   438     self assert:parser fail:'asd'.
   438     self assert:parser fail:'a'.
   439 
   439 
   440     "Created: / 02-06-2015 / 17:04:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   440     "Created: / 02-06-2015 / 17:04:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   441     "Modified: / 03-06-2015 / 06:10:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   441     "Modified: / 04-06-2015 / 22:44:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
   442 !
       
   443 
       
   444 testMappedActionNode2
       
   445     node := ((#letter asParser , #letter asParser) 
       
   446             map:[:a :b | String with:a with:b ]) asCompilerTree.
       
   447     node child markForInline.
       
   448     self compileTree:node.
       
   449     self 
       
   450         assert:parser
       
   451         parse:'ab'
       
   452         to:'ab'.
       
   453     self 
       
   454         assert:parser
       
   455         parse:'cz'
       
   456         to:'cz'.
       
   457     self assert:parser fail:''.
       
   458     self assert:parser fail:'a'.
       
   459 
       
   460     "Created: / 04-06-2015 / 23:13:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   442 !
   461 !
   443 
   462 
   444 testMessagePredicate
   463 testMessagePredicate
   445     | messageNode |
   464     | messageNode |
   446     messageNode := PPCMessagePredicateNode new
   465     messageNode := PPCMessagePredicateNode new