compiler/tests/extras/PPCSmalltalkTests.st
changeset 515 b5316ef15274
parent 464 f6d77fee9811
child 516 3b81c9e53352
child 524 f6f68d32de73
--- a/compiler/tests/extras/PPCSmalltalkTests.st	Fri Jul 24 15:06:54 2015 +0100
+++ b/compiler/tests/extras/PPCSmalltalkTests.st	Mon Aug 17 12:13:16 2015 +0100
@@ -11,6 +11,16 @@
 
 !PPCSmalltalkTests methodsFor:'as yet unclassified'!
 
+configuration
+    arguments := PPCArguments default
+        profile: true;
+        yourself.
+        
+    ^ PPCTokenizingConfiguration new
+        arguments: arguments;
+        yourself.
+!
+
 setUp
     arguments := PPCArguments default
         profile: true;
@@ -22,13 +32,12 @@
 !
 
 testSmalltakToken
-    | token1 token2 |
-    arguments generate: false.
+    | token1  |
+    configuration := self configuration.
     token1 := 'a' asParser smalltalkToken compileWithConfiguration: configuration.
-    token2 := 'b' asParser smalltalkToken compileWithConfiguration: configuration.
     
-    self assert: token1 tokenizer children first tokenClass = PPSmalltalkToken.
-    self assert: token1 tokenizer children first whitespace = token1 tokenizer children first  whitespace.
+    self assert: ((token1 parse: 'a') class == PPSmalltalkToken).
+    self assert: (token1 parse: '"comment" a "another comment"') inputValue = 'a'
 !
 
 testSmalltakWhitespace
@@ -37,8 +46,10 @@
     ws2 := PPSmalltalkWhitespaceParser new.
     
     self assert: ws1 = ws2.
-    self assert: (ws1 == ws2) not.
+    self assert: ws1 ~~ ws2.
     
     self assert: ws1 hash = ws2 hash.
+
+    "Modified: / 30-07-2015 / 06:56:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !