The Trunk: CollectionsTests-nice.301.mcz

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

The Trunk: CollectionsTests-nice.301.mcz

commits-2
Nicolas Cellier uploaded a new version of CollectionsTests to project The Trunk:
http://source.squeak.org/trunk/CollectionsTests-nice.301.mcz

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

Name: CollectionsTests-nice.301
Author: nice
Time: 12 February 2019, 11:58:26.442479 pm
UUID: 503ca5fe-4b0e-451e-bdc6-f60410d5eb95
Ancestors: CollectionsTests-mt.300

Fix the Interval and RunArray tests now that they are not equal to themselves asArray.

=============== Diff against CollectionsTests-mt.300 ===============

Item was changed:
  ----- Method: IntervalTest>>testEquals (in category 'tests') -----
  testEquals
 
+ self deny: (3 to: 5) = #(3 4 5).
- self assert: #(3 4 5) equals: (3 to: 5).
  self deny: (3 to: 5) = #(3 5).
  self deny: (3 to: 5) = #().
 
+ self deny: #(3 4 5) = (3 to: 5).
- self assert: (3 to: 5) equals: #(3 4 5).
  self deny: #(3 5) = (3 to: 5).
  self deny: #() = (3 to: 5).!

Item was removed:
- ----- Method: IntervalTest>>testEquals2 (in category 'tests') -----
- testEquals2
-
- self assert: (3 to: 5) = #(3 4 5).
- self deny: (3 to: 5) = #(3 5).
- self deny: (3 to: 5) = #().
-
- self assert: #(3 4 5) = (3 to: 5).
- self deny: #(3 5) = (3 to: 5).
- self deny: #() = (3 to: 5).!

Item was changed:
  ----- Method: IntervalTest>>testEquals4 (in category 'tests') -----
  testEquals4
 
+ self deny: (3 to: 5 by: 2) = #(3 5).
- self assert: (3 to: 5 by: 2) = #(3 5).
  self deny: (3 to: 5 by: 2) = #(3 4 5).
  self deny: (3 to: 5 by: 2) = #().
 
+ self deny: #(3 5) = (3 to: 5 by: 2).
- self assert: #(3 5) = (3 to: 5 by: 2).
  self deny: #(3 4 5) = (3 to: 5 by: 2).
  self deny: #() = (3 to: 5 by: 2).!

Item was removed:
- ----- Method: IntervalTest>>testHashBug3380 (in category 'tests') -----
- testHashBug3380
- "Array and Interval equate, but their hashes didn't.  Test that this is fixed.
- It is about mantis bug http://bugs.squeak.org/view.php?id=6455"
- | interval array |
- interval := (1 to: 3).
- array:= #(1 2 3).
- self assert: interval equals: array.
- self assert: interval hash equals: array hash.!

Item was changed:
  ----- Method: IntervalTest>>testInvalid (in category 'tests') -----
  testInvalid
  "empty, impossible ranges"
+ self assert: (1 to: 0) isEmpty.
+ self assert: (1 to: -1) isEmpty.
+ self assert: (-1 to: -2) isEmpty.
+ self assert: (1 to: 5 by: -1) isEmpty.
- self assert: (1 to: 0) = #().
- self assert: (1 to: -1) = #().
- self assert: (-1 to: -2) = #().
- self assert: (1 to: 5 by: -1) = #().
 
  "always contains only start value."
+ self assert: (1 to: 1) asArray = #(1).
+ self assert: (1 to: 5 by: 10) asArray = #(1).
+ self assert: (1 to: 0 by: -2) asArray = #(1).
- self assert: (1 to: 1) = #(1).
- self assert: (1 to: 5 by: 10) = #(1).
- self assert: (1 to: 0 by: -2) = #(1).
  !

Item was changed:
  ----- Method: RunArrayTest>>testAtPut (in category 'tests - accessing') -----
  testAtPut
  "self debug: #testAtPut"
  | array |
  array := RunArray new: 5 withAll: 2.
 
  array at: 3 put: 5.
+ self assert: array asArray = #(2 2 5 2 2).
- self assert: array = #(2 2 5 2 2).
 
  array at: 1 put: 1.
+ self assert: array asArray = #(1 2 5 2 2).!
- self assert: array = #(1 2 5 2 2).!

Item was changed:
  ----- Method: RunArrayTest>>testNewFrom (in category 'tests - instance creation') -----
  testNewFrom
  "self debug: #testNewFrom"
  | array |
  array := RunArray newFrom: #($a $b $b $b $b $c $c $a).
  self assert: array size = 8.
+ self assert: array asArray = #($a $b $b $b $b $c $c $a).!
- self assert: array = #($a $b $b $b $b $c $c $a).!

Item was changed:
  ----- Method: RunArrayTest>>testNewWithAll (in category 'tests - instance creation') -----
  testNewWithAll
  "self debug: #testNewWithAll"
  | array |
  array := RunArray new: 5 withAll: 2.
  self assert: array size = 5.
+ self assert: array asArray = #(2 2 2 2 2)!
- self assert: array = #(2 2 2 2 2)!

Item was changed:
  ----- Method: RunArrayTest>>testRunsValues (in category 'tests - instance creation') -----
  testRunsValues
  "self debug: #testRunsValues"
  | array |
  array := RunArray runs: #(1 4 2 1) values: #($a $b $c $a).
  self assert: array size = 8.
+ self assert: array asArray = #($a $b $b $b $b $c $c $a).!
- self assert: array = #($a $b $b $b $b $c $c $a).!