compiler/tests/PPCDistinctScannerTest.st
changeset 534 a949c4fe44df
parent 529 439c4057517f
child 537 fb212e14d1f4
--- a/compiler/tests/PPCDistinctScannerTest.st	Wed Aug 26 23:34:48 2015 +0100
+++ b/compiler/tests/PPCDistinctScannerTest.st	Sat Aug 29 07:56:14 2015 +0100
@@ -9,6 +9,7 @@
 	category:'PetitCompiler-Tests-Core-Tokenizing'
 !
 
+
 !PPCDistinctScannerTest methodsFor:'as yet unclassified'!
 
 aToken
@@ -59,7 +60,7 @@
     | parser |
     parser := self fooToken, self overlappingToken.
     parser compileWithConfiguration: configuration.
-    scanner := (Smalltalk at: configuration options scannerName) new.
+    scanner := (Smalltalk at: configuration context options scannerName) new.
 
     scanner stream: 'foobaz' asPetitStream.
     scanner perform: #'consume_foo'.
@@ -67,13 +68,15 @@
     self assert: scanner position = 3.
     self assert: scanner resultPosition = 3.
     self assert: scanner result isNil.
+
+    "Modified: / 28-08-2015 / 14:15:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 testConsumeToken2
     | parser |
     parser := self fooToken, self barToken.
     parser compileWithConfiguration: configuration.
-    scanner := (Smalltalk at: configuration options scannerName) new.
+    scanner := (Smalltalk at: configuration context options scannerName) new.
 
     scanner stream: 'foobar' asPetitStream.
     scanner perform: #'consume_foo'.
@@ -81,6 +84,8 @@
     self assert: scanner position = 3.
     self assert: scanner resultPosition = 6.
     self assert: scanner result = #bar.
+
+    "Modified: / 28-08-2015 / 14:16:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 testScan
@@ -88,7 +93,7 @@
     parser := self aToken.
     parser compileWithConfiguration: configuration.
     
-    scanner := (Smalltalk at: configuration options scannerName) new.
+    scanner := (Smalltalk at: configuration context options scannerName) new.
 
     scanner stream: 'a' asPetitStream.
     scanner perform: #'scan_token'.
@@ -96,6 +101,8 @@
     self assert: scanner position = 0.
     self assert: scanner resultPosition = 1.
     self assert: scanner result = #token.
+
+    "Modified: / 28-08-2015 / 14:16:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 testScan2
@@ -103,7 +110,7 @@
     parser := self fooToken.
     parser compileWithConfiguration: configuration.
     
-    scanner := (Smalltalk at: configuration options scannerName) new.
+    scanner := (Smalltalk at: configuration context options scannerName) new.
 
     scanner stream: 'foo' asPetitStream.
     scanner perform: #'scan_foo'.
@@ -111,6 +118,8 @@
     self assert: scanner position = 0.
     self assert: scanner resultPosition = 3.
     self assert: scanner result = #foo.
+
+    "Modified: / 28-08-2015 / 14:16:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 testScan3
@@ -118,7 +127,7 @@
     parser := self fooToken.
     parser compileWithConfiguration: configuration.
     
-    scanner := (Smalltalk at: configuration options scannerName) new.
+    scanner := (Smalltalk at: configuration context options scannerName) new.
 
     scanner stream: 'bar' asPetitStream.
     scanner perform: #'scan_foo'.
@@ -126,6 +135,8 @@
     self assert: scanner position = 0.
     self assert: scanner resultPosition = 0.
     self assert: scanner result isNil.
+
+    "Modified: / 28-08-2015 / 14:16:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 testScan4
@@ -133,7 +144,7 @@
     parser := self fooToken, self idToken.
     parser compileWithConfiguration: configuration.
     
-    scanner := (Smalltalk at: configuration options scannerName) new.
+    scanner := (Smalltalk at: configuration context options scannerName) new.
 
     scanner stream: 'foothere' asPetitStream.
     scanner perform: #'scan_foo'.
@@ -147,6 +158,8 @@
     self assert: scanner position = 3.
     self assert: scanner resultPosition = 8.
     self assert: scanner result = #id.
+
+    "Modified: / 28-08-2015 / 14:16:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 testSequence
@@ -154,7 +167,7 @@
     parser := self fooTrimmingToken, self idTrimmingToken.
     parser compileWithConfiguration: configuration.
     
-    scanner := (Smalltalk at: configuration options scannerName) new.
+    scanner := (Smalltalk at: configuration context options scannerName) new.
 
     scanner stream: 'foo there ' asPetitStream.
     scanner perform: #'foo'.
@@ -162,7 +175,7 @@
     self assert: scanner position = 0.
     self assert: scanner resultPosition = 3.
     self assert: scanner stream position = 4.
-    self assert: scanner result = #foo.	
+    self assert: scanner result = #foo.         
     
     result := scanner perform: #'consume_foo'.
 
@@ -175,6 +188,8 @@
     self assert: result start = 1.
     self assert: result stop = 3.
     self assert: result inputValue = 'foo'.
+
+    "Modified: / 28-08-2015 / 14:16:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 testToken
@@ -182,7 +197,7 @@
     parser := self fooToken, self idTrimmingToken.
     parser compileWithConfiguration: configuration.
     
-    scanner := (Smalltalk at: configuration options scannerName) new.
+    scanner := (Smalltalk at: configuration context options scannerName) new.
 
     scanner stream: 'foo there' asPetitStream.
     scanner perform: #'foo'.
@@ -190,7 +205,9 @@
     self assert: scanner position = 0.
     self assert: scanner resultPosition = 3.
     self assert: scanner stream position = 3.
-    self assert: scanner result = #foo.		
+    self assert: scanner result = #foo.
+
+    "Modified: / 28-08-2015 / 14:16:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 testTrimmingScan
@@ -198,14 +215,16 @@
     parser := self fooTrimmingToken, self idTrimmingToken.
     parser compileWithConfiguration: configuration.
     
-    scanner := (Smalltalk at: configuration options scannerName) new.
+    scanner := (Smalltalk at: configuration context options scannerName) new.
 
     scanner stream: 'foo there' asPetitStream.
     scanner perform: #'scan_foo'.
     
     self assert: scanner position = 0.
     self assert: scanner resultPosition = 3.
-    self assert: scanner result = #foo.	
+    self assert: scanner result = #foo.
+
+    "Modified: / 28-08-2015 / 14:16:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 testTrimmingToken
@@ -213,7 +232,7 @@
     parser := self fooTrimmingToken, self idTrimmingToken.
     parser compileWithConfiguration: configuration.
     
-    scanner := (Smalltalk at: configuration options scannerName) new.
+    scanner := (Smalltalk at: configuration context options scannerName) new.
 
     scanner stream: 'foo there' asPetitStream.
     result := scanner perform: #'foo'.
@@ -221,8 +240,17 @@
     self assert: scanner position = 0.
     self assert: scanner resultPosition = 3.
     self assert: scanner stream position = 4.
-    self assert: scanner result = #foo.		
+    self assert: scanner result = #foo.                 
         
     self assert: result.
+
+    "Modified: / 28-08-2015 / 14:16:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
+!PPCDistinctScannerTest class methodsFor:'documentation'!
+
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
+! !
+