[squeak-dev] The Trunk: Tests-nice.478.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Mar 10 09:50:26 UTC 2022


Nicolas Cellier uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-nice.478.mcz

==================== Summary ====================

Name: Tests-nice.478
Author: nice
Time: 10 March 2022, 10:50:22.837899 am
UUID: 254a0ef5-89bc-4144-b38d-e52912d08150
Ancestors: Tests-ct.477

Add a test for ecnoding/decoding of Character literals.

Related to https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/618

=============== Diff against Tests-ct.477 ===============

Item was added:
+ ----- Method: CompilerTest>>testCharacterLiteral (in category 'tests - literals') -----
+ testCharacterLiteral
+ 	#(0 65 16r80 16rFF 16r100 16r7FFF
+ 		16r8000 "bug https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/618"
+ 		16r10000
+ 		16r10FFFE "max unicode value - 1"
+ 		"Note: max unicode value cannot be encoded as a literal because it is used as the so called #DoIt character
+ 		which is used to mark the end of source stream in Smalltalk Parser")
+ 			do: [:code |
+ 			| literalValue |
+ 			literalValue := Compiler evaluate: (String with: $$ with: (Character value: code)).
+ 			self assert: literalValue isCharacter.
+ 			self assert: literalValue asInteger = code].!



More information about the Squeak-dev mailing list