ProjectDefinition.st
changeset 13544 4c9779fe1181
parent 13485 60df70976373
child 13559 9f9023caaf50
equal deleted inserted replaced
13543:63c783128bae 13544:4c9779fe1181
  1116 
  1116 
  1117     "Created: / 03-06-2011 / 16:56:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
  1117     "Created: / 03-06-2011 / 16:56:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
  1118 !
  1118 !
  1119 
  1119 
  1120 testSuite
  1120 testSuite
  1121 
  1121     "generate and return a testSuite containing all of my test-classes"
  1122 
  1122 
  1123     |suite classes|
  1123     |suite classes|
  1124 
  1124 
  1125     suite := TestSuite named:self package.
  1125     suite := TestSuite named:self package.
  1126     classes := self classes select:
  1126     classes := self classes 
  1127 		[:each |
  1127                 select:[:each |
  1128 		each isLoaded ifFalse:[each autoload].
  1128                     each isLoaded ifFalse:[each autoload].
  1129 		(each isTestCaseLike) and:[ each isAbstract not ] ].
  1129                     (each isTestCaseLike) and:[ each isAbstract not ] 
  1130     classes := classes collect:[:each|each asTestCase].
  1130                 ]
       
  1131                 thenCollect:[:each | each asTestCase].
       
  1132 
  1131     classes := classes asSortedCollection:[:a :b | a name <= b name ].
  1133     classes := classes asSortedCollection:[:a :b | a name <= b name ].
  1132 
  1134 
  1133     classes do:
  1135     classes do: [:each | 
  1134 	[:each | | tests |
  1136         | tests |
  1135 	tests := each buildSuite tests.
  1137 
  1136 	tests := tests reject:[:test|self shouldExcludeTest: test].
  1138         tests := each buildSuite tests.
  1137 	suite addTests: tests].
  1139         tests := tests reject:[:test|self shouldExcludeTest: test].
  1138     ^suite
  1140         suite addTests: tests
       
  1141     ].
       
  1142     ^ suite
  1139 
  1143 
  1140     "Created: / 01-04-2011 / 15:20:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
  1144     "Created: / 01-04-2011 / 15:20:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
  1141     "Modified: / 03-06-2011 / 17:07:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
  1145     "Modified: / 03-06-2011 / 17:07:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
  1146     "Modified (comment): / 03-08-2011 / 12:41:51 / cg"
  1142 ! !
  1147 ! !
  1143 
  1148 
  1144 !ProjectDefinition class methodsFor:'class initialization'!
  1149 !ProjectDefinition class methodsFor:'class initialization'!
  1145 
  1150 
  1146 initialize
  1151 initialize
  6385 ! !
  6390 ! !
  6386 
  6391 
  6387 !ProjectDefinition class methodsFor:'documentation'!
  6392 !ProjectDefinition class methodsFor:'documentation'!
  6388 
  6393 
  6389 version_CVS
  6394 version_CVS
  6390     ^ '$Header: /cvs/stx/stx/libbasic/ProjectDefinition.st,v 1.339 2011-07-03 19:52:47 cg Exp $'
  6395     ^ '$Header: /cvs/stx/stx/libbasic/ProjectDefinition.st,v 1.340 2011-08-03 10:42:00 cg Exp $'
  6391 !
  6396 !
  6392 
  6397 
  6393 version_SVN
  6398 version_SVN
  6394     ^ '§ Id: ProjectDefinition.st 10645 2011-06-09 15:28:45Z vranyj1  §'
  6399     ^ '§ Id: ProjectDefinition.st 10645 2011-06-09 15:28:45Z vranyj1  §'
  6395 ! !
  6400 ! !