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

commits at source.squeak.org commits at source.squeak.org
Sat Mar 6 21:48:30 UTC 2010


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

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

Name: Tests-nice.56
Author: nice
Time: 6 March 2010, 10:48:18.727 pm
UUID: 01546a30-20fb-854c-aa0f-ecbeea534c00
Ancestors: Tests-nice.55

Add two tests reflecting new features:
- selector @- allowed
- expression (-  2) forbidden

=============== Diff against Tests-nice.55 ===============

Item was added:
+ ----- Method: CompilerTest>>testBinarySelectorWithMinus (in category 'syntax') -----
+ testBinarySelectorWithMinus
+ 	"Acknowledge the fact that $- is now allowed at any place in a binary selector"
+ 	
+ 	| source tree |
+ 	source := '1 @- 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 = #'@-'.!

Item was added:
+ ----- Method: CompilerTest>>testNegativeNumbers (in category 'syntax') -----
+ testNegativeNumbers
+ 	"Acknowledge the fact that (-  2) which was accepted up to Squeak 3.10 is not valid anymore"
+ 	
+ 	self assert: (Compiler evaluate: '-2') = 2 negated.
+ 	self should: [Compiler evaluate: '-  2'] raise: SyntaxErrorNotification description: 'A negative number literal shall not include any separator'!




More information about the Squeak-dev mailing list