The Inbox: CollectionsTests-ct.358.mcz

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

The Inbox: CollectionsTests-ct.358.mcz

commits-2
A new version of CollectionsTests was added to project The Inbox:
http://source.squeak.org/inbox/CollectionsTests-ct.358.mcz

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

Name: CollectionsTests-ct.358
Author: ct
Time: 10 June 2021, 8:46:05.348588 pm
UUID: 38a6fe79-5645-2b44-bc79-952cd4cac3e3
Ancestors: CollectionsTests-nice.354

Tests Collections-ct.947.

=============== Diff against CollectionsTests-nice.354 ===============

Item was added:
+ ----- Method: SortFunctionTest>>testCompareSortBlock (in category 'tests') -----
+ testCompareSortBlock
+
+ | function block |
+ block := [:a :b | a x <= b x and: [a y >= b y]].
+ function := block asCompareSortFunction.
+
+ self assert: (function value: 1 @ 1 value: 1 @ 1).
+ self assert: (function value: 0 @ 1 value: 1 @ 1).
+ self assert: (function value: 1 @ 2 value: 1 @ 1).
+ self deny: (function value: 2 @ 1 value: 1 @ 1).
+ self deny: (function value: 1 @ 2 value: 0 @ 1).!

Item was added:
+ ----- Method: SortFunctionTest>>testCompareSortSymbol (in category 'tests') -----
+ testCompareSortSymbol
+
+ | function symbol |
+ symbol := #compareSafely:.
+ function := symbol asCompareSortFunction.
+
+ self assert: (function value: true value: nil).
+ self deny: (function value: nil value: true).
+ self assert: (function value: Object new value: true).
+ self deny: (function value: true value: Object new).
+ self assert: (function value: Object new value: nil).
+ self deny: (function value: nil value: Object new).!