[prev in list] [next in list] [prev in thread] [next in thread] 

List:       squeak-dev
Subject:    [squeak-dev] The Trunk: KernelTests-ct.421.mcz
From:       commits () source ! squeak ! org
Date:       2024-02-26 14:58:13
Message-ID: 20240226145818.A645257E5BB () mail ! squeak ! org
[Download RAW message or body]

Christoph Thiede uploaded a new version of KernelTests to project The Trunk:
http://source.squeak.org/trunk/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.419 ===============

Item was added:
+ ----- Method: ContextTest>>testPrimitive188 (in category 'tests') -----
+ testPrimitive188
+ 
+ 	self testPrimitive188: [:receiver :args :compiledMethod |
+ 		receiver withArgs: args executeMethod: compiledMethod].
+ 	
+ 	self testPrimitive188: [:receiver :args :compiledMethod |
+ 		CompiledMethod receiver: receiver withArguments: args executeMethod: \
compiledMethod].!

Item was added:
+ ----- 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 added:
+ ----- 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]])].!


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic