Pharo test defects

Package row 138: moosetechnology-fast

State
Open: 2 tests (the first repair ran; a second draft is not in the repository)
Defect in
the package (cause not proven for each test)
Tests
2
Fix
moosetechnology-fast.st
Upstream repository
moosetechnology/FAST

Summary

Famix commit bcc80b10 removed the <derived> pragma from the fixture; the FAST tests are stale. A round-2 draft (<work directory>) forces isDerived: true in the two tests; its probe passes 57 of 57 on both VMs, but it is NOT in scripts/pkg-jit-test/fixes (the repo file is the round-1 one) and was not run as a full row.

Next step: Copy round2/moosetechnology-fast.st to scripts/pkg-jit-test/fixes/moosetechnology-fast.st, rerun row 138 with scripts/vmrun.sh pkgs --redo; give the FAST/Famix change upstream to the owner for review.

Results

LoadStock Cogiospharo VM
oktests=57 P=55 F=2 E=0 S=0 T=0 X=0tests=57 P=55 F=2 E=0 S=0 T=0 X=0

Test

TestStock Cogiospharo VM
FASTCopyVisitorCodeGeneratorTest>>testShouldCopyMultiValuedDerivedPropertyFAILFAIL
FASTCopyVisitorCodeGeneratorTest>>testShouldNotCopyMultivaluedDerivedPropertyFAILFAIL

Fix

Fixes file (filed in after the load): moosetechnology-fast.st (download)
"moosetechnology/FAST (v3): the package code and its tests call two selectors
of the old Moose API: Object>>mooseDescription and
ClassDescription>>asMooseDescription.  The Famix development branch moved to
metadescription and asMetadescription (package Moose-Query), and keeps the old
names only in the package Famix-Deprecated.  The baseline of FAST loads the
Famix groups that do not include Famix-Deprecated, so the old names do not
exist in the image: FamixModelComparator>>compareProperties:to: and five
tests of FASTCopyVisitorCodeGeneratorTest fail with doesNotUnderstand.  The
repair changes the six methods of FAST to the new names.  The class that
receives the message is a class (node1 class, FmxTraitsTest... class), so the
right message is asMetadescription (ClassDescription) and not metadescription
(Object>>metadescription would ask the class of the class)."

fix value: #FamixModelComparator value: #compareProperties:to:
	value: [ :source | source includesSubstring: 'mooseDescription' ]
	value:
'compareProperties: node1 to: node2
	"compare the values of the ''properties'' (attributes with primitive types) of the two nodes
	 since the two nodes should be the same class, they have the same properties"

	(node1 class asMetadescription allPrimitiveProperties)
		select: [ :property | self propertyToCompare: property ]
		thenDo:  [ :property || value1 value2 |
			value1 := node1 perform: property implementingSelector.
			value2 := node2 perform: property implementingSelector.

			(value1 = value2) ifFalse: [
			self ast: node1 differ: node2 property: property
		]
	]
'.

fix value: #FASTCopyVisitorCodeGeneratorTest value: #testShouldCopyMultiValuedDerivedProperty
	value: [ :source | source includesSubstring: 'asMooseDescription' ]
	value:
'testShouldCopyMultiValuedDerivedProperty
	| property |

	property := FmxTraitsTestGenerateAccessorBClassB asMetadescription
		allProperties detect: [ :prop | prop name = ''relationToA'' ].

	self assert: property isDerived.
	self assert: (generator shouldCopyProperty: property)'.

fix value: #FASTCopyVisitorCodeGeneratorTest value: #testShouldCopyNotMultiValuedProperty
	value: [ :source | source includesSubstring: 'asMooseDescription' ]
	value:
'testShouldCopyNotMultiValuedProperty
	| property |

	property := FmxTraitsTestGenerateAccessorBClassB asMetadescription
		allProperties detect: [ :prop | prop name = ''relationToA'' ].

	self deny: property isMultivalued.
	self assert: (generator shouldCopyProperty: property)'.

fix value: #FASTCopyVisitorCodeGeneratorTest value: #testShouldCopyPropertyToOtherEntity
	value: [ :source | source includesSubstring: 'asMooseDescription' ]
	value:
'testShouldCopyPropertyToOtherEntity
	| property |

	property := FmxTraitsTestGenerateAccessorBClassA asMetadescription
		allProperties detect: [ :prop | prop name = ''relationToB'' ].

	self assert: (generator shouldCopyProperty: property)'.

fix value: #FASTCopyVisitorCodeGeneratorTest value: #testShouldNotCopyMultivaluedDerivedProperty
	value: [ :source | source includesSubstring: 'asMooseDescription' ]
	value:
'testShouldNotCopyMultivaluedDerivedProperty
	| property |

	property := FmxTraitsTestGenerateAccessorBClassB asMetadescription
		allProperties detect: [ :prop | prop name = ''relationToA'' ].

	"forcing it to be multivalued"
	property isMultivalued: true.
	[
		self assert: property isMultivalued.
		self deny: (generator shouldCopyProperty: property)
	]
	ensure: [ property isMultivalued: false ]'.

fix value: #FASTCopyVisitorCodeGeneratorTest value: #testShouldNotCopyPropertyParent
	value: [ :source | source includesSubstring: 'asMooseDescription' ]
	value:
'testShouldNotCopyPropertyParent
	"property pointing to parent should not be copied"
	| property |

	property := FmxTraitsTestGenerateAccessorBClassA asMetadescription
		allProperties detect: [ :prop | prop name = ''relationToB'' ].

	"forcing it to be to parent"
	property isContainer: true.
	[ self assert: property isContainer.
	  self deny: (generator shouldCopyProperty: property)
	]
	ensure: [ property isContainer: false ]'.

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