# HG changeset patch # User Claus Gittinger # Date 1312368120 -7200 # Node ID 4c9779fe1181188faf00241623a372932291db1b # Parent 63c783128bae769fb69e059f3cc96cef10892376 commented: #testSuite diff -r 63c783128bae -r 4c9779fe1181 ProjectDefinition.st --- a/ProjectDefinition.st Tue Aug 02 09:34:38 2011 +0200 +++ b/ProjectDefinition.st Wed Aug 03 12:42:00 2011 +0200 @@ -1118,27 +1118,32 @@ ! testSuite - + "generate and return a testSuite containing all of my test-classes" |suite classes| suite := TestSuite named:self package. - classes := self classes select: - [:each | - each isLoaded ifFalse:[each autoload]. - (each isTestCaseLike) and:[ each isAbstract not ] ]. - classes := classes collect:[:each|each asTestCase]. + classes := self classes + select:[:each | + each isLoaded ifFalse:[each autoload]. + (each isTestCaseLike) and:[ each isAbstract not ] + ] + thenCollect:[:each | each asTestCase]. + classes := classes asSortedCollection:[:a :b | a name <= b name ]. - classes do: - [:each | | tests | - tests := each buildSuite tests. - tests := tests reject:[:test|self shouldExcludeTest: test]. - suite addTests: tests]. - ^suite + classes do: [:each | + | tests | + + tests := each buildSuite tests. + tests := tests reject:[:test|self shouldExcludeTest: test]. + suite addTests: tests + ]. + ^ suite "Created: / 01-04-2011 / 15:20:02 / Jan Vrany " "Modified: / 03-06-2011 / 17:07:04 / Jan Vrany " + "Modified (comment): / 03-08-2011 / 12:41:51 / cg" ! ! !ProjectDefinition class methodsFor:'class initialization'! @@ -6387,7 +6392,7 @@ !ProjectDefinition class methodsFor:'documentation'! version_CVS - ^ '$Header: /cvs/stx/stx/libbasic/ProjectDefinition.st,v 1.339 2011-07-03 19:52:47 cg Exp $' + ^ '$Header: /cvs/stx/stx/libbasic/ProjectDefinition.st,v 1.340 2011-08-03 10:42:00 cg Exp $' ! version_SVN