The Trunk: CollectionsTests-nice.351.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.351.mcz

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

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

Name: CollectionsTests-nice.351
Author: nice
Time: 3 March 2021, 2:18:59.33262 am
UUID: b5730ca8-f82f-3c44-af32-6b067a27d017
Ancestors: CollectionsTests-dtl.350

Change the expectations w.r.t. Interval fuzzy inclusion.
Include a couple of tests taken from https://github.com/dolphinsmalltalk/Dolphin/issues/1108
Revise the expectedFailures, some turned into unexpected success!

=============== Diff against CollectionsTests-dtl.350 ===============

Item was changed:
  ----- Method: IntervalTest>>expectedFailures (in category 'failures') -----
  expectedFailures
 
+ ^ #(testIntervalOfFloatEqual)!
- ^ #(testIntervalOfFloatLast testIntervalOfFloatReversed testSurprisingFuzzyInclusionBehavior)!

Item was added:
+ ----- Method: IntervalTest>>testElementOutOfBound (in category 'tests') -----
+ testElementOutOfBound
+ self deny: ((1/5 to: 1.2 by: 1) anySatisfy: [:e | e > 1.2]).!

Item was added:
+ ----- Method: IntervalTest>>testIncludesBound (in category 'tests') -----
+ testIncludesBound
+ "This interval is crafted for including 1.2
+ but a careless definition of size might exclude this bound"
+ self assert: (((0.3 to: 1.2 by: 0.1) includes: 1.2) ==> [(0.3 to: 1.2 by: 0.1) anySatisfy: [:each | each = 1.2]]).!

Item was changed:
  ----- Method: IntervalTest>>testInclusionBug6455 (in category 'tests') -----
  testInclusionBug6455
+ "This test is about mantis bug http://bugs.squeak.org/view.php?id=6455.
+ Well it's not a bug, and not a good feature.
+ See testSurprisingFuzzyInclusion for why this feature is not a good idea"
- "This test is about mantis bug http://bugs.squeak.org/view.php?id=6455
- It should work as long as Fuzzy inclusion test feature for Interval of Float is maintained.
- This is a case when tested element is near ones of actual value, but by default.
- Code used to work only in the case of close numbers by excess..."
 
+ self deny: ((0.2 to: 0.6 by: 0.1) includes: 0.3) description: 'Strict Float equality expecation is too high'.
+ self assert: ((0.2 to: 0.6 by: 0.1) includes: 0.3 successor) description: 'it includes a slightly different number'!
- self assert: ((0 to: Float pi by: Float pi / 100) includes: Float pi * (3/100))!

Item was changed:
  ----- Method: IntervalTest>>testIndexOfBug6455 (in category 'tests') -----
  testIndexOfBug6455
  "This test is about mantis bug http://bugs.squeak.org/view.php?id=6455
+ Well it's not a bug, and not a good feature.
+ See testSurprisingFuzzyInclusion for why this feature is not a good idea"
- It should work as long as Fuzzy inclusion test feature for Interval of Float is maintained.
- This is a case when tested element is near ones of actual value, but by default.
- Code used to work only in the case of close numbers by excess..."
 
+ self deny: ((0.2 to: 0.6 by: 0.1) indexOf: 0.3) = 2 description: 'Strict Float equality expecation is too high'.
+ self assert: ((0.2 to: 0.6 by: 0.1) indexOf: 0.3 successor) = 2 description: 'it includes a slightly different number'!
- self assert: ((0 to: Float pi by: Float pi / 100) indexOf: Float pi * (3/100)) = 4!