[squeak-dev] The Trunk: 60Deprecated-ct.108.mcz
commits at source.squeak.org
commits at source.squeak.org
Fri Mar 25 20:24:35 UTC 2022
Christoph Thiede uploaded a new version of 60Deprecated to project The Trunk:
http://source.squeak.org/trunk/60Deprecated-ct.108.mcz
==================== Summary ====================
Name: 60Deprecated-ct.108
Author: ct
Time: 25 March 2022, 9:24:32.353762 pm
UUID: 66b82798-b173-684a-b384-48b70c79f60b
Ancestors: 60Deprecated-mt.107
Complements SUnit-ct.139 (deprecation of #shouldFix:). Uses Kernel-ct.1452.
=============== Diff against 60Deprecated-mt.107 ===============
Item was added:
+ ----- Method: SUnitExtensionsTest>>shouldFixTest (in category '*60Deprecated-real tests') -----
+ shouldFixTest
+
+ self shouldFix: [ Error signal: 'any kind of error' ]
+ !
Item was added:
+ ----- Method: SUnitExtensionsTest>>testShouldFix (in category '*60Deprecated-tests') -----
+ testShouldFix
+
+ | testCase testResult |
+
+ testCase := self class selector: #shouldFixTest.
+ testResult := Deprecation suppressDuring: [testCase run].
+
+ self assert: (testResult passed includes: testCase).
+ self assert: testResult passed size=1.
+ self assert: testResult failures isEmpty.
+ self assert: testResult errors isEmpty.
+
+ !
Item was added:
+ ----- Method: TestCase>>shouldFix: (in category '*60Deprecated-asserting - extensions') -----
+ shouldFix: aBlock
+
+ self deprecated: 'Handling exceptions of all kind is disrecommended. To test for errors, send #shouldRaiseError: instead. You can also send #should:raise: to test against specific exception classes such as Warning or NotFound. See also the class comments on Exception and Error.'.
+ ^self should: aBlock raise: Exception!
More information about the Squeak-dev
mailing list
|