Skip to content

Commit

Permalink
update test method
Browse files Browse the repository at this point in the history
  • Loading branch information
akevalion committed Oct 10, 2023
1 parent cddccdb commit dc6312d
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/Roassal-Layouts-Tests/RSLayoutTestCase.class.st
Expand Up @@ -6,9 +6,8 @@ Class {

{ #category : #asserting }
RSLayoutTestCase >> assertIntegerPosition: aGroupOfShapes equals: anArray [
| block |
block := [ :a :b | a x = b x ifTrue: [ a y < b y ] ifFalse: [ a x < b x ] ].
self
assert: ((aGroupOfShapes collect: [ :each | each position asIntegerPoint ] as: Array) sortedAs: block )
equals: (anArray sortedAs: block)
| col |
col := aGroupOfShapes collect: [ :each | each position asIntegerPoint ] as: Array.
self assert: col size equals: anArray size.
col do: [ :each | self assert: (anArray includes: each) ]
]

0 comments on commit dc6312d

Please sign in to comment.