compiler/tests/PPCTokenizingTest.st
changeset 525 751532c8f3db
parent 518 a6d8b93441b0
parent 524 f6f68d32de73
child 529 439c4057517f
--- a/compiler/tests/PPCTokenizingTest.st	Tue Aug 18 22:46:10 2015 +0100
+++ b/compiler/tests/PPCTokenizingTest.st	Mon Aug 24 15:56:20 2015 +0100
@@ -323,6 +323,18 @@
         
 !
 
+testCompileStar3
+    parser := 'a' asParser trimmingToken star, 'b' asParser trimmingToken
+         compileWithConfiguration: configuration.
+    
+    self assert: parser parse: 'ab'.
+    self assert: parser parse: 'aaab'.
+    self assert: result size = 2.
+    self assert: result first size = 3.
+            
+    self assert: parser fail: 'ac'.
+!
+
 testCompileTokenComplex2
     |  a b argumentsWith  |
     "based on the PPSmalltlakGrammar>>blockArgumentsWith"
@@ -337,7 +349,7 @@
     parser := argumentsWith compileWithConfiguration: configuration.
     self assert: parser parse: '|'.
 
-    self assert: parser parse: ']'.
+    self assert: parser parse: ']' end: 0.
 !
 
 testCompileTokenComplex3
@@ -463,7 +475,8 @@
     self assert: parser parse: 'foofoo'.
     self assert: result first inputValue = 'foo'.
     self assert: result second inputValue = 'foo'.
-    self assert: (parser class methodDictionary includesKey: #fooToken).
+    self assert: (parser scanner class methodDictionary includesKey: #fooToken).
+    self assert: (parser scanner class methodDictionary includesKey: #scan_fooToken).
 !
 
 testWhitespace
@@ -482,7 +495,7 @@
     self assert: parser parse: ' foo '.
     self assert: result first inputValue = 'foo'.
 
-    self assert: (context invocations select: [:e | e = #consumeWhitespace ]) size = 3.
+    self assert: (context invocations select: [:e | e = #scan_consumeWhitespace ]) size = 3.
 !
 
 testWhitespace2
@@ -502,7 +515,7 @@
     self assert: result first inputValue = 'foo'.
     self assert: result second inputValue = 'foo'.
 
-    self assert: (context invocations select: [:e | e = #consumeWhitespace ]) size = 4.
+    self assert: (context invocations select: [:e | e = #scan_consumeWhitespace ]) size = 4.
 !
 
 testWhitespace3
@@ -523,6 +536,6 @@
     self assert: result second inputValue = 'foo'.
     self assert: result third inputValue = 'foo'.
 
-    self assert: (context invocations select: [:e | e = #consumeWhitespace ]) size = 5.
+    self assert: (context invocations select: [:e | e = #scan_consumeWhitespace ]) size = 5.
 ! !