The Trunk: SUnitGUI-ct.70.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: SUnitGUI-ct.70.mcz

commits-2
Marcel Taeumel uploaded a new version of SUnitGUI to project The Trunk:
http://source.squeak.org/trunk/SUnitGUI-ct.70.mcz

==================== Summary ====================

Name: SUnitGUI-ct.70
Author: ct
Time: 31 May 2019, 2:15:26.862053 pm
UUID: 44154dfb-d0a5-e841-9b8e-826248842855
Ancestors: SUnitGUI-tpr.69

Add convenience method (#newForSuite:) for instance creation of TestRunner.

=============== Diff against SUnitGUI-tpr.69 ===============

Item was added:
+ ----- Method: TestRunner class>>newForSuite: (in category 'instance-creation') -----
+ newForSuite: aSuite
+
+ | runner classes categories |
+ runner := TestRunner new.
+ classes := aSuite tests asSet collect: #class.
+ categories := classes collect: #category.
+ ^ runner
+ filterCategoriesBy: ((categories collect: #asString) asStringByDelimiter: $;);
+ filterClassesBy: ((classes collect: #asString) asStringByDelimiter: $;);
+ yourself!

Item was changed:
  ----- Method: TestRunner>>filterCategories (in category 'accessing-categories') -----
  filterCategories
  | pattern |
  pattern := UIManager default
  request: 'Pattern(s) to select categories:\    (separate patterns with '';'')' withCRs
  initialAnswer: (categoryPattern ifNil: ['*']).
  (pattern isNil or: [pattern isEmpty]) ifTrue:
  [^self].
+ self filterCategoriesBy: pattern!
- categoriesSelected := ((categoryPattern := pattern) subStrings: ';')
- inject: Set new
- into: [:matches :subPattern|
- matches
- addAll: (categories select: [ :each | subPattern match: each]);
- yourself].
- self changed: #allSelections; changed: #categorySelected; updateClasses!

Item was added:
+ ----- Method: TestRunner>>filterCategoriesBy: (in category 'accessing-categories') -----
+ filterCategoriesBy: aPattern
+ categoriesSelected := ((categoryPattern := aPattern) subStrings: ';')
+ inject: Set new
+ into: [:matches :subPattern|
+ matches
+ addAll: (categories select: [ :each | subPattern match: each]);
+ yourself].
+ self changed: #allSelections; changed: #categorySelected; updateClasses!

Item was changed:
  ----- Method: TestRunner>>filterClasses (in category 'accessing-classes') -----
  filterClasses
  | pattern |
  pattern := UIManager default
  request: 'Pattern(s) to select tests:\  (separate patterns with '';'')' withCRs
  initialAnswer: (classPattern ifNil: '*').
  (pattern isNil or: [pattern isEmpty]) ifTrue:
  [^self].
+ self filterClassesBy: pattern!
- classesSelected := ((classPattern := pattern) subStrings: ';')
- inject: Set new
- into: [:matches :subPattern|
- matches
- addAll: (classes select: [ :each | subPattern match: each name]);
- yourself].
- self
- changed: #allSelections;
- changed: #classSelected;
- changed: #hasRunnable!

Item was added:
+ ----- Method: TestRunner>>filterClassesBy: (in category 'accessing-classes') -----
+ filterClassesBy: aPattern
+ classesSelected := ((classPattern := aPattern) subStrings: ';')
+ inject: Set new
+ into: [:matches :subPattern|
+ matches
+ addAll: (classes select: [ :each | subPattern match: each name]);
+ yourself].
+ self
+ changed: #allSelections;
+ changed: #classSelected;
+ changed: #hasRunnable!