diff --git a/source/Buoy-Collections-Tests/OrderedSetTest.class.st b/source/Buoy-Collections-Tests/OrderedSetTest.class.st index 3257626..4f3098e 100644 --- a/source/Buoy-Collections-Tests/OrderedSetTest.class.st +++ b/source/Buoy-Collections-Tests/OrderedSetTest.class.st @@ -466,7 +466,7 @@ OrderedSetTest >> testCopyReplaceFromToWithInsertingAtEnd [ original := self abcSet. - copy := original copyReplaceFrom: 4 to: 4 with: 'f'. + copy := original copyReplaceFrom: 4 to: 3 with: 'f'. self assert: copy size equals: 4; diff --git a/source/Buoy-Collections/OrderedSet.class.st b/source/Buoy-Collections/OrderedSet.class.st index 1923a98..cfb69ec 100644 --- a/source/Buoy-Collections/OrderedSet.class.st +++ b/source/Buoy-Collections/OrderedSet.class.st @@ -116,6 +116,15 @@ OrderedSet >> copyFrom: start to: stop [ ^ self species withAll: ( collection copyFrom: start to: stop ) ] +{ #category : #copying } +OrderedSet >> copyReplaceAll: oldSubCollection with: newSubCollection [ + + ^ self species withAll: + (collection + copyReplaceAll: oldSubCollection + with: newSubCollection) +] + { #category : #copying } OrderedSet >> copyReplaceFrom: start to: stop with: replacementCollection [ diff --git a/source/Buoy-SUnit-GS64-Extensions/TestAsserter.extension.st b/source/Buoy-SUnit-GS64-Extensions/TestAsserter.extension.st index d24ccdf..0e5c26f 100644 --- a/source/Buoy-SUnit-GS64-Extensions/TestAsserter.extension.st +++ b/source/Buoy-SUnit-GS64-Extensions/TestAsserter.extension.st @@ -55,7 +55,7 @@ TestAsserter >> should: aBlock raise: anException withExceptionDo: anotherBlock [ aBlock value. false] - sunitOn: anException + on: anException do: [:aSignal | anotherBlock value: aSignal. aSignal sunitExitWith: true].