Christoph Thiede uploaded a new version of SUnit to project The Treated Inbox:
http://source.squeak.org/treated/SUnit-ct.137.mcz
==================== Summary ====================
Name: SUnit-ct.137
Author: ct
Time: 19 January 2022, 11:54:53.214828 pm
UUID: dd617d36-ff31-f143-932d-09d1c332f5dc
Ancestors: SUnit-ct.136
Revises exception choice in TestCase >> #shouldFix:. It is a bad practice to handle, or even to search for arbitary Exceptions. Many mechanisms signal possibly unhandled "harmless" exceptions and rely on their #defaultAction. This includes accesses to the source files, debugging operations, and many others. The assertion in its current form makes little sense.
=============== Diff against SUnit-ct.136 ===============
Item was changed:
----- Method: TestCase>>shouldFix: (in category 'asserting - extensions') -----
shouldFix: aBlock
+ ^self should: aBlock raise: TestResult exError!
- ^self should: aBlock raise: Exception!
Christoph Thiede uploaded a new version of Chronology-Core to project The Trunk:
http://source.squeak.org/trunk/Chronology-Core-ct.75.mcz
==================== Summary ====================
Name: Chronology-Core-ct.75
Author: ct
Time: 31 January 2022, 8:48:00.118214 pm
UUID: ed9132ca-ceb9-5143-9865-3f89d80f1e60
Ancestors: Chronology-Core-ct.74
Recategorizes uncategorized method.
=============== Diff against Chronology-Core-ct.74 ===============
Item was changed:
+ ----- Method: Duration>>adaptToCollection:andSend: (in category 'converting') -----
- ----- Method: Duration>>adaptToCollection:andSend: (in category 'as yet unclassified') -----
adaptToCollection: rcvr andSend: selector
"If I am involved in arithmetic with a Collection, return a Collection of the results of each element combined with me in that expression."
^ rcvr collect: [:element | element perform: selector with: self]!
Christoph Thiede uploaded a new version of SUnit to project The Trunk:
http://source.squeak.org/trunk/SUnit-ct.138.mcz
==================== Summary ====================
Name: SUnit-ct.138
Author: ct
Time: 31 January 2022, 8:38:14.044214 pm
UUID: b34d72f7-2b2e-a642-9c1e-66cc7a361a00
Ancestors: SUnit-ct.136
Adds and tests #shouldRaiseError: as a convenience assertion that encapsulates the #exError abstraction. Adds an explaining comment on that abstraction (see TestResult exError and allErrors).
Thanks to Marcel for the discussion!
=============== Diff against SUnit-ct.136 ===============
Item was added:
+ ----- Method: SUnitExtensionsTest>>shouldRaiseErrorTest (in category 'real tests') -----
+ shouldRaiseErrorTest
+
+ self shouldRaiseError: [ TestResult exError signal: 'any kind of error' ]
+ !
Item was added:
+ ----- Method: SUnitExtensionsTest>>testShouldRaiseError (in category 'tests') -----
+ testShouldRaiseError
+
+ | testCase testResult |
+ testCase := self class selector: #shouldRaiseErrorTest.
+ testResult := testCase run.
+
+ self assert: (testResult passed includes: testCase).
+ self assert: 1 equals: testResult passed size.
+ self assert: testResult failures isEmpty.
+ self assert: testResult errors isEmpty.!
Item was added:
+ ----- Method: TestCase>>shouldRaiseError: (in category 'asserting') -----
+ shouldRaiseError: aBlock
+
+ ^ self should: aBlock raise: TestResult exError
+ !
Item was changed:
----- Method: TestResult class>>allErrors (in category 'exceptions') -----
allErrors
+ "Answer an exception set for all common exceptions that can be raised when a typical error is detected in Squeak. This method decouples the testing framework from the exception handling system and allows clients to convert their tests to another Smalltalk dialect easily."
^ self exError, Warning, Halt
!
Item was changed:
----- Method: TestResult class>>exError (in category 'exceptions') -----
exError
+ "Answer the exception class that represents a regular error in Squeak. This method decouples the testing framework from the exception handling system and allows clients to convert their tests to another Smalltalk dialect easily."
^Error
!
Christoph Thiede uploaded a new version of Files to project The Trunk:
http://source.squeak.org/trunk/Files-ct.189.mcz
==================== Summary ====================
Name: Files-ct.189
Author: ct
Time: 31 January 2022, 8:03:16.983876 pm
UUID: 6c263b96-030b-d044-934f-7e8c75af61f6
Ancestors: Files-mt.188
FileDirectory: Extracts idempotent #startUpDefaultDirectory from #startUp, which is not idempotent when the host system is Windows, where the source files must not be opened multiple times. Clients only interested in refreshing the default directory should send the new extracted message.
See: http://lists.squeakfoundation.org/pipermail/squeak-dev/2022-January/218179.…
=============== Diff against Files-mt.188 ===============
Item was changed:
+ ----- Method: FileDirectory class>>startUp (in category 'system start up') -----
- ----- Method: FileDirectory class>>startUp (in category 'name utilities') -----
startUp
- "Establish the platform-specific FileDirectory subclass. Do any platform-specific startup."
- self setDefaultDirectoryClass.
+ self startUpDefaultDirectory.
+ Smalltalk openSourceFiles.!
- self setDefaultDirectory: (self dirPathFor: Smalltalk imageName).
-
- Preferences startInUntrustedDirectory
- ifTrue:[ "The SecurityManager may override the default directory to prevent unwanted write access etc."
- self setDefaultDirectory: SecurityManager default untrustedUserDirectory.
- "Make sure we have a place to go to"
- DefaultDirectory assureExistence].
- Smalltalk openSourceFiles.
- (Smalltalk classNamed: #DoItFirst) ifNotNil: [ :doit | doit perform: #reevaluateCwd ].
- !
Item was added:
+ ----- Method: FileDirectory class>>startUpDefaultDirectory (in category 'system start up') -----
+ startUpDefaultDirectory
+ "Establish the platform-specific FileDirectory subclass. Do any platform-specific startup."
+
+ self setDefaultDirectoryClass.
+ self setDefaultDirectory: (self dirPathFor: Smalltalk imageName).
+
+ Preferences startInUntrustedDirectory
+ ifTrue:[ "The SecurityManager may override the default directory to prevent unwanted write access etc."
+ self setDefaultDirectory: SecurityManager default untrustedUserDirectory.
+ "Make sure we have a place to go to"
+ DefaultDirectory assureExistence].
+
+ (Smalltalk classNamed: #DoItFirst) ifNotNil: [ :doit | doit perform: #reevaluateCwd ].!