Skip to content

Commit

Permalink
Merge pull request amber-smalltalk#227 from herby/test-run-selected-only
Browse files Browse the repository at this point in the history
Only run tests from selected categories. Fixes #226.
  • Loading branch information
NicolasPetton committed Jun 14, 2012
2 parents 4a95f86 + 2337b56 commit 5c9c9d8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions js/IDE.deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -3238,11 +3238,11 @@ smalltalk.addMethod(
"_testCases",
smalltalk.method({
selector: "testCases",
fn: function () {
fn: function (){
var self=this;
var testCases=nil;
(testCases=[]);
smalltalk.send(smalltalk.send(self, "_selectedClasses", []), "_do_", [(function(each){return smalltalk.send(testCases, "_addAll_", [smalltalk.send(each, "_buildSuite", [])]);})]);
smalltalk.send(smalltalk.send(smalltalk.send(self, "_selectedClasses", []), "_select_", [(function(each){return smalltalk.send(smalltalk.send(self, "_selectedCategories", []), "_includes_", [smalltalk.send(each, "_category", [])]);})]), "_do_", [(function(each){return smalltalk.send(testCases, "_addAll_", [smalltalk.send(each, "_buildSuite", [])]);})]);
return testCases;
return self;}
}),
Expand Down
8 changes: 4 additions & 4 deletions js/IDE.js
Original file line number Diff line number Diff line change
Expand Up @@ -4564,16 +4564,16 @@ smalltalk.addMethod(
smalltalk.method({
selector: "testCases",
category: 'accessing',
fn: function () {
fn: function (){
var self=this;
var testCases=nil;
(testCases=[]);
smalltalk.send(smalltalk.send(self, "_selectedClasses", []), "_do_", [(function(each){return smalltalk.send(testCases, "_addAll_", [smalltalk.send(each, "_buildSuite", [])]);})]);
smalltalk.send(smalltalk.send(smalltalk.send(self, "_selectedClasses", []), "_select_", [(function(each){return smalltalk.send(smalltalk.send(self, "_selectedCategories", []), "_includes_", [smalltalk.send(each, "_category", [])]);})]), "_do_", [(function(each){return smalltalk.send(testCases, "_addAll_", [smalltalk.send(each, "_buildSuite", [])]);})]);
return testCases;
return self;},
args: [],
source: "testCases\x0a\x09| testCases |\x0a\x09testCases := #().\x0a\x09self selectedClasses do: [:each | testCases addAll: each buildSuite].\x0a\x09^testCases",
messageSends: ["do:", "selectedClasses", "addAll:", "buildSuite"],
source: "testCases\x0a\x09| testCases |\x0a\x09testCases := #().\x0a\x09(self selectedClasses\x0a\x09\x09select: [:each | self selectedCategories includes: each category])\x0a\x09\x09do: [:each | testCases addAll: each buildSuite].\x0a\x09^testCases",
messageSends: ["do:", "select:", "selectedClasses", "includes:", "selectedCategories", "category", "addAll:", "buildSuite"],
referencedClasses: []
}),
smalltalk.TestRunner);
Expand Down
4 changes: 3 additions & 1 deletion st/IDE.st
Original file line number Diff line number Diff line change
Expand Up @@ -2033,7 +2033,9 @@ statusInfo
testCases
| testCases |
testCases := #().
self selectedClasses do: [:each | testCases addAll: each buildSuite].
(self selectedClasses
select: [:each | self selectedCategories includes: each category])
do: [:each | testCases addAll: each buildSuite].
^testCases
! !

Expand Down

0 comments on commit 5c9c9d8

Please sign in to comment.