Pharo test defects

Package: Buoy (ba-st/Buoy, row 10)

State
Fixed (package repair)
Defect in
see the record
Tests
0
Fix
ba-st-buoy.st, ba-st-buoy.patch
Upstream repository
ba-st/Buoy

The record is the text of the repair. The Results table is the last run of the row.

Record

Test

Load the package into a Pharo 14 image (build 791) with the load expression of the test run, file in the fixes file of the row if there is one, and run the test classes of the package.

"row 10"
Metacello new baseline: 'Buoy'; repository: 'github://ba-st/Buoy:release-candidate/source'; onConflict: [:e | e useIncoming]; load: #('default' 'CI').

Results

Last result of the package run (stock Cog and iospharo on the same image).

RowLabelLoadStock Cogiospharo VM
10ba-st-buoyoktests=616 P=616 F=0 E=0 S=0 T=0 X=0tests=616 P=616 F=0 E=0 S=0 T=0 X=0

Fix

Fixes file (filed in after the load): ba-st-buoy.st (download)
"Buoy (ba-st/Buoy, release-candidate): OrderedDictionaryExtensionsTest>>testEquals
is a copy of an old OrderedDictionaryTest>>testEquals of Pharo.  It fills two
dictionaries with the same associations in opposite orders and expects that
the two are equal ('For equality, order will not matter').

OrderedDictionary>>= of Pharo 14 compares indexOfKey: for each key, so the
order matters.  The test of Pharo 14 itself (OrderedDictionaryTest>>testEquals)
fills the two dictionaries in the same order.  The test of Buoy fails on stock
Cog and on our VM with 'Got an OrderedDictionary(...) instead of an
OrderedDictionary(...)'.

The repair: the two dictionaries get the associations in the same order, as in
the test of Pharo 14, and a third dictionary with the opposite order must not
be equal."

fix value: #OrderedDictionaryExtensionsTest value: #testEquals
	value: [ :source | source includesSubstring: 'with: self orderedAssociations reversed' ]
	value:
'testEquals
	| dictionaryOne dictionaryTwo dictionaryThree |

	dictionaryOne := self emptyDictionary.
	dictionaryTwo := self emptyDictionary.
	self
		assertDictionary: dictionaryOne
		equals: dictionaryTwo.

	"Pharo 14: the order of the associations matters for equality"
	self orderedAssociations
		with: self orderedAssociations
		do: [:firstAssociation :secondAssociation |
			dictionaryOne add: firstAssociation.
			dictionaryTwo add: secondAssociation.
			self
				assertDictionary: dictionaryOne
				doesNotEqual: self emptyDictionary.
			self
				assertDictionary: dictionaryTwo
				doesNotEqual: self emptyDictionary.
			self
				assertDictionary: dictionaryOne
				equals: dictionaryTwo].

	"The same associations in the opposite order are not equal"
	dictionaryThree := self emptyDictionary.
	self orderedAssociations reversed do: [:each | dictionaryThree add: each].
	self assert: dictionaryThree size equals: dictionaryOne size.
	self
		assertDictionary: dictionaryOne
		doesNotEqual: dictionaryThree.

	self
		assertDictionary: dictionaryOne
		equals: dictionaryTwo'.
Patch of the package source: ba-st-buoy.patch (download)
diff --git a/source/Buoy-Metaprogramming-Pharo-Extensions/Symbol.extension.st b/source/Buoy-Metaprogramming-Pharo-Extensions/Symbol.extension.st
deleted file mode 100644
index e652fd1..0000000
--- a/source/Buoy-Metaprogramming-Pharo-Extensions/Symbol.extension.st
+++ /dev/null
@@ -1,7 +0,0 @@
-Extension { #name : 'Symbol' }
-
-{ #category : '*Buoy-Metaprogramming-Pharo-Extensions' }
-Symbol >> argumentCount [
-
-	^self numArgs
-]
diff --git a/source/Buoy-Metaprogramming/KeywordMessageSendingCollector.class.st b/source/Buoy-Metaprogramming/KeywordMessageSendingCollector.class.st
index 5e9bbb1..e60779c 100644
--- a/source/Buoy-Metaprogramming/KeywordMessageSendingCollector.class.st
+++ b/source/Buoy-Metaprogramming/KeywordMessageSendingCollector.class.st
@@ -23,7 +23,7 @@ KeywordMessageSendingCollector class >> sendingAllMessagesBeginningWith: aPrefix
 KeywordMessageSendingCollector class >> sendingAllMessagesMatching: aFilterBlock to: aReceiver withAll: anArgumentCollection [
 
 	^ self new
-		initializeSendingAllMessagesMatching: [ :selector | selector argumentCount = anArgumentCollection size and: [ aFilterBlock value: selector ] ]
+		initializeSendingAllMessagesMatching: [ :selector | selector numArgs = anArgumentCollection size and: [ aFilterBlock value: selector ] ]
 		to: aReceiver
 		withAll: anArgumentCollection asArray
 ]
Version locks: ba-st-hyperspace.txt (download)
# Buoy replaces Symbol>>argumentCount of Pharo 14, and the load stops (docs/upstream/package-repairs.md).
Buoy ba-st-buoy
Version locks: ba-st-launchpad.txt (download)
# Buoy replaces Symbol>>argumentCount of Pharo 14, and the load stops (docs/upstream/package-repairs.md).
Buoy ba-st-buoy

State of 2026-11-20. Made from the test records of the iospharo project (a second Pharo VM). The fixes are proposals for review.