[squeak-dev] The Trunk: CollectionsTests-tpr.385.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Jan 16 00:17:16 UTC 2023


tim Rowledge uploaded a new version of CollectionsTests to project The Trunk:
http://source.squeak.org/trunk/CollectionsTests-tpr.385.mcz

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

Name: CollectionsTests-tpr.385
Author: tpr
Time: 15 January 2023, 4:17:14.743871 pm
UUID: 42e06142-047a-4ab1-bdbc-2a182868ffcf
Ancestors: CollectionsTests-pre.384

Correct variable shadowing in four tests

=============== Diff against CollectionsTests-pre.384 ===============

Item was changed:
  ----- Method: Ascii85ConverterTest>>testEncodeDecode (in category 'tests') -----
  testEncodeDecode
  
- 	| encoded |
  	encoded := (Ascii85Converter encode: self decoded) contents.
  	self 
  		assert: self encoded
  		equals: encoded
  		description: 'A simple text should be encodable.'.
  	self
  		assert: self decoded
  		equals: (Ascii85Converter decodeToChars: encoded) contents
  		description: 'The encoded text decoded should match the original'.
  !

Item was changed:
  ----- Method: StringTest>>testFindLiteral (in category 'tests - finding') -----
  testFindLiteral
  
  	#(
  		nil '' "empty string"
  		nil '"Comment."' "comment literal"
  				
  		42 '42' "integer literal"
  		2r1001 '2r1001'
  		-42 '-42' "negative integer literal"
  		-2r1001 '-2r1001'
  		
  		2.34 '2.34' "float literal"
  		2.34e2 '2.34e2'
  		2.34e-2 '2.34e-2'
  		
  		1e20 '1e20' "large positive integer"
  		-1e20 '-1e20' "large negative integer"
  		
  		#() '#()' "empty literal array"
  		#(a 5 'c') '#(a 5 ''c'')' "literal array"
  		
  		'Hello' '''Hello''' "string literal"
  		'drawOn:' 'drawOn:' "identifier or message send"
  		#drawOn: '#drawOn:' "symbol literal"
  
  		${ '{}' "opening bracket of empty object literal"
  		${ '{1. 2}' "opening bracket of empty object literal"
  		
  		42 '42 23' "first literal only"
  		
+ 	) pairsDo: [:literal :str |
+ 		self assert: (literal literalEqual: str findLiteral)].!
- 	) pairsDo: [:literal :string |
- 		self assert: (literal literalEqual: string findLiteral)].!

Item was changed:
  ----- Method: StringTest>>testFindSelector (in category 'tests - finding') -----
  testFindSelector
  
  	#(
  		#negated 'negated' "Simplest case."
  		#negated '#negated' "Ignore leading #"
  		#negated '   negated' "Ignore leading whitespace"
  
  		nil 'shouldnotexist42' "Do not intern new symbols."
  		nil '' "No empty symbols."
  
  		#copy 'self copy' "Ignore leading receiver."
  		#copyWithout: 'self copyWithout: 42' "Ignore leading receiver."
  		#negated 'self copy negated' "Choose last selector if several."
  	
  		#drawOn: 'drawOn:'
  		nil 'drawOn' "Do not add colons."
  		#drawOn: 'drawOn: aCanvas' "Ignore argument"
  		
  		#at:put: 'at: 42 put: nil' "Ignore arguments"
  		#at:put: 'at: #drawOn: put: 42' "Ignore colons in arguments."
  		#at:put: 'at:42 put:43' "Scarce whitepsace"
  		#at:put: 'at: ''key:'' put: nil' "Ignore : inside String literal"
  		#at:put: 'at: #(foo bar baz:) put:43' "handle literal array"
  		#at:put: 'at: $( put:$: asInteger' "Ignore : in Character literal"
  		
  		#ifTrue: 'ifTrue: [self open]'
  		#ifTrue:ifFalse: 'ifTrue: [] ifFalse: [self close]'
  		#ifNotEmpty: 'ifNotEmpty: [:all | all sum]'
  		
  		#+ '+'
  		#+ '1 +'
  		nil '+ 2'
  		nil '1 + 2'
  		
+ 	) pairsDo: [:selector :str |
+ 		self assert: selector equals: str findSelector].!
- 	) pairsDo: [:selector :string |
- 		self assert: selector equals: string findSelector].!

Item was changed:
  ----- Method: StringTest>>testFindSymbol (in category 'tests - finding') -----
  testFindSymbol
  
  	#(
  		#negated 'negated' "Simplest case."
  		#drawOn: 'drawOn:'
  		#String 'String' "class name or other global variables"
  
  		nil '#negated' "No string modification"
  		nil 'shouldnotexist42' "Do not intern new symbols."
  		nil '' "No empty symbols."
  		nil 'drawOn' "Do not add colons."
  		nil '#(a b c)'
  
  		"Ignore whitespace"
  		#negated '   negated'
  		#at:put: 'at: put: ' 
  		#+ '+  '
  		#** '*     *'		
+ 	) pairsDo: [:selector :str |
+ 		self assert: selector equals: str findSymbol].!
- 	) pairsDo: [:selector :string |
- 		self assert: selector equals: string findSymbol].!



More information about the Squeak-dev mailing list