Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/Containers-OrderedSet-Tests/CTOrderedSetTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,21 @@ CTOrderedSetTest >> testFourth [
self assert: actual equals: expected.
]

{ #category : #'collection tests' }
CTOrderedSetTest >> testCopyFromToOfOrderedSet [
"Allows one to create a copy of the receiver that contains elements from position start to end"

| t1 t2 t3 |
t1 := #(100 200 300 400) asOrderedSet .
t2 := t1 copyFrom: 1 to: 2.
self assert: t2 equals: #(100 200) asOrderedSet. "-> is Good ! "

t3 := t1 copyFrom: 4 to: 2.
self assertEmpty: t3. "Index 4 >2 -> return Empty "

self should: [ t1 copyFrom: 5 to: 7 ] raise: Error. "-> Index out Limit"
]

{ #category : #'collection tests' }
CTOrderedSetTest >> testIncludesAllFalse [
| set |
Expand Down