Fixes tests HGStxTests>>test_commit_16x on 6.2.2
authorJan Vrany <jan.vrany@fit.cvut.cz>
Wed, 29 Jan 2014 15:57:26 +0000
changeset 365 1ce5bbf93d1c
parent 364 921840a61e72
child 366 9da938d1e76a
child 481 0cfef855baa2
Fixes tests HGStxTests>>test_commit_16x on 6.2.2 There's no TestCase>>skipIf:description: in 6.2.2'a SUnit.
mercurial/HGStXTests.st
--- a/mercurial/HGStXTests.st	Wed Jan 29 15:24:06 2014 +0000
+++ b/mercurial/HGStXTests.st	Wed Jan 29 15:57:26 2014 +0000
@@ -7,7 +7,7 @@
 This library is free software; you can redistribute it and/or
 modify it under the terms of the GNU Lesser General Public
 License as published by the Free Software Foundation; either
-version 2.1 of the License. 
+version 2.1 of the License.
 
 This library is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -37,7 +37,7 @@
 This library is free software; you can redistribute it and/or
 modify it under the terms of the GNU Lesser General Public
 License as published by the Free Software Foundation; either
-version 2.1 of the License. 
+version 2.1 of the License.
 
 This library is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -942,7 +942,7 @@
 
 test_commit_12a
     "
-        Test correct fileout or class with respect to UTF8.  
+        Test correct fileout or class with respect to UTF8.
         This checks for issue #8.
 
     "
@@ -979,7 +979,7 @@
 
 test_commit_12b
     "
-        Test correct fileout of extensions with respect to UTF8. 
+        Test correct fileout of extensions with respect to UTF8.
         This checks for issue #8.
     "
 
@@ -1213,11 +1213,16 @@
 
     | repo pmN111 ctN111 java_lang_String changeset |
 
+    "/ Hack for rel 6.2.2 - should use 'self skipIf: ... '
+    "/ but this is not supported by 6.2.2's SUnit..."
+    (Smalltalk versionString = '6.2.2') ifTrue:[ ^ self ].
+
     repo := self repositoryNamed: 'mocks/hg/p5'.
     self assert: (Smalltalk loadPackage:'mocks:hg/p5').
 
     "/ Do skipIf after package is loaded!!!!!! otherwise the
     "/ Java extension is not loaded!!
+
     self skipIf: self stxlibjavaAvailable not description: 'STX:LIBJAVA not available'.
 
     java_lang_String := Java classForName: 'java.lang.String'.
@@ -1252,6 +1257,11 @@
 
     | repo pmN111 ctN111 changeset |
 
+    "/ Hack for rel 6.2.2 - should use 'self skipIf: ... '
+    "/ but this is not supported by 6.2.2's SUnit..."
+    (Smalltalk versionString = '6.2.2') ifTrue:[ ^ self ].
+
+
     repo := self repositoryNamed: 'mocks/hg/p5'.
     self assert: (Smalltalk loadPackage:'mocks:hg/p5').
 
@@ -1260,7 +1270,7 @@
     self skipIf: self stxlibjavaAvailable not description: 'STX:LIBJAVA not available'.
 
     "/ Flush Java to make sure java.lang.Object is not loaded.
-    (Smalltalk at:#Java) flushAllJavaResources.        
+    (Smalltalk at:#Java) flushAllJavaResources.
 
 
     pmN111 := HGPackageModel named: #'mocks:hg/p5'.
@@ -1789,7 +1799,7 @@
 
 stxlibjavaAvailable
     "raise an error: this method should be implemented (TODO)"
-    
+
     (Smalltalk at:#JavaVM) isNil ifTrue:[
         Smalltalk loadPackage:'stx:libjava'.
     ].
@@ -1807,8 +1817,8 @@
 
         "/ Opps, workaround - have to nil out Java:ExtensionsPathPackages
         Smalltalk at: #'Java:ExtensionsPathPackages' put: nil.
-        
-        "/ Now, initialize ot..."                
+
+        "/ Now, initialize ot..."
         (Smalltalk at:#Java) initialize.
         (Smalltalk at:#JavaVM) initializeVM.
         true.