The Trunk: SUnit-mt.102.mcz

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

The Trunk: SUnit-mt.102.mcz

commits-2
Marcel Taeumel uploaded a new version of SUnit to project The Trunk:
http://source.squeak.org/trunk/SUnit-mt.102.mcz

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

Name: SUnit-mt.102
Author: mt
Time: 19 April 2015, 7:24:35.203 am
UUID: 3e115dcf-b404-3043-814e-ecb6f43f9192
Ancestors: SUnit-bf.101

Extracted logic of being a test method to be easier reusable in extensions and tools.

Moved test-class-check from SUnitTools to here.

=============== Diff against SUnit-bf.101 ===============

Item was added:
+ ----- Method: CompiledMethod>>isTestMethod (in category '*SUnit-testing') -----
+ isTestMethod
+
+ ^ self methodClass isTestClass and: [self selector isTestSelector]!

Item was added:
+ ----- Method: MethodReference>>isTestMethod (in category '*SUnit-testing') -----
+ isTestMethod
+
+ ^ self compiledMethod isTestMethod!

Item was added:
+ ----- Method: Object>>isTestClass (in category '*SUnit-testing') -----
+ isTestClass
+
+ ^ false!

Item was added:
+ ----- Method: Symbol>>isTestSelector (in category '*SUnit-testing') -----
+ isTestSelector
+
+ ^ self beginsWith: 'test'!

Item was changed:
  ----- Method: TestCase class>>allTestSelectors (in category 'accessing') -----
  allTestSelectors
 
  ^(self allSelectors asArray select: [ :each |
+ each isTestSelector and: [ each numArgs isZero ] ]) sort
- (each beginsWith: 'test') and: [ each numArgs isZero ] ]) sort
  !

Item was added:
+ ----- Method: TestCase class>>isTestClass (in category 'testing') -----
+ isTestClass
+ ^ true!