Marcel Taeumel uploaded a new version of TraitsTests to project The Trunk:
http://source.squeak.org/trunk/TraitsTests-mt.22.mcz
==================== Summary ====================
Name: TraitsTests-mt.22
Author: mt
Time: 2 September 2019, 6:30:30.686683 pm
UUID: 2fdfe490-2fb1-5c48-a171-9a3ef751aa72
Ancestors: TraitsTests-mt.21
Removes a hard-coded value to let the test pass again.
=============== Diff against TraitsTests-mt.21 ===============
Item was changed:
----- Method: TraitTest>>testPrinting (in category 'testing') -----
testPrinting
self assertPrints: self t6 definition
like: 'Trait named: #T6
uses: T1 + (T2 @ {#m22Alias->#m22})
+ category: ''', self categoryName, ''''!
- category: ''TraitsTests-Kernel'''!
Marcel Taeumel uploaded a new version of TraitsTests to project The Trunk:
http://source.squeak.org/trunk/TraitsTests-mt.21.mcz
==================== Summary ====================
Name: TraitsTests-mt.21
Author: mt
Time: 2 September 2019, 6:16:52.04089 pm
UUID: 4cf604e6-f6b1-bd4a-a2a7-8cdb84295f3b
Ancestors: TraitsTests-mt.20
Uses category name from resources object. Fixes a protocol. Comments a test that gave me the hint for that fix in SUnit-mt.116.
=============== Diff against TraitsTests-mt.20 ===============
Item was changed:
----- Method: TraitMethodDescriptionTest>>testArgumentNames (in category 'running') -----
testArgumentNames
+ "T5 combines both T1 and T2. For conflicting messages, T5 cannot know the correct argument names and thus falls back to a generic form 'arg1', 'arg2', etc."
+
self t1 compile: 'zork1: myArgument zork2: mySecondArgument ^true'.
self t2 compile: 'zork1: myArgument zork2: somethingElse ^false'.
+
self assert: ((self t5 sourceCodeAt: #zork1:zork2:) asString
beginsWith: 'zork1: arg1 zork2: arg2').
+
self t1 compile: 'zork1: myArgument zork2: mySecondArgument ^true'.
self t2 compile: 'zork1: somethingElse zork2: myArgument ^false'.
+
self assert: ((self t5 sourceCodeAt: #zork1:zork2:) asString
beginsWith: 'zork1: arg1 zork2: arg2')!
Item was changed:
----- Method: TraitsTestCase>>categoryName (in category 'running') -----
categoryName
+
+ ^ TraitsResource current categoryName!
- ^self class category!
Item was changed:
+ ----- Method: TraitsTestCase>>setUp (in category 'running') -----
- ----- Method: TraitsTestCase>>setUp (in category 'accessing') -----
setUp
super setUp.
self timeout: 90. "pre: This is necessary to account for the TraitsResrouce setup"
!
Marcel Taeumel uploaded a new version of SUnit to project The Trunk:
http://source.squeak.org/trunk/SUnit-mt.116.mcz
==================== Summary ====================
Name: SUnit-mt.116
Author: mt
Time: 2 September 2019, 6:14:45.31489 pm
UUID: 9009acd3-04d0-304e-8f97-9dd9eca62b27
Ancestors: SUnit-pre.115
Reset all test resources during system-wide clean up. While this *should* happen automatically during regular use of the test runner (see TestCase >> #debug), our trunk image has some outdated TraitsResource stuff, which affects the first run of tests.
=============== Diff against SUnit-pre.115 ===============
Item was added:
+ ----- Method: TestResource class>>cleanUp: (in category 'class initialization') -----
+ cleanUp: aggressive
+
+ aggressive ifTrue: [
+ self withAllSubclassesDo: [:cls | cls reset]].!
Marcel Taeumel uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-mt.1089.mcz
==================== Summary ====================
Name: System-mt.1089
Author: mt
Time: 2 September 2019, 4:27:00.273994 pm
UUID: c9c311b5-5625-ba44-90eb-ecfdc1216633
Ancestors: System-mt.1088
Adds some support for the empty symbol because some tests rely on it. Hmpf.
=============== Diff against System-mt.1088 ===============
Item was changed:
----- Method: SystemNavigation>>allSentMessagesWithout: (in category 'query') -----
allSentMessagesWithout: classesAndMessagesPair
"Answer the set of selectors which are sent somewhere in the system,
computed in the absence of the supplied classes and messages."
| sent absentClasses absentSelectors |
sent := IdentitySet new: CompiledMethod instanceCount.
absentClasses := classesAndMessagesPair first.
absentSelectors := classesAndMessagesPair second.
"sd 29/04/03"
Cursor execute showWhile: [
self environment allClassesAndTraitsDo: [:cls |
((absentClasses includes: cls)
ifTrue: [{}]
ifFalse: [{cls. cls classSide}])
do: [:each | (absentSelectors isEmpty
ifTrue: [each selectors]
ifFalse: [each selectors copyWithoutAll: absentSelectors])
do: [:sel | "Include all sels, but not if sent by self"
(each compiledMethodAt: sel) allLiteralsDo: [:m |
self flag: #dicuss. "mt: How to distinguish a symbol from a selector?"
+ (m isSymbol and: [m size > 0 and: [m first isLowercase]])
- (m isSymbol and: [m first isLowercase])
ifTrue: ["might be sent"
m == sel ifFalse: [sent add: m]].
]]]]].
"The following may be sent without being in any literal frame"
Smalltalk specialSelectorNames do: [:sel | sent add: sel].
Smalltalk presumedSentMessages do: [:sel | sent add: sel].
^ sent.!
Marcel Taeumel uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-mt.1088.mcz
==================== Summary ====================
Name: System-mt.1088
Author: mt
Time: 2 September 2019, 9:12:20.976272 am
UUID: 3e565c44-884e-0d47-b919-b0071d31f64c
Ancestors: System-mt.1087
Moves utility method from MenuItemMorph.
We should think about having more geometry classes such as Triangle. See: http://forum.world.st/Proposal-Geometry-Classes-td5093998.html
=============== Diff against System-mt.1087 ===============
Item was added:
+ ----- Method: Utilities class>>triangle:containsPoint: (in category 'geometry testing') -----
+ triangle: points containsPoint: p
+ " Computes if p is in the triangle defined by points.
+ p should be a Point, and points should be an array with three Points.
+ I took the algorithm from the bottom of this page:
+ http://www.blackpawn.com/texts/pointinpoly/default.html "
+
+ | a b c v0 v1 v2 dot00 dot01 dot02 dot11 dot12 denom invDenom u v |
+ a := points first.
+ b := points second.
+ c := points third.
+ " Compute vectors "
+ v0 := c - a.
+ v1 := b - a.
+ v2 := p - a.
+ " Compute dot products "
+ dot00 := v0 dotProduct: v0.
+ dot01 := v0 dotProduct: v1.
+ dot02 := v0 dotProduct: v2.
+ dot11 := v1 dotProduct: v1.
+ dot12 := v1 dotProduct: v2.
+ " Compute barycentric coordinates "
+ denom := dot00 * dot11 - (dot01 * dot01).
+ denom = 0 ifTrue: [ ^false ].
+ invDenom := 1 / denom.
+ u := (dot11 * dot02 - (dot01 * dot12)) * invDenom.
+ v := (dot00 * dot12 - (dot01 * dot02)) * invDenom.
+ " Check if point is in triangle "
+ ^u >= 0 and: [ v >= 0 and: [ u + v <= 1 ] ]!