On Sat, Oct 12, 2013 at 09:00:27PM +0200, Holger Hans Peter Freyther wrote:
> On Sat, Oct 12, 2013 at 06:30:19PM +0200, Paolo Bonzini wrote:
> > Can you guys look at what caused the double sharp? :)
> 
> probably 0f550663b46a9785c353dbab8b2721f8b5620ce0 :)

not beautiful... but what about this?


diff --git a/packages/sunit/SUnit.st b/packages/sunit/SUnit.st
index 38a872b..871f541 100644
--- a/packages/sunit/SUnit.st
+++ b/packages/sunit/SUnit.st
@@ -1121,8 +1121,10 @@ When you are writing a test case method, send #assert: 
aBoolean when you want to
        <category: 'Printing'>
        aStream
            nextPutAll: self class printString;
-           nextPutAll: '>>#';
-           nextPutAll: testSelector printString.
+           nextPutAll: '>>';
+           nextPutAll: (testSelector isNil
+                           ifTrue: [#nil]
+                           ifFalse: [testSelector]) printString.
     ]
 ]
 
diff --git a/packages/sunit/SUnitTests.st b/packages/sunit/SUnitTests.st
index 166ee89..ed44412 100644
--- a/packages/sunit/SUnitTests.st
+++ b/packages/sunit/SUnitTests.st
@@ -278,11 +278,19 @@ if the tests are hard to write, something is probably 
wrong with the design".'>
 
     testPrintString [
         <category: 'Testing'>
-        "Make sure that a new test can be printed"
+       | suite result |
+        "Make sure that a new test can be printed and that for
+        a ran test it shows only one hash."
 
         self
             shouldnt: [TestCase new printString] raise: Exception;
             assert: TestCase new printString = 'TestCase>>#nil'.
+
+       suite := TestSuite new.
+       suite addTest: (SUnitClientTest selector: #noop).
+       result := suite run.
+
+       self assert: suite tests first printString = 'SUnitClientTest>>#noop'.
     ]
 
     isLogging [

_______________________________________________
help-smalltalk mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-smalltalk

Reply via email to