Portability: Removed tests/asserts referring to BlockClosure
authorJan Vrany <jan.vrany@fit.cvut.cz>
Thu, 10 Sep 2015 07:13:16 +0100
changeset 547 0b8c75af51a0
parent 546 679fd1f9a25b
child 548 5536a6da50e4
Portability: Removed tests/asserts referring to BlockClosure Due to historical reasons, there's no BlockClosure in Smalltalk/X, the class is named Block. Conversely, there's no Block in Squeak/Pharo.
compiler/PPCCodeGen.st
compiler/tests/stx_goodies_petitparser_compiler_tests.st
--- a/compiler/PPCCodeGen.st	Tue Sep 08 09:15:35 2015 +0100
+++ b/compiler/PPCCodeGen.st	Thu Sep 10 07:13:16 2015 +0100
@@ -173,13 +173,9 @@
     
     stringOrBlock isString ifTrue: [ 
         ^ self codeAssignString: stringOrBlock to: variable
-    ].
-
-    (stringOrBlock isKindOf: BlockClosure) ifTrue: [ 
+    ] ifFalse:[
         ^ self codeAssignParsedValueOf: stringOrBlock  to: variable
     ].
-
-    self error: 'unknown argument'.
 !
 
 codeAssignParsedValueOf:aBlock to: variable 
@@ -223,7 +219,6 @@
     stringOrBlock isString ifTrue: [ 
         self codeEvaluateAndAssignString: stringOrBlock to: variable
     ] ifFalse: [ 
-        self assert: (stringOrBlock isKindOf: BlockClosure).
         self codeEvaluateAndAssignParsedValueOf: stringOrBlock  to: variable 
     ]
 !
--- a/compiler/tests/stx_goodies_petitparser_compiler_tests.st	Tue Sep 08 09:15:35 2015 +0100
+++ b/compiler/tests/stx_goodies_petitparser_compiler_tests.st	Thu Sep 10 07:13:16 2015 +0100
@@ -80,6 +80,7 @@
         #'stx:goodies/petitparser/tests'    "PPAbstractParserTest - superclass of PPCCodeGeneratorTest"
         #'stx:goodies/sunit'    "TestAsserter - superclass of FooScannerTest"
         #'stx:libbasic'    "LibraryDefinition - superclass of stx_goodies_petitparser_compiler_tests"
+        #'stx:libcompat'
     )
 !