--- a/compiler/tests/extras/PPCResources.st Sun May 10 06:46:56 2015 +0100
+++ b/compiler/tests/extras/PPCResources.st Sun May 10 14:20:24 2015 +0100
@@ -9,8 +9,6 @@
category:'PetitCompiler-Extras-Tests-Support'
!
-PPCResources comment:''
-!
!PPCResources methodsFor:'java'!
@@ -23,7 +21,9 @@
!
javaLangMath
- ^ (FileStream fileNamed: '../java-src/java/lang/Math.java') contents
+ ^ (FileStream fileNamed: '../java-src/java/lang/Math.java') contents asString
+
+ "Modified: / 10-05-2015 / 14:11:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
javaSourcesBig
@@ -32,7 +32,9 @@
!
javaUtilTimer
- ^ (FileStream fileNamed: '../java-src/java/util/Timer.java') contents
+ ^ (FileStream fileNamed: '../java-src/java/util/Timer.java') contents asString
+
+ "Modified: / 10-05-2015 / 14:11:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
workingJavaInDirectory: directory
@@ -57,11 +59,24 @@
readDirectory: directory
| file |
- file := directory asFileReference.
- file exists ifTrue: [
+
+ ( (Smalltalk respondsTo: #isSmalltalkX) and:[ Smalltalk isSmalltalkX ] ) ifTrue:[
+ file := directory asFilename.
+ file exists ifFalse:[
+ self error: 'Directory does not exist'.
+ ].
+ ^ file recursiveDirectoryContentsAsFilenames select:[:each | each isRegularFile ]
+ ] ifFalse:[
+ "Assuming Pharo..."
+
+ file := directory asFileReference.
+ file exists ifFalse: [
+ self error: 'Directory does not exist'.
+ ].
^ file allFiles
- ].
- ^ #()
+ ]
+
+ "Modified: / 10-05-2015 / 07:54:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!PPCResources methodsFor:'smalltalk'!
@@ -92,3 +107,10 @@
^ (self smalltalkInDirectory: '../smalltalk-src/') copyFrom: 1 to: 5000.
! !
+!PPCResources class methodsFor:'documentation'!
+
+version_HG
+
+ ^ '$Changeset: <not expanded> $'
+! !
+