Pharo test defects

Package row 154: tomooda-viennatalk

State
Open: 1 test (a repair is written, not run)
Defect in
the package (cause not proven for each test)
Tests
1
Fix
tomooda-viennatalk.st
Upstream repository
tomooda/ViennaTalk

Summary

ViennaConstrainedType>>name takes the block source from printString; Pharo 14 BlockClosure>>printOn: prints '[ ] in Class>>selector'. Repair fixes/tomooda-viennatalk.st (name uses sourceNode sourceCode) is committed but NOT run.

Next step: scripts/vmrun.sh pkgs --redo <work directory> 154 154; expect 1430 of 1430.

Results

LoadStock Cogiospharo VM
oktests=1430 P=1429 F=1 E=0 S=0 T=0 X=0tests=1430 P=1429 F=1 E=0 S=0 T=0 X=0

Test

TestStock Cogiospharo VM
ViennaConstrainedTypeTest>>testNameFAILFAIL

Fix

Fixes file (filed in after the load): tomooda-viennatalk.st (download)
"tomooda/ViennaTalk: ViennaConstrainedTypeTest>>testName fails the same way on
the two VMs.  ViennaConstrainedType>>name builds the name of the type from
'invariant printString'.  In Pharo 14 BlockClosure>>printOn: prints
'[ ] in Class>>#selector', not the source of the block, so the name is
'int inv [ ] in ViennaConstrainedTypeTest>>#testName' and not
'int inv [ :i | i < 0 ]'.  The name is shown to the user as the text of the
type, so the code must use the source text.  The repair uses the source of the
AST node of the block (BlockClosure>>sourceNode, sourceCode) for a block, and
keeps printString for the other invariants (a Symbol such as #odd prints as
#odd, as before).  The test and its expected text stay as they are."

fix value: #ViennaConstrainedType value: #name
	value: [ :source | source includesSubstring: ''' inv '' , invariant printString' ]
	value:
'name
	| text |
	text := invariant isBlock
		ifTrue: [ invariant sourceNode sourceCode ]
		ifFalse: [ '''' ].
	^ basetype name , '' inv '' , (text isEmpty
		ifTrue: [ invariant printString ]
		ifFalse: [ text ])'.

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