[squeak-dev] The Inbox: KernelTests-ct.421.mcz
commits at source.squeak.org
commits at source.squeak.org
Sat Mar 12 00:40:01 UTC 2022
A new version of KernelTests was added to project The Inbox:
http://source.squeak.org/inbox/KernelTests-ct.421.mcz
==================== Summary ====================
Name: KernelTests-ct.421
Author: ct
Time: 12 March 2022, 1:39:59.553359 am
UUID: 3916242e-4ff0-0541-9da6-e876e740d0ad
Ancestors: KernelTests-ct.420
Tests handling of objects as methods (OaM) during simulation of Object>>#withArgs:executeMethod: and Object>>#with:...executeMethod:.
=============== Diff against KernelTests-ct.420 ===============
Item was changed:
----- Method: ContextTest>>testPrimitive188: (in category 'tests') -----
testPrimitive188: primitiveBlock
+ | block |
{
{2. {}. SmallInteger >> #even}. "valid 0-arg message"
{2. {1}. Integer >> #<<}. "valid unary message"
{2. {3. 4}. Integer >> #raisedTo:modulo:}. "valid binary message"
{2. 'not an array'. Integer >> #<<}. "invalid arguments"
{2. {'excess arg'}. SmallInteger >> #even}. "too many arguments"
{2. {}. Integer >> #<<}. "missing argument"
{2. {1}. 'not a method'}. "invalid method"
+ {block := [(primitiveBlock valueWithArguments: {2. {3. 4}. TestObjectForMethod new xxxMethod: thisContext homeMethod})
+ allButFirst "OaM selector is undefined behavior"]. {}. block class lookupSelector: #value} "object as method"
} do: [:args |
self
assert: ([primitiveBlock valueWithArguments: args] on: Error do: [:ex | ex messageText])
equals: (Context runSimulated: [[primitiveBlock valueWithArguments: args] on: Error do: [:ex | ex messageText]])].!
Item was changed:
----- Method: ContextTest>>testPrimitive189 (in category 'tests') -----
testPrimitive189
{
[2 executeMethod: SmallInteger >> #even]. "valid 0-arg message"
[2 with: 1 executeMethod: Integer >> #<<]. "valid unary message"
[2 with: 3 with: 4 executeMethod: Integer >> #raisedTo:modulo:]. "valid binary message"
[2 with: 1 executeMethod: Integer >> #even]. "too many arguments"
[2 executeMethod: Integer >> #<<]. "missing argument"
[2 with: 1 executeMethod: 'not a method']. "invalid method"
+ [(2 with: 3 with: 4 executeMethod: (TestObjectForMethod new xxxMethod: thisContext homeMethod))
+ allButFirst "OaM selector is undefined behavior"] "object as method"
} do: [:block |
self
assert: (block on: Error do: [:ex | ex messageText])
equals: (Context runSimulated: [block on: Error do: [:ex | ex messageText]])].!
More information about the Squeak-dev
mailing list
|