The Trunk: Tools-ul.758.mcz

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

The Trunk: Tools-ul.758.mcz

commits-2
Levente Uzonyi uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-ul.758.mcz

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

Name: Tools-ul.758
Author: ul
Time: 24 April 2017, 1:16:28.553014 pm
UUID: 48605681-865d-4eab-abd2-d8e5299d772d
Ancestors: Tools-eem.757

- rewrote senders of #clone to use #shallowCopy

=============== Diff against Tools-eem.757 ===============

Item was changed:
  ----- Method: MethodFinder>>testFromTuple: (in category 'initialize') -----
  testFromTuple: nth
  "verify that the methods allowed don't crash the system.  Try N of each of the fundamental types.  up to 4 of each kind."
 
  | objects nonRepeating even other aa cnt |
  objects := #((1 4 17 42) ($a $b $c $d) ('one' 'two' 'three' 'four')
  (x + rect: new) ((a b 1 4) (c 1 5) ($a 3 d) ()) (4.5 0.0 3.2 100.3)
  ).
 
  objects := objects, {{true. false. true. false}. {Point. SmallInteger. Association. Array}.
  {Point class. SmallInteger class. Association class. Array class}.
  "{ 4 blocks }."
  {Date today. '1 Jan 1950' asDate. '25 Aug 1987' asDate. '1 Jan 2000' asDate}.
  {'15:16' asTime. '1:56' asTime. '4:01' asTime. '6:23' asTime}.
  {Dictionary new. Dictionary new. Dictionary new. Dictionary new}.
  {#(a b 1 4) asOrderedCollection. #(c 1 5) asOrderedCollection.
  #($a 3 d) asOrderedCollection. #() asOrderedCollection}.
  {3 -> true. 5.6 -> $a. #x -> 2. 'abcd' -> false}.
  {9 @ 3 extent: 5 @ 4. 0 @ 0 extent: 45 @ 9. -3 @ -7 extent: 2 @ 2. 4 @ 4 extent: 16 @ 16}.
  {Color red.  Color blue. Color black. Color gray}}.
 
  self test2: objects.
  "rec+0, rec+1, rec+2, rec+3 need to be tested.  "
  cnt := 0.
  nth to: 4 do: [:take |
  nonRepeating := OrderedCollection new.
  objects do: [:each |
  nonRepeating addAll: (each copyFrom: 1 to: take)].
  "all combinations of take, from nonRepeating"
  even := true.
  nonRepeating combinations: take atATimeDo: [:tuple |
+ even ifTrue: [other := tuple shallowCopy]
- even ifTrue: [other := tuple clone]
  ifFalse: [self load: (aa := Array with: tuple with: 1 with: other with: 7).
  (cnt := cnt + 1) \\ 50 = 0 ifTrue: [
  Transcript cr; show: aa first printString].
  self search: true.
  self test2: aa.
  self test2: nonRepeating.
  "self test2: objects"].
  even := even not].
  ].!

Item was changed:
  ----- Method: SavedMultiWindowState>>addNewWindow (in category 'operations') -----
  addNewWindow
+ self addWindow: prototype shallowCopy!
- self addWindow: prototype clone!

Item was changed:
  ----- Method: SavedMultiWindowState>>on: (in category 'initialize-release') -----
  on: aModel
+ prototype := aModel shallowCopy.
- prototype := aModel clone.
  self addWindow: aModel!