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 |