Skip to content

Commit

Permalink
Fixes to TestRunner and #asText. Symbol evaluation protocol. Thanks L…
Browse files Browse the repository at this point in the history
…uciano.
  • Loading branch information
jvuletich committed Nov 28, 2024
1 parent 0df6d5e commit 1111440
Show file tree
Hide file tree
Showing 3 changed files with 91 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
'From Cuis7.1 [latest update: #6864] on 28 November 2024 at 6:19:50 am'!

!TestRunner methodsFor: 'updating' stamp: 'len 10/9/2024 09:27:38'!
update: aParameter
"updates come in from another thread"
(aParameter is: #TestResult) ifTrue:
[UISupervisor whenUIinSafeState:
[result := aParameter.
" self updatePassFail: aParameter."
self updateDetails: aParameter.
self updateFailures: aParameter.
self updateErrors: aParameter].
^ self].
(aParameter is: #TestCase) ifTrue:
[UISupervisor whenUIinSafeState:
[completedTests := completedTests + 1.
progressLabel := aParameter printString.
self changed: #progress].
^ self].
super update: aParameter! !


!ProgressMorph methodsFor: 'accessing' stamp: 'len 10/11/2024 08:39:02'!
label: aString subLabel: otherString
| label subLabel n |
label := aString.
subLabel := otherString.
layoutSpec notNil ifTrue: [
label isEmpty ifFalse: [
n := label size * extent x * 0.95 // (FontFamily defaultFamilyAndPointSize widthOfString: label).
label := label squeezedTo: n ].
subLabel isEmpty ifFalse: [
n := subLabel size * extent x * 0.95 // (FontFamily defaultFamilyAndPointSize widthOfString: subLabel).
subLabel := subLabel squeezedTo: n ] ].
self whenUIinSafeState: [
labelMorph contents: label.
subLabelMorph contents: subLabel.
self updatePositionAndExtent. ]! !


Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
'From Cuis7.1 [latest update: #6864] on 28 November 2024 at 6:20:28 am'!

!Character methodsFor: 'converting' stamp: 'len 10/12/2024 08:16:48'!
asText
^ self asString asText! !

Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
'From Cuis7.1 [latest update: #6864] on 28 November 2024 at 6:21:09 am'!

!Symbol methodsFor: 'evaluating' stamp: 'len 11/5/2024 08:56:50'!
value: anObject value: anObject2
^ anObject perform: self with: anObject2! !

!Symbol methodsFor: 'evaluating' stamp: 'len 11/5/2024 08:57:07'!
value: anObject value: anObject2 value: anObject3
^ anObject perform: self with: anObject2 with: anObject3! !

!Symbol methodsFor: 'evaluating' stamp: 'len 11/5/2024 08:57:20'!
value: anObject value: anObject2 value: anObject3 value: anObject4
^ anObject perform: self with: anObject2 with: anObject3 with: anObject4! !

!Symbol methodsFor: 'evaluating' stamp: 'len 11/5/2024 08:58:53'!
valueWithArguments: anArray
^ anArray first perform: self withArguments: anArray allButFirst! !


!UnicodeSymbol methodsFor: 'evaluating' stamp: 'len 11/5/2024 08:59:54'!
value: anObject value: anObject2
^ anObject perform: self with: anObject2! !

!UnicodeSymbol methodsFor: 'evaluating' stamp: 'len 11/5/2024 08:59:49'!
value: anObject value: anObject2 value: anObject3
^ anObject perform: self with: anObject2 with: anObject3! !

!UnicodeSymbol methodsFor: 'evaluating' stamp: 'len 11/5/2024 08:59:43'!
value: anObject value: anObject2 value: anObject3 value: anObject4
^ anObject perform: self with: anObject2 with: anObject3 with: anObject4! !

!UnicodeSymbol methodsFor: 'evaluating' stamp: 'len 11/5/2024 08:59:34'!
valueWithArguments: anArray
^ anArray first perform: self withArguments: anArray allButFirst! !


!Symbol methodsFor: 'evaluating' stamp: 'len 11/7/2024 08:45:52'!
value: anObject
^ anObject perform: self! !


!UnicodeSymbol methodsFor: 'evaluating' stamp: 'len 11/7/2024 08:46:09'!
value: anObject
^ anObject perform: self! !

0 comments on commit 1111440

Please sign in to comment.