The Inbox: Tests-ct.427.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Inbox: Tests-ct.427.mcz

commits-2
Christoph Thiede uploaded a new version of Tests to project The Inbox:
http://source.squeak.org/inbox/Tests-ct.427.mcz

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

Name: Tests-ct.427
Author: ct
Time: 10 February 2020, 11:36:42.870089 pm
UUID: 9735b8ac-1439-d14a-8e15-8e6ab7e403c4
Ancestors: Tests-mt.424

Tests block argument syntax. Complements Compiler-ct.417.

=============== Diff against Tests-mt.424 ===============

Item was changed:
  ----- Method: CompilerExceptionsTest>>testUndeclaredVariable (in category 'tests') -----
  testUndeclaredVariable
 
  self
  compiling: 'griffle ^ goo'
  shouldRaise: UndeclaredVariable;
  compiling: 'griffle ^ [ goo ] value'
+ shouldRaise: UndeclaredVariable !
- shouldRaise: UndeclaredVariable!

Item was added:
+ ----- Method: CompilerTest>>testBlockWithArgs (in category 'tests - syntax') -----
+ testBlockWithArgs
+
+ self assert: 0 equals: (Compiler evaluate: '[]') numArgs.
+ self assert: 1 equals: (Compiler evaluate: '[:foo |]') numArgs.
+ self assert: 2 equals: (Compiler evaluate: '[:foo :bar |]') numArgs.
+ self should: [Compiler evaluate: '[|]'] raise: SyntaxErrorNotification.
+ self should: [Compiler evaluate: '[:foo]'] raise: SyntaxErrorNotification.
+ self should: [Compiler evaluate: '[:foo :bar]'] raise: SyntaxErrorNotification.!