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

commits at source.squeak.org commits at source.squeak.org
Mon Oct 24 17:17:43 UTC 2011


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

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

Name: Tests-nice.133
Author: nice
Time: 24 October 2011, 7:17:16.796 pm
UUID: a5694376-8adb-f749-91dd-ba749f1a7f54
Ancestors: Tests-eem.132

Add tests for binary selectors with vertical bar

=============== Diff against Tests-eem.132 ===============

Item was added:
+ ----- Method: CompilerTest>>testBinarySelectorWithBar (in category 'syntax') -----
+ testBinarySelectorWithBar
+ 	"Acknowledge the fact that $| is now allowed at any place in a binary selector"
+ 	
+ 	#(#'||' #'|||' #'|||++' #'<|>') do: [:selector | | source tree |
+ 		source := ('1 ' , selector , ' 2') readStream.
+ 		tree := (Compiler new)
+ 			from: source class: Object context: nil notifying: nil;
+ 			translate: source noPattern: true ifFail: [nil].
+ 		self assert: tree notNil.
+ 	
+ 		"Hem, this test is really ugly..."
+ 		self assert: tree block statements first expr selector key = selector].!

Item was added:
+ ----- Method: CompilerTest>>testEmptyTemporaries (in category 'syntax') -----
+ testEmptyTemporaries
+ 	self assert: (Compiler evaluate: '||') isNil!

Item was added:
+ ----- Method: CompilerTest>>testInvalidVerticalBarSelector (in category 'syntax') -----
+ testInvalidVerticalBarSelector
+ 	self should: [Compiler evaluate: '1 | | 2'] raise: SyntaxErrorNotification.
+ 	self should: [Compiler evaluate: '1 | - 2'] raise: SyntaxErrorNotification.!

Item was added:
+ ----- Method: CompilerTest>>testLocalTemporariesInABlock (in category 'syntax') -----
+ testLocalTemporariesInABlock
+ 	self assert: ((Compiler evaluate: '[:x|| tmp | tmp := x]') value: 2) = 2!




More information about the Squeak-dev mailing list