compiler/tests/PPCUnivarsalGuardTest.st
changeset 537 fb212e14d1f4
parent 535 a8feb0f47574
child 538 16e8536f5cfb
--- a/compiler/tests/PPCUnivarsalGuardTest.st	Mon Sep 07 08:03:02 2015 +0100
+++ b/compiler/tests/PPCUnivarsalGuardTest.st	Mon Sep 07 08:20:46 2015 +0100
@@ -4,7 +4,7 @@
 
 PPAbstractParserTest subclass:#PPCUnivarsalGuardTest
 	instanceVariableNames:'parser result context node compiler id node2 id2 id1 node1 node3
-		options configuration'
+		options'
 	classVariableNames:''
 	poolDictionaries:''
 	category:'PetitCompiler-Tests-Core-Universal'
@@ -22,13 +22,12 @@
 !
 
 setUp
-    options := PPCCompilationOptions default
-        profile: true;
-        tokenize: false;
-        yourself.
-        
-    configuration := PPCConfiguration new.
-    configuration context options: options
+    options := (PPCCompilationOptions default)
+            profile:true;
+            tokenize:false;
+            yourself.
+    compiler := PPCCompiler new.
+    compiler context options:options
 
     "Modified: / 04-09-2015 / 16:21:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
@@ -45,8 +44,8 @@
 !PPCUnivarsalGuardTest methodsFor:'tests - guard'!
 
 testChoiceGuard
-    parser := ('foo' asParser trimmingToken / 'bar' asParser trimmingToken / $d asParser trimmingToken plus) 
-        compileWithConfiguration: configuration.
+    parser := ('foo' asParser trimmingToken / 'bar' asParser trimmingToken 
+                    / $d asParser trimmingToken plus) compileUsingCompiler:compiler.
     
     self assert: parser parse: 'foo'.
     self assert: result inputValue = 'foo'.	
@@ -70,8 +69,8 @@
 !
 
 testEmptyChoiceGuard
-    parser := ('foo' asParser trimmingToken / 'bar' asParser trimmingToken / $d asParser trimmingToken star) 
-        compileWithConfiguration: configuration.
+    parser := ('foo' asParser trimmingToken / 'bar' asParser trimmingToken 
+                    / $d asParser trimmingToken star) compileUsingCompiler:compiler.
     
     self assert: parser parse: 'foo'.
     self assert: result inputValue = 'foo'.	
@@ -91,7 +90,8 @@
 !
 
 testGuardSmalltlakToken
-    parser := (#letter asParser, #word asParser star) smalltalkToken compileWithConfiguration: configuration.
+    parser := (#letter asParser , #word asParser star) smalltalkToken 
+                    compileUsingCompiler:compiler.
     
     self assert: parser parse: 'bar'.
     self assert: (context invocations anySatisfy: [ :e | e beginsWith: 'seq' ]).
@@ -101,7 +101,8 @@
 !
 
 testSequenceGuard
-    parser := ((#any asParser, #any asParser) wrapped, (#any asParser, #any asParser)) compileWithConfiguration: configuration.
+    parser := ((#any asParser , #any asParser) wrapped , (#any asParser , #any asParser)) 
+                    compileUsingCompiler:compiler.
     
     self assert: parser parse: 'fooo' to: #(#($f $o) #($o $o)).	
     self assert: parser parse: 'fo oo' to: #(#($f $o) #($  $o)) end: 4.	
@@ -110,7 +111,7 @@
 !
 
 testTrimmerGuard
-    parser := $a asParser trim, $b asParser compileWithConfiguration: configuration.
+    parser := $a asParser trim , $b asParser compileUsingCompiler:compiler.
     
     self assert: parser parse: 'ab'.
     self assert: parser parse: ' ab'.